Skip to content

List Prometheus scrape tokens

GET
/api/integrations/prometheus-tokens

Lists all non-revoked Prometheus scrape tokens with their metadata. The raw token value is NEVER returned — only id, name, created_at, last_used_at, last_used_ip, expires_at, revoked_at. Use this endpoint for operator dashboards and audit review.

Admin role required (D-24).

Token metadata array.

Array of scrape token metadata. Raw token values are never exposed.

object
tokens
required

One element per non-revoked token, newest first.

Array<object>

Scrape token metadata. No cleartext token, no hash.

object
id
required

Token row id.

integer format: int64
name
required

Operator-facing label.

string
created_at
required

When the token was minted.

string format: date-time
last_used_at

When the token was last successfully used to scrape. Field is omitted (or empty zero-time) when the token has never been used.

string format: date-time
last_used_ip
required

Source IP from the most recent successful scrape, or empty if never used.

string
expires_at

Token expiry. Field is omitted (or empty zero-time) when the token has no expiry.

string format: date-time
revoked_at

When the token was revoked. Field is omitted (or empty zero-time) when the token is still active.

string format: date-time

Authentication is required or the supplied token is invalid.

Standardised error envelope per RFC 7807. Many existing endpoints still return an older shape (e.g. {"error": "..."}). This schema documents the target shape; legacy endpoints will be migrated in Phase 70. Per D-21 the spec describes current behaviour without enforcing the migration here.

object
type

A URI reference that identifies the problem type.

string format: uri-reference
default: about:blank
title

A short human-readable summary of the problem.

string
status

The HTTP status code generated by the origin server.

integer format: int32
>= 100 <= 599
detail

A human-readable explanation specific to this occurrence.

string
instance

A URI reference that identifies the specific occurrence.

string format: uri-reference
error

Legacy error message field. Will be removed once handlers are migrated.

string
details

Legacy per-field error details. Will be removed once handlers are migrated.

object
key
additional properties
string
requestId

The request id middleware-assigned identifier for tracing.

string

Forbidden — admin role required.

Standardised error envelope per RFC 7807. Many existing endpoints still return an older shape (e.g. {"error": "..."}). This schema documents the target shape; legacy endpoints will be migrated in Phase 70. Per D-21 the spec describes current behaviour without enforcing the migration here.

object
type

A URI reference that identifies the problem type.

string format: uri-reference
default: about:blank
title

A short human-readable summary of the problem.

string
status

The HTTP status code generated by the origin server.

integer format: int32
>= 100 <= 599
detail

A human-readable explanation specific to this occurrence.

string
instance

A URI reference that identifies the specific occurrence.

string format: uri-reference
error

Legacy error message field. Will be removed once handlers are migrated.

string
details

Legacy per-field error details. Will be removed once handlers are migrated.

object
key
additional properties
string
requestId

The request id middleware-assigned identifier for tracing.

string

Internal server error

Standardised error envelope per RFC 7807. Many existing endpoints still return an older shape (e.g. {"error": "..."}). This schema documents the target shape; legacy endpoints will be migrated in Phase 70. Per D-21 the spec describes current behaviour without enforcing the migration here.

object
type

A URI reference that identifies the problem type.

string format: uri-reference
default: about:blank
title

A short human-readable summary of the problem.

string
status

The HTTP status code generated by the origin server.

integer format: int32
>= 100 <= 599
detail

A human-readable explanation specific to this occurrence.

string
instance

A URI reference that identifies the specific occurrence.

string format: uri-reference
error

Legacy error message field. Will be removed once handlers are migrated.

string
details

Legacy per-field error details. Will be removed once handlers are migrated.

object
key
additional properties
string
requestId

The request id middleware-assigned identifier for tracing.

string