<?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: API WebServices show-access-layer returning 404 Not Found in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-WebServices-show-access-layer-returning-404-Not-Found/m-p/102547#M5328</link>
    <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;not really. 200 is only the Postman http return status.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Yes. Other Web Service requests , for example show-host are working as expected. I'm pretty sure Postman and API are working as expected.&lt;/P&gt;&lt;P&gt;2. I get the UID from the mgmt_cli where the command show acces-layers returns the UIDs of my layers&lt;/P&gt;&lt;P&gt;3. I used name in show-acces-layer with same result.&lt;/P&gt;&lt;P&gt;4. I have not done the setup, as far as I know SMS. How can I be sure ? mgmt_cli show domains returns&amp;nbsp; nothing....&lt;/P&gt;&lt;P&gt;5. .... I've set value of show global-domain as domain parameter in the API login request. Same result as without.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;CC_one&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Nov 2020 19:42:22 GMT</pubDate>
    <dc:creator>CC_one</dc:creator>
    <dc:date>2020-11-18T19:42:22Z</dc:date>
    <item>
      <title>API WebServices show-access-layer returning 404 Not Found</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-WebServices-show-access-layer-returning-404-Not-Found/m-p/102486#M5326</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;when requesting show-access-layer via Postman collection I get a 404 Not Found .&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"code"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"generic_err_object_not_found"&lt;/SPAN&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;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"Requested&amp;nbsp;object&amp;nbsp;[883e9de5-7c9e-4779-8c4e-1a3b8c6aa007]&amp;nbsp;not&amp;nbsp;found"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When trying to show-access-layers I get Status 200 with empty result&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"access-layers"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&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;"total"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When running the same commands from SmartConsole Commandline I get a result showing layer or layers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;API Version is V1.5 Management Server R80.30.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I miss something ?&amp;nbsp; Any Ideas ?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 11:02:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-WebServices-show-access-layer-returning-404-Not-Found/m-p/102486#M5326</guid>
      <dc:creator>CC_one</dc:creator>
      <dc:date>2020-11-18T11:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: API WebServices show-access-layer returning 404 Not Found</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-WebServices-show-access-layer-returning-404-Not-Found/m-p/102527#M5327</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;It looks like you enabled the API for retrieving request from external sources since you get a 200 OK for&amp;nbsp;show-access-layers&lt;/P&gt;
