Skip to content

API Reference

GET /metrics/summary

Description

Retrieves a summary of metrics within a specified time range.


Request Parameters

Query Parameters

Parameter Type Required Description
start time.Time No The start of the time range for metrics.
end time.Time No The end of the time range for metrics.

Example Request:

GET /api/v1/metrics/summary?start=2025-01-01T00:00:00Z&end=2025-01-07T23:59:59Z

Response Format

Response Body

The response is a JSON object containing a mapping of metric definitions to their corresponding summary items.

{
  "items": {
    "jobSubmitted": [
      {
        "id": "jobSubmitted",
        "point": {
          "time": "2025-01-01T12:00:00Z",
          "value": 150.0
        },
        "metaData": {
          "queueName": "queue1"
        }
      }
    ],
    "runtime": [
      {
        "id": "runtime",
        "point": {
          "time": "2025-01-02T12:00:00Z",
          "value": 300.5
        },
        "metaData": {
          "queueName": "queue1"
        }
      }
    ], 
    "spotProtection": [
      {
        "id": "spotProtection",
        "point": {
          "time": "2025-01-02T12:00:00Z",
          "value": 3
        },
        "metaData": {
          "queueName": "queue1"
        }
      }
    ],
    "timeSaved": [
      {
        "id": "timeSaved",
        "point": {
          "time": "2025-01-02T12:00:00Z",
          "value": 120.5
        },
        "metaData": {
          "queueName": "queue1"
        }
      }
    ]
  }
}