<?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: Response status 202 with api call in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/Response-status-202-with-api-call/m-p/269542#M3603</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/86239"&gt;@ni5hat&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Under&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/shortlink/api-response-codes" target="_self"&gt;Dynatrace API - Response codes&lt;/A&gt;&amp;nbsp;the follows is written:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;EM&gt;In case when a successful request may return different codes, it is specified in the description of the request.&lt;/EM&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Anyhow, Can you elaborate on which API call you are using that's return 202?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;My guess is that you are using a post call to create something, within the response body you should receive an ID that IMO you can check with the appropriate get API&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;HTH&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Yos&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Sun, 09 Feb 2025 06:59:12 GMT</pubDate>
    <dc:creator>Yosi_Neuman</dc:creator>
    <dc:date>2025-02-09T06:59:12Z</dc:date>
    <item>
      <title>Response status 202 with api call</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Response-status-202-with-api-call/m-p/269181#M3602</link>
      <description>&lt;P&gt;Sometimes when I make a POST API call to dynatrace through python, I get 202 as the response status code,&amp;nbsp; meaning the request was accepted but is still being processed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My final goal is to get the final json response, hence I need a way to check the status of long-running requests.&amp;nbsp;In general,&amp;nbsp;202 response often includes a Location header, which provides a URL where you can check the status of your request. But dynatrace does not include the location header in the 202 response.&lt;/P&gt;
&lt;P&gt;Could anyone help me with the specific endpoint or method for checking long-running operations for dynatrace?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 13:07:03 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Response-status-202-with-api-call/m-p/269181#M3602</guid>
      <dc:creator>ni5hat</dc:creator>
      <dc:date>2025-02-10T13:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Response status 202 with api call</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Response-status-202-with-api-call/m-p/269542#M3603</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/86239"&gt;@ni5hat&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Under&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/shortlink/api-response-codes" target="_self"&gt;Dynatrace API - Response codes&lt;/A&gt;&amp;nbsp;the follows is written:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;EM&gt;In case when a successful request may return different codes, it is specified in the description of the request.&lt;/EM&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Anyhow, Can you elaborate on which API call you are using that's return 202?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;My guess is that you are using a post call to create something, within the response body you should receive an ID that IMO you can check with the appropriate get API&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;HTH&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Yos&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 09 Feb 2025 06:59:12 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Response-status-202-with-api-call/m-p/269542#M3603</guid>
      <dc:creator>Yosi_Neuman</dc:creator>
      <dc:date>2025-02-09T06:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Response status 202 with api call</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Response-status-202-with-api-call/m-p/274677#M3695</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/86239"&gt;@ni5hat&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your request takes too long to be processed, for example when you query Grail through API, it is entirely possible to get a 202 with the following json in its body that may look like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{ "state": "RUNNING", &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"requestToken": "[You can use this token on the /query:poll endpoint to check its status], &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"ttlSeconds": 79 }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I have found it is possible to adjust the parameter &lt;SPAN&gt;"requestTimeoutMilliseconds" in order to tell Dynatrace how long you're willing to wait for a query to be processed. When querying Grail through the API, you can edit the curl as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -X 'POST' \
  'https:/[yourenvironment]/platform/storage/query/v1/query:execute' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer [your Bearer Token]' \
  -H 'Content-Type: application/json' \
  -d '{
  "query":[The DQL query],
  "defaultTimeframeStart": "2025-02-01T00:00:00Z[examples, edit to fit your needs]",
  "defaultTimeframeEnd": "2025-02-20T23:59:59Z[examples, edit to fit your needs]",
  "timezone": "UTC",
  "locale": "en_US",
  "maxResultRecords": 1000,
  "maxResultBytes": 1000000,
  "fetchTimeoutSeconds": 60,
  "requestTimeoutMilliseconds": [EDIT THIS ONE in order to get the full response instead of the 202],
  "enablePreview": true,
  "defaultSamplingRatio": 100,
  "defaultScanLimitGbytes": 100,
  "queryOptions": null,
  "filterSegments": null
}
'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is entirely possible that you my be able to circumvent your issue by doing this.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 14:23:24 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Response-status-202-with-api-call/m-p/274677#M3695</guid>
      <dc:creator>PedroSantos</dc:creator>
      <dc:date>2025-04-08T14:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Response status 202 with api call</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Response-status-202-with-api-call/m-p/274824#M3702</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/77112"&gt;@PedroSantos&lt;/a&gt;&amp;nbsp;That is exactly what I did to resolve this issue &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I played around with both the parameters "requestTimeoutMilliseconds" and "maxResultRecords" and was able to get a finished response.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 07:20:26 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Response-status-202-with-api-call/m-p/274824#M3702</guid>
      <dc:creator>ni5hat</dc:creator>
      <dc:date>2025-04-10T07:20:26Z</dc:date>
    </item>
  </channel>
</rss>

