<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get revisions by API or CLI for R80.40 in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-revisions-by-API-or-CLI-for-R80-40/m-p/106984#M5457</link>
    <description>&lt;P&gt;You can query sessions' UIDs with "show sessions":&amp;nbsp;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/?#cli/show-sessions~v1.6.1%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/?#cli/show-sessions~v1.6.1%20&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jan 2021 08:59:23 GMT</pubDate>
    <dc:creator>_Val_</dc:creator>
    <dc:date>2021-01-05T08:59:23Z</dc:date>
    <item>
      <title>How to get revisions by API or CLI for R80.40</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-revisions-by-API-or-CLI-for-R80-40/m-p/106968#M5456</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp; How can I get the revision information by API or CLI for R80.40, I want get revision uid as parameter for install-policy CLI&amp;nbsp;to simply rollback the policy installed on the gateway without reverting the database on the manager.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 06:09:32 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-revisions-by-API-or-CLI-for-R80-40/m-p/106968#M5456</guid>
      <dc:creator>Sam1</dc:creator>
      <dc:date>2021-01-05T06:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get revisions by API or CLI for R80.40</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-revisions-by-API-or-CLI-for-R80-40/m-p/106984#M5457</link>
      <description>&lt;P&gt;You can query sessions' UIDs with "show sessions":&amp;nbsp;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/?#cli/show-sessions~v1.6.1%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/?#cli/show-sessions~v1.6.1%20&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 08:59:23 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-revisions-by-API-or-CLI-for-R80-40/m-p/106984#M5457</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2021-01-05T08:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to get revisions by API or CLI for R80.40</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-revisions-by-API-or-CLI-for-R80-40/m-p/107175#M5459</link>
      <description>&lt;P&gt;Thank you very much for your reply, Do you mean that revision UID is actually the session UID?&lt;/P&gt;&lt;P&gt;Another question I would appreciate if you could answer, If call&amp;nbsp;&lt;SPAN&gt;revert-to-revision to revert to specific version&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it will roll back not only the database, but also the policy that last installed, right?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sam&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 06:52:00 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-revisions-by-API-or-CLI-for-R80-40/m-p/107175#M5459</guid>
      <dc:creator>Sam1</dc:creator>
      <dc:date>2021-01-07T06:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to get revisions by API or CLI for R80.40</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-revisions-by-API-or-CLI-for-R80-40/m-p/107248#M5460</link>
      <description>&lt;P&gt;Starting Management API version 1.6.1, you can use API call&amp;nbsp;&lt;STRONG&gt;show logs&lt;/STRONG&gt; and filter for date and&amp;nbsp;&lt;EM&gt;Operation&lt;/EM&gt; field for value&amp;nbsp;&lt;EM&gt;Publish&lt;/EM&gt; and get the Session ID from there. After that, use the API call&amp;nbsp;&lt;STRONG&gt;revert-to-revision&lt;/STRONG&gt; which was introduced in API version 1.6 to revert to that specific session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;# Query logs for operator Publish
# mgmt_cli -r true show logs new-query.type "audit" new-query.time-frame "yesterday" new-query.filter "operation:\"Publish\"" --format json | jq '.logs[] | { "Time": .time, "Publisher": .administrator, "Changes": .fieldschanges, "Session UID": .session_uid }'

# What are those changes for the Session UID
# mgmt_cli -r true show logs new-query.type "audit" new-query.time-frame "yesterday" new-query.filter "4a052f08-b4fa-44af-bd85-c273b7c18425" --format json | jq '.logs[] | {"Time": .time, "Subject":.subject, "Type": .objecttype, "Object": .objectname, "Operation": .operation, "Changes": .fieldschanges, "Description": .calc_desc}'

# Revert database to Session UID
# mgmt_cli -r true revert-to-revision to-session "29c3c03e-ae9d-4878-a02c-d16075219bf5" --format json&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will revert the database to the revision.&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Arturas Zalenekas&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 21:50:05 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-revisions-by-API-or-CLI-for-R80-40/m-p/107248#M5460</guid>
      <dc:creator>Art_Zalenekas</dc:creator>
      <dc:date>2021-01-07T21:50:05Z</dc:date>
    </item>
  </channel>
</rss>

