@ -1,15 +1,27 @@
# Loki API
## API
## Authentication
*nb* Authentication is out of scope for this project. You are expected to run an
authenticating reverse proxy in front of our services, such as an Nginx with basic
auth or a OAuth2 proxy.
*nb* Authentication is out of scope for this project.
You are expected to run an authenticating reverse proxy in front of our services, such as an Nginx with basic auth or a OAuth2 proxy.
Loki is a multitenant system; requests and data for tenant A are isolated from tenant B.
Requests to the Loki API should include an HTTP header (`X-Scope-OrgID`) identifying the tentant for the request.
Tenant IDs can be any alphanumeric string; limiting them to 20 bytes is reasonable.
Loki can be run in "single-tenant" mode where the `X-Scope-OrgID` header is not required.
In this situation, the tenant ID is defaulted to be `fake` .
## REST API
There are 4 API endpoints:
- `POST /api/prom/push`
For sending log entries, expects a snappy compressed proto in the HTTP Body.
For sending log entries, expects a snappy compressed proto in the HTTP Body:
- [ProtoBuffer defition ](/pkg/logproto/logproto.proto )
- [Golang client library ](/pkg/promtail/client.go )
- `GET /api/prom/query`