<?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: problems deleting an application access-layer via API in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/problems-deleting-an-application-access-layer-via-API/m-p/30909#M1871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To summarize:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I actually found out that the layer is used by the&amp;nbsp;Policy Package itself in cpm.elg:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;02/10/18 14:15:18,667 ERROR coresvc.internal.ObjectCrudSvcImpl [qtp185018416-250140]: ObjectDeletionException with objId = f81dc4aa-43df-4f84-b9c5-65fc1f2e76ad, objName = Access-Layer Name, reason = it is used by the following object(s):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Policy Package objid:[8796dc52-0ac6-4611-b0bc-e05bd41a3a9b] (field:layers)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The where-used should of worked as well, but let's put that aside.&lt;/P&gt;&lt;P&gt;We basically need to remove the layer from the policy package first, before we try to remove it completely:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;[Expert@R80.10:0]# mgmt_cli -r true -d&amp;nbsp;IP/Domain set package name "Package Name" access-layers.remove.1 "Acess-Layer Name"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Now after we removed the access-layer from the package we can remove it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;[Expert@R80.10:0]# mgmt_cli -r true -d IP/Domain delete access-layer name "Access-Layer Name"&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Oct 2018 09:26:37 GMT</pubDate>
    <dc:creator>Sergey_Aliev</dc:creator>
    <dc:date>2018-10-03T09:26:37Z</dc:date>
    <item>
      <title>problems deleting an application access-layer via API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/problems-deleting-an-application-access-layer-via-API/m-p/30906#M1868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have mulitple policy packages that have a security layer and a application layer. The application layer appeared after importing from migrate import from R77, i do not want it. I would like to remove this layer from all these policy packages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The application layer has only 1 rule&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Any -&amp;gt; Internet -&amp;gt; accept -&amp;gt; detailed log :accounting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought i would just be able to delete the layer from the API. It deletes perfectly from the SmartConsole. I have tried&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;deleting the application access layer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mgmt_cli -r true -d Mgmt1 delete access-layer uid "12345678-abcd-4710-a798-12345609f989"&lt;BR /&gt;code: "generic_err_object_deletion"&lt;BR /&gt;message: "Object MyPolicy Application could not be deleted because it is referenced by other objects, run where-used command for details"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have verified that I have the correct id for the application layer, using show object uid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mgmt_cli -r true -d Mgmt1 where-used uid "12345678-abcd-4710-a798-12345609f989"&lt;BR /&gt;code: "generic_err_object_not_found"&lt;BR /&gt;message: "Requested object [12345678-805c-4710-a798-12345609f989] not found"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where used doesnt work on this object, ok expected i think.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I tried to delete the 1 rule from the application access layer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mgmt_cli -r true -d Mgmt1 delete access-rule layer "12345678-abcd-4710-a798-12345609f989" rule-number 1 --format json&lt;BR /&gt;{&lt;BR /&gt; "code" : "generic_error",&lt;BR /&gt; "message" : "Runtime error: Cannot delete the only child of the rulebase."&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So , can i delete this using the API, what am i missing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2018 10:25:45 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/problems-deleting-an-application-access-layer-via-API/m-p/30906#M1868</guid>
      <dc:creator>Richard_Carson</dc:creator>
      <dc:date>2018-09-28T10:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: problems deleting an application access-layer via API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/problems-deleting-an-application-access-layer-via-API/m-p/30907#M1869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to delete it from the API.&lt;/P&gt;&lt;P&gt;I would open a TAC ticket so we can troubleshoot what's going on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2018 17:36:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/problems-deleting-an-application-access-layer-via-API/m-p/30907#M1869</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-09-28T17:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: problems deleting an application access-layer via API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/problems-deleting-an-application-access-layer-via-API/m-p/30908#M1870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I tested this and got the same error... I&amp;nbsp;had a shared inline layer, which I was only able to delete from the SmartConsole, but not by using API. API tells that the object is in use. However, I can delete it without any warnings from SmartConsole. If it was really in use I would expect of getting the same error message in SmartConsole.&lt;/P&gt;&lt;P&gt;I'm using R80.20.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2018 00:47:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/problems-deleting-an-application-access-layer-via-API/m-p/30908#M1870</guid>
      <dc:creator>Lari_Luoma</dc:creator>
      <dc:date>2018-10-02T00:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: problems deleting an application access-layer via API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/problems-deleting-an-application-access-layer-via-API/m-p/30909#M1871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To summarize:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I actually found out that the layer is used by the&amp;nbsp;Policy Package itself in cpm.elg:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;02/10/18 14:15:18,667 ERROR coresvc.internal.ObjectCrudSvcImpl [qtp185018416-250140]: ObjectDeletionException with objId = f81dc4aa-43df-4f84-b9c5-65fc1f2e76ad, objName = Access-Layer Name, reason = it is used by the following object(s):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Policy Package objid:[8796dc52-0ac6-4611-b0bc-e05bd41a3a9b] (field:layers)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The where-used should of worked as well, but let's put that aside.&lt;/P&gt;&lt;P&gt;We basically need to remove the layer from the policy package first, before we try to remove it completely:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;[Expert@R80.10:0]# mgmt_cli -r true -d&amp;nbsp;IP/Domain set package name "Package Name" access-layers.remove.1 "Acess-Layer Name"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Now after we removed the access-layer from the package we can remove it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;[Expert@R80.10:0]# mgmt_cli -r true -d IP/Domain delete access-layer name "Access-Layer Name"&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2018 09:26:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/problems-deleting-an-application-access-layer-via-API/m-p/30909#M1871</guid>
      <dc:creator>Sergey_Aliev</dc:creator>
      <dc:date>2018-10-03T09:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: problems deleting an application access-layer via API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/problems-deleting-an-application-access-layer-via-API/m-p/30910#M1872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Sergey. I have tried this and confirmed that it works. I guess the GUI is calling some extra functions behind the scene to remove it from the policy package first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 follow ups i think!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. where used need to work - would have helped here&lt;/P&gt;&lt;P&gt;2. i think it would be useful to have something in the api documentation to suggest that you need to remove the layer from the package first , or perhaps the call should just do this as it does in the GUI?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2018 04:12:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/problems-deleting-an-application-access-layer-via-API/m-p/30910#M1872</guid>
      <dc:creator>Richard_Carson</dc:creator>
      <dc:date>2018-10-05T04:12:55Z</dc:date>
    </item>
  </channel>
</rss>