&lt;P&gt;But you need to provide more information.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Are you using a postman collections from &lt;A title="Postman Collections (links to all available) and the basics" href="https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/Postman-Collections-links-to-all-available-and-the-basics/m-p/40923#M2785" target="_self"&gt;here&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;How did you get the UID for the show-access-layer and are you using the correct UID?&lt;/LI&gt;
&lt;LI&gt;Why are you not using name for show-access-layer?&lt;/LI&gt;
&lt;LI&gt;Are you logging in to a MDS or a SMS?&lt;/LI&gt;
&lt;LI&gt;If you are logging into a MDS are you providing a domain parameter when sending the API login request?&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Kind Regards&lt;BR /&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 16:17:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-WebServices-show-access-layer-returning-404-Not-Found/m-p/102527#M5327</guid>
      <dc:creator>Jim_Oqvist</dc:creator>
      <dc:date>2020-11-18T16:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: API WebServices show-access-layer returning 404 Not Found</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-WebServices-show-access-layer-returning-404-Not-Found/m-p/102547#M5328</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;not really. 200 is only the Postman http return status.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Yes. Other Web Service requests , for example show-host are working as expected. I'm pretty sure Postman and API are working as expected.&lt;/P&gt;&lt;P&gt;2. I get the UID from the mgmt_cli where the command show acces-layers returns the UIDs of my layers&lt;/P&gt;&lt;P&gt;3. I used name in show-acces-layer with same result.&lt;/P&gt;&lt;P&gt;4. I have not done the setup, as far as I know SMS. How can I be sure ? mgmt_cli show domains returns&amp;nbsp; nothing....&lt;/P&gt;&lt;P&gt;5. .... I've set value of show global-domain as domain parameter in the API login request. Same result as without.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;CC_one&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 19:42:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-WebServices-show-access-layer-returning-404-Not-Found/m-p/102547#M5328</guid>
      <dc:creator>CC_one</dc:creator>
      <dc:date>2020-11-18T19:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: API WebServices show-access-layer returning 404 Not Found</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-WebServices-show-access-layer-returning-404-Not-Found/m-p/102556#M5331</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;If you see this icon in the middle bottom of SmartConsole it means that you are connected to a domain management server in a MDS&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="domain.png" style="width: 211px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/9100iCD6EB225A3D4B872/image-size/large?v=v2&amp;amp;px=999" role="button" title="domain.png" alt="domain.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;and youre login payload should look like this in postman&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
  "user" : "aa",
  "password" : "aaaa",
  "domain" : "Domain Name"
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you just see this it means that you are connected to a SMS&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sms.png" style="width: 136px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/9101i9B5976C833689A7F/image-size/large?v=v2&amp;amp;px=999" role="button" title="sms.png" alt="sms.png" /&gt;&lt;/span&gt;&lt;BR /&gt;and your login payload should look like this in posman&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
  "user" : "aa",
  "password" : "aaaa"
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would help if you post the API requests and their payloads you are using in postman as well ass the command you used in the&amp;nbsp;mgmt_cli to get the UID.&lt;/P&gt;
&lt;P&gt;Kind Regards&lt;BR /&gt;Jim&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 23:15:21 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-WebServices-show-access-layer-returning-404-Not-Found/m-p/102556#M5331</guid>
      <dc:creator>Jim_Oqvist</dc:creator>
      <dc:date>2020-11-18T23:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: API WebServices show-access-layer returning 404 Not Found</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-WebServices-show-access-layer-returning-404-Not-Found/m-p/102768#M5332</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;I solved my Problem. It was lack of user rights. My API Webservices User is a read only user in contrast mgmt_cli user had more rights.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What confused me was the output, not stating there is a lack of user rights and returning nothing .&lt;/P&gt;&lt;P&gt;Thanks for help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CC_one&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 07:48:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-WebServices-show-access-layer-returning-404-Not-Found/m-p/102768#M5332</guid>
      <dc:creator>CC_one</dc:creator>
      <dc:date>2020-11-20T07:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: API WebServices show-access-layer returning 404 Not Found</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-WebServices-show-access-layer-returning-404-Not-Found/m-p/102782#M5333</link>
      <description>&lt;P&gt;Hi am glad to hear that your issue was resolved. But I am not sure I understand what caused it and what was the solution.&lt;/P&gt;
&lt;P&gt;Using a read only user you are able to list layers and see the content of the layer using the API.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is from mgmt_cli but it works in exactly the same way when using Postman.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Expert@sms69:0]# # add admin with Read Only permissions
[Expert@sms69:0]# mgmt_cli -r true -d "System Data" -f json add administrator name "ro_user" password "vpn123" must-change-password false authentication-method "check point password" permissions-profile "Read Only All"
{
  "uid" : "f69cfa69-93cc-40d0-aaf9-2a964291ebb1",
  "name" : "ro_user",
  "type" : "administrator",
  "domain" : {
    "uid" : "a0eebc99-afed-4ef8-bb6d-fedfedfedfed",
    "name" : "System Data",
    "domain-type" : "mds"
  },
  "email" : "",
  "phone-number" : "",
  "authentication-method" : "check point password",
  "must-change-password" : false,
  "permissions-profile" : {
    "uid" : "f4a23218-5bb9-4880-94bb-9c06b951f195",
    "name" : "Read Only All",
    "type" : "PermissionRole",
    "domain" : {
      "uid" : "a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
      "name" : "Check Point Data",
      "domain-type" : "data domain"
    }
  },
  "sic-name" : "",
  "comments" : "",
  "color" : "black",
  "icon" : "General/Administrator",
  "tags" : [ ],
  "meta-info" : {
    "lock" : "unlocked",
    "validation-state" : "ok",
    "last-modify-time" : {
      "posix" : 1605866490731,
      "iso-8601" : "2020-11-20T11:01+0100"
    },
    "last-modifier" : "WEB_API",
    "creation-time" : {
      "posix" : 1605866490731,
      "iso-8601" : "2020-11-20T11:01+0100"
    },
    "creator" : "WEB_API"
  },
  "read-only" : true
}


