User Subscription
Lists the collection of subscriptions of the specified user.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/subscriptions&api-version={api-version}
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/subscriptions?$filter={$filter}&$top={$top}&$skip={$skip}&api-version={api-version}
URI Parameters
| Name | In | Required | Type | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
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: |
|||||||||||||||||||||
|
uid
|
path | True |
|
User 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
ApiManagementListUserSubscriptions
Sample Request
GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b/subscriptions&api-version=2017-03-01
Sample Response
{
"value": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/5931a769d8d14f0ad8ce13b8",
"type": "Microsoft.ApiManagement/service/users/subscriptions",
"name": "5931a769d8d14f0ad8ce13b8",
"properties": {
"userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b",
"productId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002",
"displayName": "Unlimited",
"state": "submitted",
"createdDate": "2017-06-02T17:59:06.223Z",
"primaryKey": "6de0a3b2da204e459148d2f6785873f0",
"secondaryKey": "c6de00b451f64ea780db1eb8dcf30b62"
}
},
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/5931a773d8d14f0ad8ce13b9",
"type": "Microsoft.ApiManagement/service/users/subscriptions",
"name": "5931a773d8d14f0ad8ce13b9",
"properties": {
"userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b",
"productId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060001",
"displayName": "Starter",
"state": "active",
"createdDate": "2017-06-02T17:59:15.987Z",
"startDate": "2017-06-02T00:00:00.000Z",
"expirationDate": "2017-06-17T00:00:00.000Z",
"notificationDate": "2017-06-05T00:00:00.000Z",
"primaryKey": "4af035850dc64d35b2d62311aa028f26",
"secondaryKey": "5fbc24d9677e4d1e82f6015a0e79ce68"
}
}
],
"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. |