Retrieve Quota Usage for a Site
Applies To: Windows Azure Pack
Retrieves the quota usage for a site.
Replace {ServiceMgmt} with your Service Management API endpoint address. Replace {Port} with either 30005 for the tenant API or 30006 for the Public Tenant API. Replace {SUBSCRIPTIONID} with the required subscription identifier. Replace {WEBSPACENAME}, and {NAME} with the corresponding values for your web site.
Method | Request URI | HTTP Version |
|---|---|---|
GET | https://<ServiceMgmt>:<Port>/{SUBSCRIPTIONID}/services/webspaces/{WEBSPACENAME}/sites/{NAME}/usages?names={USAGES}&computeMode={COMPUTEMODE}&siteMode={SITEMODE} | HTTP/1.1 |
URI Parameter | Description |
|---|---|
names | Specifies a comma-separated list of the names of the metrics to return. If the names parameter is not specified, then all available metrics are returned. |
computeMode | The Compute mode for the website. Possible values are Shared or Dedicated. |
siteMode | The scaling for the website. Possible values are Limited or Basic. If the computeMode parameter is Dedicated, the siteMode parameter must be NULL. |
The following is a list of supported metrics:
CpuTime
BytesReceived
BytesSent
IncomingRequestBytes
IncomingRequestResponseBytes
OutgoingRequestBytes
OutgoingRequestResponseBytes
LocalReadBytes
LocalWrittenBytes
NetworkReadBytes
NetworkWrittenBytes
Requests
Http2xx
Http3xx
Http401
Http403
Http404
Http406
Http4xx
Http5xx
The following table describes required and optional request headers.
Request header | Description |
|---|---|
x-ms-version | Required. Specifies the version of the operation to use for this request. This header should be set to 2012-10-10 or the current version. |
accept: application/json | Optional. Use this header to receive the response in JSON format. |
None.
The response includes an HTTP status code, a set of response headers, and a response body.
A successful operation returns status code 200 (OK).
For information about status codes, see Error Codes (Web Sites Service REST API).
The response for this operation includes the following headers. The response can also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.
Response header | Description |
|---|---|
x-ms-request-id | A value that uniquely identifies the request made against the management service. |
The code example shows the format of the response body.
[{
"ComputeMode":0,
"CurrentValue":9223372036854775807,
"DisplayName":"String content",
"Limit":9223372036854775807,
"Name":"String content",
"NextResetTime":"\/Date(928174800000-0700)\/",
"ResourceName":"String content",
"SiteMode":"String content",
"Unit":"String content"
}]
The following table describes the key elements of the response body.
Element name | Description | ||
|---|---|---|---|
Usages | Container element for a set of metrics. | ||
Usages.Usage | Container element for a specific metric. | ||
Usages.Usage.ComputeMode | The Compute mode of the website. For websites in Standard mode, the return value is Dedicated. For websites in Free or Shared mode, the return value is Shared. | ||
Usages.Usage.CurrentValue | The current value of the specified metric, which is expressed in terms of the measurement that is specified by the Unit element. | ||
Usages.Usage.DisplayName | The display name of the metric. It includes spaces. | ||
Usages.Usage.Limit | The maximum point that the given metric can reach. The limit resets at the time that is specified by the NextResetTime property. If the limit is reached before the reset time, the site is stopped. A value of -1 means unlimited. Resources with limits typically include CPU time, memory usage, and file system storage.
| ||
Usages.Usage.Name | The name of the metric, without spaces. The value is usually the same as that of the ResourceName property. | ||
Usages.Usage.NextResetTime | The time at which the metric is to be reset. | ||
Usages.Usage.ResourceName | The name of the resource that is measured. | ||
Usages.Usage.SiteMode | The scaling for the website. Websites in Free mode return a value of Limited. Websites in Shared mode return a value of Basic. Sites in Standard mode return NULL. | ||
Usages.Usage.Unit | The unit of measure for the given metric. |
