<?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 Locked session on web api call in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Locked-session-on-web-api-call/m-p/157596#M7121</link>
    <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you are doing well.&lt;/P&gt;&lt;P&gt;I'm trying to use the add host method in the web api to create hosts into existing group.&lt;/P&gt;&lt;P&gt;I was able to run it using postman with the below body:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"name"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"xxxxx"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"ip-address"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"xxxxxxx"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"comments"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"xxxxxxx "&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"groups"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"xxxxxxx"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I got the response and then ran the publish method with the same X-chkp-sid, and i got task-id as a response.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The problem is when i go to the painel, the object is locked (Locked by other session).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;In the attached image you can see the message displayed for other users.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I was trying to follow this discussion but it's not helpful.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;A href="https://community.checkpoint.com/t5/API-CLI-Discussion/Best-way-to-handle-locked-session-locked-but-not-available-on/td-p/9467#" target="_blank" rel="noopener"&gt;https://community.checkpoint.com/t5/API-CLI-Discussion/Best-way-to-handle-locked-session-locked-but-not-available-on/td-p/9467#&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;How can i solve this problem?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks in adavance&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 20 Sep 2022 08:47:17 GMT</pubDate>
    <dc:creator>hermanmaleiane</dc:creator>
    <dc:date>2022-09-20T08:47:17Z</dc:date>
    <item>
      <title>Locked session on web api call</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Locked-session-on-web-api-call/m-p/157596#M7121</link>
      <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you are doing well.&lt;/P&gt;&lt;P&gt;I'm trying to use the add host method in the web api to create hosts into existing group.&lt;/P&gt;&lt;P&gt;I was able to run it using postman with the below body:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"name"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"xxxxx"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"ip-address"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"xxxxxxx"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"comments"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"xxxxxxx "&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"groups"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"xxxxxxx"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I got the response and then ran the publish method with the same X-chkp-sid, and i got task-id as a response.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The problem is when i go to the painel, the object is locked (Locked by other session).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;In the attached image you can see the message displayed for other users.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I was trying to follow this discussion but it's not helpful.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;A href="https://community.checkpoint.com/t5/API-CLI-Discussion/Best-way-to-handle-locked-session-locked-but-not-available-on/td-p/9467#" target="_blank" rel="noopener"&gt;https://community.checkpoint.com/t5/API-CLI-Discussion/Best-way-to-handle-locked-session-locked-but-not-available-on/td-p/9467#&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;How can i solve this problem?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks in adavance&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 20 Sep 2022 08:47:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Locked-session-on-web-api-call/m-p/157596#M7121</guid>
      <dc:creator>hermanmaleiane</dc:creator>
      <dc:date>2022-09-20T08:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Locked session on web api call</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Locked-session-on-web-api-call/m-p/157609#M7122</link>
      <description>&lt;P&gt;You also need to close the session after "publish" action, in other word, to log out&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 09:40:00 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Locked-session-on-web-api-call/m-p/157609#M7122</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2022-09-20T09:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Locked session on web api call</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Locked-session-on-web-api-call/m-p/157611#M7123</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/181"&gt;@_Val_&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;When i try a new request i got this error:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"code" : "generic_error",&lt;BR /&gt;"message" : "Action cannot be executed on object: N-DENY-XX due to: Object 'N-DENY-XX' is locked by another session."&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can i bypass this error. I need to brute force close this session&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 09:53:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Locked-session-on-web-api-call/m-p/157611#M7123</guid>
      <dc:creator>hermanmaleiane</dc:creator>
      <dc:date>2022-09-20T09:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Locked session on web api call</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Locked-session-on-web-api-call/m-p/157613#M7124</link>
      <description>&lt;P&gt;As said before, all previous sessions should be properly closed to unlock the object again. Clean your sessions, try again.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 10:03:13 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Locked-session-on-web-api-call/m-p/157613#M7124</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2022-09-20T10:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Locked session on web api call</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Locked-session-on-web-api-call/m-p/157637#M7125</link>
      <description>&lt;P&gt;On sessions view it appears disconnected.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="session.png" style="width: 999px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/17826i42981759A4300696/image-size/large?v=v2&amp;amp;px=999" role="button" title="session.png" alt="session.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 13:03:48 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Locked-session-on-web-api-call/m-p/157637#M7125</guid>
      <dc:creator>hermanmaleiane</dc:creator>
      <dc:date>2022-09-20T13:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: Locked session on web api call</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Locked-session-on-web-api-call/m-p/157656#M7126</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/181"&gt;@_Val_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Sorry for this.&lt;/P&gt;&lt;P&gt;I was able to run a command to discard all web_api sessions and i tried again to add host and add to specific group but i got the same result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This time i complete all the steps with logout method.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Response from add-host&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"uid": "XXXXXXX",&lt;BR /&gt;"name": "XXXXXXX",&lt;BR /&gt;"type": "host",&lt;BR /&gt;"domain": {&lt;BR /&gt;"uid": "XXXXXXX",&lt;BR /&gt;"name": "SMC User",&lt;BR /&gt;"domain-type": "domain"&lt;BR /&gt;},&lt;BR /&gt;"ipv4-address": "XXXXXXX",&lt;BR /&gt;"interfaces": [],&lt;BR /&gt;"nat-settings": {&lt;BR /&gt;"auto-rule": false&lt;BR /&gt;},&lt;BR /&gt;"groups": [&lt;BR /&gt;{&lt;BR /&gt;"uid": "XXXXXXX",&lt;BR /&gt;"name": "XXXXXXX",&lt;BR /&gt;"type": "group",&lt;BR /&gt;"domain": {&lt;BR /&gt;"uid": "XXXXXXX",&lt;BR /&gt;"name": "SMC User",&lt;BR /&gt;"domain-type": "domain"&lt;BR /&gt;},&lt;BR /&gt;"icon": "General/group",&lt;BR /&gt;"color": "slate blue"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"comments": "Imported from soar API",&lt;BR /&gt;"color": "black",&lt;BR /&gt;"icon": "Objects/host",&lt;BR /&gt;"tags": [],&lt;BR /&gt;"meta-info": {&lt;BR /&gt;"lock": "unlocked",&lt;BR /&gt;"validation-state": "ok",&lt;BR /&gt;"last-modify-time": {&lt;BR /&gt;"posix": 1663687538594,&lt;BR /&gt;"iso-8601": "2022-09-20T17:25+0200"&lt;BR /&gt;},&lt;BR /&gt;"last-modifier": "XXXXXXX",&lt;BR /&gt;"creation-time": {&lt;BR /&gt;"posix": 1663687538594,&lt;BR /&gt;"iso-8601": "2022-09-20T17:25+0200"&lt;BR /&gt;},&lt;BR /&gt;"creator": "XXXXXXX"&lt;BR /&gt;},&lt;BR /&gt;"read-only": true&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Response from publish&amp;nbsp;&lt;/P&gt;&lt;P&gt;"task-id": "01234567-89ab-cdef-9516-e10f427f328e"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Response from logout&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"message"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"OK"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Can you please help with this issue?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 15:37:56 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Locked-session-on-web-api-call/m-p/157656#M7126</guid>
      <dc:creator>hermanmaleiane</dc:creator>
      <dc:date>2022-09-20T15:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Locked session on web api call</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Locked-session-on-web-api-call/m-p/157890#M7134</link>
      <description>&lt;P&gt;This is very odd and should not happen. Please open a TAC case for this, it's the fastest way.&lt;/P&gt;
&lt;P&gt;I would also run a set of sample actions through mgmt_cli tool, to see if it has the same result.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 04:25:38 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Locked-session-on-web-api-call/m-p/157890#M7134</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2022-09-23T04:25:38Z</dc:date>
    </item>
  </channel>
</rss>

