Get request analytics as categorical data for APIs, applications, and resources

get

/apiplatform/analytics/v1/categorical/requestsBy/{category}

Returns analytics data for APIs, applications, and URIs as categorical data. Use the category parameter to specify the type of measures returned.

This operation returns the intersection of all applied query parameter 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, applications, and gateways).

Request

Path Parameters
  • Pattern: (apps|apis|uris)
    Type of measure to return. apps returns data for applications, apis returns data for APIs, and uris returns data for the URIs requested by clients.
    Allowed Values: [ "apps", "apis", "uris" ]
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
    Filter data by gatewayIds as repeated query parameters (like ?gatewayIds=2&gatewayIds=3) or a single-comma separated query parameter (like ?gatewayIds=2,3).
  • Collection Format: multi

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

    Grouping results by methods and iterations is supported for this endpoint.

  • Collection Format: multi
    Filter data by iterationIds as repeated query parameters (like ?iterationIds=2&iterationIds=3) or a single comma separated query parameter (like ?iterationIds=2,3).
  • Collection Format: multi
    Filter data by methods as repeated query parameters (like ?methods=GET&methods=PUT) or a single comma separated query parameter (like ?methods=GET,PUT).
  • Collection Format: multi
    Filter data by nodeIds as repeated query parameters (like ?nodeIds=2&appIds=3) or a single comma separated query parameter (like ?nodeIds=2,3).
  • Collection Format: multi
    Filter data by planIds as repeated query parameters (like ?planIds=2&planIds=3) or a single comma separated query parameter (like ?planIds=2,3).
  • Collection Format: multi
    Filter data by serviceIds as repeated query parameters (like ?serviceIds=2&serviceIds=3) or a single comma separated query parameter (like ?serviceIds=2,3).
  • 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.
  • 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.
Back to Top

Response

Supported Media Types

200 Response

JSON response with categorical data for requests.
Body ()
Collection of metrics for request distribution categories.
Root Schema : RequestDistributionCollectionResponse
Type: object
Collection of metrics for request distribution categories.
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 : TimeMetadata
Type: object
Metadata describing the time parameters used for the database query.
Show Source
Nested Schema : RequestDistributionItem
Type: object
Contains a row of metrics for a given category.
Show Source

400 Response

Bad Request

401 Response

Unauthorized

500 Response

Internal Server Error
Back to Top

Examples

The following example shows how to retrieve request, rejection, and error details for requests to all active applications by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL

curl -i -X GET 
-H "Authorization: Bearer access_token
https://example.com/apiplatform/analytics/v1/categorical/requestsBy/apps

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.0.0
Date: Fri, 30 Dec 2016 17:23:16 GMT
Content-length: 1200
Content-type: application/json
X-oracle-dms-ecid: 3gbYa1YnR00000000
X-oracle-dms-rid: 0:1
Via: 1.1 otd_opc
Proxy-agent: Oracle-Traffic-Director/12.2.1.0.0

Example of Response Body

The following example shows the contents of the response body in JSON format, including request, rejection, and error details for requests to all active applications.

{
  "count": 8,
  "time": {
    "timeEnd": "2016-12-30T17:23:16.445Z",
    "timeSetting": "last30days",
    "timeStart": "2016-11-30T17:23:16.445Z",
    "timeOffsetId": "Z"
  },
  "items": [
    {
      "request_vol": 7979684,
      "request_dist": 0.999997,
      "error_dist": 0.99889857,
      "reject_dist": 0.9998942,
      "error_vol": 8162,
      "reject_vol": 103984,
      "id": -1,
      "app_id": -1
    },
    {
      "request_vol": 8,
      "request_dist": 0.000001002543,
      "error_dist": 0.00036715213,
      "reject_dist": 0.000048079233,
      "error_vol": 3,
      "reject_vol": 5,
      "id": 371,
      "app_id": 371
    },
    {
      "request_vol": 5,
      "request_dist": 0.000000627,
      "reject_dist": 0.000038463386,
      "reject_vol": 4,
      "name": "appTest3",
      "id": 131,
      "app_id": 131
    },
    {
      "request_vol": 5,
      "request_dist": 0.000000627,
      "error_dist": 0.00048953615,
      "error_vol": 4,
      "name": "testwithouttype",
      "id": 368,
      "app_id": 368
    },
    {
      "request_vol": 3,
      "request_dist": 0.0000003760,
      "error_dist": 0.00024476807,
      "error_vol": 2,
      "name": "RestE2E_AnalyticsRestAPP1",
      "id": 380,
      "app_id": 380
    },
    {
      "request_vol": 1,
      "request_dist": 0.0000001253,
      "reject_dist": 0.0000096158465,
      "reject_vol": 1,
      "name": "myAPP_294",
      "id": 325,
      "app_id": 325
    },
    {
      "request_vol": 1,
      "request_dist": 0.0000001253,
      "reject_dist": 0.0000096158465,
      "reject_vol": 1,
      "name": "newAPP",
      "id": 333,
      "app_id": 333
    },
    {
      "request_vol": 1,
      "request_dist": 0.0000001253,
      "name": "weatherapp2",
      "id": 336,
      "app_id": 336
    }
  ]
}
Back to Top