{ "swagger": "2.0", "info": { "title": "ApiManagementClient", "description": "Use these REST APIs for performing operations on Quota entity associated with your Azure API Management deployment. To configure call rate limit and quota policies refer to [how to configure call rate limit and quota](https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-product-with-rules#a-namepolicies-ato-configure-call-rate-limit-and-quota-policies).", "version": "2019-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}/quotas/{quotaCounterKey}": { "get": { "tags": [ "QuotaByCounterKeys" ], "operationId": "QuotaByCounterKeys_ListByService", "description": "Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-product-with-rules#a-namepolicies-ato-configure-call-rate-limit-and-quota-policies", "description": "Document describing how to configure the quota policies." }, "x-ms-examples": { "ApiManagementGetQuotaCounterKeys": { "$ref": "./examples/ApiManagementGetQuotaCounterKeys.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/QuotaCounterKeyParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Lists a collection of the quota counter values.", "schema": { "$ref": "./definitions.json#/definitions/QuotaCounterCollection" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } }, "patch": { "tags": [ "QuotaByCounterKeys" ], "operationId": "QuotaByCounterKeys_Update", "description": "Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values.", "x-ms-examples": { "ApiManagementUpdateQuotaCounterKey": { "$ref": "./examples/ApiManagementUpdateQuotaCounterKey.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/QuotaCounterKeyParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "./definitions.json#/definitions/QuotaCounterValueContractProperties" }, "description": "The value of the quota counter to be applied to all quota counter periods." }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "204": { "description": "Quota counter period was successfully updated." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}": { "get": { "tags": [ "QuotaByPeriodKeys" ], "operationId": "QuotaByPeriodKeys_Get", "description": "Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-product-with-rules#a-namepolicies-ato-configure-call-rate-limit-and-quota-policies", "description": "Document describing how to configure the quota policies." }, "x-ms-examples": { "ApiManagementGetQuotaCounterKeysByQuotaPeriod": { "$ref": "./examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/QuotaCounterKeyParameter" }, { "$ref": "./apimanagement.json#/parameters/QuotaPeriodKeyParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "The response body contains the Quota counter details for the specified period.", "schema": { "$ref": "./definitions.json#/definitions/QuotaCounterContract" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } }, "patch": { "tags": [ "QuotaByPeriodKeys" ], "operationId": "QuotaByPeriodKeys_Update", "description": "Updates an existing quota counter value in the specified service instance.", "x-ms-examples": { "ApiManagementUpdateQuotaCounterKeyByQuotaPeriod": { "$ref": "./examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/QuotaCounterKeyParameter" }, { "$ref": "./apimanagement.json#/parameters/QuotaPeriodKeyParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "./definitions.json#/definitions/QuotaCounterValueContractProperties" }, "description": "The value of the Quota counter to be applied on the specified period." }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "204": { "description": "The quota counter value was successfully updated." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } } } }, "definitions": {}, "parameters": {} }