{ "swagger": "2.0", "info": { "title": "ApiManagementClient", "description": "Use these REST APIs for performing operations on Certificate entity in your Azure API Management deployment. Certificates can be used to setup mutual authentication with your Backend in API Management. For more information refer to [How to secure backend using Mutual Auth Certificate](https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-mutual-certificates).", "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}/certificates": { "get": { "tags": [ "Certificates" ], "operationId": "Certificates_ListByService", "description": "Lists a collection of all certificates in the specified service instance.", "externalDocs": { "url": "https://msdn.microsoft.com/en-us/library/azure/dn783483.aspx" }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "name": "$filter", "in": "query", "required": false, "type": "string", "description": "| Field | Supported operators | Supported functions |\n|----------------|------------------------|---------------------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| subject | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| thumbprint | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| expirationDate | ge, le, eq, ne, gt, lt | N/A |" }, { "$ref": "./apimanagement.json#/parameters/TopQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/SkipQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Returns a collection of Certificate entity.", "schema": { "$ref": "#/definitions/CertificateCollection" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorBodyContract" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-odata": "#/definitions/CertificateContract" } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}": { "get": { "tags": [ "Certificates" ], "operationId": "Certificates_Get", "description": "Gets the details of the certificate specified by its identifier.", "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/CertificateIdParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "The response body contains the specified Certificate entity.", "schema": { "$ref": "#/definitions/CertificateContract" }, "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" } } } }, "put": { "tags": [ "Certificates" ], "operationId": "Certificates_CreateOrUpdate", "description": "Creates or updates the certificate being used for authentication with the backend.", "externalDocs": { "description": "How to secure back-end services using client certificate authentication in Azure API Management", "url": "https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/" }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/CertificateIdParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/CertificateCreateOrUpdateParameters" }, "description": "Create parameters." }, { "name": "If-Match", "in": "header", "required": false, "description": "The entity state (Etag) version of the certificate 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": "The new certificate was successfully added." }, "204": { "description": "The certificate details were successfully updated." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorBodyContract" } } } }, "delete": { "tags": [ "Certificates" ], "operationId": "Certificates_Delete", "description": "Deletes specific certificate.", "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/CertificateIdParameter" }, { "name": "If-Match", "in": "header", "required": true, "description": "The entity state (Etag) version of the certificate to delete. 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": "The certificate was successfully deleted." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorBodyContract" } } } } } }, "definitions": { "CertificateCollection": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/CertificateContract" }, "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 Certificates list representation." }, "CertificateContract": { "properties": { "id": { "type": "string", "description": "Certificate identifier path: /certificates/{certificateId}", "readOnly": true }, "subject": { "type": "string", "description": "Subject attribute of the certificate." }, "thumbprint": { "type": "string", "description": "Thumbprint of the certificate." }, "expirationDate": { "type": "string", "format": "date-time", "description": "Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n" } }, "required": [ "subject", "thumbprint", "expirationDate" ], "description": "Certificate details." }, "CertificateCreateOrUpdateParameters": { "properties": { "data": { "type": "string", "description": "Base 64 encoded certificate using the application/x-pkcs12 representation." }, "password": { "type": "string", "description": "Password for the Certificate" } }, "required": [ "data", "password" ], "description": "Parameters supplied to the CreateOrUpdate certificate operation." } }, "parameters": { "CertificateIdParameter": { "name": "certificateId", "in": "path", "required": true, "type": "string", "description": "Identifier of the certificate entity. Must be unique in the current API Management service instance.", "minLength": 1, "maxLength": 256, "pattern": "^[^*#&+:<>?]+$", "x-ms-parameter-location": "method" } } }