Get Metrics Data

This operation returns the data for a provided data point in a specified time window.


Method Request URI
GET{subscription ID}/ services/servicebus/Namespaces/{Namespace}/<ResourcePath>/MetricKeyPredicate/Rollups/RollupKeyPredicate/Values/?<queryOptions>


Parameter Name Description
SubscriptionID The Azure subscription.
Namespace The Service Bus namespace.
ResourcePath Path to the Service Bus entity being queried.
MetricKeyPredicate Metric name. Metric name (data point) depends on the entity type you are querying.
RollupKeyPredicate Rollup key (name). For example, PT1H specifies a rollup policy of one hour.
QueryOptions $filter=<Filter expression>
Filter Expression Timestamp <Logical Operator> <Value> AND <Filter expression>
Logical Operator Eq | Ne | Gt | Ge | Lt | Le

Request Body

  • none


Response Codes

HTTP Code Condition
200 Successfully retrieved metric data.
401 Authorization failure. Returned when user does not have credentials to retrieve metric data; for example, if a subscription is suspended.
404 Entity does not exist under this namespace.
500 Internal/unhandled exception.

Response Headers

Response Header Description
Content-Type application/xml; application/json

Response Body

  • If the entity exists

    • Requested metric values
  • Else

    • None


The following call retrieves the size of MyNamespace/MyQueue in the last day (aggregates by hours):