Reports

List By Service

Lists report records for the service instance.

You can filter the results by specifying a value for the $filter parameter using OData filter expression syntax.

Reports are available in the following aggregations. Each report aggregation has different filter parameters available for filtering the returned report records.

Get metrics over a period of time

The byTime aggregation returns metrics covering the specified time period.

The following fields and operators are supported for the $filter parameter. This parameter is required and must include a timestamp for the call to be successful.

Field Supported operators Description
timestamp ge,le The start and end of the reporting period, for example $filter=timestamp ge datetime'2014-10-07T00:00:00' and timestamp le datetime'2014-10-14T00:00:00'. If le is omitted the current date and time is used for the end of the reporting period. You must specify a starting date and time for ge.
apiRegion eq Azure region where the gateway that processed this request is located.
userId eq User identifier
productId eq Product identifier.
apiId eq API identifier.
operationId eq Operation identifier.
subscriptionId eq Subscription identifier.

This report requires the interval parameter, which specifies the period of time over which the data presented in this entity was aggregated, in ISO 8601 format: P500DT3H10M15.304S. The minimum interval is fifteen minutes, and interval must be in even fifteen minute increments; otherwise a 400 Bad Request error is returned.

This parameter is required.

This report supports the following $filter parameter expression operand combinations.

  • API
  • API and operation
  • Product
  • Subscription
  • User
  • User and API
  • User and API and operation
  • User and product

For this report, the following fields are returned.

  • timestamp
  • interval
  • callCountSuccess
  • callCountBlocked
  • callCountFailed
  • callCountOther
  • bandwidth
  • cacheHitsCount
  • cacheMissCount
  • apiTimeAvg
  • apiTimeMin
  • apiTimeMax
  • serviceTimeAvg
  • serviceTimeMin
  • serviceTimeMax

All other fields in the response contain default values.

Get metrics aggregated by geographical region

The byGeo aggregation returns metrics aggregated by geographical region.

The following fields and operators are supported. The $filter parameter is required and must include a timestamp for the call to be successful.

Field Supported operations Description
timestamp ge,le The start and end of the reporting period, for example $filter=timestamp ge datetime'2014-10-07T00:00:00' and timestamp le datetime'2014-10-14T00:00:00'. If le is omitted the current date and time is used for the end of the reporting period. You must specify a starting date and time for ge.
apiRegion eq Azure region where the gateway that processed this request is located.
userId eq User identifier.
productId eq Product identifier.
apiId eq API identifier.
operationId eq Operation identifier.
subscriptionId eq Subscription identifier.

This report supports the following $filter parameter expression operand combinations.

  • API
  • API and operation
  • Product
  • Subscription
  • User
  • User and API
  • User and API and operation
  • User and product

For this report, the following fields are returned.

  • country
  • region
  • zip
  • callCountSuccess
  • callCountBlocked
  • callCountFailed
  • callCountOther
  • bandwidth
  • cacheHitsCount
  • cacheMissCount
  • apiTimeAvg
  • apiTimeMin
  • apiTimeMax
  • serviceTimeAvg
  • serviceTimeMin
  • serviceTimeMax

All other fields in the response contain default values.

Get metrics aggregated by user

The byUser aggregation returns metrics aggregated by user.

The following fields and operators are supported. The $filter parameter is required and must include a timestamp for the call to be successful.

Field Supported operations Description
timestamp ge,le The start and end of the reporting period, for example $filter=timestamp ge datetime'2014-10-07T00:00:00' and timestamp le datetime'2014-10-14T00:00:00'. If le is omitted the current date and time is used for the end of the reporting period. You must specify a starting date and time for ge.
userId eq User identifier.
apiRegion eq Azure region where the gateway that processed this request is located.
productId eq Product identifier.
apiId eq API identifier.
operationId eq Operation identifier.
subscriptionId eq Subscription identifier.

This operation has an $orderby parameter that provides an OData order by query option. The following fields are supported.

  • name
  • callCountSuccess
  • callCountBlocked
  • callCountFailed
  • callCountOther
  • bandwidth
  • apiTimeAvg

This report supports the following $filter parameter expression operand combinations.

  • API
  • API and operation
  • Product
  • Subscription - can be combined with any other filter
  • User - can be combined with any other filter

For this report, the following fields are returned.

  • name
  • userId
  • callCountSuccess
  • callCountBlocked
  • callCountFailed
  • callCountOther
  • bandwidth
  • cacheHitsCount
  • cacheMissCount
  • apiTimeAvg
  • apiTimeMin
  • apiTimeMax
  • serviceTimeAvg
  • serviceTimeMin
  • serviceTimeMax

All other fields in the response contain default values.

Get metrics aggregated by product

The byProduct aggregation returns metrics aggregated by product.

The following fields and operators are supported. The $filter parameter is required and must include a timestamp for the call to be successful.

Field Supported operations Description
timestamp ge,le The start and end of the reporting period, for example $filter=timestamp ge datetime'2014-10-07T00:00:00' and timestamp le datetime'2014-10-14T00:00:00'. If le is omitted the current date and time is used for the end of the reporting period. You must specify a starting date and time for ge.
apiRegion eq Azure region where the gateway that processed this request is located.
userId eq User identifier
productId eq Product identifier.
subscriptionId eq Subscription identifier.

