Retrieve a Subscription for a Notification
Applies To: Windows Azure Pack
Used by the Service Management API to retrieve subscription information.
Request
Replace <NotificationEndpoint> with the endpoint address for the Windows Azure Pack Custom Resource Provider Notification REST API. Replace <Id> with the identifier of the subscription to retrieve.
Method |
Request URI |
HTTP version |
---|---|---|
GET |
http://<NotificationEndpoint>/subscriptions/<Id> |
HTTP/1.1 |
URI Parameters
None.
Request Headers
The following table describes required and optional request headers.
Request header |
Description |
---|---|
Authorization: Basic |
Required. The basic authorization 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
Return status code 200 (OK) if the operation is successful.
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 |
---|---|
Subscription |
The retrieved subscription. For more information, see Subscription (Notification Endpoint Object). |
Example
The following example shows a Retrieve a Subscription for a Notification request.
GET https://<NotificationEndpoint>:30010/subscriptions/ec66ec96-8edd-4916-be45-607959155c2a HTTP/1.1
Referer: https://<Computer>:30004/subscriptions/ec66ec96-8edd-4916-be45-607959155c2a
Accept-Language: en-US
x-ms-client-request-id: ef2c5d93-a957-439b-9210-de52107322c1-2014-07-09 23:45:22Z
x-ms-client-session-id: a519f0aa-53e9-4522-94fd-3c55607a6b65
x-ms-principal-id: <Computer>%5cAdministrator
x-ms-request-id: 684b6822d29e4aac96fe45110881e525.2014-07-09T23:45:24.2267567Z
Authorization: Basic <encoded username and password>
Content-Type: application/json; charset=utf-8
Host: <Computer>:30010
Content-Length: 0
Expect: 100-continue
The following code example shows the JSON response for Retrieve a Subscription for a Notification.
{
"SubscriptionId": "ec66ec96-8edd-4916-be45-607959155c2a",
"SubscriptionName": null,
"State": 1,
"LifecycleState": 0,
"LastErrorMessage": null,
"QuotaSettings": [
{
"Key": "Editions",
"Value": "[{\"displayName\":\"Default\",\"groupName\":\"Default\",\"resourceCount\":\"10\",\"resourceSize\":\"1024\",\"resourceSizeLimit\":\"0\",\"offerEditionId\":\"32814080310\",\"groupType\":\"Shared\"}]"
}
],
"AdminId": "notauser@contoso.com",
"CoAdminIds": [
]
}
Remarks
The QuotaSettings property must be populated in the response.
If a resource provider is using an asynchronous subscription operation, the resource provider returns 202 from the asynchronous operation, TBD is then called every 10 seconds by the Service Management API to determine if the operation is complete.
TBD is used during a system upgrade from Windows Azure Pack Version 1.
See Also
Windows Azure Pack Custom Resource Provider Notification REST API Reference