---
title: "Get all metrics for a service"
method: GET
path: "/api/v1/prometheus/metrics/all"
tags: ["Prometheus Metrics"]
---

# Get all metrics for a service

`GET /api/v1/prometheus/metrics/all`

## Request

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

Fetch a comprehensive set of metrics for a given application and service.

## Query parameters

- `appName` string, required
- `serviceName` string, required
- `timeRange` string

## Response `200`

All metrics for the service

- ServiceDeploymentMetrics
  - `app_name` string
  - `avg_latency` string: Average response time
  - `cpu_usage` number: 0.0 to 1.0 (0% to 100%)
  - `error_rate` number: 0.0 to 1.0 (0% to 100%)
  - `memory_usage` number: 0.0 to 1.0 (0% to 100%)
  - `service_name` string
  - `throughput` number: Requests per second
  - `timestamp` string

## 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)
