POST /v2/metricsSearches

Creates a new metrics search page.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
queries[] Array Yes

Queries of the metrics search page.

queries[].spansQueryData Object No

The data format describing a basic spans query.

queries[].spansQueryData.filters[] Array Yes

A list of filters for the spans query.

queries[].spansQueryData.filters[].type String Yes

The spans filter type.

queries[].spansQueryData.filters[].fieldName String Yes

The name of the filtering field.

queries[].spansQueryData.limit[] Array Yes

A list of limits that will be applied to the spans query.

queries[].spansQueryData.limit[].direction String Yes

Describes whether the results should be sorted in an ascending or a descending order.

queries[].spansQueryData.limit[].limitValue Integer Yes

The number of aggregated results returned, e.g. if 10 is requested, then only the first 10 aggregated results are returned.

queries[].spansQueryData.groupBy[] Array Yes

A list of group-by clauses for the spans query.

queries[].spansQueryData.groupBy[].type String Yes

The type of the group-by clause.

queries[].spansQueryData.visualizations[] Array Yes

A list of used visualization methods for the spans query.

queries[].spansQueryData.visualizations[].name String Yes

A unique name of the visualization.

queries[].spansQueryData.visualizations[].type String Yes

The visualization type.

queries[].transient Boolean No

This field only applies for queryType of Metrics but other query types may be supported in the future. Determines if the row should be returned in the response. Can be used in conjunction with a join, if only the result of the join is needed, and not the intermediate rows. Setting transient to true wherever the intermediate results aren't required speeds up the computation and reduces the amount of data transferred over the network.

Default value: false

queries[].metricsQueryMode String No

The mode of the metrics query that the user was editing. Can be Basic or Advanced. Will ONLY be specified for metrics queries.

queries[].tracesQueryData Object No

The data format describing a basic traces query.

queries[].tracesQueryData.filters[] Array Yes

A list of filters for the traces query.

queries[].tracesQueryData.filters[].type String Yes

The type of the filter.

queries[].parseMode String No

This field only applies for queryType of Logs but other query types may be supported in the future. Define the parsing mode to scan the JSON format log messages. Possible values are:

  1. Auto
  2. Manual In AutoParse mode, the system automatically figures out fields to parse based on the search query. While in the Manual mode, no fields are parsed out automatically. For more information see Dynamic Parsing.

Default value: "Auto"

queries[].queryKey String Yes

The key for metric, traces or log queries. Used as an identifier for queries. It is displayed on the panel builder and used for display overrides and query toggling.

queries[].queryType String Yes

The type of the query, either Metrics, Traces, Spans or Logs.

queries[].queryString String Yes

The metrics, traces or logs query.

queries[].outputCardinalityLimit Integer No

This field only applies for queryType of Metrics but other query types may be supported in the future. Specifies the output cardinality limitations for the query, which is the maximum number of timeseries returned in the result.

Default value: 1000

queries[].metricsQueryData Object No

The data format describing a basic metrics query.

queries[].metricsQueryData.metric String Yes

The metric of the query.

queries[].metricsQueryData.filters[] Array Yes

A list of filters for the metrics query.

queries[].metricsQueryData.filters[].key String No

The key of the metrics filter.

queries[].metricsQueryData.filters[].value String Yes

The value of the metrics filter.

queries[].metricsQueryData.filters[].negation Boolean No

Whether or not the metrics filter is negated.

queries[].metricsQueryData.groupBy String No

The field to group the results by.

queries[].metricsQueryData.operators[] Array No

A list of operator data for the metrics query.

queries[].metricsQueryData.operators[].operatorName String Yes

The name of the metrics operator.

queries[].metricsQueryData.operators[].parameters[] Array Yes

A list of operator parameters for the operator data.

queries[].metricsQueryData.operators[].parameters[].key String Yes

The key of the operator parameter.

queries[].metricsQueryData.operators[].parameters[].value String Yes

The value of the operator parameter.

queries[].metricsQueryData.aggregationType String No

The type of aggregation. Can be Count, Minimum, Maximum, Sum, Average or None.

queries[].timeSource String No

This field only applies for queryType of Logs but other query types may be supported in the future. Define the time source of this query. Possible values are Message, Receipt and Searchable. Message will use the timeStamp on the message, while Receipt will use the timestamp it was received by Sumo. Searchable will use the timestamp when the message is ready to be searched.

Default value: "Message"

visualSettings String No

Visual settings of the metrics search page.

description String No

Description of the metrics search page.

title String Yes

Title of the metrics search page.

folderId String No

The identifier of the folder to save the metrics search in. By default it is saved in your personal folder.

timeRange Object Yes
timeRange.type String Yes

Type of the time range. Value must be either CompleteLiteralTimeRange or BeginBoundedTimeRange.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.