<?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: Configuration Search Using Prisma Cloud API in Prisma Cloud Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/configuration-search-using-prisma-cloud-api/m-p/283620#M9</link>
    <description>&lt;P&gt;Thanks. I don't think the token expired since I can use the same token to do other API calls such as a health check.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for pointing out open single quote. A copy paste error on my end :).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;"query": "config where cloud.account = 'Name of cloud account' AND api.name = 'azure-storage-account-list'",
        "timeRange": {
            "type": "relative",
            "value": {
                "unit": "hour",
                "amount": 24
            }

        }
        
    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2019 23:43:36 GMT</pubDate>
    <dc:creator>RJesudasan</dc:creator>
    <dc:date>2019-08-19T23:43:36Z</dc:date>
    <item>
      <title>Configuration Search Using Prisma Cloud API</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/configuration-search-using-prisma-cloud-api/m-p/283438#M7</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to run a config search using the API. I can successfully get the JWT token and can use the token to do basic get options.&lt;/P&gt;&lt;P&gt;However, when trying the configuration search I get a 401 unauthorized error if I format the data as json( using header1). And if I don't specify the Content-Type, then I get a 500 internal server error ( header2). Just wondering&amp;nbsp; if someone might be able to help with identifying the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Python code snippet:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;URL = 'https://api.prismacloud.io/search/config'
header1 = {"Content-Type":"application/json", "Accept": "text/csv", "x-redlock-auth":jwt}
header2 = {"Accept":"text/csv", "x-redlock-auth":jwt}

requestbody = {
        "query": "config where cloud.account = 'Name of cloud account' AND api.name = "azure-storage-account-list'",
        "timeRange": {
            "type": "relative",
            "value": {
                "unit": "hour",
                "amount": 24
            }

        }
        
    }&lt;BR /&gt;&lt;BR /&gt;.....&lt;BR /&gt;response=request.requests('POST', URL, json=requestbody, header=header1)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 17:18:52 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/configuration-search-using-prisma-cloud-api/m-p/283438#M7</guid>
      <dc:creator>RJesudasan</dc:creator>
      <dc:date>2020-09-02T17:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Configuration Search Using Prisma Cloud API</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/configuration-search-using-prisma-cloud-api/m-p/283545#M8</link>
      <description>&lt;P&gt;I don't see anything wrong with header1 (header 2 is missing the content-type so that would throw the 500 as expected).&amp;nbsp; If you are getting a 401, then the token has expired.&amp;nbsp; FYI, there is a syntax issue with your "query" line - you have an open single quote.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 14:59:06 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/configuration-search-using-prisma-cloud-api/m-p/283545#M8</guid>
      <dc:creator>ebeuerlein</dc:creator>
      <dc:date>2019-08-19T14:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Configuration Search Using Prisma Cloud API</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/configuration-search-using-prisma-cloud-api/m-p/283620#M9</link>
      <description>&lt;P&gt;Thanks. I don't think the token expired since I can use the same token to do other API calls such as a health check.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for pointing out open single quote. A copy paste error on my end :).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;"query": "config where cloud.account = 'Name of cloud account' AND api.name = 'azure-storage-account-list'",
        "timeRange": {
            "type": "relative",
            "value": {
                "unit": "hour",
                "amount": 24
            }

        }
        
    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 23:43:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/configuration-search-using-prisma-cloud-api/m-p/283620#M9</guid>
      <dc:creator>RJesudasan</dc:creator>
      <dc:date>2019-08-19T23:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Configuration Search Using Prisma Cloud API</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/configuration-search-using-prisma-cloud-api/m-p/283621#M10</link>
      <description>&lt;P&gt;So it might be an issue with the token, since the health check doesn't need a token. Thanks for the response.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 00:12:58 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/configuration-search-using-prisma-cloud-api/m-p/283621#M10</guid>
      <dc:creator>RJesudasan</dc:creator>
      <dc:date>2019-08-20T00:12:58Z</dc:date>
    </item>
  </channel>
</rss>

