Get request analytics as time series data

get

/developers/services/v1/analytics/timeSeries/requests/{category}

Returns time series data for requests. Use the category parameter to specify the type of measures returned.

This operation returns the intersection of apiIds and appIds filters.

Any authenticated user can request this resource. The response contains data the requesting user is authorized to view based on their role and the resources they are issued grants to (APIs and applications).

Request

Path Parameters
  • Pattern: (all|successes|failures)
    Type of measure to return. successes shows requests returning HTTP Status 2*, failures shows HTTP Status 4* and 5*.
Query Parameters
  • Collection Format: multi
    Filter data by apiIds as repeated query parameters (like ?apiIds=2&apiIds=3) or a single-comma separated query parameter (like ?apiIds=2,3).
  • Collection Format: multi
    Filter data by appIds as repeated query parameters (like ?appIds=2&appIds=3) or a single comma separated query parameter (like ?appIds=2,3).
  • Collection Format: multi

    Split the query results into groups based on repeated query parameters (like ?groupBys=apiIds&groupBys=appIds) or a single comma separated query parameter (like ?groupBys=apiIds,appIds). Both of these examples display query results grouped by available apiIds and appIds.

    Grouping results by apiIds, and appIds is supported for all endpoints that support the groupBy query parameter.

  • Calculates timeUnit and timeGroupSize automatically given maximum number of time periods (groups).

    Note: This is not accurate for low limit settings.

  • End time filter as ISO8601 offset date. Example: 2016-01-01T00:00:00-07:00, 2016-01-01T00:00:00Z, 2016-01-01T00:00:00. The default value is no filtering. You must use this in conjunction with the timeSetting=custom query parameter.
  • Size of time bucket in number of time units. Defaults to 1. When the timeUnit query parameter is MINUTE, valid values are: 1, 5, 10, 15, 30, 60. When the timeUnit query parameter is HOUR, valid values are: 1, 2, 3, 4, 6, 12, 24. All other time units support only 1 as a valid value.
  • ISO8601 time offset ID. Example: Z. This parameter overrides the time offset of timeStart or timeEnd. This parameter is also used when calculating the start of time groups. The value of this parameter defaults to Z. (GMT).

    Note: Best effort is made to apply this parameter, but its accuracy may be limited by existing data granularity.

  • Time setting mode. Defaults to custom. Valid values include: custom, currentHour, currentWeek, currentMonth, last15minutes, last60minutes, last24hours, last7days, last30days, last365days, january, february, march, april, may, june, july, august, september, october, november, december, year-2015, year-2016, etc.
  • Start time filter as ISO8601 offset date. Example: 2016-01-01T00:00:00-07:00, 2016-01-01T00:00:00Z, 2016-01-01T00:00:00. The default value is no filtering. You must use this in conjunction with the timeSetting=custom query parameter.
  • Time unit to use for time bucket aggregation. Valud values: MINUTE, HOUR, DAY, WEEK, MONTH, and YEAR.
Back to Top

Response

Supported Media Types

200 Response

JSON response with time series data for the requests.
Body ()
Collection of time series data points.
Root Schema : TimeSeriesCollectionResponse
Type: object
Collection of time series data points.
Show Source
Nested Schema : items
Type: array
The actual response items.
Show Source
Nested Schema : states
Type: array
An optional list for API states. This is null by default.
Show Source
Nested Schema : TimeSeriesTimeMetadata
Type: object
Metadata describing the time parameters used for the database query.
Show Source
Nested Schema : TimeSeriesItem
Type: object
Contains a start time value and measure. Responses for some operations also contain high and low measure fields.
Show Source

400 Response

Bad Request

401 Response

Unauthorized

500 Response

Internal Server Error
Back to Top

Examples

The following example shows how to view time series data for rejected requests for all APIs by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL

curl -i -X GET 
-u apicsadmin:password
https://example.com/developers/services/v1/analytics/timeSeries/requests/rejections

Example of Response Headers

The following shows an example of the response headers.

HTTP/1.1 200 OK
Server: Oracle-Traffic-Director/12.2.1.3.0
Date: Fri, 05 Jan 2018 16:42:13 GMT
Content-type: application/json
X-oracle-dms-ecid: Jf2Eb1fnR00000000
X-oracle-dms-rid: 0:1
Via: 1.1 otd_opc
Proxy-agent: Oracle-Traffic-Director/12.2.1.3.0
Transfer-encoding: chunked

Example of Response Body

The following example shows the contents of the response body in JSON format, including time series details for rejected request.

{
  "count": 5,
  "time": {
    "timeEnd": "2017-12-30T16:43:13.923Z",
    "timeSetting": "last30days",
    "timeGroupSize": 1,
    "timeStart": "2017-11-30T16:42:13.923Z",
    "timeOffsetId": "Z",
    "timePeriodMs": 60000,
    "timeUnit": "MINUTE"
  },
  "items": [
    {
      "start_ts": "2017-12-06T08:00:00Z",
      "measure": 1
    },
    {
      "start_ts": "2017-12-06T08:01:00Z",
      "measure": 2
    },
    {
      "start_ts": "2017-12-06T08:04:00Z",
      "measure": 2
    },
    {
      "start_ts": "2017-12-06T08:34:00Z",
      "measure": 2
    },
    {
      "start_ts": "2017-12-06T08:35:00Z",
      "measure": 2
    }
  ]
}
Back to Top