---
title: "Set Prometheus configuration"
method: POST
path: "/api/v1/prometheus/config"
tags: ["Prometheus Configuration"]
---

# Set Prometheus configuration

`POST /api/v1/prometheus/config`

## Request

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

Configure Prometheus URL and authentication for a cluster or region. Requires either cluster_id or (region_code + user_id).

## Request body

- PrometheusApiPrometheusConfigRequest: Request body for setting Prometheus configuration for a cluster or region
  - `auth_type` 'none' | 'basic' | 'bearer', required
  - `bearer_token` string
  - `cluster_id` string
  - `password` string
  - `region_code` string
  - `url` string, required
  - `user_id` string
  - `username` string

## Response `200`

Configuration saved successfully

- PrometheusApiSuccessMessageResponse: Generic success response with message
  - `message` string

## Other responses

- `400`: Bad request - Invalid parameters or missing required fields
- `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)
