Metrics

Execute Prometheus query.

post

Executes a Prometheus query (instant or range) against the metrics server. Accepts either a direct 'promql' string or components ('pipeline', 'filters', 'conditions', 'subPipelines') to build the query.

Authorizations
Body
Endstring · date-timeOptional
FiltersstringOptional
PromqlstringOptional
QueryTypestring · enumOptionalPossible values:
Startstring · date-timeOptional
StepstringOptional
Responses
200Success
post
POST /api/metrics/query HTTP/1.1
Host: api.groundcover.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 1529

{
  "Conditions": [
    {
      "additionalFilter": "text",
      "autoComplete": true,
      "filterKeys": [
        "text"
      ],
      "filters": [
        {
          "op": "text",
          "value": null
        }
      ],
      "isNullable": true,
      "key": "text",
      "origin": "text",
      "type": "text"
    }
  ],
  "End": "2025-07-20T16:51:18.025Z",
  "Filters": "text",
  "Pipeline": {
    "conditions": [
      {
        "additionalFilter": "text",
        "autoComplete": true,
        "filterKeys": [
          "text"
        ],
        "filters": [
          {
            "op": "text",
            "value": null
          }
        ],
        "isNullable": true,
        "key": "text",
        "origin": "text",
        "type": "text"
      }
    ],
    "function": {
      "args": [
        "text"
      ],
      "name": "text",
      "pipelines": [
        {
          "conditions": [
            {
              "additionalFilter": "text",
              "autoComplete": true,
              "filterKeys": [
                "text"
              ],
              "filters": [
                {
                  "op": "text",
                  "value": null
                }
              ],
              "isNullable": true,
              "key": "text",
              "origin": "text",
              "type": "text"
            }
          ],
          "function": {
            "args": [
              "text"
            ],
            "name": "text",
            "pipelines": "[Circular Reference]"
          },
          "metric": "text",
          "template": "text"
        }
      ]
    },
    "metric": "text",
    "template": "text"
  },
  "Promql": "text",
  "QueryType": "range",
  "Start": "2025-07-20T16:51:18.025Z",
  "Step": "text",
  "SubPipelines": {
    "ANY_ADDITIONAL_PROPERTY": {
      "conditions": [
        {
          "additionalFilter": "text",
          "autoComplete": true,
          "filterKeys": [
            "text"
          ],
          "filters": [
            {
              "op": "text",
              "value": null
            }
          ],
          "isNullable": true,
          "key": "text",
          "origin": "text",
          "type": "text"
        }
      ],
      "function": {
        "args": [
          "text"
        ],
        "name": "text",
        "pipelines": [
          {
            "conditions": [
              {
                "additionalFilter": "text",
                "autoComplete": true,
                "filterKeys": [
                  "text"
                ],
                "filters": [
                  {
                    "op": "text",
                    "value": null
                  }
                ],
                "isNullable": true,
                "key": "text",
                "origin": "text",
                "type": "text"
              }
            ],
            "function": {
              "args": [
                "text"
              ],
              "name": "text",
              "pipelines": "[Circular Reference]"
            },
            "metric": "text",
            "template": "text"
          }
        ]
      },
      "metric": "text",
      "template": "text"
    }
  }
}

No content

GetMetricValues retrieves metric values based on the provided request parameters.

post
Authorizations
Body
Endstring · date-timeOptional
FilterstringOptional
KeystringOptional
Limitinteger · uint32Optional
NamestringOptional
Startstring · date-timeOptional
Responses
200Success
post
POST /api/metrics/values HTTP/1.1
Host: api.groundcover.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 489

{
  "Conditions": [
    {
      "additionalFilter": "text",
      "autoComplete": true,
      "filterKeys": [
        "text"
      ],
      "filters": [
        {
          "op": "text",
          "value": null
        }
      ],
      "isNullable": true,
      "key": "text",
      "origin": "text",
      "type": "text"
    }
  ],
  "End": "2025-07-20T16:51:18.025Z",
  "Filter": "text",
  "Key": "text",
  "Limit": 1,
  "Name": "text",
  "Sources": [
    {
      "additionalFilter": "text",
      "autoComplete": true,
      "filterKeys": [
        "text"
      ],
      "filters": [
        {
          "op": "text",
          "value": null
        }
      ],
      "isNullable": true,
      "key": "text",
      "origin": "text",
      "type": "text"
    }
  ],
  "Start": "2025-07-20T16:51:18.025Z"
}

No content

GetKeys retrieves metric keys based on the provided request parameters.

post
Authorizations
Body
endstring · date-timeOptional

End specifies the end time for the metric keys query.

filterstringOptional

Filter specifies a search filter to apply to the metric keys.

limitinteger · uint32Optional

Limit specifies the maximum number of results to return.

namestringOptional

Name specifies the metric name to get keys for.

startstring · date-timeOptional

Start specifies the start time for the metric keys query.

Responses
200Success
post
POST /api/metrics/keys HTTP/1.1
Host: api.groundcover.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 291

{
  "end": "2025-07-20T16:51:18.025Z",
  "filter": "text",
  "limit": 1,
  "name": "text",
  "sources": [
    {
      "additionalFilter": "text",
      "autoComplete": true,
      "filterKeys": [
        "text"
      ],
      "filters": [
        {
          "op": "text",
          "value": null
        }
      ],
      "isNullable": true,
      "key": "text",
      "origin": "text",
      "type": "text"
    }
  ],
  "start": "2025-07-20T16:51:18.025Z"
}

No content

GetNames retrieves metric names based on the provided request parameters.

post
Authorizations
Body
endstring · date-timeOptional

End specifies the end time for the metric names query.

filterstringOptional

Filter specifies a search filter to apply to the metric names.

limitinteger · uint32Optional

Limit specifies the maximum number of results to return.

requiredstring[]Optional

Required specifies a list of metric names that must be included in the results.

startstring · date-timeOptional

Start specifies the start time for the metric names query.

Responses
200Success
post
POST /api/metrics/names HTTP/1.1
Host: api.groundcover.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 297

{
  "end": "2025-07-20T16:51:18.025Z",
  "filter": "text",
  "limit": 1,
  "required": [
    "text"
  ],
  "sources": [
    {
      "additionalFilter": "text",
      "autoComplete": true,
      "filterKeys": [
        "text"
      ],
      "filters": [
        {
          "op": "text",
          "value": null
        }
      ],
      "isNullable": true,
      "key": "text",
      "origin": "text",
      "type": "text"
    }
  ],
  "start": "2025-07-20T16:51:18.025Z"
}

No content

Last updated