Reports - List By User

Lists report records by User.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser?$filter={$filter}&api-version=2022-08-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser?$filter={$filter}&$top={$top}&$skip={$skip}&$orderby={$orderby}&api-version=2022-08-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

serviceName
path True

string

The name of the API Management service.

Regex pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

subscriptionId
path True

string

The ID of the target subscription.

$filter
query True

string

| Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |

api-version
query True

string

The API version to use for this operation.

$orderby
query

string

OData order by query option.

$skip
query

integer

int32

Number of records to skip.

$top
query

integer

int32

Number of records to return.

Responses

Name Type Description
200 OK

ReportCollection

Lists a collection of Report record.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

ApiManagementGetReportsByUser

Sample Request

GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/reports/byUser?$filter=timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'&api-version=2022-08-01

Sample Response

{
  "value": [
    {
      "name": "Administrator",
      "userId": "/users/1",
      "callCountSuccess": 13,
      "callCountBlocked": 1,
      "callCountFailed": 0,
      "callCountOther": 0,
      "callCountTotal": 14,
      "bandwidth": 11019,
      "cacheHitCount": 0,
      "cacheMissCount": 0,
      "apiTimeAvg": 1015.7607923076923,
      "apiTimeMin": 330.3206,
      "apiTimeMax": 1819.2173,
      "serviceTimeAvg": 957.094776923077,
      "serviceTimeMin": 215.24,
      "serviceTimeMax": 1697.3612
    },
    {
      "name": "Samir Solanki",
      "userId": "/users/56eaec62baf08b06e46d27fd",
      "callCountSuccess": 0,
      "callCountBlocked": 0,
      "callCountFailed": 0,
      "callCountOther": 0,
      "callCountTotal": 0,
      "bandwidth": 0,
      "cacheHitCount": 0,
      "cacheMissCount": 0,
      "apiTimeAvg": 0,
      "apiTimeMin": 0,
      "apiTimeMax": 0,
      "serviceTimeAvg": 0,
      "serviceTimeMin": 0,
      "serviceTimeMax": 0
    },
    {
      "name": "Anonymous",
      "userId": "/users/54c800b332965a0035030000",
      "callCountSuccess": 0,
      "callCountBlocked": 0,
      "callCountFailed": 0,
      "callCountOther": 0,
      "callCountTotal": 0,
      "bandwidth": 0,
      "cacheHitCount": 0,
      "cacheMissCount": 0,
      "apiTimeAvg": 0,
      "apiTimeMin": 0,
      "apiTimeMax": 0,
      "serviceTimeAvg": 0,
      "serviceTimeMin": 0,
      "serviceTimeMax": 0
    }
  ],
  "count": 3,
  "nextLink": ""
}

Definitions

Name Description
ErrorFieldContract

Error Field contract.

ErrorResponse

Error Response.

ReportCollection

Paged Report records list representation.

ReportRecordContract

Report data.

ErrorFieldContract

Error Field contract.

Name Type Description
code

string

Property level error code.

message

string

Human-readable representation of property-level error.

target

string

Property name.

ErrorResponse

Error Response.

Name Type Description
error.code

string

Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.

error.details

ErrorFieldContract[]

The list of invalid fields send in request, in case of validation error.

error.message

string

Human-readable representation of the error.

ReportCollection

Paged Report records list representation.

Name Type Description
count

integer

Total record count number across all pages.

nextLink

string

Next page link if any.

value

ReportRecordContract[]

Page values.

ReportRecordContract

Report data.

Name Type Description
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).

name

string

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

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

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.