---------------------------------------------
Time: [11:01:32] 20/11/2020
---------------------------------------------
"Publish operation"  succeeded  (100%)
[Expert@sms69:0]# # Show access layers with Read Only permissions
[Expert@sms69:0]# mgmt_cli -u ro_user -p vpn123 show-access-layers
access-layers:
- uid: "63b7fe60-76d2-4287-bca5-21af87337b0a"
  name: "Network"
  type: "access-layer"
  domain:
    uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"
    name: "SMC User"
    domain-type: "domain"
from: 1
to: 1
total: 1

[Expert@sms69:0]# # Show access layer network with Read Only permissions
[Expert@sms69:0]# mgmt_cli -u ro_user -p vpn123 show-access-layer name Network
uid: "63b7fe60-76d2-4287-bca5-21af87337b0a"
name: "Network"
type: "access-layer"
domain:
  uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"
  name: "SMC User"
  domain-type: "domain"
shared: false
applications-and-url-filtering: false
content-awareness: false
mobile-access: false
firewall: true
implicit-cleanup-action: "drop"
comments: ""
color: "black"
icon: "ApplicationFirewall/rulebase"
tags: []
meta-info:
  lock: "unlocked"
  validation-state: "ok"
  last-modify-time:
    posix: 1579509785872
    iso-8601: "2020-01-20T09:43+0100"
  last-modifier: "System"
  creation-time:
    posix: 1579509785831
    iso-8601: "2020-01-20T09:43+0100"
  creator: "System"
read-only: false

[Expert@sms69:0]#&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind Regards&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 10:09:51 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-WebServices-show-access-layer-returning-404-Not-Found/m-p/102782#M5333</guid>
      <dc:creator>Jim_Oqvist</dc:creator>
      <dc:date>2020-11-20T10:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: API WebServices show-access-layer returning 404 Not Found</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-WebServices-show-access-layer-returning-404-Not-Found/m-p/102793#M5334</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Basically I had/have 2 User .&amp;nbsp; First is my admin User with Read/Write. I used this user for cli request with success.For all kind of requests.&lt;/P&gt;&lt;P&gt;Second user was/is a&amp;nbsp; User "api_user" with a custom permission-profile with read only. I Used "api_user" with Postman. It turned out my custom permission-profile lacks some permissions for example when reading layer information.&lt;/P&gt;&lt;P&gt;I changed&amp;nbsp;api_user's permission-profile to the build in "Read Only All" et voila I get layer Information via Postman and Webservices.&lt;/P&gt;&lt;P&gt;I'm afraid I wasted your Time &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; .... I made classical beginner failures.&lt;/P&gt;&lt;P&gt;1 Failure: Using 2 different User and awaiting same result&lt;/P&gt;&lt;P&gt;2 Failure: Not using build in permission-profile for first test&lt;/P&gt;&lt;P&gt;3 Failure: Awaiting a correct error . Something like " Not enough User Rights....."&amp;nbsp;would have given me a hint. Instead cp returned&amp;nbsp; "code": "generic_err_object_not_found",&lt;BR /&gt;&amp;nbsp;&amp;nbsp; "message": "Requested object [883e9de5-7c9e-4779-8c4e-1a3b8c6aa007] not found". Or even worse, returning an empty response and no failure at all.&amp;nbsp;In case of show-access-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layers this was the answer :"access-layers": [], "total": 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards CC_one&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 14:46:08 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-WebServices-show-access-layer-returning-404-Not-Found/m-p/102793#M5334</guid>
      <dc:creator>CC_one</dc:creator>
      <dc:date>2020-11-20T14:46:08Z</dc:date>
    </item>
  </channel>
</rss>

