Share via


Revoke Api Key - Post

Revokes an active API key. Please note that this API is currently in a preview state and requires sign-up to the 'Discovery Api Key Early Access' preview feature using a valid Azure subscription. For more information on this process please see the documentation for Marketplace Catalog APIs here

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Marketplace/keys/{apiKeyAlias}/revoke?api-version=2023-01-01-preview

URI Parameters

Name In Required Type Description
apiKeyAlias
path True

string

The alias of your API key.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Header

Name Required Type Description
x-ms-client-tenant-id True

string

The tenant associated with the subscription.

Responses

Name Type Description
200 OK

Indicates that the API key was successfully revoked.

Other Status Codes

ErrorResponse

Microsoft.Marketplace error response describing why the operation failed.

Examples

Revoke_Key

Sample request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Marketplace/keys/key1/revoke?api-version=2023-01-01-preview

Sample response

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.