Share via


Retrieve a Set of Subscriptions

 

Applies To: Windows Azure Pack

Retrieves a collection of subscriptions.

Request

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

Method

Request URI

HTTP version

GET

https://<ServiceMgmt>:30004/subscriptions

HTTP/1.1

Request Headers

The following table describes required and optional request headers.

Request header

Description

Authorization: Bearer

Required. The authorization bearer token.

x-ms-principal-id

Required. The principal identifier.

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.

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

items

The list of AdminSubscription (Administrator object) query results.

filteredTotalCount

The total number of returned items before paging is applied and after filtering is applied.

totalCount

The total number of returned items before paging and filtering are applied.

Example

The following code example shows a List Subscriptions request.

GET https://<Computer>:30004/subscriptions?skip=0&take=25 HTTP/1.1
Authorization: Bearer <Token>
x-ms-client-request-id: 2ecbe1f6-6a6c-442a-bfa6-04eb7ce58184-2013-06-26 19:45:57Z
x-ms-client-session-id: 04f2c518-71af-4dfa-973e-1bcae380ef88
x-ms-principal-id: <COMPUTER>\Administrator
Accept-Language: en-US
x-ms-principal-liveid: <COMPUTER>\Administrator
Host: <Computer>:30004

The following code example shows a List Subscriptions response.

 {
  "items": [
    {
      "SubscriptionID": "8bb6bc0b-b2da-44c3-a923-659f2a36b5c4",
      "SubscriptionName": "MySqlPlanhje1ejx0",
      "AccountAdminLiveEmailId": "smorozexp@hotmail.com",
      "ServiceAdminLiveEmailId": null,
      "CoAdminNames": [

      ],
      "AddOnReferences": [

      ],
      "AddOns": [

      ],
      "State": 1,
      "QuotaSyncState": 0,
      "ActivationSyncState": 0,
      "PlanId": "MySqlPlanhje1ejx0znyw0lvn",
      "Services": [
        {
          "Type": "mysqlservers",
          "State": "registered",
          "QuotaSyncState": 0,
          "ActivationSyncState": 0,
          "BaseQuotaSettings": [
            {
              "Key": "Editions",
              "Value": "[{\"displayName\":\"Default\",\"groupName\":\"Default\",\"resourceCount\":\"10\",\"resourceSize\":\"1024\",\"offerEditionId\":\"062513100207\",\"groupType\":null}]"
            }
          ]
        }
      ],
      "LastErrorMessage": null,
      "Features": null,
      "OfferFriendlyName": "MySqlPlanhje1ejx0",
      "OfferCategory": null,
      "Created": "2013-06-25T22:05:04.167"
    }
  ]

  "filteredTotalCount": 1,
  "totalCount": 1
}

See Also

Administrator Subscription Interfaces