Portal Metrics API

The Portal Metrics API can be used to retrieve various metrics for the aan. The API consists of the following RESTful resources:
apip43
The Portal Metrics API can be used to retrieve various metrics for the
API Portal
. The API consists of the following RESTful resources:
  • errors
    Lets you retrieve error metrics for APIs or applications.
  • hits
    Lets you retrieve hit metrics for APIs or applications.
  • latency
    Lets you retrieve latency metrics for APIs.
  • usage
    Lets you retrieve usage metrics for account plans.
Requests and responses are in JSON format.
The Real-Time Analytics page in the
API Portal
(accessible from
Analytics
in the menu) uses this API to visualize metrics data. Integrating with the Portal Metrics API lets you retrieve metrics data for use with your own BI tools, potentially create mash-ups with other corporate data to generate a richer data set, and allows you to create your own custom data visualizations, among other potential benefits.
Accessing the Portal Metrics API
You can call the Portal Metrics API from your external client application, and try it out using the API Explorer in the
API Portal
.
API Explorer is only accessible through the API Portal/Ingress tenant.
To try out the API in the API Portal:
  1. Log in to the
    API Portal
    as a Portal administrator for the intended tenant.
  2. Select
    Publish
    ,
    Portal
    APIs
    .
  3. Select the
    Portal Metrics API
    option from the drop-down list. The API Explorer appears in the right pane, showing the Portal Metrics API.
