---
title: "Query Prometheus metrics with time range"
method: GET
path: "/api/v1/prometheus/query_range"
tags: ["Prometheus Metrics"]
---

# Query Prometheus metrics with time range

`GET /api/v1/prometheus/query_range`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/prometheus/query_range`
- Auth: API key in header `Authorization`

Execute a PromQL range query against the default Prometheus instance for time-series data.

## Query parameters

- `query` string, required
- `start` string
- `end` string
- `step` string

## Response `200`

Prometheus range query result

- object

## Other responses

- `400`: Bad request - Missing or invalid parameters
- `500`: Internal server error

---

[API](https://skmtc.dev/nife/apis/nife-io-swagger-api.md) - [All operations](https://skmtc.dev/nife/apis/nife-io-swagger-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nife/apis/nife-io-swagger-api/revisions/6e868dc62795?raw)
