Product Subscriptions
Lists the collection of subscriptions to the specified product.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions&api-version={api-version}
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions?$filter={$filter}&$top={$top}&$skip={$skip}&api-version={api-version}
URI Parameters
| Name | In | Required | Type | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
policyId
|
path | True |
|
The identifier of the Policy. | |||||||||||||||||||||
|
groupId
|
path | True |
|
Group identifier. Must be unique in the current API Management service instance.
Regex pattern: |
|||||||||||||||||||||
|
apiId
|
path | True |
|
API identifier. Must be unique in the current API Management service instance.
Regex pattern: |
|||||||||||||||||||||
|
subscriptionId
|
path | True |
|
Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
|||||||||||||||||||||
|
resourceGroupName
|
path | True |
|
The name of the resource group. |
|||||||||||||||||||||
|
serviceName
|
path | True |
|
The name of the API Management service. Regex pattern: |
|||||||||||||||||||||
|
productId
|
path | True |
|
Product identifier. Must be unique in the current API Management service instance. Regex pattern: |
|||||||||||||||||||||
|
$filter
|
query |
|
|
||||||||||||||||||||||
|
$top
|
query |
|
Number of records to return. |
||||||||||||||||||||||
|
$skip
|
query |
|
Number of records to skip. |
||||||||||||||||||||||
|
api-version
|
query | True |
|
Version of the API to be used with the client request. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Lists a collection of subscription entities. |
|
| Other Status Codes |
Error response describing why the operation failed. |
Examples
ApiManagementListProductSubscriptions
Sample Request
GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/armTemplateProduct4/subscriptions&api-version=2017-03-01
Sample Response
{
"value": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/592f117198a5ce0c64de1a62",
"type": "Microsoft.ApiManagement/service/products/subscriptions",
"name": "592f117198a5ce0c64de1a62",
"properties": {
"userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1",
"productId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/armTemplateProduct4",
"displayName": " ARM Template ProductName 4 subscription",
"state": "active",
"createdDate": "2017-05-31T18:54:41.133Z",
"startDate": "2017-05-31T00:00:00.000Z",
"primaryKey": "9c79c5e0ad2d49b385a295bda544c3ad",
"secondaryKey": "9fcdada8f46e4de7afa2158c19cce7b5"
}
},
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/armTemplatesubscription2",
"type": "Microsoft.ApiManagement/service/products/subscriptions",
"name": "armTemplatesubscription2",
"properties": {
"userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/armTemplateUser3",
"productId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/armTemplateProduct4",
"displayName": " ARM Template ProductName 4 subscription",
"state": "active",
"createdDate": "2017-05-31T18:54:50.920Z",
"startDate": "2017-05-31T00:00:00.000Z",
"primaryKey": "6a4ba8a67f2b4db48031c56320bfa035",
"secondaryKey": "9da2585b029b46e18607f4a08bf66f5e"
}
}
],
"nextLink": ""
}
Definitions
| ErrorFieldContract |
Error Field contract. |
| ErrorResponse | |
| SubscriptionCollection | |
| SubscriptionContract |
Subscription details. |
Error Field contract.
| Name | Type | Description |
|---|---|---|
| code |
|
Property level error code. |
| message |
|
Human-readable representation of property-level error. |
| target |
|
Property name. |
| Name | Type | Description |
|---|---|---|
| code |
|
Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. |
| details |
The list of invalid fields send in request, in case of validation error. |
|
| message |
|
Human-readable representation of the error. |
| Name | Type | Description |
|---|---|---|
| nextLink |
|
Next page link if any. |
| value |
Page values. |
Subscription details.
| Name | Type | Description |
|---|---|---|
| createdDate |
|
Subscription creation date. The date conforms to the following format: |
| displayName |
|
The name of the subscription, or null if the subscription has no name. |
| endDate |
|
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 |
| expirationDate |
|
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 |
| id |
|
Resource ID. |
| name |
|
Resource name. |
| notificationDate |
|
Upcoming subscription expiration notification date. The date conforms to the following format: |
| primaryKey |
|
Subscription primary key. |
| productId |
|
The product resource identifier of the subscribed product. The value is a valid relative URL in the format of /products/{productId} where {productId} is a product identifier. |
| secondaryKey |
|
Subscription secondary key. |
| startDate |
|
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 |
| 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. |
| stateComment |
|
Optional subscription comment added by an administrator. |
| type |
|
Resource type for API Management resource. |
| userId |
|
The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{uid} where {uid} is a user identifier. |