Share via


Retrieve the Available Plans

 

Applies To: Windows Azure Pack

Lists the available Plans.

Request

Replace <ServiceMgmt> with your Service Management API endpoint address. Replace <Port> with either 30005 for the tenant API or 30004 for the administrator API.

Method

Request URI

HTTP version

GET

https://<ServiceMgmt>:<Port>/plans

HTTP/1.1

URI Parameters

None.

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.

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

Plan

The list of plans. For more information, see Plan (Administrator object).

Example

The following code is an example of a List Plan request.

GET https://<Computer>:30004/plans HTTP/1.1
Authorization: Bearer <Token>
x-ms-client-request-id: 40413a4c-4d39-47d5-8eb7-f7a2a4be9a59-2013-06-26 19:39:15Z
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 is an example of a List Plan response.

[
  {
    "Id": "MySqlPlanhje1ejx0znyw0lvn",
    "DisplayName": "MySqlPlanhje1ejx0",
    "State": 0,
    "ConfigState": 1,
    "QuotaSyncState": 0,
    "LastErrorMessage": null,
    "Advertisements": [
      {
        "LanguageCode": "en-us",
        "DisplayName": "MySqlPlanhje1ejx0",
        "Description": null
      }
    ],
    "ServiceQuotas": [
      {
        "ServiceName": "mysqlservers",
        "ServiceInstanceId": "33CC0954-8412-4CE1-924F-B9CB1525FA96",
        "ServiceDisplayName": "MySQL Servers",
        "ServiceInstanceDisplayName": "MySQL Servers",
        "ConfigState": 1,
        "QuotaSyncState": 0,
        "Settings": [
          {
            "Key": "Editions",
            "Value": "[{\"displayName\":\"Default\",\"groupName\":\"Default\",\"resourceCount\":\"10\",\"resourceSize\":\"1024\",\"offerEditionId\":\"062513100207\",\"groupType\":null}]"
          }
        ]
      }
    ],
    "SubscriptionCount": 1,
    "MaxSubscriptionsPerAccount": 1,
    "AddOnReferences": [

    ],
    "AddOns": [

    ],
    "InvitationCode": null,
    "Price": null
  }
]

See Also

Common Plan Interfaces