Document `/services` API endpoint (#6111)

* Documented /services API endpoint

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

* Grammar

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
pull/6115/head
Danny Kopping 3 years ago committed by GitHub
parent 06e309bae6
commit 8838530976
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      docs/sources/api/_index.md

@ -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:
@ -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`.

Loading…
Cancel
Save