OpenSearch/docs/reference/repositories-metering-api/apis/get-repositories-metering.asciidoc
Francisco Fernández Castaño 2bb5716b3d
Add repositories metering API (#62088)
This pull request adds a new set of APIs that allows tracking the number of requests performed
by the different registered repositories.

In order to avoid losing data, the repository statistics are archived after the repository is closed for
a configurable retention period `repositories.stats.archive.retention_period`. The API exposes the
statistics for the active repositories as well as the modified/closed repositories.

Backport of #60371
2020-09-08 14:01:04 +02:00

36 lines
1.2 KiB
Plaintext

[role="xpack"]
[testenv="basic"]
[[get-repositories-metering-api]]
=== Get repositories metering information
++++
<titleabbrev>Get repositories metering information</titleabbrev>
++++
Returns cluster repositories metering information.
[[get-repositories-metering-api-request]]
==== {api-request-title}
`GET /_nodes/<node_id>/_repositories_metering`
[[get-repositories-metering-api-desc]]
==== {api-description-title}
You can use the cluster repositories metering API to retrieve repositories metering information in a cluster.
This API exposes monotonically non-decreasing counters and it's expected that clients would durably store
the information needed to compute aggregations over a period of time. Additionally, the information
exposed by this API is volatile, meaning that it won't be present after node restarts.
[[get-repositories-metering-api-path-params]]
==== {api-path-parms-title}
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=node-id]
All the nodes selective options are explained <<cluster-nodes,here>>.
[role="child_attributes"]
[[get-repositories-metering-api-response-body]]
==== {api-response-body-title}
include::{es-repo-dir}/repositories-metering-api/apis/repositories-meterings-body.asciidoc[tag=repositories-metering-body]