{ "swagger": "2.0", "info": { "title": "ApiManagementClient", "description": "Use these REST APIs for performing operations on Subscription entity associated with your Azure API Management deployment. The Subscription entity represents the association between a user and a product in API Management. Products contain one or more APIs, and once a product is published, developers can subscribe to the product and begin to use the product’s APIs.", "version": "2019-12-01-preview" }, "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}/subscriptions": { "get": { "tags": [ "Subscription" ], "operationId": "Subscription_List", "description": "Lists all subscriptions of the API Management service instance.", "x-ms-examples": { "ApiManagementListSubscriptions": { "$ref": "./examples/ApiManagementListSubscriptions.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "$filter", "in": "query", "required": false, "type": "string", "description": "| Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| user | expand | | |
" }, { "$ref": "./apimanagement.json#/parameters/TopQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/SkipQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "A collection of the Subscription entities for the specified API Management service instance.", "schema": { "$ref": "./definitions.json#/definitions/SubscriptionCollection" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-odata": "./definitions.json#/definitions/SubscriptionContract" } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}": { "head": { "tags": [ "Subscription" ], "operationId": "Subscription_GetEntityTag", "description": "Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier.", "x-ms-examples": { "ApiManagementHeadSubscription": { "$ref": "./examples/ApiManagementHeadSubscription.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionEntityIdParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Specified apimanagement subscription entity exists and current entity state version is present in the ETag header.", "headers": { "ETag": { "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", "type": "string" } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } }, "get": { "tags": [ "Subscription" ], "operationId": "Subscription_Get", "description": "Gets the specified Subscription entity.", "x-ms-examples": { "ApiManagementGetSubscription": { "$ref": "./examples/ApiManagementGetSubscription.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionEntityIdParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "The response body contains the specified Subscription entity.", "schema": { "$ref": "./definitions.json#/definitions/SubscriptionContract" }, "headers": { "ETag": { "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", "type": "string" } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } }, "put": { "tags": [ "Subscription" ], "operationId": "Subscription_CreateOrUpdate", "description": "Creates or updates the subscription of specified user to the specified product.", "x-ms-examples": { "ApiManagementCreateSubscription": { "$ref": "./examples/ApiManagementCreateSubscription.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionEntityIdParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "./definitions.json#/definitions/SubscriptionCreateParameters" }, "description": "Create parameters." }, { "$ref": "./apimanagement.json#/parameters/NotifySubscriptionStateChangeParameter" }, { "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "201": { "description": "The user was successfully subscribed to the product.", "headers": { "ETag": { "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", "type": "string" } }, "schema": { "$ref": "./definitions.json#/definitions/SubscriptionContract" } }, "200": { "description": "The user already subscribed to the product.", "headers": { "ETag": { "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", "type": "string" } }, "schema": { "$ref": "./definitions.json#/definitions/SubscriptionContract" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } }, "patch": { "tags": [ "Subscription" ], "operationId": "Subscription_Update", "description": "Updates the details of a subscription specified by its identifier.", "x-ms-examples": { "ApiManagementUpdateSubscription": { "$ref": "./examples/ApiManagementUpdateSubscription.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionEntityIdParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "./definitions.json#/definitions/SubscriptionUpdateParameters" }, "description": "Update parameters." }, { "$ref": "./apimanagement.json#/parameters/NotifySubscriptionStateChangeParameter" }, { "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "204": { "description": "The subscription details were successfully updated." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } }, "delete": { "tags": [ "Subscription" ], "operationId": "Subscription_Delete", "description": "Deletes the specified subscription.", "x-ms-examples": { "ApiManagementDeleteSubscription": { "$ref": "./examples/ApiManagementDeleteSubscription.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionEntityIdParameter" }, { "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "The subscription details were successfully deleted." }, "204": { "description": "The subscription details were successfully deleted." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey": { "post": { "tags": [ "Subscription" ], "operationId": "Subscription_RegeneratePrimaryKey", "description": "Regenerates primary key of existing subscription of the API Management service instance.", "x-ms-examples": { "ApiManagementSubscriptionRegeneratePrimaryKey": { "$ref": "./examples/ApiManagementSubscriptionRegeneratePrimaryKey.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionEntityIdParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "204": { "description": "The primary key was successfully regenerated." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey": { "post": { "tags": [ "Subscription" ], "operationId": "Subscription_RegenerateSecondaryKey", "description": "Regenerates secondary key of existing subscription of the API Management service instance.", "x-ms-examples": { "ApiManagementSubscriptionRegenerateSecondaryKey": { "$ref": "./examples/ApiManagementSubscriptionRegenerateSecondaryKey.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionEntityIdParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "204": { "description": "The secondary key was successfully regenerated." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/listSecrets": { "post": { "tags": [ "Subscription" ], "operationId": "Subscription_ListSecrets", "description": "Gets the subscription keys.", "x-ms-examples": { "ApiManagementListSecretsSubscription": { "$ref": "./examples/ApiManagementListSecretsSubscription.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionEntityIdParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "The response body contains subscription keys.", "schema": { "$ref": "./definitions.json#/definitions/SubscriptionKeysContract" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } } } }, "definitions": {}, "parameters": {} }