This operation has an $orderby parameter that provides an OData order by query option. The following fields are supported.

  • name
  • callCountSuccess
  • callCountBlocked
  • callCountFailed
  • callCountOther
  • bandwidth
  • apiTimeAvg

    This report supports the following $filter parameter expression operand combinations.

  • User

  • Subscription - can be combined with any other filter
  • Product - can be combined with any other filter

For this report, the following fields are returned.

  • name
  • productId
  • callCountSuccess
  • callCountBlocked
  • callCountFailed
  • callCountOther
  • bandwidth
  • cacheHitsCount
  • cacheMissCount
  • apiTimeAvg
  • apiTimeMin
  • apiTimeMax
  • serviceTimeAvg
  • serviceTimeMin
  • serviceTimeMax

All other fields in the response contain default values.

Get metrics aggregated by API

The byApi aggregation returns metrics aggregated by API.

The following fields and operators are supported. The $filter parameter is required and must include a timestamp for the call to be successful.

Field Supported operations Description
timestamp ge,le The start and end of the reporting period, for example $filter=timestamp ge datetime'2014-10-07T00:00:00' and timestamp le datetime'2014-10-14T00:00:00'. If le is omitted the current date and time is used for the end of the reporting period. You must specify a starting date and time for ge.
apiRegion eq Azure region where the gateway that processed this request is located.
userId eq User identifier.
productId eq Product identifier.
subscriptionId eq Subscription identifier.
apiId eq API identifier.

This operation has an $orderby parameter that provides an OData order by query option. The following fields are supported.

  • name
  • callCountSuccess
  • callCountBlocked
  • callCountFailed
  • callCountOther
  • bandwidth
  • apiTimeAvg

    This report supports the following $filter parameter expression operand combinations.

  • Product

  • User
  • User and product
  • API - can be combined with any other filter
  • Subscription - can be combined with any other filter

For this report, the following fields are returned.

  • name
  • apiId
  • callCountSuccess
  • callCountBlocked
  • callCountFailed
  • callCountOther
  • bandwidth
  • cacheHitsCount
  • cacheMissCount
  • apiTimeAvg
  • apiTimeMin
  • apiTimeMax
  • serviceTimeAvg
  • serviceTimeMin
  • serviceTimeMax

All other fields in the response contain default values.

Get metrics aggregated by operation

The byOperation aggregation returns metrics aggregated by operation.

The following fields and operators are supported. The $filter parameter is required and must include a timestamp for the call to be successful.

Field Supported operations Description
timestamp ge,le The start and end of the reporting period, for example $filter=timestamp ge datetime'2014-10-07T00:00:00' and timestamp le datetime'2014-10-14T00:00:00'. If le is omitted the current date and time is used for the end of the reporting period. You must specify a starting date and time for ge.
apiRegion eq Azure region where the gateway that processed this request is located.
userId eq User identifier.
productId eq Product identifier.
apiId eq API identifier.
subscriptionId eq Subscription identifier.
operationId eq Operation identifier.

This operation has an $orderby parameter that provides an OData order by query option. The following fields are supported.

  • name
  • callCountSuccess
  • callCountBlocked
  • callCountFailed
  • callCountOther
  • bandwidth
  • apiTimeAvg

    This report supports the following $filter parameter expression operand combinations.

  • API

  • Product
  • User
  • User and API
  • User and product
  • Subscription - can be combined with any other filter
  • Subscription - can be combined with API and/or operation
  • Operation - may not be used alone, must be combined with API

For this report, the following fields are returned.

  • name
  • operationId
  • callCountSuccess
  • callCountBlocked
  • callCountFailed
  • callCountOther
  • bandwidth
  • cacheHitsCount
  • cacheMissCount
  • apiTimeAvg
  • apiTimeMin
  • apiTimeMax
  • serviceTimeAvg
  • serviceTimeMin
  • serviceTimeMax

All other fields in the response contain default values.

Get metrics aggregated by subscription

The bySubscription aggregation returns metrics aggregated by subscription.

The following fields and operators are supported. The $filter parameter is required and must include a timestamp for the call to be successful.

Field Supported operations Description
timestamp ge,le The start and end of the reporting period, for example $filter=timestamp ge datetime'2014-10-07T00:00:00' and timestamp le datetime'2014-10-14T00:00:00'. If le is omitted the current date and time is used for the end of the reporting period. You must specify a starting date and time for ge.
apiRegion eq Azure region where the gateway that processed this request is located.
userId eq User identifier.
productId eq Product identifier.
subscriptionId eq Subscription identifier.

This operation has an $orderby parameter that provides an OData order by query option. The following fields are supported.

  • name
  • callCountSuccess
  • callCountBlocked
  • callCountFailed
  • callCountOther
  • callCountTotal
  • bandwidth
  • apiTimeAvg

    This report supports the following $filter parameter expression operand combinations.

  • API

  • API and operation
  • User - can be combined with any other filter
  • Product - can be combined with any other filter
  • Subscription - can be combined with any other filter

