reports
Creates, updates, deletes, gets or lists a reports resource.
Overview
| Name | reports |
| Type | Resource |
| Id | azure.api_management.reports |
Fields
The following fields are returned by SELECT queries:
- list_by_time
- list_by_api
| Name | Datatype | Description |
|---|---|---|
name | string | Name depending on report endpoint specifies product, API, operation or developer name. |
apiId | string | API identifier path. /apis/{apiId}. |
apiRegion | string | API region identifier. |
apiTimeAvg | number | Average time it took to process request. |
apiTimeMax | number | Maximum time it took to process request. |
apiTimeMin | number | Minimum time it took to process request. |
bandwidth | integer | Bandwidth consumed. |
cacheHitCount | integer | Number of times when content was served from cache policy. |
cacheMissCount | integer | Number of times content was fetched from backend. |
callCountBlocked | integer | Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests. |
callCountFailed | integer | Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. |
callCountOther | integer | Number of other calls. |
callCountSuccess | integer | Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect. |
callCountTotal | integer | Total number of calls. |
country | string | Country to which this record data is related. |
interval | string | Length of aggregation period. 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 _). |
operationId | string | Operation identifier path. /apis/{apiId}/operations/{operationId}. |
productId | string | Product identifier path. /products/{productId}. |
region | string | Country region to which this record data is related. |
serviceTimeAvg | number | Average time it took to process request on backend. |
serviceTimeMax | number | Maximum time it took to process request on backend. |
serviceTimeMin | number | Minimum time it took to process request on backend. |
subscriptionId | string | Subscription identifier path. /subscriptions/{subscriptionId}. |
timestamp | string (date-time) | Start of aggregation period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. |
userId | string | User identifier path. /users/{userId}. |
zip | string | Zip code to which this record data is related. |
| Name | Datatype | Description |
|---|---|---|
name | string | Name depending on report endpoint specifies product, API, operation or developer name. |
apiId | string | API identifier path. /apis/{apiId}. |
apiRegion | string | API region identifier. |
apiTimeAvg | number | Average time it took to process request. |
apiTimeMax | number | Maximum time it took to process request. |
apiTimeMin | number | Minimum time it took to process request. |
bandwidth | integer | Bandwidth consumed. |
cacheHitCount | integer | Number of times when content was served from cache policy. |
cacheMissCount | integer | Number of times content was fetched from backend. |
callCountBlocked | integer | Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests. |
callCountFailed | integer | Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. |
callCountOther | integer | Number of other calls. |
callCountSuccess | integer | Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect. |
callCountTotal | integer | Total number of calls. |
country | string | Country to which this record data is related. |
interval | string | Length of aggregation period. 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 _). |
operationId | string | Operation identifier path. /apis/{apiId}/operations/{operationId}. |
productId | string | Product identifier path. /products/{productId}. |
region | string | Country region to which this record data is related. |
serviceTimeAvg | number | Average time it took to process request on backend. |
serviceTimeMax | number | Maximum time it took to process request on backend. |
serviceTimeMin | number | Minimum time it took to process request on backend. |
subscriptionId | string | Subscription identifier path. /subscriptions/{subscriptionId}. |
timestamp | string (date-time) | Start of aggregation period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. |
userId | string | User identifier path. /users/{userId}. |
zip | string | Zip code to which this record data is related. |
Methods
The following methods are available for this resource:
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
$filter | string | | Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| timestamp | filter | ge, le | | | apiId | filter | eq | | | operationId | filter | eq | | | productId | filter | eq | | | userId | filter | eq | | | apiRegion | filter | eq | | | subscriptionId | filter | eq | | . Required. |
interval | string | By time interval. 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 TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
service_name | string | The name of the API Management service. Required. |
subscription_id | string | |
$orderby | string | OData order by query option. Default value is None. |
$skip | integer | Number of records to skip. Default value is None. |
$top | integer | Number of records to return. Default value is None. |
SELECT examples
- list_by_time
- list_by_api
Lists report records by Time.
SELECT
name,
apiId,
apiRegion,
apiTimeAvg,
apiTimeMax,
apiTimeMin,
bandwidth,
cacheHitCount,
cacheMissCount,
callCountBlocked,
callCountFailed,
callCountOther,
callCountSuccess,
callCountTotal,
country,
interval,
operationId,
productId,
region,
serviceTimeAvg,
serviceTimeMax,
serviceTimeMin,
subscriptionId,
timestamp,
userId,
zip
FROM azure.api_management.reports
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}' -- required
AND interval = '{{ interval }}' -- required
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
AND $orderby = '{{ $orderby }}'
;
Lists report records by API.
SELECT
name,
apiId,
apiRegion,
apiTimeAvg,
apiTimeMax,
apiTimeMin,
bandwidth,
cacheHitCount,
cacheMissCount,
callCountBlocked,
callCountFailed,
callCountOther,
callCountSuccess,
callCountTotal,
country,
interval,
operationId,
productId,
region,
serviceTimeAvg,
serviceTimeMax,
serviceTimeMin,
subscriptionId,
timestamp,
userId,
zip
FROM azure.api_management.reports
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}' -- required
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
AND $orderby = '{{ $orderby }}'
;
Lifecycle Methods
- list_by_user
- list_by_operation
- list_by_product
- list_by_geo
- list_by_subscription
- list_by_request
Lists report records by User.
EXEC azure.api_management.reports.list_by_user
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@$filter='{{ $filter }}' --required,
@$top='{{ $top }}',
@$skip='{{ $skip }}',
@$orderby='{{ $orderby }}'
;
Lists report records by API Operations.
EXEC azure.api_management.reports.list_by_operation
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@$filter='{{ $filter }}' --required,
@$top='{{ $top }}',
@$skip='{{ $skip }}',
@$orderby='{{ $orderby }}'
;
Lists report records by Product.
EXEC azure.api_management.reports.list_by_product
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@$filter='{{ $filter }}' --required,
@$top='{{ $top }}',
@$skip='{{ $skip }}',
@$orderby='{{ $orderby }}'
;
Lists report records by geography.
EXEC azure.api_management.reports.list_by_geo
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@$filter='{{ $filter }}' --required,
@$top='{{ $top }}',
@$skip='{{ $skip }}'
;
Lists report records by subscription.
EXEC azure.api_management.reports.list_by_subscription
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@$filter='{{ $filter }}' --required,
@$top='{{ $top }}',
@$skip='{{ $skip }}',
@$orderby='{{ $orderby }}'
;
Lists report records by Request.
EXEC azure.api_management.reports.list_by_request
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@$filter='{{ $filter }}' --required,
@$top='{{ $top }}',
@$skip='{{ $skip }}'
;