{ "swagger": "2.0", "info": { "title": "ApiManagementClient", "description": "Use these REST APIs to get the analytics reports associated with your Azure API Management deployment.", "version": "2018-01-01" }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow.", "scopes": { "user_impersonation": "impersonate your user account" } } }, "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi": { "get": { "tags": [ "Reports" ], "operationId": "Reports_ListByApi", "description": "Lists report records by API.", "x-ms-examples": { "ApiManagementGetReportsByApi": { "$ref": "./examples/ApiManagementGetReportsByApi.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "$filter", "in": "query", "required": true, "type": "string", "description": "The filter to apply on the operation." }, { "$ref": "./apimanagement.json#/parameters/TopQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/SkipQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Lists a collection of Report record.", "schema": { "$ref": "#/definitions/ReportCollection" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-odata": "#/definitions/ReportRecordContract" } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser": { "get": { "tags": [ "Reports" ], "operationId": "Reports_ListByUser", "description": "Lists report records by User.", "x-ms-examples": { "ApiManagementGetReportsByUser": { "$ref": "./examples/ApiManagementGetReportsByUser.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "$filter", "in": "query", "required": true, "type": "string", "description": "The filter to apply on the operation." }, { "$ref": "./apimanagement.json#/parameters/TopQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/SkipQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Lists a collection of Report record.", "schema": { "$ref": "#/definitions/ReportCollection" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-odata": "#/definitions/ReportRecordContract" } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation": { "get": { "tags": [ "Reports" ], "operationId": "Reports_ListByOperation", "description": "Lists report records by API Operations.", "x-ms-examples": { "ApiManagementGetReportsByOperation": { "$ref": "./examples/ApiManagementGetReportsByOperation.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "$filter", "in": "query", "required": true, "type": "string", "description": "The filter to apply on the operation." }, { "$ref": "./apimanagement.json#/parameters/TopQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/SkipQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Lists a collection of Report record.", "schema": { "$ref": "#/definitions/ReportCollection" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-odata": "#/definitions/ReportRecordContract" } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct": { "get": { "tags": [ "Reports" ], "operationId": "Reports_ListByProduct", "description": "Lists report records by Product.", "x-ms-examples": { "ApiManagementGetReportsByProduct": { "$ref": "./examples/ApiManagementGetReportsByProduct.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "$filter", "in": "query", "required": true, "type": "string", "description": "The filter to apply on the operation." }, { "$ref": "./apimanagement.json#/parameters/TopQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/SkipQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Lists a collection of Report record.", "schema": { "$ref": "#/definitions/ReportCollection" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-odata": "#/definitions/ReportRecordContract" } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo": { "get": { "tags": [ "Reports" ], "operationId": "Reports_ListByGeo", "description": "Lists report records by geography.", "x-ms-examples": { "ApiManagementGetReportsByGeo": { "$ref": "./examples/ApiManagementGetReportsByGeo.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "$filter", "in": "query", "required": false, "type": "string", "description": "The filter to apply on the operation." }, { "$ref": "./apimanagement.json#/parameters/TopQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/SkipQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Lists a collection of Report record.", "schema": { "$ref": "#/definitions/ReportCollection" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-odata": "#/definitions/ReportRecordContract" } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription": { "get": { "tags": [ "Reports" ], "operationId": "Reports_ListBySubscription", "description": "Lists report records by subscription.", "x-ms-examples": { "ApiManagementGetReportsBySubscription": { "$ref": "./examples/ApiManagementGetReportsBySubscription.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "$filter", "in": "query", "required": false, "type": "string", "description": "The filter to apply on the operation." }, { "$ref": "./apimanagement.json#/parameters/TopQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/SkipQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Lists a collection of Report record.", "schema": { "$ref": "#/definitions/ReportCollection" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-odata": "#/definitions/ReportRecordContract" } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime": { "get": { "tags": [ "Reports" ], "operationId": "Reports_ListByTime", "description": "Lists report records by Time.", "x-ms-examples": { "ApiManagementGetReportsByTime": { "$ref": "./examples/ApiManagementGetReportsByTime.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "$filter", "in": "query", "required": false, "type": "string", "description": "The filter to apply on the operation." }, { "$ref": "./apimanagement.json#/parameters/TopQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/SkipQueryParameter" }, { "name": "interval", "in": "query", "required": true, "type": "string", "format": "duration", "description": "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))" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Lists a collection of Report record.", "schema": { "$ref": "#/definitions/ReportCollection" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-odata": "#/definitions/ReportRecordContract" } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest": { "get": { "tags": [ "Reports" ], "operationId": "Reports_ListByRequest", "description": "Lists report records by Request.", "x-ms-examples": { "ApiManagementGetReportsByRequest": { "$ref": "./examples/ApiManagementGetReportsByRequest.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "$filter", "in": "query", "required": true, "type": "string", "description": "The filter to apply on the operation." }, { "$ref": "./apimanagement.json#/parameters/TopQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/SkipQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Lists a collection of Report record.", "schema": { "$ref": "#/definitions/RequestReportCollection" } } }, "x-ms-pageable": { "nextLinkName": null }, "x-ms-odata": "#/definitions/RequestReportRecordContract" } } }, "definitions": { "ReportCollection": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/ReportRecordContract" }, "description": "Page values." }, "count": { "type": "integer", "format": "int64", "description": "Total record count number across all pages." }, "nextLink": { "type": "string", "description": "Next page link if any." } }, "description": "Paged Report records list representation." }, "ReportRecordContract": { "properties": { "name": { "type": "string", "description": "Name depending on report endpoint specifies product, API, operation or developer name." }, "timestamp": { "type": "string", "format": "date-time", "description": "Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n" }, "interval": { "type": "string", "description": "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)." }, "country": { "type": "string", "description": "Country to which this record data is related." }, "region": { "type": "string", "description": "Country region to which this record data is related." }, "zip": { "type": "string", "description": "Zip code to which this record data is related." }, "userId": { "readOnly": true, "type": "string", "description": "User identifier path. /users/{userId}" }, "productId": { "readOnly": true, "type": "string", "description": "Product identifier path. /products/{productId}" }, "apiId": { "type": "string", "description": "API identifier path. /apis/{apiId}" }, "operationId": { "type": "string", "description": "Operation identifier path. /apis/{apiId}/operations/{operationId}" }, "apiRegion": { "type": "string", "description": "API region identifier." }, "subscriptionId": { "type": "string", "description": "Subscription identifier path. /subscriptions/{subscriptionId}" }, "callCountSuccess": { "type": "integer", "format": "int32", "description": "Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect" }, "callCountBlocked": { "type": "integer", "format": "int32", "description": "Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests" }, "callCountFailed": { "type": "integer", "format": "int32", "description": "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" }, "callCountOther": { "type": "integer", "format": "int32", "description": "Number of other calls." }, "callCountTotal": { "type": "integer", "format": "int32", "description": "Total number of calls." }, "bandwidth": { "type": "integer", "format": "int64", "description": "Bandwidth consumed." }, "cacheHitCount": { "type": "integer", "format": "int32", "description": "Number of times when content was served from cache policy." }, "cacheMissCount": { "type": "integer", "format": "int32", "description": "Number of times content was fetched from backend." }, "apiTimeAvg": { "type": "number", "format": "double", "description": "Average time it took to process request." }, "apiTimeMin": { "type": "number", "format": "double", "description": "Minimum time it took to process request." }, "apiTimeMax": { "type": "number", "format": "double", "description": "Maximum time it took to process request." }, "serviceTimeAvg": { "type": "number", "format": "double", "description": "Average time it took to process request on backend." }, "serviceTimeMin": { "type": "number", "format": "double", "description": "Minimum time it took to process request on backend." }, "serviceTimeMax": { "type": "number", "format": "double", "description": "Maximum time it took to process request on backend." } }, "description": "Report data." }, "RequestReportCollection": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/RequestReportRecordContract" }, "description": "Page values." }, "count": { "type": "integer", "format": "int64", "description": "Total record count number across all pages." } }, "description": "Paged Report records list representation." }, "RequestReportRecordContract": { "properties": { "apiId": { "type": "string", "description": "API identifier path. /apis/{apiId}" }, "operationId": { "type": "string", "description": "Operation identifier path. /apis/{apiId}/operations/{operationId}" }, "productId": { "readOnly": true, "type": "string", "description": "Product identifier path. /products/{productId}" }, "userId": { "readOnly": true, "type": "string", "description": "User identifier path. /users/{userId}" }, "method": { "type": "string", "description": "The HTTP method associated with this request.." }, "url": { "type": "string", "description": "The full URL associated with this request." }, "ipAddress": { "type": "string", "description": "The client IP address associated with this request." }, "backendResponseCode": { "type": "string", "description": "The HTTP status code received by the gateway as a result of forwarding this request to the backend." }, "responseCode": { "type": "integer", "format": "int32", "description": "The HTTP status code returned by the gateway." }, "responseSize": { "type": "integer", "format": "int32", "description": "The size of the response returned by the gateway." }, "timestamp": { "type": "string", "format": "date-time", "description": "The date and time when this request was received by the gateway in ISO 8601 format." }, "cache": { "type": "string", "description": "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." }, "apiTime": { "type": "number", "format": "double", "description": "The total time it took to process this request." }, "serviceTime": { "type": "number", "format": "double", "description": "he time it took to forward this request to the backend and get the response back." }, "apiRegion": { "type": "string", "description": "Azure region where the gateway that processed this request is located." }, "subscriptionId": { "type": "string", "description": "Subscription identifier path. /subscriptions/{subscriptionId}" }, "requestId": { "type": "string", "description": "Request Identifier." }, "requestSize": { "type": "integer", "format": "int32", "description": "The size of this request.." } }, "description": "Request Report data." } }, "parameters": {} }