For this report, the following fields are returned.

  • name
  • userId
  • productId
  • subscriptionId
  • callCountSuccess
  • callCountBlocked
  • callCountFailed
  • callCountOther
  • callCountTotal
  • bandwidth
  • cacheHitsCount
  • cacheMissCount
  • apiTimeAvg
  • apiTimeMin
  • apiTimeMax
  • serviceTimeAvg
  • serviceTimeMin
  • serviceTimeMax

All other fields in the response contain default values.

Get request log entries

The byRequest aggregation returns request log entries.

The following fields and operators are supported. The $filter parameter is required and must include a timestamp for the call to be successful.

Field Supported operations Description
timestamp ge,le The start and end of the reporting period, for example $filter=timestamp ge datetime'2014-10-07T00:00:00' and timestamp le datetime'2014-10-14T00:00:00'. If le is omitted the current date and time is used for the end of the reporting period. You must specify a starting date and time for ge.

Sample response body


{  
"value":   
  [  
        {  
            "apiId": "/apis/1",  
            "operationId": "/apis/1/operations/15",  
            "productId": "/products/1",  
            "userId": "/users/1",  
            "method": "GET",  
            "url": "https://contoso.azure-api.net/weather/exampleApi?parameter=12345",  
            "ipAddress": "52.19.150.51",  
            "backendResponseCode": 200,  
            "responseCode": 200,  
            "responseSize": 6207,  
            "timestamp": "2016-08-26T21:48:10.6363746",  
            "cache": "none",  
            "apiTime": 480.2314,  
            "serviceTime": 459.9143,  
            "apiRegion": "West Europe",  
            "subscriptionId": "/subscriptions/33",  
            "requestSize": 0  
        },  
            "apiId": "/apis/2",  
            "operationId": "/apis/2/operations/10",  
            "productId": "/products/2",  
            "userId": "/users/2",  
            "method": "GET",  
            "url": "https://contoso.azure-api.net/weather/anotherExampleApi?parameter=6789",  
            "ipAddress": "100.15.65.51",  
            "backendResponseCode": 200,  
            "responseCode": 200,  
            "responseSize": 7405,  
            "timestamp": "2016-08-26T21:53:15.6378946",  
            "cache": "none",  
            "apiTime": 315.5657,  
            "serviceTime": 212.8273,  
            "apiRegion": "West US",  
            "subscriptionId": "/subscriptions/55",  
            "requestSize": 0  
        }                        
    ],  
  "count": 2  
}  
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/{aggregation}?api-version=2016-10-10[&$filter&$top&$skip&interval]

Properties

aggregation

Report aggregation.

inpath
requiredTrue
typestring
api-version

Version of the API to be used with the client request.

inquery
requiredTrue
typestring
resourceGroupName

The name of the resource group.

inpath
requiredTrue
typestring
serviceName

The name of the API Management service.

inpath
requiredTrue
typestring
subscriptionId

Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

inpath
requiredTrue
typestring
$filter

The filter to apply on the operation.

inquery
requiredFalse
typestring
$skip

Number of records to skip.

inquery
requiredFalse
typeinteger
$top

Number of records to return.

inquery
requiredFalse
typeinteger
interval

By time interval. This value is only applicable to ByTime aggregation. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds))

inquery
requiredFalse
typestring

Returns (HTTP Response Codes)

200 response

Lists a collection of Report record.

typeReportCollection
value

Page values.

name

Name depending on report endpoint specifies product, API, operation or developer name.

typestring
timestamp

Start of aggregation period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.

typedate-time
interval

Length of agregation period.

typeint64
country

Country to which this record data is related.

typestring
region

Country region to which this record data is related.

typestring
zip

Zip code to which this record data is related.

typestring
userId

User identifier path. /users/{userId}

read onlyTrue
typestring
productId

Product identifier path. /products/{productId}

read onlyTrue
typestring
apiId

API identifier path. /apis/{apiId}

typestring
operationId

Operation identifier path. /apis/{apiId}/operations/{operationId}

typestring
apiRegion

API region identifier.

typestring
subscriptionId

Subscription identifier path. /subscriptions/{subscriptionId}

typestring
callCountSuccess

Number of succesful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect

typeint32
callCountBlocked

Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorize and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests

typeint32
callCountFailed

Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600

typeint32
callCountOther

Number of other calls.

typeint32
callCountTotal

Total number of calls.

typeint32
bandwidth

Bandwidth consumed.

typeint64
cacheHitCount

Number of times when content was served from cache policy.

typeint32
cacheMissCount

Number of times content was fetched from backend.

typeint32
apiTimeAvg

Average time it took to process request.

typedouble
apiTimeMin

Minimum time it took to process request.

typedouble
apiTimeMax

Maximum time it took to process request.

typedouble
serviceTimeAvg

Average time it took to process request on backend.

typedouble
serviceTimeMin

Minimum time it took to process request on backend.

typedouble
serviceTimeMax

Maximum time it took to process request on backend.

typedouble
count

Total record count number across all pages.

typeint64
nextLink

Next page link if any.

typestring