Sven Malvik
Sven Malvik

Reputation: 755

Azure API Management - Adding header and query parameters to APIM operation using Azure CLI

How can I add headers and query parameters to an APIM operation using the Azure CLI. I know how to do this with the REST API, so I was wondering if this is possible at all.

Upvotes: 0

Views: 1330

Answers (1)

Kai Walter
Kai Walter

Reputation: 4001

You can add headers or queryParameters with these calls:

az apim api operation update --api-id my-api-id --operation-id my-operation-id -g my-rg -n my-apim-service-name --add request.headers name="test" type="string"

az apim api operation update --api-id my-api-id --operation-id my-operation-id -g my-rg -n my-apim-service-name --add request.queryParameters name="test" type="string"

where key value pairs to be used for headers and queryParameters are documented here

Upvotes: 1

Related Questions