Retrieve Subscription Events
Applies To: Windows Azure Pack
Retrieves the list of subscription events.
Request
Replace <UsageEndpoint> with the name of the computer that hosts the usage endpoint for the Windows Azure Pack.
Method |
Request URI |
HTTP version |
---|---|---|
GET |
https://<UsageEndpoint>:30022/billing/subscriptions |
HTTP/1.1 |
URI Parameters
The following table describes the URI parameters.
URI parameter |
Description |
---|---|
startId |
The identifier of the first record to retrieve. |
batchSize |
The maximum number of records to retrieve. |
Request Headers
The following table describes required and optional request headers.
Request header |
Description |
---|---|
Authorization: Basic |
Required. The basic authorization token. |
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 |
---|---|
UsageEventList |
A list of subscription events. For more information, see UsageEvent (Usage Metering Object). |
Example
The following code example shows a Get Subscription Events request.
https://<Computer>:30022/billing/subscriptions?startId=0&batchSize=1 HTTP/1.1
Accept: application/json
Authorization: basic <Token>
Host: <Computer>:30022
Connection: Keep-Alive
The following code example shows a Get Subscription Events response.
[
{
"EventId": 2,
"State": 0,
"Method": "POST",
"Entity": {
"SubscriptionID": "f6fb6996-0ce0-4192-b203-e435accbd55e",
"SubscriptionName": "Gold",
"AccountAdminLiveEmailId": "cont_1x122w43@ms.com",
"ServiceAdminLiveEmailId": null,
"CoAdminNames": null,
"AddOnReferences": [
],
"AddOns": [
],
"State": 1,
"QuotaSyncState": 0,
"ActivationSyncState": 0,
"PlanId": "Goldas32o0zc",
"Services": [
],
"LastErrorMessage": null,
"Features": null,
"OfferFriendlyName": null,
"OfferCategory": null,
"Created": "0001-01-01T00:00:00Z"
},
"EntityParentId": null,
"NotificationEventTimeCreated": "2013-08-21T12:32:40.607"
}
]