{ "swagger": "2.0", "info": { "title": "ApiManagementClient", "description": "Use these REST APIs for performing operations on tenant entity associated with your Azure API Management deployment. Using this entity you can manage properties and configuration that apply to the entire API Management service instance.", "version": "2016-10-10" }, "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}/tenant/access": { "get": { "tags": [ "TenantAccess" ], "operationId": "TenantAccess_Get", "description": "Get tenant access information details.", "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Tenant Access information.", "schema": { "$ref": "#/definitions/AccessInformationContract" }, "headers": { "ETag": { "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", "type": "string" } } } } }, "patch": { "tags": [ "TenantAccess" ], "operationId": "TenantAccess_Update", "description": "Update tenant access information details.", "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/AccessInformationUpdateParameters" }, "description": "Parameters." }, { "name": "If-Match", "in": "header", "required": true, "description": "The entity state (Etag) version of the tenant access settings to update. A value of \"*\" can be used for If-Match to unconditionally apply the operation.", "type": "string" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "201": { "description": "Tenant's access information updated successfully." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorBodyContract" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/access/regeneratePrimaryKey": { "post": { "tags": [ "TenantAccess" ], "operationId": "TenantAccess_RegeneratePrimaryKey", "description": "Regenerate primary access key.", "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$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/ErrorBodyContract" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/access/regenerateSecondaryKey": { "post": { "tags": [ "TenantAccess" ], "operationId": "TenantAccess_RegenerateSecondaryKey", "description": "Regenerate secondary access key.", "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$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/ErrorBodyContract" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/access/git": { "get": { "tags": [ "TenantAccessGit" ], "operationId": "TenantAccessGit_Get", "description": "Gets the Git access configuration for the tenant.", "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Git Access Information for the Service.", "schema": { "$ref": "#/definitions/AccessInformationContract" }, "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/ErrorBodyContract" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/access/git/regeneratePrimaryKey": { "post": { "tags": [ "TenantAccessGit" ], "operationId": "TenantAccessGit_RegeneratePrimaryKey", "description": "Regenerate primary access key for GIT.", "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$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/ErrorBodyContract" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/access/git/regenerateSecondaryKey": { "post": { "tags": [ "TenantAccessGit" ], "operationId": "TenantAccessGit_RegenerateSecondaryKey", "description": "Regenerate secondary access key for GIT.", "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$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/ErrorBodyContract" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/configuration/deploy": { "post": { "tags": [ "TenantConfiguration" ], "operationId": "TenantConfiguration_Deploy", "description": "This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete.", "externalDocs": { "description": "To deploy any service configuration changes to the API Management service instance", "url": "https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-deploy-any-service-configuration-changes-to-the-api-management-service-instance" }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/DeployConfigurationParameters" }, "description": "Deploy Configuration parameters." }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Result of applying changes from Git branch to database.", "schema": { "$ref": "#/definitions/OperationResultContract" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorBodyContract" } } }, "x-ms-long-running-operation": true } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/configuration/save": { "post": { "tags": [ "TenantConfiguration" ], "operationId": "TenantConfiguration_Save", "description": "This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete.", "externalDocs": { "description": "To save the service configuration to the Git repository", "url": "https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-save-the-service-configuration-to-the-git-repository" }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/SaveConfigurationParameter" }, "description": "Save Configuration parameters." }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Result of creating a commit in the repository.", "schema": { "$ref": "#/definitions/OperationResultContract" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorBodyContract" } } }, "x-ms-long-running-operation": true } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/configuration/validate": { "post": { "tags": [ "TenantConfiguration" ], "operationId": "TenantConfiguration_Validate", "description": "This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete.", "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/DeployConfigurationParameters" }, "description": "Validate Configuration parameters." }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Result of validating the changes in the specified Git branch.", "schema": { "$ref": "#/definitions/OperationResultContract" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorBodyContract" } } }, "x-ms-long-running-operation": true } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/configuration/syncState": { "get": { "tags": [ "TenantConfigurationSyncState" ], "operationId": "TenantConfigurationSyncState_Get", "description": "Gets the status of the most recent synchronization between the configuration database and the Git repository.", "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Sync state result.", "schema": { "$ref": "#/definitions/TenantConfigurationSyncStateContract" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/policy": { "get": { "tags": [ "TenantPolicy" ], "operationId": "TenantPolicy_Get", "description": "Get the global policy configuration of the tenant.", "produces": [ "application/vnd.ms-azure-apim.policy+xml" ], "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Tenant Global Policy information.", "schema": { "type": "file" }, "headers": { "ETag": { "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", "type": "string" } } } } }, "put": { "tags": [ "TenantPolicy" ], "operationId": "TenantPolicy_CreateOrUpdate", "description": "Creates or updates global policy configuration for the tenant.", "consumes": [ "application/vnd.ms-azure-apim.policy+xml" ], "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "parameters", "in": "body", "schema": { "type": "object", "format": "file" }, "required": true, "description": "The policy content details." }, { "name": "If-Match", "in": "header", "required": true, "description": "The entity state (Etag) version of the tenant policy to update. A value of \"*\" can be used for If-Match to unconditionally apply the operation.", "type": "string" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "201": { "description": "Global policy configuration was successfully created." }, "204": { "description": "Global policy configuration of the tenant was successfully updated." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorBodyContract" } } } }, "delete": { "tags": [ "TenantPolicy" ], "operationId": "TenantPolicy_Delete", "description": "Deletes the global tenant policy configuration.", "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "If-Match", "in": "header", "required": true, "description": "The entity state (Etag) version of the tenant policy to update. A value of \"*\" can be used for If-Match to unconditionally apply the operation.", "type": "string" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "204": { "description": "Successfully deleted the global policy configuration of the Tenant." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorBodyContract" } } } } } }, "definitions": { "AccessInformationContract": { "properties": { "id": { "type": "string", "description": "Identifier." }, "primaryKey": { "type": "string", "description": "Primary access key." }, "secondaryKey": { "type": "string", "description": "Secondary access key." }, "enabled": { "type": "boolean", "description": "Tenant access information of the API Management service." } }, "description": "Tenant access information contract of the API Management service." }, "AccessInformationUpdateParameters": { "properties": { "enabled": { "type": "boolean", "description": "Tenant access information of the API Management service." } }, "required": [ "enabled" ], "description": "Tenant access information update parameters of the API Management service." }, "DeployConfigurationParameters": { "properties": { "branch": { "type": "string", "description": "The name of the Git branch from which the configuration is to be deployed to the configuration database." }, "force": { "type": "boolean", "description": "The value enforcing deleting subscriptions to products that are deleted in this update." } }, "required": [ "branch" ], "description": "Parameters supplied to the Deploy Configuration operation." }, "OperationResultContract": { "properties": { "id": { "type": "string", "description": "Operation result identifier." }, "status": { "type": "string", "description": "Status of an async operation.", "enum": [ "Started", "InProgress", "Succeeded", "Failed" ], "x-ms-enum": { "name": "AsyncOperationState", "modelAsString": false } }, "started": { "type": "string", "format": "date-time", "description": "Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n" }, "updated": { "type": "string", "format": "date-time", "description": "Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n" }, "resultInfo": { "type": "string", "description": "Optional result info." }, "error": { "$ref": "./apimanagement.json#/definitions/ErrorBodyContract" } }, "description": "Operation Result." }, "SaveConfigurationParameter": { "properties": { "branch": { "type": "string", "description": "The name of the Git branch in which to commit the current configuration snapshot." }, "force": { "type": "boolean", "description": "The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten." } }, "required": [ "branch" ], "description": "Parameters supplied to the Save Tenant Configuration operation." }, "TenantConfigurationSyncStateContract": { "properties": { "branch": { "type": "string", "description": "The name of Git branch." }, "commitId": { "type": "string", "description": "The latest commit Id." }, "isExport": { "type": "boolean", "description": "value indicating if last sync was save (true) or deploy (false) operation." }, "isSynced": { "type": "boolean", "description": "value indicating if last synchronization was later than the configuration change." }, "isGitEnabled": { "type": "boolean", "description": "value indicating whether Git configuration access is enabled." }, "syncDate": { "type": "string", "format": "date-time", "description": "The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n" }, "configurationChangeDate": { "type": "string", "format": "date-time", "description": "The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n" } }, "description": "Tenant Configuration Synchronization State." } }, "parameters": {} }