az apim api

Manage Azure API Management API's.

Commands

az apim api create

Create an API Management API.

az apim api delete

Delete an API Management API.

az apim api import

Import an API Management API.

az apim api list

List API Management API's.

az apim api operation

Manage Azure API Management API Operations.

az apim api operation create

Creates a new operation in the API.

az apim api operation delete

Deletes the specified operation in the API.

az apim api operation list

List a collection of the operations for the specified API.

az apim api operation show

Gets the details of the API Operation specified by its identifier.

az apim api operation update

Updates the details of the operation in the API specified by its identifier.

az apim api release

Manage Azure API Management API Release.

az apim api release create

Creates a new Release for the API.

az apim api release delete

Deletes the specified release in the API.

az apim api release list

Lists all releases of an API.

az apim api release show

Returns the details of an API release.

az apim api release update

Updates the details of the release of the API specified by its identifier.

az apim api revision

Manage Azure API Management API Revision.

az apim api revision create

Create API revision.

az apim api revision list

Lists all revisions of an API.

az apim api schema

Manage Azure API Management API Schema's.

az apim api schema create

Create an API Management API Schema.

az apim api schema delete

Delete an API Management API Schema.

az apim api schema get-etag

Get etag of an API Management API schema.

az apim api schema list

List API Management API schema's.

az apim api schema show

Show details of an API Management API Schema.

az apim api schema wait

Place the CLI in a waiting state until a condition of an apim api schema is met.

az apim api show

Show details of an API Management API.

az apim api update

Update an API Management API.

az apim api versionset

Manage Azure API Management API Version Set.

az apim api versionset create

Creates a Api Version Set.

az apim api versionset delete

Deletes specific Api Version Set.

az apim api versionset list

Lists a collection of API Version Sets in the specified service instance.

az apim api versionset show

Gets the details of the Api Version Set specified by its identifier.

az apim api versionset update

Updates the details of the Api VersionSet specified by its identifier.

az apim api wait

Place the CLI in a waiting state until a condition of an apim api is met.

az apim api create

Create an API Management API.

az apim api create --api-id
                   --display-name
                   --path
                   --resource-group
                   --service-name
                   [--api-type {graphql, http, soap, websocket}]
                   [--authorization-scope]
                   [--authorization-server-id]
                   [--bearer-token-sending-methods]
                   [--description]
                   [--no-wait]
                   [--open-id-provider-id]
                   [--protocols {http, https, ws, wss}]
                   [--service-url]
                   [--subscription-key-header-name]
                   [--subscription-key-query-param-name]
                   [--subscription-key-required]
                   [--subscription-required {false, true}]

Examples

Create a basic API.

az apim api create --service-name MyApim -g MyResourceGroup --api-id MyApi --path '/myapi' --display-name 'My API'

Required Parameters

--api-id

Unique name of the api to be created.

--display-name

Display name of the API to be created.

--path

Path to the API.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name -n

The name of the API Management service instance.

Optional Parameters

--api-type

The type of the API.

accepted values: graphql, http, soap, websocket
--authorization-scope

Specifies the OAuth operations scope.

--authorization-server-id

Specifies the OAuth authorization server ID.

--bearer-token-sending-methods

Specifies the sending methods for bearer token.

--description

Description of the API. May include HTML formatting tags.

--no-wait

Do not wait for the long-running operation to finish.

--open-id-provider-id

Specifies the openid in the authentication setting.

--protocols

Describes on which protocols the operations in this API can be invoked.

accepted values: http, https, ws, wss
--service-url

Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.

--subscription-key-header-name

Specifies the subscription key header name.

--subscription-key-query-param-name

Specifies the subscription key query string parameter name.

--subscription-key-required

Specifies whether subscription key is required during call to this API, true - API is included into closed products only, false - API is included into open products alone, null - there is a mix of products.

--subscription-required

If true, the API requires a subscription key on requests.

accepted values: false, true

az apim api delete

Delete an API Management API.

az apim api delete --api-id
                   --resource-group
                   --service-name
                   [--delete-revisions]
                   [--if-match]
                   [--no-wait]
                   [--yes]

Required Parameters

--api-id

API identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name -n

The name of the API Management service instance.

Optional Parameters

--delete-revisions

Delete all revisions of the Api.

--if-match

ETag of the Entity.

--no-wait

Do not wait for the long-running operation to finish.

--yes -y

Do not prompt for confirmation.

az apim api import

Import an API Management API.

