<?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 PCCE API limits not working for NON paginated endpoints in Prisma Cloud Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/pcce-api-limits-not-working-for-non-paginated-endpoints/m-p/471369#M464</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We are using Prisma Cloud Compute Edition (PCCE) on premise and we are inquiring the REST API endpoints to get data into Splunk.&lt;/P&gt;&lt;P&gt;Some endpoints are paginated, therefore we have implemented the logic described here and it is working fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://prisma.pan.dev/api/cloud/cwpp/21-04/api-limits" target="_blank" rel="noopener"&gt;https://prisma.pan.dev/api/cloud/cwpp/21-04/api-limits&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;https://&amp;lt;CONSOLE&amp;gt;/api/v1/images?limit=50&amp;amp;offset=X&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;The problem now comes with NON paginated endpoints, like /defenders/summary&lt;/P&gt;&lt;P&gt;In the official documentation we do not find any information if the endpoint is paginated or not. Furthermore if you pass the limit and offset to a NON paginated endpoint it always reply with the same results instead of providing an empty result (like it happen for paginated API). See here below an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example 1: Request without using paginated logics&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;There are only 4 results, and it works just fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;curl -k \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-u myuser:mypassword \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-H 'Content-Type: application/json' \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-X GET \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-g "&lt;A href="https://centralconsole.mydomain.net:8083/api/v1/defenders/summary?project=myProject" target="_blank" rel="noopener"&gt;https://centralconsole.mydomain.net:8083/api/v1/defenders/summary?project=myProject&lt;/A&gt;"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;[{"category":"container","connected":12,"deployed":12,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"host","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"serverless","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"appEmbedded","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example 2: Request using paginated logics&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;There are only 4 results, and it works just fine for the first request (limit=50, offset=0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;curl -k \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-u myuser:mypassword \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-H 'Content-Type: application/json' \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-X GET \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-g "&lt;A href="https://centralconsole.mydomain.net:8083/api/v1/defenders/summary?project=myProject&amp;amp;limit=50&amp;amp;offset=0" target="_blank" rel="noopener"&gt;https://centralconsole.mydomain.net:8083/api/v1/defenders/summary?project=myProject&amp;amp;limit=50&amp;amp;offset=0&lt;/A&gt;"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;[{"category":"container","connected":12,"deployed":12,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"host","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"serverless","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"appEmbedded","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now the second request (limit=50, offset=50) should reply with no results because&amp;nbsp;offset is greater than the available results.&lt;/P&gt;&lt;P&gt;Instead it always give 4 results, we think this is wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;curl -k \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-u myuser:mypassword \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-H 'Content-Type: application/json' \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-X GET \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-g "&lt;A href="https://centralconsole.mydomain.net:8083/api/v1/defenders/summary?project=myProject&amp;amp;limit=50&amp;amp;offset=50" target="_blank" rel="noopener"&gt;https://centralconsole.mydomain.net:8083/api/v1/defenders/summary?project=myProject&amp;amp;limit=50&amp;amp;offset=50&lt;/A&gt;"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;[{"category":"container","connected":12,"deployed":12,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"host","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"serverless","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"appEmbedded","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We think this behavior should be corrected OR (but this is a worse solution) in the documentation it should be indicated if the endpoint support paginated/non paginated responses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;LI-PRODUCT title="Prisma Cloud" id="Prisma_Cloud"&gt;&lt;/LI-PRODUCT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;Edoardo&lt;/P&gt;</description>
    <pubDate>Tue, 08 Mar 2022 15:54:37 GMT</pubDate>
    <dc:creator>edoardo.vicendone</dc:creator>
    <dc:date>2022-03-08T15:54:37Z</dc:date>
    <item>
      <title>PCCE API limits not working for NON paginated endpoints</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/pcce-api-limits-not-working-for-non-paginated-endpoints/m-p/471369#M464</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We are using Prisma Cloud Compute Edition (PCCE) on premise and we are inquiring the REST API endpoints to get data into Splunk.&lt;/P&gt;&lt;P&gt;Some endpoints are paginated, therefore we have implemented the logic described here and it is working fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://prisma.pan.dev/api/cloud/cwpp/21-04/api-limits" target="_blank" rel="noopener"&gt;https://prisma.pan.dev/api/cloud/cwpp/21-04/api-limits&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;https://&amp;lt;CONSOLE&amp;gt;/api/v1/images?limit=50&amp;amp;offset=X&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;The problem now comes with NON paginated endpoints, like /defenders/summary&lt;/P&gt;&lt;P&gt;In the official documentation we do not find any information if the endpoint is paginated or not. Furthermore if you pass the limit and offset to a NON paginated endpoint it always reply with the same results instead of providing an empty result (like it happen for paginated API). See here below an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example 1: Request without using paginated logics&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;There are only 4 results, and it works just fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;curl -k \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-u myuser:mypassword \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-H 'Content-Type: application/json' \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-X GET \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-g "&lt;A href="https://centralconsole.mydomain.net:8083/api/v1/defenders/summary?project=myProject" target="_blank" rel="noopener"&gt;https://centralconsole.mydomain.net:8083/api/v1/defenders/summary?project=myProject&lt;/A&gt;"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;[{"category":"container","connected":12,"deployed":12,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"host","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"serverless","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"appEmbedded","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example 2: Request using paginated logics&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;There are only 4 results, and it works just fine for the first request (limit=50, offset=0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;curl -k \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-u myuser:mypassword \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-H 'Content-Type: application/json' \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-X GET \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-g "&lt;A href="https://centralconsole.mydomain.net:8083/api/v1/defenders/summary?project=myProject&amp;amp;limit=50&amp;amp;offset=0" target="_blank" rel="noopener"&gt;https://centralconsole.mydomain.net:8083/api/v1/defenders/summary?project=myProject&amp;amp;limit=50&amp;amp;offset=0&lt;/A&gt;"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;[{"category":"container","connected":12,"deployed":12,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"host","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"serverless","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"appEmbedded","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now the second request (limit=50, offset=50) should reply with no results because&amp;nbsp;offset is greater than the available results.&lt;/P&gt;&lt;P&gt;Instead it always give 4 results, we think this is wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;curl -k \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-u myuser:mypassword \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-H 'Content-Type: application/json' \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-X GET \&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;-g "&lt;A href="https://centralconsole.mydomain.net:8083/api/v1/defenders/summary?project=myProject&amp;amp;limit=50&amp;amp;offset=50" target="_blank" rel="noopener"&gt;https://centralconsole.mydomain.net:8083/api/v1/defenders/summary?project=myProject&amp;amp;limit=50&amp;amp;offset=50&lt;/A&gt;"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;[{"category":"container","connected":12,"deployed":12,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"host","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"serverless","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;,{"category":"appEmbedded","connected":0,"deployed":0,"licensed":0}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We think this behavior should be corrected OR (but this is a worse solution) in the documentation it should be indicated if the endpoint support paginated/non paginated responses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;LI-PRODUCT title="Prisma Cloud" id="Prisma_Cloud"&gt;&lt;/LI-PRODUCT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;Edoardo&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 15:54:37 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/pcce-api-limits-not-working-for-non-paginated-endpoints/m-p/471369#M464</guid>
      <dc:creator>edoardo.vicendone</dc:creator>
      <dc:date>2022-03-08T15:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: PCCE API limits not working for NON paginated endpoints</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/pcce-api-limits-not-working-for-non-paginated-endpoints/m-p/509665#M538</link>
      <description>&lt;P&gt;&lt;SPAN&gt;It sounds like a request to fix functionality of the API, I suggest opening a support case.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.paloaltonetworks.com/" target="_self"&gt;&lt;SPAN&gt;https://support.paloaltonetworks.com/&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 21:33:58 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/pcce-api-limits-not-working-for-non-paginated-endpoints/m-p/509665#M538</guid>
      <dc:creator>RPrasadi</dc:creator>
      <dc:date>2022-07-22T21:33:58Z</dc:date>
    </item>
  </channel>
</rss>

