Retrieve the Subscriptions for a User (Tenant Subscription)

 

Applies To: Windows Azure Pack

Retrieves the subscriptions of a user.

Request

Replace <ServiceMgmt> with your Service Management API endpoint address.

Method

Request URI

HTTP version

GET

https://<ServiceMgmt>:30005/subscriptions

HTTP/1.1

URI Parameters

None.

Request Headers

The following table describes required and optional request headers.

Request Header

Description

x-ms-principal-id:

Required. The principal identifier.

Authorization: Bearer

Required. Authorization bearer token.

x-ms-client-request-id:

Optional. The client request identifier.

x-ms-client-session-id:

Optional. The client session identifier.

x-ms-principal-liveid:

Optional. The principal Live identifier.

Request Body

None.

Response

The response includes an HTTP status code, a set of response headers, and a response body.

Status Code

A successful operation returns status code 200 (OK).

For information about status codes, see Status and Error Codes (Windows Azure Pack Service Management).

Response Headers

The response for this operation includes standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

Response Body

The following table describes the key elements of the response body:

Element name

Description

SubscriptionList

A list of Subscriptions. For more information, see Subscription (Common object).

Example

The following code example shows a List Subscription request.

GET https://<Computer>:30005/subscriptions HTTP/1.1
x-ms-principal-id: person@contoso.com
Authorization: Bearer <Token>
x-ms-client-request-id: bea95100-73df-43f2-ae63-9972023e032f-2013-06-28 22:01:40Z
x-ms-client-session-id: 4933f1c7-aabf-4944-b250-3a57062d093c
Accept-Language: en-US
x-ms-principal-liveid: mradtes@3test.comt
Host: <Computer>:30005

The following code example shows a List Subscription response.

[
  {
    "SubscriptionID": "d001ad25-2639-4475-b6f6-f54e8842c902",
    "SubscriptionName": "Gold",
    "AccountAdminLiveEmailId": "person@contoso.com",
    "ServiceAdminLiveEmailId": null,
    "CoAdminNames": [

    ],
    "AddOnReferences": [

    ],
    "AddOns": [

    ],
    "State": 1,
    "QuotaSyncState": 0,
    "ActivationSyncState": 0,
    "PlanId": "Sergehihwpl2d",
    "Services": [
      {
        "Type": "webspaces",
        "State": "registered",
        "QuotaSyncState": 0,
        "ActivationSyncState": 0,
        "BaseQuotaSettings": [
          {
            "Key": "BytesReceived_Shared_WebSpace_Limited",
            "Value": "{\"ComputeMode\":0,\"CustomActionName\":null,\"EnforcementScope\":0,\"ExceededAction\":0,\"Limit\":-1,\"Period\":1440,\"QuotaName\":\"BytesReceived\",\"ResourceName\":\"BytesReceived\",\"SiteMode\":\"Limited\",\"Unit\":1,\"WebPlan\":null}"
          },

          {
            "Key": "NumberOfVirtualWorkers_Dedicated_WebSpace_NULL",
            "Value": "{\"ComputeMode\":1,\"CustomActionName\":null,\"EnforcementScope\":0,\"ExceededAction\":0,\"Limit\":-1,\"Period\":1440,\"QuotaName\":\"NumberOfVirtualWorkers\",\"ResourceName\":\"NumberOfVirtualWorkers\",\"SiteMode\":null,\"Unit\":1,\"WebPlan\":null}"
          }
        ]
      },
      {
        "Type": "sqlservers",
        "State": "registered",
        "QuotaSyncState": 0,
        "ActivationSyncState": 0,
        "BaseQuotaSettings": [
          {
            "Key": "Editions",
            "Value": "[{\"displayName\":\"Default\",\"groupName\":\"Default\",\"resourceCount\":\"10\",\"resourceSize\":\"1024\",\"resourceSizeLimit\":\"1024\",\"offerEditionId\":\"062813094218\",\"groupType\":null}]"
          }
        ]
      },
      {
        "Type": "servicebus",
        "State": "registered",
        "QuotaSyncState": 0,
        "ActivationSyncState": 0,
        "BaseQuotaSettings": [

        ]
      },
      {
        "Type": "mysqlservers",
        "State": "registered",
        "QuotaSyncState": 0,
        "ActivationSyncState": 0,
        "BaseQuotaSettings": [
          {
            "Key": "Editions",
            "Value": "[{\"displayName\":\"Default\",\"groupName\":\"Default\",\"resourceCount\":\"10\",\"resourceSize\":\"1024\",\"offerEditionId\":\"062813094218\",\"groupType\":null}]"
          }
        ]
      }
    ],
    "LastErrorMessage": null,
    "Features": null,
    "OfferFriendlyName": "Gold",
    "OfferCategory": null,
    "Created": "2013-06-28T21:42:39.413"
  }
]

See Also

Tenant Subscription Interfaces