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.

Sumo Logic has several deployment types, which vary by geographic location and the date an account is created. Select the documentation link below that corresponds to your deployment. If you're not sure, 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
Legal
Privacy Statement
Terms of Use

Copyright © 2024 by Sumo Logic, Inc.