Skip to main content

reports

Creates, updates, deletes, gets or lists a reports resource.

Overview

Namereports
TypeResource
Idazure.api_management.reports

Fields

The following fields are returned by SELECT queries:

Lists a collection of Report record.

NameDatatypeDescription
namestringName depending on report endpoint specifies product, API, operation or developer name.
apiIdstringAPI identifier path. /apis/{apiId}
apiRegionstringAPI region identifier.
apiTimeAvgnumber (double)Average time it took to process request.
apiTimeMaxnumber (double)Maximum time it took to process request.
apiTimeMinnumber (double)Minimum time it took to process request.
bandwidthinteger (int64)Bandwidth consumed.
cacheHitCountinteger (int32)Number of times when content was served from cache policy.
cacheMissCountinteger (int32)Number of times content was fetched from backend.
callCountBlockedinteger (int32)Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests
callCountFailedinteger (int32)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
callCountOtherinteger (int32)Number of other calls.
callCountSuccessinteger (int32)Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect
callCountTotalinteger (int32)Total number of calls.
countrystringCountry to which this record data is related.
intervalstringLength 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).
operationIdstringOperation identifier path. /apis/{apiId}/operations/{operationId}
productIdstringProduct identifier path. /products/{productId}
regionstringCountry region to which this record data is related.
serviceTimeAvgnumber (double)Average time it took to process request on backend.
serviceTimeMaxnumber (double)Maximum time it took to process request on backend.
serviceTimeMinnumber (double)Minimum time it took to process request on backend.
subscriptionIdstringSubscription identifier path. /subscriptions/{subscriptionId}
timestampstring (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.
userIdstringUser identifier path. /users/{userId}
zipstringZip code to which this record data is related.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_apiselectresourceGroupName, serviceName, $filter, subscriptionId$top, $skip, $orderbyLists report records by API.
list_by_userselectresourceGroupName, serviceName, $filter, subscriptionId$top, $skip, $orderbyLists report records by User.
list_by_operationselectresourceGroupName, serviceName, $filter, subscriptionId$top, $skip, $orderbyLists report records by API Operations.
list_by_productselectresourceGroupName, serviceName, $filter, subscriptionId$top, $skip, $orderbyLists report records by Product.
list_by_geoselectresourceGroupName, serviceName, $filter, subscriptionId$top, $skipLists report records by geography.
list_by_subscriptionselectresourceGroupName, serviceName, $filter, subscriptionId$top, $skip, $orderbyLists report records by subscription.
list_by_timeselectresourceGroupName, serviceName, $filter, interval, subscriptionId$top, $skip, $orderbyLists report records by Time.
list_by_requestselectresourceGroupName, serviceName, $filter, subscriptionId$top, $skipLists report records by Request.

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.

NameDatatypeDescription
$filterstring| Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| productId | filter | eq | | </br>| userId | filter | eq | | </br>| apiRegion | filter | eq | | </br>| subscriptionId | filter | eq | | </br>
intervalstring (duration)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)).
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serviceNamestringThe name of the API Management service.
subscriptionIdstringThe ID of the target subscription.
$orderbystringOData order by query option.
$skipinteger (int32)Number of records to skip.
$topinteger (int32)Number of records to return.

SELECT examples

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 resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND $filter = '{{ $filter }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
AND $orderby = '{{ $orderby }}'
;