Subscription - List
Lists all subscriptions of the API Management service instance.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions?api-version=2024-05-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions?$filter={$filter}&$top={$top}&$skip={$skip}&api-version=2024-05-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. |
service
|
path | True |
string |
The name of the API Management service. Regex pattern: |
subscription
|
path | True |
string uuid |
The ID of the target subscription. The value must be an UUID. |
api-version
|
query | True |
string |
The API version to use for this operation. |
$filter
|
query |
string |
| Field | Usage | Supported operators | Supported functions | |
|
$skip
|
query |
integer int32 |
Number of records to skip. |
|
$top
|
query |
integer int32 |
Number of records to return. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
A collection of the Subscription entities for the specified API Management service instance. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
ApiManagementListSubscriptions
Sample request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions?api-version=2024-05-01
Sample response
{
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/5600b59475ff190048070001",
"type": "Microsoft.ApiManagement/service/subscriptions",
"name": "5600b59475ff190048070001",
"properties": {
"ownerId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1",
"scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060001",
"state": "active",
"createdDate": "2015-09-22T01:57:40.3Z"
}
},
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/56eaed3dbaf08b06e46d27fe",
"type": "Microsoft.ApiManagement/service/subscriptions",
"name": "56eaed3dbaf08b06e46d27fe",
"properties": {
"ownerId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/56eaec62baf08b06e46d27fd",
"scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060001",
"displayName": "Starter",
"state": "active",
"createdDate": "2016-03-17T17:45:33.837Z",
"startDate": "2016-03-17T00:00:00Z",
"expirationDate": "2016-04-01T00:00:00Z",
"notificationDate": "2016-03-20T00:00:00Z"
}
},
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/5931a769d8d14f0ad8ce13b8",
"type": "Microsoft.ApiManagement/service/subscriptions",
"name": "5931a769d8d14f0ad8ce13b8",
"properties": {
"ownerId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b",
"scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002",
"displayName": "Unlimited",
"state": "submitted",
"createdDate": "2017-06-02T17:59:06.223Z"
}
}
],
"count": 3,
"nextLink": ""
}
Definitions
Name | Description |
---|---|
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Subscription |
Paged Subscriptions list representation. |
Subscription |
Subscription details. |
Subscription |
Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. |
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 |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
SubscriptionCollection
Paged Subscriptions list representation.
Name | Type | Description |
---|---|---|
count |
integer |
Total record count number across all pages. |
nextLink |
string |
Next page link if any. |
value |
Page values. |
SubscriptionContract
Subscription details.
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
The name of the resource |
properties.allowTracing |
boolean |
Determines whether tracing is enabled |
properties.createdDate |
string |
Subscription creation date. The date conforms to the following format: |
properties.displayName |
string |
The name of the subscription, or null if the subscription has no name. |
properties.endDate |
string |
Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the |
properties.expirationDate |
string |
Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the |
properties.notificationDate |
string |
Upcoming subscription expiration notification date. The date conforms to the following format: |
properties.ownerId |
string |
The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier. |
properties.primaryKey |
string |
Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. |
properties.scope |
string |
Scope like /products/{productId} or /apis or /apis/{apiId}. |
properties.secondaryKey |
string |
Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. |
properties.startDate |
string |
Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the |
properties.state |
Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. |
|
properties.stateComment |
string |
Optional subscription comment added by an administrator when the state is changed to the 'rejected'. |
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
SubscriptionState
Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.
Name | Type | Description |
---|---|---|
active |
string |
|
cancelled |
string |
|
expired |
string |
|
rejected |
string |
|
submitted |
string |
|
suspended |
string |