Add link to protobuf and client library to API docs. (#147)

* Add link to protobuf and client library to API docs.

* Link to API docs from README

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>

* Add more words about auth.

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
pull/152/head
Tom Wilkie 7 years ago committed by GitHub
parent 63f93520af
commit 208798e020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      README.md
  2. 22
      docs/api.md

@ -25,7 +25,7 @@ A Loki-based logging stack consists of 3 components:
For instructions on getting started with Loki, see [our getting started docs](./production/README.md).
For the beginnings of documentation on how to use Loki, see [our usage docs](./docs/usage.md).
For the beginnings of documentation on how to use Loki, see [our usage docs](./docs/usage.md). [API documentation](./docs/api.md) is also available.
## Getting Help

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

Loading…
Cancel
Save