Reports - List By Request

Lists report records by Request.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest?$filter={$filter}&api-version=2022-08-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest?$filter={$filter}&$top={$top}&$skip={$skip}&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 | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | |
| subscriptionId | filter | eq | |

api-version
query True

string

The API version to use for this operation.

$skip
query

integer

int32

Number of records to skip.

$top
query

integer

int32

Number of records to return.

Responses

Name Type Description
200 OK

RequestReportCollection

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

ApiManagementGetReportsByRequest

Sample Request

GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/reports/byRequest?$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": [
    {
      "apiId": "/apis/5931a75ae4bbd512a88c680b",
      "operationId": "/apis/5931a75ae4bbd512a88c680b/operations/-",
      "productId": "/products/-",
      "userId": "/users/1",
      "method": "GET",
      "url": "https://apimService1.azure-api.net/echo/resource?param1=sample",
      "ipAddress": "207.xx.155.xx",
      "responseCode": 404,
      "responseSize": 405,
      "timestamp": "2017-06-03T00:17:00.1649134Z",
      "cache": "none",
      "apiTime": 221.1544,
      "serviceTime": 0,
      "apiRegion": "East Asia",
      "subscriptionId": "/subscriptions/5600b59475ff190048070002",
      "requestId": "63e7119c-26aa-433c-96d7-f6f3267ff52f",
      "requestSize": 0
    },
    {
      "apiId": "/apis/5931a75ae4bbd512a88c680b",
      "operationId": "/apis/5931a75ae4bbd512a88c680b/operations/-",
      "productId": "/products/-",
      "userId": "/users/1",
      "method": "POST",
      "url": "https://apimService1.azure-api.net/echo/resource",
      "ipAddress": "207.xx.155.xx",
      "responseCode": 404,
      "responseSize": 403,
      "timestamp": "2017-06-03T00:17:20.5255131Z",
      "cache": "none",
      "apiTime": 6.675400000000001,
      "serviceTime": 0,
      "apiRegion": "East Asia",
      "subscriptionId": "/subscriptions/5600b59475ff190048070002",
      "requestId": "e581b7f7-c9ec-4fc6-8ab9-3855d9b00b04",
      "requestSize": 0
    }
  ],
  "count": 2
}

Definitions

Name Description
ErrorFieldContract

Error Field contract.

ErrorResponse

Error Response.

RequestReportCollection

Paged Report records list representation.

RequestReportRecordContract

Request 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.

RequestReportCollection

Paged Report records list representation.

Name Type Description
count

integer

Total record count number across all pages.

value

RequestReportRecordContract[]

Page values.

RequestReportRecordContract

Request Report data.

Name Type Description
apiId

string

API identifier path. /apis/{apiId}

apiRegion

string

Azure region where the gateway that processed this request is located.

apiTime

number

The total time it took to process this request.

backendResponseCode

string

The HTTP status code received by the gateway as a result of forwarding this request to the backend.

cache

string

Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend.

ipAddress

string

The client IP address associated with this request.

method

string

The HTTP method associated with this request..

operationId

string

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

productId

string

Product identifier path. /products/{productId}

requestId

string

Request Identifier.

requestSize

integer

The size of this request..

responseCode

integer

The HTTP status code returned by the gateway.

responseSize

integer

The size of the response returned by the gateway.

serviceTime

number

he time it took to forward this request to the backend and get the response back.

subscriptionId

string

Subscription identifier path. /subscriptions/{subscriptionId}

timestamp

string

The date and time when this request was received by the gateway in ISO 8601 format.

url

string

The full URL associated with this request.

userId

string

User identifier path. /users/{userId}