Retrieve the Subscriptions for an Add-ons
Applies To: Windows Azure Pack
Retrieves the subscriptions for an add-on.
Request
Replace <ServiceMgmt> with your Service Management API endpoint address.
Method |
Request URI |
HTTP version |
---|---|---|
GET |
https://<ServiceMgmt>:30004/subscriptions |
HTTP/1.1 |
URI Parameters
The following table describes the URI parameters.
URI Parameter |
Description |
---|---|
addOnId |
Required. The identifier of the add-on that the subscription belongs to. |
Filter |
A string to use as a query filter. |
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 |
---|---|
items |
A 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 Retrieve the Subscriptions for an Add-on request.
GET https://<Computer>:30004/subscriptions?addOnId=SqlAOrcghl4snaz0slbre&skip=0&take=25 HTTP/1.1
Authorization: Bearer <Token>
x-ms-client-request-id: fbaea692-256c-4db0-b81f-0317febed272-2013-06-28 19:47:14Z
x-ms-client-session-id: 36d65d7b-42b5-4fc0-8334-93c10e7a90f2
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 Retrieve the Subscriptions for an Add-on response.
{
"items": [
{
"SubscriptionID": "fc92a116-34c8-4654-ae8a-b5c865e8b260",
"SubscriptionName": "PlanWithAddOnx4xbhndb",
"AccountAdminLiveEmailId": "mulsub_q2r2mw2c@live.com",
"ServiceAdminLiveEmailId": null,
"CoAdminNames": [
],
"AddOnReferences": [
{
"AddOnId": "SqlAOrcghl4snaz0slbre",
"AddOnInstanceId": "04e04b10-f9bd-4eae-b27b-890acd10a49f",
"AcquisitionTime": "2013-06-27T03:01:42.49"
}
],
"AddOns": [
{
"Id": "SqlAOrcghl4snaz0slbre",
"DisplayName": "SqlAOrcghl4sn",
"State": 0,
"ConfigState": 1,
"QuotaSyncState": 0,
"LastErrorMessage": null,
"Advertisements": [
{
"LanguageCode": "en-us",
"DisplayName": "SqlAOrcghl4sn",
"Description": null
}
],
"ServiceQuotas": [
{
"ServiceName": "sqlservers",
"ServiceInstanceId": "7BAD5022-79CA-4B53-8177-1ACAEEAFA099",
"ServiceDisplayName": "SQL Servers",
"ServiceInstanceDisplayName": "SQL Servers",
"ConfigState": 1,
"QuotaSyncState": 0,
"Settings": [
{
"Key": "Editions",
"Value": "[{\"groupName\":\"Default\",\"resourceCount\":\"2\",\"resourceSize\":\"10\",\"offerEditionId\":\"1367541399669\"}]"
}
]
}
],
"SubscriptionCount": 1,
"AssociatedPlans": [
],
"MaxOccurrencesPerPlan": 1,
"Price": null
}
],
"State": 1,
"QuotaSyncState": 0,
"ActivationSyncState": 0,
"PlanId": "PlanWithAddOnx4xbhndbt4jyiffn",
"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\":\"062713030129\",\"groupType\":null}]"
}
]
},
{
"Type": "mysqlservers",
"State": "registered",
"QuotaSyncState": 0,
"ActivationSyncState": 0,
"BaseQuotaSettings": [
{
"Key": "Editions",
"Value": "[{\"displayName\":\"Default\",\"groupName\":\"Default\",\"resourceCount\":\"10\",\"resourceSize\":\"1024\",\"offerEditionId\":\"062713030129\",\"groupType\":null}]"
}
]
}
],
"LastErrorMessage": null,
"Features": null,
"OfferFriendlyName": "PlanWithAddOnx4xbhndb",
"OfferCategory": null,
"Created": "2013-06-27T03:01:31.923"
}
],
"filteredTotalCount": 1,
"totalCount": 1
}