<?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 API 400 error when using BETWEEN_TIMES parameter on LITE account in Splunk AppDynamics</title>
    <link>https://community.splunk.com/t5/Splunk-AppDynamics/API-400-error-when-using-BETWEEN-TIMES-parameter-on-LITE-account/m-p/735710#M9512</link>
    <description>&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;Recently I found an issue when using the AppDynamics API to retrieve metrics or events on a LITE account. I know about the restriction on the last 1440 minutes and I comply with it by requesting data for less that.&lt;/P&gt;&lt;P&gt;However the API still returns the 400 error with body:&lt;BR /&gt;"HTTP Status 400 - For LITE Account only last 1440 minutes of data could be extracted"&lt;/P&gt;&lt;P&gt;It is weird because I request less than the limit, for example the request that I use is:&lt;/P&gt;&lt;P&gt;GET /controller/rest/applications/9077/metric-data?output=JSON&amp;amp;metric-path=Overall+Application+Performance%7C*&amp;amp;time-range-type=BETWEEN_TIMES&amp;amp;start-time=1596446430281&amp;amp;end-time=1596446434281&amp;amp;rollup=false HTTP/1.1&lt;/P&gt;&lt;P&gt;The time range defined between the start-time and end-time parameters is only a few seconds and it is just a minute in the past relative to the time of initiating the request, so it fits in the limit of last 1440 minutes, however I still have the error...&lt;/P&gt;&lt;P&gt;If I try to request data using the&amp;nbsp;&lt;SPAN&gt;BEFORE_NOW parameter, like:&lt;BR /&gt;GET /controller/rest/applications/9077/metric-data?output=JSON&amp;amp;metric-path=Overall+Application+Performance%7C*&amp;amp;time-range-type=BEFORE_NOW&amp;amp;duration-in-mins=10&amp;amp;rollup=false HTTP/1.1&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I get successful&amp;nbsp;response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BUT I don't see anywhere on the documentation that the&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I did look on the documentation and I don't BETWEEN_TIMES time range type is not supported on LITE accounts.&lt;/P&gt;&lt;P&gt;So bottom line the questions is why the BETWEEN_TIMES range type does not work on my LITE account?&lt;/P&gt;</description>
    <pubDate>Mon, 03 Aug 2020 09:45:27 GMT</pubDate>
    <dc:creator>Lyubo_Dimitrov</dc:creator>
    <dc:date>2020-08-03T09:45:27Z</dc:date>
    <item>
      <title>API 400 error when using BETWEEN_TIMES parameter on LITE account</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/API-400-error-when-using-BETWEEN-TIMES-parameter-on-LITE-account/m-p/735710#M9512</link>
      <description>&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;Recently I found an issue when using the AppDynamics API to retrieve metrics or events on a LITE account. I know about the restriction on the last 1440 minutes and I comply with it by requesting data for less that.&lt;/P&gt;&lt;P&gt;However the API still returns the 400 error with body:&lt;BR /&gt;"HTTP Status 400 - For LITE Account only last 1440 minutes of data could be extracted"&lt;/P&gt;&lt;P&gt;It is weird because I request less than the limit, for example the request that I use is:&lt;/P&gt;&lt;P&gt;GET /controller/rest/applications/9077/metric-data?output=JSON&amp;amp;metric-path=Overall+Application+Performance%7C*&amp;amp;time-range-type=BETWEEN_TIMES&amp;amp;start-time=1596446430281&amp;amp;end-time=1596446434281&amp;amp;rollup=false HTTP/1.1&lt;/P&gt;&lt;P&gt;The time range defined between the start-time and end-time parameters is only a few seconds and it is just a minute in the past relative to the time of initiating the request, so it fits in the limit of last 1440 minutes, however I still have the error...&lt;/P&gt;&lt;P&gt;If I try to request data using the&amp;nbsp;&lt;SPAN&gt;BEFORE_NOW parameter, like:&lt;BR /&gt;GET /controller/rest/applications/9077/metric-data?output=JSON&amp;amp;metric-path=Overall+Application+Performance%7C*&amp;amp;time-range-type=BEFORE_NOW&amp;amp;duration-in-mins=10&amp;amp;rollup=false HTTP/1.1&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I get successful&amp;nbsp;response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BUT I don't see anywhere on the documentation that the&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I did look on the documentation and I don't BETWEEN_TIMES time range type is not supported on LITE accounts.&lt;/P&gt;&lt;P&gt;So bottom line the questions is why the BETWEEN_TIMES range type does not work on my LITE account?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 09:45:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/API-400-error-when-using-BETWEEN-TIMES-parameter-on-LITE-account/m-p/735710#M9512</guid>
      <dc:creator>Lyubo_Dimitrov</dc:creator>
      <dc:date>2020-08-03T09:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: API 400 error when using BETWEEN_TIMES parameter on LITE account</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/API-400-error-when-using-BETWEEN-TIMES-parameter-on-LITE-account/m-p/735711#M9513</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;As per the documentation, you can only access the last 1440 minutes of data.&lt;/P&gt;&lt;P&gt;The start and end dates cannot be used when using accessing the data via that API call from what I know, if on LITE version.&lt;/P&gt;&lt;P&gt;On a side note, if you use developer options in your browser, in the UI by setting start &amp;amp; end date e.g in metric browser, it should possibly give you a working query you can maybe use if you really need to use start and end dates.&lt;/P&gt;&lt;P&gt;As you only have access to the last 1440 minutes, is there a reason you are trying to use start &amp;amp; end dates?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 13:32:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/API-400-error-when-using-BETWEEN-TIMES-parameter-on-LITE-account/m-p/735711#M9513</guid>
      <dc:creator>Morelz</dc:creator>
      <dc:date>2020-08-03T13:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: API 400 error when using BETWEEN_TIMES parameter on LITE account</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/API-400-error-when-using-BETWEEN-TIMES-parameter-on-LITE-account/m-p/735712#M9514</link>
      <description>&lt;P&gt;Hi Mario,&lt;/P&gt;&lt;P&gt;Thanks for your comment, I had another look on the UI, inspecting the requests through the developer console and what I found is that on LITE account, on the Metric Browser page the Custom time range is not available. So the queries are only with BEFORE_NOW time range type.&lt;/P&gt;&lt;P&gt;If I check the same on a PRO instance, I have the Custom time frame on the UI and the request on the background is actually using BETWEEN_TIMES parameter.&lt;/P&gt;&lt;P&gt;So I tend to agree that the&amp;nbsp;BETWEEN_TIMES parameter is actually not allowed for LITE version, though it is not clearly stated... It would make much more sense to either get a more descriptive error from the API or at least&amp;nbsp; note it in the documentation.&lt;/P&gt;&lt;P&gt;And just to comment, the use case I need the start/end time for is an integration. So using the start/end parameters on scheduled queries is the best way from integration perspective. Using the last n could cause either performance issues or gaps in the data.&lt;/P&gt;&lt;P&gt;Another thing I noticed by inspecting the network requests is that the frontend is using a match better API request for retrieving the metrics data &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; which would be really good if exposed in documentation and supported.&lt;/P&gt;&lt;P&gt;THanks,&lt;/P&gt;&lt;P&gt;Lyubo&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 10:22:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/API-400-error-when-using-BETWEEN-TIMES-parameter-on-LITE-account/m-p/735712#M9514</guid>
      <dc:creator>Lyubo_Dimitrov</dc:creator>
      <dc:date>2020-08-04T10:22:12Z</dc:date>
    </item>
  </channel>
</rss>

