SignalFx Developers Guide

Developer Home

Product Docs

SignalFx

Retrieve MTS API

API for for retrieving metric timeseries (MTS) for a given time window

Retrieve MTS

Retrieves MTS for a specified time window

Retrieves datapoints from the MTS specified by text search or a time window or both. The request uses the following query parameters:

  • query: A query that searches metrics, dimensions, custom properties, and tags. The query language lets you use wildcards for names and values.
  • startMS: The starting point of a time window for the datapoints in the MTS.
  • endMS: The end point of a time window for the datapoints in the MTS.
    Another query parameter, resolution, specifies the resolution that the API should use when returning datapoints. Because SignalFx stores MTS for a specified length of time according to resolution, it can return datapoints at a resolution of 1 second, 1 minute, 5 minutes, and 1 hour, regardless of the incoming data resolution.
query Parameters
query
string

Search criteria that specifies the MTS that you want the API to return. You can search for the following:

  • Metric names
  • Dimension names
  • Specific values of a dimension
  • Custom properties
  • Specific values of a custom property
  • Tags
    Search criteria have the following rules:
  • To search for a metric, specify its name. The result is all datapoints in MTS that have that metric.
  • To search for datapoints that have a dimension or property, regardless of the value, specify <name>:*
  • To search for specific values of a dimension or property, specify the name and value as <name>:<value>. If <value> contains non-alphanumeric characters (for example, blanks), surround it with double quotes.
  • To search for names or values using wildcards, use * as the wildcard character. For example, to search for all values of the region dimension, use region:*.
  • You can do range searches on metrics, dimensions or properties using the syntax <name>:[<lower> to <upper>] (The value of <lower> must be less than or equal to <upper>). This works for numeric and alphabetic values.
  • To search MTS for the existence of dimensions or properties, use _exists_ and _missing_. For example, to search for MTS that have the host_machine dimension, specify _exists_:host_machine.
  • A single property name and value (or wildcards) make up a predicate that implicitly returns a boolean.
  • Join predicates with the NOT, AND, and OR boolean operators.
  • Use parentheses '(' and ')' to change the evaluation order. For example, to retrieve all custom events that have an eventType prefixed with myCompany and have the dimension region:emea, use query="eventType:myCompany* AND region:emea.
startMs
integer <int64>
Example: startMs=1557264630000

Starting time of the time window within which the API should search for matching MTS. Specify the value in Unix time.

endMS
integer <int64>
Example: endMS=1557271830000

End point of the time window within which the API should search for matching MTS. Specify the value in Unix time.

resolution
integer <int32>

Resolution that the API should use for datapoints it returns.
Allowed values are 1000 (1 second), 60000 (1 minute), 300000 (5 minutes), and 3600000 (1 hour).

header Parameters
X-SF-Token
required
string

Authentication token.

Responses

Response Headers
Content-Type
string

Format of the response payload

Response Schema: application/json
object

The datapoints for the MTS that match the search criteria and have timestamps within the specified time window. The number of datapoints is controlled by the resolution you request.

errors
Array of strings

Errors associated with the request

Response samples

Content type
application/json
{
  • "data":
    {
    },
  • "errors":
    [
    ]
}

© Copyright 2020 Splunk, Inc.

Third-party license information