A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.newrelic.com/docs/apis/rest-api-v2/requirements/specifying-time-range-v2/ below:

Specify a time range (v2)

You can specify a time range for the data to be returned in a New Relic REST API call. You can also request to return an average over the time range instead of the series of values returned by default.

Change the default 30 minute time range

The default time range for an API call is the last 30 minutes. To modify the time range, include from= and optional to= values. (To end the time range at the current time, omit to=.)

Example:

$

curl -X GET "https://api.newrelic.com/v2/applications/${APP_ID}/metrics/data.json" \

>

-H "Api-Key:$API_KEY" -i \

>

-d 'names[]=Agent/MetricsReported/count&from=2014-08-11T14:42:00+00:00&to=2014-08-11T15:12:00+00:00'

The time period returned for each data point depends on the time range you specify. To modify the time period, include the period parameter in your query.

If you are using the New Relic REST API Explorer (v2), you can use the diamond icon to select time ranges. If you have an EU region account, the above URL begins with https://api.eu.newrelic.com.

Offset UTC

By default the API time input uses Universal Time Coordinated (UTC). To offset the UTC, use plus or minus 00:00 in your API call. This allows you to input times in a different time zone; however, this does not modify the output times, which are always UTC.

$

curl -X GET "https://api.newrelic.com/v2/applications/$APP_ID/metrics/data.json" \

>

-H "Api-Key:$API_KEY" -i \

>

-d 'names[]=Agent/MetricsReported/count&from=2014-08-11T14:42:00-02:00&to=2014-08-11T15:12:00-02:00'

$

curl -X GET "https://api.newrelic.com/v2/applications/$APP_ID/metrics/data.json" \

>

-H "Api-Key:$API_KEY" -i \

>

-d 'names[]=Agent/MetricsReported/count&from=2014-08-11T14:42:00%2B08:00&to=2014-08-11T15:12:00%2B08:00


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4