UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 21.2 kB
{"openapi":"3.0.0","info":{"description":"Use these REST APIs for performing operations on entities like API, Product, and Subscription associated with your Azure API Management deployment.","title":"ApiManagementClient","version":"2018-01-01","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://assets.onestore.ms/cdnfiles/onestorerolling-1606-01000/shell/v3/images/logo/microsoft.png"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2018-01-01/apimanagement.json","version":"2.0"}],"x-preferred":true,"x-providerName":"azure.com","x-serviceName":"apimanagement","x-tags":["Azure","Microsoft"]},"security":[{"azure_auth":["user_impersonation"]}],"paths":{"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies":{"get":{"description":"Lists all the Global Policy definitions of the Api Management service.","operationId":"Policy_ListByService","parameters":[{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/ServiceNameParameter"},{"description":"Policy scope.","in":"query","name":"scope","required":false,"x-ms-enum":{"modelAsString":false,"name":"PolicyScopeContract"},"schema":{"type":"string","enum":["Tenant","Product","Api","Operation","All"]}},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"}],"responses":{"200":{"description":"Returns an array of Policy Contracts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyCollection"},"examples":{"ApiManagementListPolicies":{"$ref":"#/components/examples/ApiManagementListPolicies"}}}}}},"tags":["Policy"]}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}":{"delete":{"description":"Deletes the global policy configuration of the Api Management Service.","operationId":"Policy_Delete","parameters":[{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/ServiceNameParameter"},{"$ref":"#/components/parameters/PolicyIdParameter"},{"$ref":"#/components/parameters/IfMatchRequiredParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"}],"responses":{"200":{"description":"Successfully deleted the policy configuration at the Global level."},"204":{"description":"Successfully deleted the policy configuration at the Global level."},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Policy"]},"get":{"description":"Get the Global policy definition of the Api Management service.","operationId":"Policy_Get","parameters":[{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/ServiceNameParameter"},{"$ref":"#/components/parameters/PolicyIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"}],"responses":{"200":{"description":"Returns the Policy Contracts.","headers":{"ETag":{"description":"Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyContract"},"examples":{"ApiManagementGetPolicy":{"$ref":"#/components/examples/ApiManagementGetPolicy"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Policy"]},"head":{"description":"Gets the entity state (Etag) version of the Global policy definition in the Api Management service.","operationId":"Policy_GetEntityTag","parameters":[{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/ServiceNameParameter"},{"$ref":"#/components/parameters/PolicyIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"}],"responses":{"200":{"description":"The 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.","schema":{"type":"string"}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"description":"Error Response.","properties":{"error":{"description":"Error Body contract.","properties":{"code":{"description":"Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.","type":"string"},"details":{"description":"The list of invalid fields send in request, in case of validation error.","items":{"description":"Error Field contract.","properties":{"code":{"description":"Property level error code.","type":"string"},"message":{"description":"Human-readable representation of property-level error.","type":"string"},"target":{"description":"Property name.","type":"string"}}},"type":"array"},"message":{"description":"Human-readable representation of the error.","type":"string"}}}}}}}}},"tags":["Policy"]},"put":{"description":"Creates or updates the global policy configuration of the Api Management service.","operationId":"Policy_CreateOrUpdate","parameters":[{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/ServiceNameParameter"},{"$ref":"#/components/parameters/PolicyIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyContract"}}},"description":"The policy contents to apply.","required":true},"responses":{"200":{"description":"Global policy configuration of the Api Management service was successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyContract"},"examples":{"ApiManagementCreatePolicy":{"$ref":"#/components/examples/ApiManagementCreatePolicy"}}}}},"201":{"description":"Global policy configuration was successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyContract"},"examples":{"ApiManagementCreatePolicy":{"$ref":"#/components/examples/ApiManagementCreatePolicy"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Policy"]}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policySnippets":{"get":{"description":"Lists all policy snippets.","operationId":"PolicySnippets_ListByService","parameters":[{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/ServiceNameParameter"},{"description":"Policy scope.","in":"query","name":"scope","required":false,"x-ms-enum":{"modelAsString":false,"name":"PolicyScopeContract"},"schema":{"type":"string","enum":["Tenant","Product","Api","Operation","All"]},"examples":{"ApiManagementListPolicySnippets":{"value":"Api"}}},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"}],"responses":{"200":{"description":"Returns an array of Policy Contracts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicySnippetsCollection"},"examples":{"ApiManagementListPolicySnippets":{"$ref":"#/components/examples/ApiManagementListPolicySnippets"}}}}}},"tags":["PolicySnippets"]}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions":{"get":{"description":"Lists all azure regions in which the service exists.","operationId":"Regions_ListByService","parameters":[{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/ServiceNameParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"}],"responses":{"200":{"description":"Lists of Regions in which the service is deployed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionListResult"},"examples":{"ApiManagementListRegions":{"$ref":"#/components/examples/ApiManagementListRegions"}}}}}},"tags":["Regions"],"x-ms-pageable":{"nextLinkName":"nextLink"}}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"ApiManagementListPolicies":{"value":{"nextLink":"","value":[{"id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies/policy","name":"policy","properties":{"policyContent":"<!--\r\n IMPORTANT:\r\n - Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.\r\n - Only the <forward-request> policy element can appear within the <backend> section element.\r\n - To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element.\r\n - To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element.\r\n - To add a policy position the cursor at the desired insertion point and click on the round button associated with the policy.\r\n - To remove a policy, delete the corresponding policy statement from the policy document.\r\n - Policies are applied in the order of their appearance, from the top down.\r\n-->\r\n<policies>\r\n <inbound />\r\n <backend>\r\n <forward-request />\r\n </backend>\r\n <outbound />\r\n</policies>"},"type":"Microsoft.ApiManagement/service/policies"}]}},"ApiManagementGetPolicy":{"value":{"id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies/policy","name":"policy","properties":{"policyContent":"<!--\r\n IMPORTANT:\r\n - Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.\r\n - Only the <forward-request> policy element can appear within the <backend> section element.\r\n - To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element.\r\n - To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element.\r\n - To add a policy position the cursor at the desired insertion point and click on the round button associated with the policy.\r\n - To remove a policy, delete the corresponding policy statement from the policy document.\r\n - Policies are applied in the order of their appearance, from the top down.\r\n-->\r\n<policies>\r\n <inbound />\r\n <backend>\r\n <forward-request />\r\n </backend>\r\n <outbound />\r\n</policies>"},"type":"Microsoft.ApiManagement/service/policies"}},"ApiManagementCreatePolicy":{"value":{"id":"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies/policy","name":"policy","properties":{"policyContent":"<policies>\r\n <inbound />\r\n <backend>\r\n <forward-request />\r\n </backend>\r\n <outbound />\r\n</policies>"},"type":"Microsoft.ApiManagement/service/policies"}},"ApiManagementListPolicySnippets":{"value":[{"content":"<authentication-basic username=\"username\" password=\"password\" />","name":"Authenticate with Basic","scope":268435471,"toolTip":"Authenticate with the backend service using Basic authentication. Use in the inbound section at API scope."}]},"ApiManagementListRegions":{"value":{"count":1,"nextLink":"","value":[{"isDeleted":false,"isMasterRegion":true,"name":"West US"}]}}},"parameters":{"ApiVersionParameter":{"description":"Version of the API to be used with the client request.","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"ApiManagementListPolicies":{"value":"2018-01-01"},"ApiManagementDeletePolicy":{"value":"2018-01-01"},"ApiManagementGetPolicy":{"value":"2018-01-01"},"ApiManagementHeadPolicy":{"value":"2018-01-01"},"ApiManagementCreatePolicy":{"value":"2018-01-01"},"ApiManagementListPolicySnippets":{"value":"2018-01-01"},"ApiManagementListRegions":{"value":"2018-01-01"}}},"IfMatchOptionalParameter":{"description":"ETag of the Entity. Not required when creating an entity, but required when updating an entity.","in":"header","name":"If-Match","required":false,"x-ms-parameter-location":"method","schema":{"type":"string"}},"IfMatchRequiredParameter":{"description":"ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.","in":"header","name":"If-Match","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"ApiManagementDeletePolicy":{"value":"*"}}},"PolicyIdParameter":{"description":"The identifier of the Policy.","in":"path","name":"policyId","required":true,"x-ms-enum":{"modelAsString":true,"name":"PolicyIdName"},"x-ms-parameter-location":"method","schema":{"type":"string","enum":["policy"]},"examples":{"ApiManagementDeletePolicy":{"value":"policy"},"ApiManagementGetPolicy":{"value":"policy"},"ApiManagementHeadPolicy":{"value":"policy"},"ApiManagementCreatePolicy":{"value":"policy"}}},"ResourceGroupNameParameter":{"description":"The name of the resource group.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"ApiManagementListPolicies":{"value":"rg1"},"ApiManagementDeletePolicy":{"value":"rg1"},"ApiManagementGetPolicy":{"value":"rg1"},"ApiManagementHeadPolicy":{"value":"rg1"},"ApiManagementCreatePolicy":{"value":"rg1"},"ApiManagementListPolicySnippets":{"value":"rg1"},"ApiManagementListRegions":{"value":"rg1"}}},"ServiceNameParameter":{"description":"The name of the API Management service.","in":"path","name":"serviceName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"},"examples":{"ApiManagementListPolicies":{"value":"apimService1"},"ApiManagementDeletePolicy":{"value":"apimService1"},"ApiManagementGetPolicy":{"value":"apimService1"},"ApiManagementHeadPolicy":{"value":"apimService1"},"ApiManagementCreatePolicy":{"value":"apimService1"},"ApiManagementListPolicySnippets":{"value":"apimService1"},"ApiManagementListRegions":{"value":"apimService1"}}},"SkipQueryParameter":{"description":"Number of records to skip.","in":"query","name":"$skip","required":false,"x-ms-parameter-location":"method","schema":{"type":"integer","format":"int32","minimum":0}},"SubscriptionIdParameter":{"description":"Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.","in":"path","name":"subscriptionId","required":true,"schema":{"type":"string"},"examples":{"ApiManagementListPolicies":{"value":"subid"},"ApiManagementDeletePolicy":{"value":"subid"},"ApiManagementGetPolicy":{"value":"subid"},"ApiManagementHeadPolicy":{"value":"subid"},"ApiManagementCreatePolicy":{"value":"subid"},"ApiManagementListPolicySnippets":{"value":"subid"},"ApiManagementListRegions":{"value":"subid"}}},"TopQueryParameter":{"description":"Number of records to return.","in":"query","name":"$top","required":false,"x-ms-parameter-location":"method","schema":{"type":"integer","format":"int32","minimum":1}}},"securitySchemes":{"azure_auth":{"description":"Azure Active Directory OAuth2 Flow.","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.microsoftonline.com/common/oauth2/authorize","scopes":{"user_impersonation":"impersonate your user account"}}}}},"schemas":{"ErrorFieldContract":{"description":"Error Field contract.","properties":{"code":{"description":"Property level error code.","type":"string"},"message":{"description":"Human-readable representation of property-level error.","type":"string"},"target":{"description":"Property name.","type":"string"}}},"ErrorResponse":{"description":"Error Response.","properties":{"error":{"description":"Error Body contract.","properties":{"code":{"description":"Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.","type":"string"},"details":{"description":"The list of invalid fields send in request, in case of validation error.","items":{"description":"Error Field contract.","properties":{"code":{"description":"Property level error code.","type":"string"},"message":{"description":"Human-readable representation of property-level error.","type":"string"},"target":{"description":"Property name.","type":"string"}}},"type":"array"},"message":{"description":"Human-readable representation of the error.","type":"string"}}}}},"ErrorResponseBody":{"description":"Error Body contract.","properties":{"code":{"description":"Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.","type":"string"},"details":{"description":"The list of invalid fields send in request, in case of validation error.","items":{"description":"Error Field contract.","properties":{"code":{"description":"Property level error code.","type":"string"},"message":{"description":"Human-readable representation of property-level error.","type":"string"},"target":{"description":"Property name.","type":"string"}}},"type":"array"},"message":{"description":"Human-readable representation of the error.","type":"string"}}},"PolicyCollection":{"description":"The response of the list policy operation.","properties":{"nextLink":{"description":"Next page link if any.","type":"string"},"value":{"description":"Policy Contract value.","items":{"$ref":"#/components/schemas/PolicyContract"},"type":"array"}}},"PolicyContract":{"allOf":[{"$ref":"#/components/schemas/Resource"}],"description":"Policy Contract details.","properties":{"properties":{"$ref":"#/components/schemas/PolicyContractProperties"}}},"PolicyContractProperties":{"description":"Policy contract Properties.","properties":{"contentFormat":{"default":"xml","description":"Format of the policyContent.","enum":["xml","xml-link","rawxml","rawxml-link"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"PolicyContentFormat","values":[{"description":"The contents are inline and Content type is an XML document.","value":"xml"},{"description":"The policy XML document is hosted on a http endpoint accessible from the API Management service.","value":"xml-link"},{"description":"The contents are inline and Content type is a non XML encoded policy document.","value":"rawxml"},{"description":"The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service.","value":"rawxml-link"}]}},"policyContent":{"description":"Json escaped Xml Encoded contents of the Policy.","type":"string"}},"required":["policyContent"]},"PolicySnippetContract":{"description":"Policy snippet.","properties":{"content":{"description":"Snippet content.","readOnly":true,"type":"string"},"name":{"description":"Snippet name.","readOnly":true,"type":"string"},"scope":{"description":"Binary OR value of the Snippet scope.","readOnly":true,"type":"integer"},"toolTip":{"description":"Snippet toolTip.","readOnly":true,"type":"string"}}},"PolicySnippetsCollection":{"description":"The response of the list policy snippets operation.","properties":{"value":{"description":"Policy snippet value.","items":{"$ref":"#/components/schemas/PolicySnippetContract"},"type":"array"}}},"RegionContract":{"description":"Region profile.","properties":{"isDeleted":{"description":"whether Region is deleted.","type":"boolean"},"isMasterRegion":{"description":"whether Region is the master region.","type":"boolean"},"name":{"description":"Region name.","readOnly":true,"type":"string"}}},"RegionListResult":{"description":"Lists Regions operation response details.","properties":{"count":{"description":"Total record count number across all pages.","format":"int64","type":"integer"},"nextLink":{"description":"Next page link if any.","type":"string"},"value":{"description":"Lists of Regions.","items":{"$ref":"#/components/schemas/RegionContract"},"type":"array"}}},"Resource":{"description":"The Resource definition.","properties":{"id":{"description":"Resource ID.","readOnly":true,"type":"string"},"name":{"description":"Resource name.","readOnly":true,"type":"string"},"type":{"description":"Resource type for API Management resource.","readOnly":true,"type":"string"}},"x-ms-azure-resource":true}}}}