Metrics Query Management APIs
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.
Documentation
To get started with Sumo Logic APIs, see 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 Which endpoint should I use?