Skip to content

Commit

Permalink
Document /services API endpoint (#6111)
Browse files Browse the repository at this point in the history
* Documented /services API endpoint

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>

* Grammar

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
  • Loading branch information
Danny Kopping authored May 6, 2022
1 parent 06e309b commit 8838530
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/sources/api/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ These endpoints are exposed by all components:
- [`GET /ready`](#get-ready)
- [`GET /metrics`](#get-metrics)
- [`GET /config`](#get-config)
- [`GET /services`](#get-services)
- [`GET /loki/api/v1/status/buildinfo`](#get-lokiapiv1statusbuildinfo)

These endpoints are exposed by the querier and the query frontend:
Expand Down Expand Up @@ -818,6 +819,19 @@ and the current are returned. A value of `defaults` returns the default configur

In microservices mode, the `/config` endpoint is exposed by all components.

## `GET /services`

`/services` returns a list of all running services and their current states.

Services can have the following states:

- **New**: Service is new, not running yet (initial state)
- **Starting**: Service is starting; if starting succeeds, service enters **Running** state
- **Running**: Service is fully running now; when service stops running, it enters **Stopping** state
- **Stopping**: Service is shutting down
- **Terminated**: Service has stopped successfully (terminal state)
- **Failed**: Service has failed in **Starting**, **Running** or **Stopping** state (terminal state)

## `GET /loki/api/v1/status/buildinfo`

`/loki/api/v1/status/buildinfo` exposes the build information in a JSON object. The fields are `version`, `revision`, `branch`, `buildDate`, `buildUser`, and `goVersion`.
Expand Down

0 comments on commit 8838530

Please sign in to comment.