v1

latestOpenAPI 3.0.02026-08-064311,0881.3 MB
metricsSearchesManagement

Save a metrics search.

Saves a metrics search in the content library. Metrics search consists of one or more queries, a time range, a quantization period and a set of chart properties like line width.

post/v1/metricsSearches

Request body

titlestring required

Item title in the content library.

descriptionstring required

Item description in the content library.

logQuerystring

Log query used to add an overlay to the chart.

desiredQuantizationInSecsinteger

Desired quantization in seconds.

propertiesstring

Chart properties, like line width, color palette, and the fill missing data method. Leave this field empty to use the defaults. This property contains JSON object encoded as a string.

parentIdstring required

Identifier of a folder to which the metrics search should be added.

Example request

{
  "title": "Short title",
  "description": "Long and detailed description",
  "timeRange": {
    "type": "BeginBoundedTimeRange",
    "from": {
      "type": "RelativeTimeRangeBoundary",
      "relativeTime": "-15m"
    }
  },
  "logQuery": "my_metric | timeslice 1m | count by _timeslice",
  "metricsQueries": [
    {
      "rowId": "A",
      "query": "my_metric | avg"
    }
  ],
  "desiredQuantizationInSecs": 60,
  "properties": "{ \\\"key\\\": \\\"value\\\" }",
  "parentId": "000000000000001A"
}

Response

Newly created metrics search.

titlestring required

Item title in the content library.

descriptionstring required

Item description in the content library.

logQuerystring

Log query used to add an overlay to the chart.

desiredQuantizationInSecsinteger

Desired quantization in seconds.

propertiesstring

Chart properties, like line width, color palette, and the fill missing data method. Leave this field empty to use the defaults. This property contains JSON object encoded as a string.

createdAtstring date-time required

Creation timestamp in UTC in RFC3339 format.

createdBystring required

Identifier of the user who created the resource.

modifiedAtstring date-time required

Last modification timestamp in UTC.

modifiedBystring required

Identifier of the user who last modified the resource.

idstring required

Identifier of the metrics search.

parentIdstring

Identifier of the parent element in the content library, such as folder.

Example response

{
  "title": "Short title",
  "description": "Long and detailed description",
  "timeRange": {
    "type": "BeginBoundedTimeRange",
    "from": {
      "type": "RelativeTimeRangeBoundary",
      "relativeTime": "-15m"
    }
  },
  "logQuery": "my_metric | timeslice 1m | count by _timeslice",
  "metricsQueries": [
    {
      "rowId": "A",
      "query": "my_metric | avg"
    }
  ],
  "desiredQuantizationInSecs": 60,
  "properties": "{ \\\"key\\\": \\\"value\\\" }",
  "createdAt": "2018-10-16T09:10:00Z",
  "createdBy": "0000000006743FDD",
  "modifiedAt": "2018-10-16T09:10:00Z",
  "modifiedBy": "0000000006743FE8",
  "id": "000000000000001A",
  "parentId": "0000000000007D2B"
}