Skip to content

Reference

Service accounts

The service accounts endpoints of the HTTP API.

GET /service-accounts

List service accounts.

Responses

Status Description Body
200 Every service account. ServiceAccountList
401 Authentication is missing or invalid. Error
403 The caller is not allowed to perform the request; a role that is too low is code forbidden_role. Error
500 The server failed to handle the request. Error

POST /service-accounts

Create a service account.

Request body

application/json, required.

A CreateServiceAccountRequest object.

Responses

Status Description Body
201 The created service account. ServiceAccount
400 The request is malformed or fails validation. Error
401 Authentication is missing or invalid. Error
403 The caller is not allowed to perform the request; a role that is too low is code forbidden_role. Error
409 The request conflicts with existing state. Error
500 The server failed to handle the request. Error

PATCH /service-accounts/{id}

Change the role a service account’s keys act with.

Service accounts cannot call this endpoint.

Parameters

Name In Type Description
id (required) path string (uuid)

Request body

application/json, required.

A UpdateServiceAccountRequest object.

Responses

Status Description Body
200 The service account with its new role. ServiceAccount
400 The request is malformed or fails validation. Error
401 Authentication is missing or invalid. Error
403 The caller is not allowed to perform the request; a role that is too low is code forbidden_role. Error
404 The resource does not exist. Error
500 The server failed to handle the request. Error

GET /service-accounts/{id}/keys

List the keys of a service account without their secrets.

Parameters

Name In Type Description
id (required) path string (uuid)

Responses

Status Description Body
200 Every key of the service account. ServiceAccountKeyList
400 The request is malformed or fails validation. Error
401 Authentication is missing or invalid. Error
403 The caller is not allowed to perform the request; a role that is too low is code forbidden_role. Error
404 The resource does not exist. Error
500 The server failed to handle the request. Error

POST /service-accounts/{id}/keys

Issue a key for a service account.

Parameters

Name In Type Description
id (required) path string (uuid)

Request body

application/json, required.

A CreateServiceAccountKeyRequest object.

Responses

Status Description Body
201 The key metadata and the token, which is shown only once. IssuedServiceAccountKey
400 The request is malformed or fails validation. Error
401 Authentication is missing or invalid. Error
403 The caller is not allowed to perform the request; a role that is too low is code forbidden_role. Error
404 The resource does not exist. Error
500 The server failed to handle the request. Error

DELETE /service-accounts/{id}/keys/{keyId}

Revoke a key of a service account.

Parameters

Name In Type Description
id (required) path string (uuid)
keyId (required) path string (uuid)

Responses

Status Description Body
204 The key is revoked.
400 The request is malformed or fails validation. Error
401 Authentication is missing or invalid. Error
403 The caller is not allowed to perform the request; a role that is too low is code forbidden_role. Error
404 The resource does not exist. Error
500 The server failed to handle the request. Error

Generated from api/openapi.yaml at bac0fe39. Report a problem.

/observeOpen source under Apache-2.0.Grafana is a trademark of Grafana Labs. SlashObserve is not affiliated with or endorsed by Grafana Labs.

Search pages and headings.