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 service instance.

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 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 {http, soap}]
                   [--authorization-scope]
                   [--authorization-server-id]
                   [--bearer-token-sending-methods]
                   [--description]
                   [--no-wait]
                   [--open-id-provider-id]
                   [--protocols {http, https}]
                   [--service-url]
                   [--subscription]
                   [--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: http, soap
--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
--service-url

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

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--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]
                   [--subscription]
                   [--yes]

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.

--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.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

az apim api import

Import an API Management service instance.

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

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.

Optional 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.

--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: http, soap
--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 the operations in this API can be invoked.

accepted values: http, https
--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-format

Specify the format of the imported API.

accepted values: OpenApi, OpenApiJson, Swagger, Wadl, Wsdl
--specification-path

File path specified to import the API.

--specification-url

Url specified to import the API.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--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]
                 [--query-examples]
                 [--skip]
                 [--subscription]
                 [--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.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--skip

Number of records to skip.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--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
                 [--query-examples]
                 [--subscription]

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.

--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.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az apim api update

Update an API Management API.

az apim api update --api-id
                   --resource-group
                   --service-name
                   [--add]
                   [--api-type {http, soap}]
                   [--description]
                   [--display-name]
                   [--force-string]
                   [--if-match]
                   [--no-wait]
                   [--path]
                   [--protocols {http, https}]
                   [--remove]
                   [--service-url]
                   [--set]
                   [--subscription]
                   [--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: http, soap
--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
--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

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--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]
                 [--subscription]
                 [--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
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.