az apim api import --path
                   --resource-group
                   --service-name
                   --specification-format {GraphQL, OpenApi, OpenApiJson, Swagger, Wadl, Wsdl}
                   [--api-id]
                   [--api-revision]
                   [--api-type {graphql, http, soap, websocket}]
                   [--api-version]
                   [--api-version-set-id]
                   [--description]
                   [--display-name]
                   [--no-wait]
                   [--protocols {http, https, ws, wss}]
                   [--service-url]
                   [--soap-api-type]
                   [--specification-path]
                   [--specification-url]
                   [--subscription-key-header-name]
                   [--subscription-key-query-param-name]
                   [--subscription-required {false, true}]
                   [--wsdl-endpoint-name]
                   [--wsdl-service-name]

Examples

Import an API Management API From a file or a url

az apim api import -g MyResourceGroup --service-name MyApim --path MyApi --specification-url https://MySpecificationURL --specification-format OpenApiJson

Required Parameters

--path

Required. Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name -n

The name of the api management service instance.

--specification-format

Specify the format of the imported API.

accepted values: GraphQL, OpenApi, OpenApiJson, Swagger, Wadl, Wsdl

Optional Parameters

--api-id

API identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

--api-revision

Describes the Revision of the Api. If no value is provided, default revision 1 is created.

--api-type

The type of the API.

accepted values: graphql, http, soap, websocket
--api-version

Describes the Version of the Api. If you add a version to a non-versioned API, an Original version will be automatically created and will respond on the default URL.

--api-version-set-id

Describes the Version Set to be used with the API.

--description

Description of the API. May include HTML formatting tags.

--display-name

Display name of this API.

--no-wait

Do not wait for the long-running operation to finish.

--protocols

Describes on which protocols(one or more) the operations in this API can be invoked.

accepted values: http, https, ws, wss
--service-url

Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.

--soap-api-type

The type of API when file format is WSDL.

--specification-path

File path specified to import the API.

--specification-url

Url specified to import the API.

--subscription-key-header-name

Specifies the subscription key header name.

--subscription-key-query-param-name

Specifies the subscription key query string parameter name.

--subscription-required

If true, the API requires a subscription key on requests.

accepted values: false, true
--wsdl-endpoint-name

Local name of WSDL Endpoint (port) to be imported.

--wsdl-service-name

Local name of WSDL Service to be imported.

az apim api list

List API Management API's.

az apim api list --resource-group
                 --service-name
                 [--filter-display-name]
                 [--skip]
                 [--top]

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name -n

The name of the API Management service instance.

Optional Parameters

--filter-display-name

Filter of APIs by displayName.

--skip

Number of records to skip.

--top

Number of records to return.

az apim api show

Show details of an API Management API.

az apim api show --api-id
                 --resource-group
                 --service-name

Required Parameters

--api-id

API identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name

The name of the API Management service instance.

az apim api update

Update an API Management API.

az apim api update --api-id
                   --resource-group
                   --service-name
                   [--add]
                   [--api-type {graphql, http, soap, websocket}]
                   [--description]
                   [--display-name]
                   [--force-string]
                   [--if-match]
                   [--no-wait]
                   [--path]
                   [--protocols {http, https, ws, wss}]
                   [--remove]
                   [--service-url]
                   [--set]
                   [--subscription-key-header-name]
                   [--subscription-key-query-param-name]
                   [--subscription-required {false, true}]
                   [--tags]

Examples

Create a basic API.

az apim api update --service-name MyApim -g MyResourceGroup --api-id MyApi --description foo

Required Parameters

--api-id

Unique name of the api to be created.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name -n

The name of the API Management service instance.

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--api-type

The type of the API.

accepted values: graphql, http, soap, websocket
--description

Description of the API. May include HTML formatting tags.

--display-name

API name. Must be 1 to 300 characters long.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

--if-match

ETag of the Entity. Not required when creating an entity, but required when updating an entity.

--no-wait

Do not wait for the long-running operation to finish.

--path

Required. Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance.

--protocols

Describes on which protocols the operations in this API can be invoked.

accepted values: http, https, ws, wss
--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--service-url

Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--subscription-key-header-name

Specifies the subscription key header name.

--subscription-key-query-param-name

Specifies the subscription key query string parameter name.

--subscription-required

If true, the API requires a subscription key on requests.

accepted values: false, true
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

az apim api wait

Place the CLI in a waiting state until a condition of an apim api is met.

az apim api wait --api-id
                 --name
                 --resource-group
                 [--created]
                 [--custom]
                 [--deleted]
                 [--exists]
                 [--interval]
                 [--timeout]
                 [--updated]

Examples

Place the CLI in a waiting state until a condition of a apim api is met. (autogenerated)

az apim api wait --created --api-id MyApi --name MyApim --resource-group MyResourceGroup

Required Parameters

--api-id

API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

--name -n

The name of the api management service instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

--exists

Wait until the resource exists.

--interval

Polling interval in seconds.

default value: 30
--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.