Skip to main content

Metrics Query Management APIs

Thumbnail icon

The Metrics Query API allows you to execute queries on various metrics and retrieve multiple time-series (data-points) over time from HTTP endpoints. For information about running a metrics query using the API, see Executing a query in Metrics APIs.

Here is example content for a v1/metricQueries API call:

{
"queries": [
{
"rowId": "A",
"query": "metric=CPU_Idle",
"quantization": 60000,
"rollup": "Avg",
"timeshift": -3600000
}
],
"timeRange": {
"type": "BeginBoundedTimeRange",
"from": {
"type": "RelativeTimeRangeBoundary",
"relativeTime": "-15m"
}
}
}

A metric query consists of a metric, one or more filters, and optionally, one or more metrics operators. Although both filters and operators are optional, in practice, your metric queries will almost always contain filters that narrow the scope of your query. For more information about the query language, see Metrics - Classic.

Documentation​

Refer to Getting Started for Sumo Logic API Authentication, Endpoints, and Security.

Our APIs are built with OpenAPI. You can generate client libraries in several languages and explore automated testing.

To access our API documentation, navigate to the appropriate link based on your Sumo deployment. Deployment types differ based on geographic location and account creation date. If unsure, see How to determine your endpoint.

DeploymentDocumentation URL
AUhttps://api.au.sumologic.com/docs/#tag/metricsQuery
CAhttps://api.ca.sumologic.com/docs/#tag/metricsQuery
DEhttps://api.de.sumologic.com/docs/#tag/metricsQuery
EUhttps://api.eu.sumologic.com/docs/#tag/metricsQuery
FEDhttps://api.fed.sumologic.com/docs/#tag/metricsQuery
INhttps://api.in.sumologic.com/docs/#tag/metricsQuery
JPhttps://api.jp.sumologic.com/docs/#tag/metricsQuery
US1https://api.sumologic.com/docs/#tag/metricsQuery
US2https://api.us2.sumologic.com/docs/#tag/metricsQuery
Status
Legal
Privacy Statement
Terms of Use

Copyright Β© 2024 by Sumo Logic, Inc.