az apim api

Manage Azure API Management API's.

Commands

Name Description Type Status
az apim api create

Create an API Management API.

Core GA
az apim api delete

Delete an API Management API.

Core GA
az apim api export

Export an API Management API.

Core GA
az apim api import

Import an API Management API.

Core GA
az apim api list

List API Management API's.

Core GA
az apim api operation

Manage Azure API Management API Operations.

Core GA
az apim api operation create

Creates a new operation in the API.

Core GA
az apim api operation delete

Deletes the specified operation in the API.

Core GA
az apim api operation list

List a collection of the operations for the specified API.

Core GA
az apim api operation show

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

Core GA
az apim api operation update

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

Core GA
az apim api release

Manage Azure API Management API Release.

Core GA
az apim api release create

Creates a new Release for the API.

Core GA
az apim api release delete

Deletes the specified release in the API.

Core GA
az apim api release list

Lists all releases of an API.

Core GA
az apim api release show

Returns the details of an API release.

Core GA
az apim api release update

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

Core GA
az apim api revision

Manage Azure API Management API Revision.

Core GA
az apim api revision create

Create API revision.

Core GA
az apim api revision list

Lists all revisions of an API.

Core GA
az apim api schema

Manage Azure API Management API Schema's.

Core GA
az apim api schema create

Create an API Management API Schema.

Core GA
az apim api schema delete

Delete an API Management API Schema.

Core GA
az apim api schema get-etag

Get etag of an API Management API schema.

Core GA
az apim api schema list

List API Management API schema's.

Core GA
az apim api schema show

Show details of an API Management API Schema.

Core GA
az apim api schema wait

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

Core GA
az apim api show

Show details of an API Management API.

Core GA
az apim api update

Update an API Management API.

Core GA
az apim api versionset

Manage Azure API Management API Version Set.

Core GA
az apim api versionset create

Creates a Api Version Set.

Core GA
az apim api versionset delete

Deletes specific Api Version Set.

Core GA
az apim api versionset list

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

Core GA
az apim api versionset show

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

Core GA
az apim api versionset update

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

Core GA
az apim api wait

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

Core GA

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.

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.

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

default value: False
--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
default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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.

default value: False
--yes -y

Do not prompt for confirmation.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az apim api export

Export an API Management API.

az apim api export --api-id
                   --ef {OpenApiJsonFile, OpenApiJsonUrl, OpenApiYamlFile, OpenApiYamlUrl, SwaggerFile, SwaggerUrl, WadlFile, WadlUrl, WsdlFile, WsdlUrl}
                   --resource-group
                   --service-name
                   [--file-path]

Examples

Export an API Management API to a file or returns a response containing a link of the export.

az apim api export -g MyResourceGroup --service-name MyApim --api-id MyApi --export-format OpenApiJson --file-path path

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. Regex pattern: ^[^*#&+:<>?]+$.

--ef --export-format

Specify the format of the exporting API.

accepted values: OpenApiJsonFile, OpenApiJsonUrl, OpenApiYamlFile, OpenApiYamlUrl, SwaggerFile, SwaggerUrl, WadlFile, WadlUrl, WsdlFile, WsdlUrl
--resource-group -g

The name of the resource group. The name is case insensitive.

--service-name -n

The name of the api management service instance.

Optional Parameters

--file-path -f

File path specified to export the API.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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.

default value: False
--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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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.

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

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

default value: []
--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.

default value: False
--if-match

ETag of the Entity. Not required when creating an entity, but required when updating an entity. Default value is None.

--no-wait

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

default value: False
--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 <indexToRemove> OR --remove propertyToRemove.

default value: []
--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=<value>.

default value: []
--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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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

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

default value: False
--custom

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

--deleted

Wait until deleted.

default value: False
--exists

Wait until the resource exists.

default value: False
--interval

Polling interval in seconds.

default value: 30
--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.