Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Management Control Plane Swagger - Direct Route - First Version #2202

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,301 @@
{
"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": "2017-03-01"
},
"x-ms-parameterized-host": {
"hostTemplate": "{apimBaseUrl}",
"useSchemePrefix": false,
"positionInOperation": "first",
"parameters": [
{
"name": "apimBaseUrl",
"description": "The management endpoint of the API Management service, for example https://myapimservice.management.azure-api.net.",
"required": true,
"type": "string",
"in": "path",
"x-ms-skip-url-encoding": true
}
]
},
"schemes": [
"https"
],
"securityDefinitions": {
"apim_key": {
"type": "apiKey",
"name": "Ocp-Apim-Subscription-Key",
"in": "header"
}
},
"security": [
{
"apim_key": []
}
],
"paths": {
"/certificates": {
"get": {
"tags": [
"Certificates"
],
"operationId": "Certificate_List",
"description": "Lists a collection of all certificates in the specified service instance.",
"parameters": [
{
"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"
}
],
"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/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/CertificateContract"
}
},
"/certificates/{certificateId}": {
"get": {
"tags": [
"Certificates"
],
"operationId": "Certificate_Get",
"description": "Gets the details of the certificate specified by its identifier.",
"parameters": [
{
"$ref": "#/parameters/CertificateIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
}
],
"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/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"Certificates"
],
"operationId": "Certificate_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": "#/parameters/CertificateIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CertificateCreateOrUpdateParameters"
},
"description": "Create or Update 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"
}
],
"responses": {
"201": {
"description": "The new certificate was successfully added.",
"schema": {
"$ref": "#/definitions/CertificateContract"
}
},
"200": {
"description": "The certificate details were successfully updated.",
"schema": {
"$ref": "#/definitions/CertificateContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"Certificates"
],
"operationId": "Certificate_Delete",
"description": "Deletes specific certificate.",
"parameters": [
{
"$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"
}
],
"responses": {
"204": {
"description": "The certificate was successfully deleted."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"CertificateCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/CertificateContract"
},
"description": "Page values."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Certificates list representation."
},
"CertificateContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/CertificateContractProperties",
"description": "Certificate properties details."
}
},
"description": "Certificate details."
},
"CertificateContractProperties": {
"properties": {
"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": "Properties of the Certificate contract."
},
"CertificateCreateOrUpdateParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/CertificateCreateOrUpdateProperties",
"description": "Certificate create or update properties details."
}
},
"description": "Certificate create or update details."
},
"CertificateCreateOrUpdateProperties": {
"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"
}
}
}
Loading