<?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 timeRange absolute 400 Bad Request in Prisma Cloud Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/timerange-absolute-400-bad-request/m-p/294653#M92</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am trying to fetch alerts based upon an absolute timerange to ensure I don't continuously run into timeouts with my queries (want to get all open alerts for long running accounts that customers never looked at or that simply have way too many misconfigured resources). Whenever I execute the call I however keep running into 400 Bad Request statuses, and seem to be blind for my mistake. The call I'm trying to execute is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -X POST \
  '&amp;lt;a href="https://api2.redlock.io/v2/alert?alert.status=open&amp;amp;detailed=true" target="_blank"&amp;gt;https://api2.redlock.io/v2/alert?alert.status=open&amp;amp;detailed=true&amp;lt;/a&amp;gt;' \
  -H 'Content-Type: application/json' \
  -H 'Host: api2.redlock.io' \
  -H 'x-redlock-auth: my-very-special-secret-auth-key' \
  -d '{
    "timeRange": {
        "type": "absolute",
        "value": {
            "startTime": 1572244614366,
            "endTime": 1569649014366
        }
    }
}'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;When attempting it with a GET request to the below URL (of course with the x-redlock-auth header set) it also returns a 400 Bad Request. When using relative time of 1 month it just works as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;a href="https://api2.redlock.io/v2/alert?alert.status=open&amp;amp;timeType=absolute&amp;amp;startTime=1572244614366&amp;amp;endTime=1569649014366&amp;amp;detailed=true" target="_blank"&amp;gt;https://api2.redlock.io/v2/alert?alert.status=open&amp;amp;timeType=absolute&amp;amp;startTime=1572244614366&amp;amp;endTime=1569649014366&amp;amp;detailed=true&amp;lt;/a&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Wed, 02 Sep 2020 18:12:13 GMT</pubDate>
    <dc:creator>Retired Member</dc:creator>
    <dc:date>2020-09-02T18:12:13Z</dc:date>
    <item>
      <title>timeRange absolute 400 Bad Request</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/timerange-absolute-400-bad-request/m-p/294653#M92</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am trying to fetch alerts based upon an absolute timerange to ensure I don't continuously run into timeouts with my queries (want to get all open alerts for long running accounts that customers never looked at or that simply have way too many misconfigured resources). Whenever I execute the call I however keep running into 400 Bad Request statuses, and seem to be blind for my mistake. The call I'm trying to execute is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -X POST \
  '&amp;lt;a href="https://api2.redlock.io/v2/alert?alert.status=open&amp;amp;detailed=true" target="_blank"&amp;gt;https://api2.redlock.io/v2/alert?alert.status=open&amp;amp;detailed=true&amp;lt;/a&amp;gt;' \
  -H 'Content-Type: application/json' \
  -H 'Host: api2.redlock.io' \
  -H 'x-redlock-auth: my-very-special-secret-auth-key' \
  -d '{
    "timeRange": {
        "type": "absolute",
        "value": {
            "startTime": 1572244614366,
            "endTime": 1569649014366
        }
    }
}'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;When attempting it with a GET request to the below URL (of course with the x-redlock-auth header set) it also returns a 400 Bad Request. When using relative time of 1 month it just works as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;a href="https://api2.redlock.io/v2/alert?alert.status=open&amp;amp;timeType=absolute&amp;amp;startTime=1572244614366&amp;amp;endTime=1569649014366&amp;amp;detailed=true" target="_blank"&amp;gt;https://api2.redlock.io/v2/alert?alert.status=open&amp;amp;timeType=absolute&amp;amp;startTime=1572244614366&amp;amp;endTime=1569649014366&amp;amp;detailed=true&amp;lt;/a&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 18:12:13 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/timerange-absolute-400-bad-request/m-p/294653#M92</guid>
      <dc:creator>Retired Member</dc:creator>
      <dc:date>2020-09-02T18:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: timeRange absolute 400 Bad Request</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/timerange-absolute-400-bad-request/m-p/294786#M93</link>
      <description>&lt;P&gt;Your start time is Oct 28th and your end time is Sept 28th.&amp;nbsp; Have you tried flipping the values to see if it still results in a 400?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 19:30:17 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/timerange-absolute-400-bad-request/m-p/294786#M93</guid>
      <dc:creator>ebeuerlein</dc:creator>
      <dc:date>2019-10-28T19:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: timeRange absolute 400 Bad Request</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/timerange-absolute-400-bad-request/m-p/294837#M94</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/111137"&gt;@ebeuerlein&lt;/a&gt;! Did I mention I seemed to be blind for my own mistake?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 07:12:13 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/timerange-absolute-400-bad-request/m-p/294837#M94</guid>
      <dc:creator>Retired Member</dc:creator>
      <dc:date>2019-10-29T07:12:13Z</dc:date>
    </item>
  </channel>
</rss>