Authentication
All API calls require a valid OAuth token.
Example
A sample here.
alpha
{ "basePath" : "/TENANT_API_NAME/analytics/metrics/v1", "definitions" : { "Errors" : { "type" : "object", "properties" : { "buckets" : { "items" : { "$ref" : "#/definitions/ErrorsBucket" }, "type" : "array" }, "errorRate" : { "format" : "double", "type" : "number" }, "errors" : { "format" : "int64", "type" : "integer" } } }, "ErrorsBucket" : { "type" : "object", "properties" : { "apiId" : { "type" : "string" }, "appId" : { "type" : "string" }, "authorizedFlag" : { "type" : "boolean" }, "errorDist" : { "format" : "double", "type" : "number" }, "errorRate" : { "format" : "double", "type" : "number" }, "errors" : { "format" : "int64", "type" : "integer" }, "methodType" : { "type" : "string" }, "orgId" : { "type" : "string" }, "respCode" : { "format" : "int32", "type" : "integer" } } }, "ErrorsRequestParams" : { "type" : "object", "properties" : { "apiIds" : { "type" : "string" }, "appIds" : { "type" : "string" }, "buckets" : { "type" : "string" }, "endTimeGMT" : { "type" : "string" }, "limit" : { "type" : "string" }, "orgIds" : { "type" : "string" }, "proxyIds" : { "type" : "string" }, "sortby" : { "type" : "string" }, "sortorder" : { "type" : "string" }, "startTimeGMT" : { "type" : "string" }, "timerange" : { "type" : "string" } } }, "ErrorsResponse" : { "type" : "object", "properties" : { "data" : { "$ref" : "#/definitions/Errors" }, "query" : { "$ref" : "#/definitions/ErrorsRequestParams" }, "requestId" : { "type" : "string" }, "respCode" : { "format" : "int32", "type" : "integer" }, "respMsg" : { "type" : "string" } } }, "ErrorsTs" : { "type" : "object", "properties" : { "buckets" : { "items" : { "$ref" : "#/definitions/ErrorsBucket" }, "type" : "array" }, "date" : { "type" : "string" }, "errorRate" : { "format" : "double", "type" : "number" }, "errors" : { "format" : "int64", "type" : "integer" } } }, "ErrorsTsEntry" : { "type" : "object", "properties" : { "errors" : { "$ref" : "#/definitions/Errors" }, "errorsTs" : { "items" : { "$ref" : "#/definitions/ErrorsTs" }, "type" : "array" } } }, "ErrorsTsResponse" : { "type" : "object", "properties" : { "data" : { "$ref" : "#/definitions/ErrorsTsEntry" }, "query" : { "$ref" : "#/definitions/ErrorsRequestParams" }, "requestId" : { "type" : "string" }, "respCode" : { "format" : "int32", "type" : "integer" }, "respMsg" : { "type" : "string" } } }, "ExceptionResponse" : { "type" : "object", "properties" : { "query" : { "properties" : { }, "type" : "object" }, "requestId" : { "type" : "string" }, "respCode" : { "format" : "int32", "type" : "integer" }, "respMsg" : { "type" : "string" } } }, "Hits" : { "type" : "object", "properties" : { "buckets" : { "items" : { "$ref" : "#/definitions/HitsBucket" }, "type" : "array" }, "hits" : { "format" : "int64", "type" : "integer" } } }, "HitsBucket" : { "type" : "object", "properties" : { "apiId" : { "type" : "string" }, "appId" : { "type" : "string" }, "hits" : { "format" : "int64", "type" : "integer" }, "orgId" : { "type" : "string" } } }, "HitsRequestParams" : { "type" : "object", "properties" : { "apiIds" : { "type" : "string" }, "appIds" : { "type" : "string" }, "buckets" : { "type" : "string" }, "endTimeGMT" : { "type" : "string" }, "limit" : { "type" : "string" }, "orgIds" : { "type" : "string" }, "proxyIds" : { "type" : "string" }, "sortby" : { "type" : "string" }, "sortorder" : { "type" : "string" }, "startTimeGMT" : { "type" : "string" }, "timerange" : { "type" : "string" } } }, "HitsResponse" : { "type" : "object", "properties" : { "data" : { "$ref" : "#/definitions/Hits" }, "query" : { "$ref" : "#/definitions/HitsRequestParams" }, "requestId" : { "type" : "string" }, "respCode" : { "format" : "int32", "type" : "integer" }, "respMsg" : { "type" : "string" } } }, "HitsTs" : { "type" : "object", "properties" : { "buckets" : { "items" : { "$ref" : "#/definitions/HitsBucket" }, "type" : "array" }, "date" : { "type" : "string" }, "hits" : { "format" : "int64", "type" : "integer" } } }, "HitsTsEntry" : { "type" : "object", "properties" : { "hits" : { "$ref" : "#/definitions/Hits" }, "hitsTs" : { "items" : { "$ref" : "#/definitions/HitsTs" }, "type" : "array" } } }, "HitsTsResponse" : { "type" : "object", "properties" : { "data" : { "$ref" : "#/definitions/HitsTsEntry" }, "query" : { "$ref" : "#/definitions/HitsRequestParams" }, "requestId" : { "type" : "string" }, "respCode" : { "format" : "int32", "type" : "integer" }, "respMsg" : { "type" : "string" } } }, "Latencies" : { "type" : "object", "properties" : { "avg" : { "format" : "double", "type" : "number" }, "buckets" : { "items" : { "$ref" : "#/definitions/LatenciesBucket" }, "type" : "array" }, "max" : { "format" : "double", "type" : "number" }, "min" : { "format" : "double", "type" : "number" } } }, "LatenciesBucket" : { "type" : "object", "properties" : { "apiId" : { "type" : "string" }, "appId" : { "type" : "string" }, "avg" : { "format" : "double", "type" : "number" }, "max" : { "format" : "double", "type" : "number" }, "min" : { "format" : "double", "type" : "number" }, "orgId" : { "type" : "string" } } }, "LatenciesResponse" : { "type" : "object", "properties" : { "data" : { "$ref" : "#/definitions/Latencies" }, "query" : { "$ref" : "#/definitions/LatencyRequestParams" }, "requestId" : { "type" : "string" }, "respCode" : { "format" : "int32", "type" : "integer" }, "respMsg" : { "type" : "string" } } }, "LatenciesTs" : { "type" : "object", "properties" : { "avg" : { "format" : "double", "type" : "number" }, "buckets" : { "items" : { "$ref" : "#/definitions/LatenciesBucket" }, "type" : "array" }, "date" : { "type" : "string" }, "max" : { "format" : "double", "type" : "number" }, "min" : { "format" : "double", "type" : "number" } } }, "LatenciesTsEntry" : { "type" : "object", "properties" : { "latencies" : { "$ref" : "#/definitions/Latencies" }, "latenciesTs" : { "items" : { "$ref" : "#/definitions/LatenciesTs" }, "type" : "array" } } }, "LatenciesTsResponse" : { "type" : "object", "properties" : { "data" : { "$ref" : "#/definitions/LatenciesTsEntry" }, "query" : { "$ref" : "#/definitions/LatencyRequestParams" }, "requestId" : { "type" : "string" }, "respCode" : { "format" : "int32", "type" : "integer" }, "respMsg" : { "type" : "string" } } }, "LatencyRequestParams" : { "type" : "object", "properties" : { "apiIds" : { "type" : "string" }, "appIds" : { "type" : "string" }, "buckets" : { "type" : "string" }, "endTimeGMT" : { "type" : "string" }, "limit" : { "type" : "string" }, "orgIds" : { "type" : "string" }, "proxyIds" : { "type" : "string" }, "sortby" : { "type" : "string" }, "sortorder" : { "type" : "string" }, "startTimeGMT" : { "type" : "string" }, "stats" : { "type" : "string" }, "timerange" : { "type" : "string" } } }, "Usage" : { "type" : "object", "properties" : { "buckets" : { "items" : { "$ref" : "#/definitions/UsageBucket" }, "type" : "array" }, "dailyQuota" : { "format" : "int64", "type" : "integer" }, "hits" : { "format" : "double", "type" : "number" }, "monthlyQuota" : { "format" : "int64", "type" : "integer" }, "orgId" : { "type" : "string" }, "orgName" : { "type" : "string" }, "usage" : { "format" : "double", "type" : "number" } } }, "UsageBucket" : { "type" : "object", "properties" : { "apiId" : { "type" : "string" }, "appId" : { "type" : "string" }, "hits" : { "format" : "double", "type" : "number" }, "orgId" : { "type" : "string" }, "usage" : { "format" : "double", "type" : "number" } } }, "UsageRequestParams" : { "type" : "object", "properties" : { "apiIds" : { "type" : "string" }, "appIds" : { "type" : "string" }, "endTimeGMT" : { "type" : "string" }, "limit" : { "type" : "string" }, "orgIds" : { "type" : "string" }, "planType" : { "type" : "string" }, "sortby" : { "type" : "string" }, "sortorder" : { "type" : "string" }, "startTimeGMT" : { "type" : "string" }, "timerange" : { "type" : "string" } } }, "UsageTs" : { "type" : "object", "properties" : { "date" : { "type" : "string" }, "usage" : { "items" : { "$ref" : "#/definitions/Usage" }, "type" : "array" } } }, "UsageTsEntry" : { "type" : "object", "properties" : { "usage" : { "items" : { "$ref" : "#/definitions/Usage" }, "type" : "array" }, "usageTs" : { "items" : { "$ref" : "#/definitions/UsageTs" }, "type" : "array" } } }, "UsageTsResponse" : { "type" : "object", "properties" : { "data" : { "$ref" : "#/definitions/UsageTsEntry" }, "query" : { "$ref" : "#/definitions/UsageRequestParams" }, "requestId" : { "type" : "string" }, "respCode" : { "format" : "int32", "type" : "integer" }, "respMsg" : { "type" : "string" } } }, "UsagesResponse" : { "type" : "object", "properties" : { "data" : { "items" : { "$ref" : "#/definitions/Usage" }, "type" : "array" }, "query" : { "$ref" : "#/definitions/UsageRequestParams" }, "requestId" : { "type" : "string" }, "respCode" : { "format" : "int32", "type" : "integer" }, "respMsg" : { "type" : "string" } } } }, "host": "PAPI_Portal_TSSG:9443", "info" : { "title" : "", "version" : "" }, "paths" : { "/errors/{type}" : { "get" : { "consumes" : [ "application/json" ], "operationId" : "getErrorMetricsUsingGET", "parameters" : [ { "name" : "type", "in" : "path", "description" : "Request Type", "required" : true, "type" : "string", "enum" : [ "apis", "apps" ] }, { "name" : "timerange", "in" : "query", "description" : "Request Time Period", "required" : false, "type" : "string", "default" : "week", "enum" : [ "hour", "day", "week", "month", "year", "custom" ] }, { "name" : "startDate", "in" : "query", "description" : "Start Date (yyyy-MM-dd)", "required" : false, "type" : "string" }, { "name" : "endDate", "in" : "query", "description" : "End Date (yyyy-MM-dd)", "required" : false, "type" : "string" }, { "name" : "appIds", "in" : "query", "description" : "comma seperated app Ids", "required" : false, "type" : "string" }, { "name" : "apiIds", "in" : "query", "description" : "comma seperated api Ids", "required" : false, "type" : "string" }, { "name" : "orgIds", "in" : "query", "description" : "comma seperated org Ids", "required" : false, "type" : "string" }, { "name" : "proxyIds", "in" : "query", "description" : "comma seperated proxy (gateway server) Ids", "required" : false, "type" : "string" }, { "name" : "buckets", "in" : "query", "description" : "Buckets. Available buckets: apis| apps| orgs| serviceErrors| policyErrors| methodType", "required" : false, "type" : "string" }, { "name" : "sortorder", "in" : "query", "description" : "Sort Order for Bucketed entries", "required" : false, "type" : "string", "default" : "desc", "enum" : [ "desc", "asc" ] }, { "name" : "sortby", "in" : "query", "description" : "Sort Field for Bucketed entries", "required" : false, "type" : "string", "default" : "errors", "enum" : [ "errors", "errorRate", "errorDist", "appName", "apiName", "orgName" ] }, { "name" : "limit", "in" : "query", "description" : "Comma separated limits. Number of Bucketed Results to be returned", "required" : false, "type" : "string" }, { "name" : "stats", "in" : "query", "description" : "Avaliable stats: errorRate, errorDist", "required" : false, "type" : "string" }, { "name" : "APIM-OrgUuid", "in" : "header", "description" : "Org Id", "required" : false, "type" : "string" } ], "produces" : [ "application/json" ], "responses" : { "200" : { "description" : "Success", "schema" : { "$ref" : "#/definitions/ErrorsResponse" } }, "400" : { "description" : "Bad Request", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } }, "500" : { "description" : "Internal Server Error", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } } }, "summary" : "Retrieves Error Metrics based on type parameter", "tags" : [ "Error Metric Apis" ] }, "parameters" : [ ] }, "/errors/{type}/by-{timeAggregation}" : { "get" : { "consumes" : [ "application/json" ], "operationId" : "getErrorMetricsByAggrUsingGET", "parameters" : [ { "name" : "type", "in" : "path", "description" : "Request Type", "required" : true, "type" : "string", "enum" : [ "apis", "apps" ] }, { "name" : "timeAggregation", "in" : "path", "description" : "Time Buckets", "required" : true, "type" : "string", "default" : "day", "enum" : [ "minute", "hour", "day", "week", "month" ] }, { "name" : "timerange", "in" : "query", "description" : "Request Time Period", "required" : false, "type" : "string", "default" : "week", "enum" : [ "hour", "day", "week", "month", "year", "custom" ] }, { "name" : "startDate", "in" : "query", "description" : "Start Date (yyyy-MM-dd)", "required" : false, "type" : "string" }, { "name" : "endDate", "in" : "query", "description" : "End Date (yyyy-MM-dd)", "required" : false, "type" : "string" }, { "name" : "appIds", "in" : "query", "description" : "comma seperated app Ids", "required" : false, "type" : "string" }, { "name" : "apiIds", "in" : "query", "description" : "comma seperated api Ids", "required" : false, "type" : "string" }, { "name" : "orgIds", "in" : "query", "description" : "comma seperated org Ids", "required" : false, "type" : "string" }, { "name" : "proxyIds", "in" : "query", "description" : "comma seperated proxy (gateway server) Ids", "required" : false, "type" : "string" }, { "name" : "buckets", "in" : "query", "description" : "Buckets. Available buckets: apis| apps| orgs| serviceErrors| policyErrors| methodType", "required" : false, "type" : "string" }, { "name" : "sortorder", "in" : "query", "description" : "Sort Order for Bucketed entries", "required" : false, "type" : "string", "default" : "desc", "enum" : [ "desc", "asc" ] }, { "name" : "sortby", "in" : "query", "description" : "Sort Field for Bucketed entries", "required" : false, "type" : "string", "default" : "errors", "enum" : [ "date", "errors", "errorRate", "errorDist", "appName", "apiName" ] }, { "name" : "limit", "in" : "query", "description" : "Comma separated limits. Number of Bucketed Results to be returned", "required" : false, "type" : "string" }, { "name" : "stats", "in" : "query", "description" : "Avaliable stats: errorRate, errorDist", "required" : false, "type" : "string" }, { "name" : "APIM-OrgUuid", "in" : "header", "description" : "Org Id", "required" : false, "type" : "string" } ], "produces" : [ "application/json" ], "responses" : { "200" : { "description" : "Success", "schema" : { "$ref" : "#/definitions/ErrorsTsResponse" } }, "400" : { "description" : "Bad Request", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } }, "500" : { "description" : "Internal Server Error", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } } }, "summary" : "Retrieves Error Metrics aggregated by time based on type parameter", "tags" : [ "Error Metric Apis" ] }, "parameters" : [ ] }, "/hits/{type}" : { "get" : { "consumes" : [ "application/json" ], "operationId" : "getHitMetricsUsingGET", "parameters" : [ { "name" : "type", "in" : "path", "description" : "Request Type", "required" : true, "type" : "string", "enum" : [ "apis", "apps" ] }, { "name" : "timerange", "in" : "query", "description" : "Request Time Period", "required" : false, "type" : "string", "default" : "week", "enum" : [ "hour", "day", "week", "month", "year", "custom" ] }, { "name" : "startDate", "in" : "query", "description" : "Start Date (yyyy-MM-dd)", "required" : false, "type" : "string" }, { "name" : "endDate", "in" : "query", "description" : "End Date (yyyy-MM-dd)", "required" : false, "type" : "string" }, { "name" : "appIds", "in" : "query", "description" : "comma seperated app Ids", "required" : false, "type" : "string" }, { "name" : "apiIds", "in" : "query", "description" : "comma seperated api Ids", "required" : false, "type" : "string" }, { "name" : "orgIds", "in" : "query", "description" : "comma seperated org Ids", "required" : false, "type" : "string" }, { "name" : "proxyIds", "in" : "query", "description" : "comma seperated proxy (gateway server) Ids", "required" : false, "type" : "string" }, { "name" : "buckets", "in" : "query", "description" : "Comma separated buckets. Available buckets: apis, apps, orgs", "required" : false, "type" : "string" }, { "name" : "sortorder", "in" : "query", "description" : "Sort Order for Bucketed entries", "required" : false, "type" : "string", "default" : "desc", "enum" : [ "desc", "asc" ] }, { "name" : "sortby", "in" : "query", "description" : "Sort Field for Bucketed entries", "required" : false, "type" : "string", "default" : "hits", "enum" : [ "hits", "appName", "apiName" ] }, { "name" : "limit", "in" : "query", "description" : "Comma separated limits. Number of Bucketed Results to be returned", "required" : false, "type" : "string" }, { "name" : "APIM-OrgUuid", "in" : "header", "description" : "Org Id", "required" : false, "type" : "string" } ], "produces" : [ "application/json" ], "responses" : { "200" : { "description" : "Success", "schema" : { "$ref" : "#/definitions/HitsResponse" } }, "400" : { "description" : "Bad Request", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } }, "500" : { "description" : "Internal Server Error", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } } }, "summary" : "Retrieves Hit Metrics based on type parameter", "tags" : [ "Hit Metric Apis" ] }, "parameters" : [ ] }, "/hits/{type}/by-{timeAggregation}" : { "get" : { "consumes" : [ "application/json" ], "operationId" : "getHitMetricsByAggrUsingGET", "parameters" : [ { "name" : "type", "in" : "path", "description" : "Request Type", "required" : true, "type" : "string", "enum" : [ "apis", "apps" ] }, { "name" : "timeAggregation", "in" : "path", "description" : "Time Buckets", "required" : true, "type" : "string", "default" : "day", "enum" : [ "minute", "hour", "day", "week", "month" ] }, { "name" : "timerange", "in" : "query", "description" : "Request Time Range", "required" : false, "type" : "string", "default" : "week", "enum" : [ "hour", "day", "week", "month", "year", "custom" ] }, { "name" : "startDate", "in" : "query", "description" : "Start Date (yyyy-MM-dd)", "required" : false, "type" : "string" }, { "name" : "endDate", "in" : "query", "description" : "End Date (yyyy-MM-dd)", "required" : false, "type" : "string" }, { "name" : "appIds", "in" : "query", "description" : "comma seperated app Ids", "required" : false, "type" : "string" }, { "name" : "apiIds", "in" : "query", "description" : "comma seperated api Ids", "required" : false, "type" : "string" }, { "name" : "orgIds", "in" : "query", "description" : "comma seperated org Ids", "required" : false, "type" : "string" }, { "name" : "proxyIds", "in" : "query", "description" : "comma seperated proxy (gateway server) Ids", "required" : false, "type" : "string" }, { "name" : "buckets", "in" : "query", "description" : "Comma separated buckets. Available buckets: apis, apps, org", "required" : false, "type" : "string" }, { "name" : "sortorder", "in" : "query", "description" : "Sort Order for Bucketed entries", "required" : false, "type" : "string", "default" : "desc", "enum" : [ "desc", "asc" ] }, { "name" : "sortby", "in" : "query", "description" : "Sort Field for Bucketed entries", "required" : false, "type" : "string", "default" : "date", "enum" : [ "date", "hits", "appName", "apiName" ] }, { "name" : "limit", "in" : "query", "description" : "Comma separated limits. Number of Bucketed Results to be returned", "required" : false, "type" : "string" }, { "name" : "APIM-OrgUuid", "in" : "header", "description" : "Org Id", "required" : false, "type" : "string" } ], "produces" : [ "application/json" ], "responses" : { "200" : { "description" : "Success", "schema" : { "$ref" : "#/definitions/HitsTsResponse" } }, "400" : { "description" : "Bad Request", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } }, "500" : { "description" : "Internal Server Error", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } } }, "summary" : "Retrieves Hit Metrics based on type and aggregation parameter", "tags" : [ "Hit Metric Apis" ] }, "parameters" : [ ] }, "/latency/{type}" : { "get" : { "consumes" : [ "application/json" ], "operationId" : "getLatencyMetricsUsingGET", "parameters" : [ { "name" : "type", "in" : "path", "description" : "Request Type", "required" : true, "type" : "string", "default" : "apis", "enum" : [ "apis", "apps" ] }, { "name" : "timerange", "in" : "query", "description" : "Request Time Range", "required" : false, "type" : "string", "default" : "week", "enum" : [ "hour", "day", "week", "month", "year", "custom" ] }, { "name" : "startDate", "in" : "query", "description" : "Start Date (yyyy-MM-dd)", "required" : false, "type" : "string" }, { "name" : "endDate", "in" : "query", "description" : "End Date (yyyy-MM-dd)", "required" : false, "type" : "string" }, { "name" : "apiIds", "in" : "query", "description" : "comma seperated api Ids", "required" : false, "type" : "string" }, { "name" : "appIds", "in" : "query", "description" : "comma seperated app Ids", "required" : false, "type" : "string" }, { "name" : "orgIds", "in" : "query", "description" : "comma seperated org Ids", "required" : false, "type" : "string" }, { "name" : "proxyIds", "in" : "query", "description" : "comma seperated proxy (gateway server) Ids", "required" : false, "type" : "string" }, { "name" : "buckets", "in" : "query", "description" : "Buckets. Available buckets: apis, apps, orgs", "required" : false, "type" : "string" }, { "name" : "sortorder", "in" : "query", "description" : "Sort Order for Bucketed entries", "required" : false, "type" : "string", "default" : "desc", "enum" : [ "desc", "asc" ] }, { "name" : "sortby", "in" : "query", "description" : "Sort Field for Bucketed entries", "required" : false, "type" : "string", "default" : "avg", "enum" : [ "avg", "min", "max", "apiName", "apiId" ] }, { "name" : "limit", "in" : "query", "description" : "Comma separated limits. Number of Bucketed Results to be returned", "required" : false, "type" : "string" }, { "name" : "stats", "in" : "query", "description" : "Comma separated stats. Avaliable stats: avg, min, max", "required" : false, "type" : "string" }, { "name" : "APIM-OrgUuid", "in" : "header", "description" : "Org Id", "required" : false, "type" : "string" } ], "produces" : [ "application/json" ], "responses" : { "200" : { "description" : "Success", "schema" : { "$ref" : "#/definitions/LatenciesResponse" } }, "400" : { "description" : "Bad Request", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } }, "500" : { "description" : "Internal Server Error", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } } }, "summary" : "Retrieves Latency Metrics based on type parameter", "tags" : [ "Latency Metric Apis" ] }, "parameters" : [ ] }, "/latency/{type}/by-{timeAggregation}" : { "get" : { "consumes" : [ "application/json" ], "operationId" : "getLatencyMetricsByAggrUsingGET", "parameters" : [ { "name" : "type", "in" : "path", "description" : "Request Type", "required" : true, "type" : "string", "default" : "apis", "enum" : [ "apis", "apps" ] }, { "name" : "timeAggregation", "in" : "path", "description" : "Time Buckets", "required" : true, "type" : "string", "default" : "day", "enum" : [ "minute", "hour", "day", "week", "month", "hod", "dow" ] }, { "name" : "timerange", "in" : "query", "description" : "Request Time Range", "required" : false, "type" : "string", "default" : "week", "enum" : [ "hour", "day", "week", "month", "year", "custom" ] }, { "name" : "startDate", "in" : "query", "description" : "Start Date (yyyy-MM-dd)", "required" : false, "type" : "string" }, { "name" : "endDate", "in" : "query", "description" : "End Date (yyyy-MM-dd)", "required" : false, "type" : "string" }, { "name" : "proxyIds", "in" : "query", "description" : "comma seperated proxy (gateway server) Ids", "required" : false, "type" : "string" }, { "name" : "apiIds", "in" : "query", "description" : "comma seperated api Ids", "required" : false, "type" : "string" }, { "name" : "appIds", "in" : "query", "description" : "comma seperated app Ids", "required" : false, "type" : "string" }, { "name" : "orgIds", "in" : "query", "description" : "comma seperated org Ids", "required" : false, "type" : "string" }, { "name" : "buckets", "in" : "query", "description" : "Buckets. Available buckets: apis, apps, orgs", "required" : false, "type" : "string" }, { "name" : "sortorder", "in" : "query", "description" : "Sort Order for Bucketed entries", "required" : false, "type" : "string", "default" : "desc", "enum" : [ "desc", "asc" ] }, { "name" : "sortby", "in" : "query", "description" : "Sort Field for Bucketed entries. Applicable only to the stats selected.", "required" : false, "type" : "string", "default" : "date", "enum" : [ "date", "avg", "min", "max", "apiName", "apiId" ] }, { "name" : "limit", "in" : "query", "description" : "Comma separated limits. Number of Bucketed Results to be returned", "required" : false, "type" : "string" }, { "name" : "stats", "in" : "query", "description" : "Comma separated stats. Avaliable stats: avg, min, max", "required" : false, "type" : "string" }, { "name" : "APIM-OrgUuid", "in" : "header", "description" : "Org Id", "required" : false, "type" : "string" } ], "produces" : [ "application/json" ], "responses" : { "200" : { "description" : "Success", "schema" : { "$ref" : "#/definitions/LatenciesTsResponse" } }, "400" : { "description" : "Bad Request", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } }, "500" : { "description" : "Internal Server Error", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } } }, "summary" : "Retrieves Latency Metrics based on type and timeaggregation parameter", "tags" : [ "Latency Metric Apis" ] }, "parameters" : [ ] }, "/usage/{type}/plan" : { "get" : { "consumes" : [ "application/json" ], "operationId" : "getOrgUsageMetricsUsingGET", "parameters" : [ { "name" : "type", "in" : "path", "description" : "Request Type", "required" : true, "type" : "string", "enum" : [ "orgs" ] }, { "name" : "planType", "in" : "query", "description" : "Plan Type", "required" : false, "type" : "string", "default" : "monthly", "enum" : [ "monthly", "daily" ] }, { "name" : "timerange", "in" : "query", "description" : "Request Time Period. Should be used only with planType 'monthly'", "required" : false, "type" : "string", "enum" : [ "week", "day", "month" ] }, { "name" : "orgIds", "in" : "query", "description" : "comma seperated org Ids", "required" : false, "type" : "string" }, { "name" : "apiIds", "in" : "query", "description" : "comma seperated api Ids", "required" : false, "type" : "string" }, { "name" : "appIds", "in" : "query", "description" : "comma seperated app Ids", "required" : false, "type" : "string" }, { "name" : "sortorder", "in" : "query", "description" : "Sort Order for Usage Entries", "required" : false, "type" : "string", "default" : "desc", "enum" : [ "desc", "asc" ] }, { "name" : "sortby", "in" : "query", "description" : "Sort Field for Usage Entries", "required" : false, "type" : "string", "default" : "usage", "enum" : [ "usage", "orgName", "orgId" ] }, { "name" : "buckets", "in" : "query", "description" : "Comma separated buckets. Available buckets: apis, apps", "required" : false, "type" : "string" }, { "name" : "orgLimit", "in" : "query", "description" : "Number of Orgs to be returned", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "limit", "in" : "query", "description" : "Number of Usage Entries to be returned", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "APIM-OrgUuid", "in" : "header", "description" : "Org Id", "required" : false, "type" : "string" } ], "produces" : [ "application/json" ], "responses" : { "200" : { "description" : "Success", "schema" : { "$ref" : "#/definitions/UsagesResponse" } }, "400" : { "description" : "Bad Request", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } }, "500" : { "description" : "Internal Server Error", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } } }, "summary" : "Retrieves Usage Metrics of Organizations", "tags" : [ "Usage Metric Apis" ] }, "parameters" : [ ] }, "/usage/{type}/plan/by-{timeAggregation}" : { "get" : { "consumes" : [ "application/json" ], "operationId" : "getOrgUsageMetricsByTimeAggrUsingGET", "parameters" : [ { "name" : "type", "in" : "path", "description" : "Request Type", "required" : true, "type" : "string", "enum" : [ "orgs" ] }, { "name" : "timeAggregation", "in" : "path", "description" : "Time Interval", "required" : true, "type" : "string", "default" : "day", "enum" : [ "hour", "day", "week", "month" ] }, { "name" : "planType", "in" : "query", "description" : "Plan Type", "required" : false, "type" : "string", "default" : "monthly", "enum" : [ "monthly", "daily" ] }, { "name" : "timerange", "in" : "query", "description" : "Request Time Period. Should be used only with planType 'monthly'", "required" : false, "type" : "string", "default" : "week", "enum" : [ "hour", "day", "week", "month", "year", "custom" ] }, { "name" : "startDate", "in" : "query", "description" : "Start Date (yyyy-MM-dd)", "required" : false, "type" : "string" }, { "name" : "endDate", "in" : "query", "description" : "End Date (yyyy-MM-dd)", "required" : false, "type" : "string" }, { "name" : "orgIds", "in" : "query", "description" : "comma seperated org Ids", "required" : false, "type" : "string" }, { "name" : "apiIds", "in" : "query", "description" : "comma seperated api Ids", "required" : false, "type" : "string" }, { "name" : "appIds", "in" : "query", "description" : "comma seperated app Ids", "required" : false, "type" : "string" }, { "name" : "buckets", "in" : "query", "description" : "Comma separated buckets. Available buckets: apis, apps", "required" : false, "type" : "string" }, { "name" : "sortorder", "in" : "query", "description" : "Sort Order for Usage Entries", "required" : false, "type" : "string", "default" : "desc", "enum" : [ "desc", "asc" ] }, { "name" : "sortby", "in" : "query", "description" : "Sort Field for Usage Entries", "required" : false, "type" : "string", "default" : "usage", "enum" : [ "date", "usage", "orgName", "orgId" ] }, { "name" : "orgLimit", "in" : "query", "description" : "Number of Orgs to be returned", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "limit", "in" : "query", "description" : "Number of Usage Entries to be returned", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "APIM-OrgUuid", "in" : "header", "description" : "Org Id", "required" : false, "type" : "string" } ], "produces" : [ "application/json" ], "responses" : { "200" : { "description" : "Success", "schema" : { "$ref" : "#/definitions/UsagesResponse" } }, "400" : { "description" : "Bad Request", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } }, "500" : { "description" : "Internal Server Error", "schema" : { "$ref" : "#/definitions/ExceptionResponse" } } }, "summary" : "<mark>Retrieves Usage Metrics of Organizations</mark>", "tags" : [ "Usage Metric Apis" ] }, "parameters" : [ ] } }, "schemes" : [ "https" ], "swagger" : "2.0", "tags" : [ { "description" : "Provides hit metrics of Apis and Apps", "name" : "Hit Metric Apis" }, { "description" : "Provides latency metrics of Apis", "name" : "Latency Metric Apis" }, { "description" : "Provides error metrics of Apis and Apps", "name" : "Error Metric Apis" }, { "description" : "Provides Usage metrics", "name" : "Usage Metric Apis" } ] }