Restructure API reference documentation (#10654)

* Removed unsupported APIs
* Change order so it matches the list on top 
* Write better headings
* Make cURL examples consistent with command-response-blocks

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
pull/10686/head
Christian Haudum 2 years ago committed by GitHub
parent b353251e47
commit a3b9534f37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docs/sources/get-started/labels/structured-metadata.md
  2. 1088
      docs/sources/reference/api.md
  3. 12
      docs/sources/send-data/k6/_index.md
  4. 2
      docs/sources/send-data/promtail/_index.md
  5. 2
      docs/sources/send-data/promtail/configuration.md

@ -23,7 +23,7 @@ to extract at query time.
## Attaching structured metadata to log lines
You have the option to attach structured metadata to log lines in the push payload along with each log line and the timestamp.
For more information on how to push logs to Loki via the HTTP endpoint, refer to the [HTTP API documentation]({{< relref "../../reference/api#push-log-entries-to-loki" >}}).
For more information on how to push logs to Loki via the HTTP endpoint, refer to the [HTTP API documentation]({{< relref "../../reference/api#ingest-logs" >}}).
Alternatively, you can use the Grafana Agent or Promtail to extract and attach structured metadata to your log lines.
See the [Promtail: Structured metadata stage]({{< relref "../../send-data/promtail/stages/structured_metadata" >}}) for more information.

File diff suppressed because it is too large Load Diff

@ -84,12 +84,12 @@ The `Client` class exposes the following instance methods:
| method | description |
| ------ | ----------- |
| `push()` | shortcut for `pushParameterized(5, 800*1024, 1024*1024)` |
| `pushParameterized(streams, minSize, maxSize)` | execute push request ([POST /loki/api/v1/push]({{< relref "../../reference/api#push-log-entries-to-loki" >}})) |
| `instantQuery(query, limit)` | execute instant query ([GET /loki/api/v1/query]({{< relref "../../reference/api#query-loki" >}})) |
| `client.rangeQuery(query, duration, limit)` | execute range query ([GET /loki/api/v1/query_range]({{< relref "../../reference/api#query-loki-over-a-range-of-time" >}})) |
| `client.labelsQuery(duration)` | execute labels query ([GET /loki/api/v1/labels]({{< relref "../../reference/api#list-labels-within-a-range-of-time" >}})) |
| `client.labelValuesQuery(label, duration)` | execute label values query ([GET /loki/api/v1/label/\<name\>/values]({{< relref "../../reference/api#list-label-values-within-a-range-of-time" >}})) |
| `client.seriesQuery(matchers, duration)` | execute series query ([GET /loki/api/v1/series]({{< relref "../../reference/api#list-series" >}})) |
| `pushParameterized(streams, minSize, maxSize)` | execute push request ([POST /loki/api/v1/push]({{< relref "../../reference/api#ingest-logs" >}})) |
| `instantQuery(query, limit)` | execute instant query ([GET /loki/api/v1/query]({{< relref "../../reference/api#query-logs-at-a-single-point-in-time" >}})) |
| `client.rangeQuery(query, duration, limit)` | execute range query ([GET /loki/api/v1/query_range]({{< relref "../../reference/api#query-logs-within-a-range-of-time" >}})) |
| `client.labelsQuery(duration)` | execute labels query ([GET /loki/api/v1/labels]({{< relref "../../reference/api#query-labels" >}})) |
| `client.labelValuesQuery(label, duration)` | execute label values query ([GET /loki/api/v1/label/\<name\>/values]({{< relref "../../reference/api#query-label-values" >}})) |
| `client.seriesQuery(matchers, duration)` | execute series query ([GET /loki/api/v1/series]({{< relref "../../reference/api#query-streams" >}})) |
**Javascript load test example:**

@ -106,7 +106,7 @@ Important details are:
## Loki Push API
Promtail can also be configured to receive logs from another Promtail or any Loki client by exposing the [Loki Push API]({{< relref "../../reference/api#push-log-entries-to-loki" >}}) with the [loki_push_api]({{< relref "./configuration#loki_push_api" >}}) scrape config.
Promtail can also be configured to receive logs from another Promtail or any Loki client by exposing the [Loki Push API]({{< relref "../../reference/api#ingest-logs" >}}) with the [loki_push_api]({{< relref "./configuration#loki_push_api" >}}) scrape config.
There are a few instances where this might be helpful:

@ -922,7 +922,7 @@ max_message_length: <int>
### loki_push_api
The `loki_push_api` block configures Promtail to expose a [Loki push API]({{< relref "../../reference/api#push-log-entries-to-loki" >}}) server.
The `loki_push_api` block configures Promtail to expose a [Loki push API]({{< relref "../../reference/api#ingest-logs" >}}) server.
Each job configured with a `loki_push_api` will expose this API and will require a separate port.

Loading…
Cancel
Save