Skip to content

Commit 3a475e9

Browse files
committed
DOC-4971 RS: Added usage_report REST API reference
1 parent 37575bd commit 3a475e9

File tree

1 file changed

+123
-0
lines changed
  • content/operate/rs/references/rest-api/requests/usage_report

1 file changed

+123
-0
lines changed
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
---
2+
Title: Usage report requests
3+
alwaysopen: false
4+
categories:
5+
- docs
6+
- operate
7+
- rs
8+
description: REST API request to get the database usage report from the cluster.
9+
headerRange: '[1-2]'
10+
hideListLinks: true
11+
linkTitle: usage_report
12+
weight: $weight
13+
---
14+
15+
| Method | Path | Description |
16+
|--------|------|-------------|
17+
| [GET](#get-usage-report) | `/v1/usage_report` | Get the cluster's database usage report |
18+
19+
## Get usage report {#get-usage-report}
20+
21+
```sh
22+
GET /v1/usage_report
23+
```
24+
25+
Gets the database usage report from the cluster as a gzip file that contains Newline Delimited JSON (NDJSON). The final line in the file is the response's MD5 hash.
26+
27+
### Request {#get-request}
28+
29+
#### Example HTTP request
30+
31+
```sh
32+
GET /v1/usage_report
33+
```
34+
35+
#### Headers
36+
37+
| Key | Value | Description |
38+
|-----|-------|-------------|
39+
| Host | cnm.cluster.fqdn | Domain name |
40+
| Accept | application/json | Accepted media type |
41+
42+
### Response {#get-response}
43+
44+
Returns a gzip file that contains Newline Delimited JSON (NDJSON), which represents the usage report for every database in the cluster. The final line in the file is the response's MD5 hash.
45+
46+
| Field | Type/Value | Description |
47+
|-------|------------|-------------|
48+
| active_active | boolean | Indicates if Active-Active is enabled |
49+
| api_version | string | API version |
50+
| backup | boolean | Indicates if backup is enabled |
51+
| bdb_uid | string | The database's unique ID |
52+
| cluster_name | string | Cluster name |
53+
| cluster_uuid | string | Cluster's unique ID |
54+
| date | string | Date of the report, including time and time zone |
55+
| dominant_shard_criteria | "mem"<br />"ops"<br />"rof" | Dominant criteria for shard selection |
56+
| type | "core"<br />"premium"<br />"auto_tiering" | Database type |
57+
| shard_type | "micro"<br />"normal"<br />"large"<br />"auto_tiering" | Shard type |
58+
| no_eviction | boolean | Indicates if no eviction policy is applied |
59+
| ops/sec | number | Consolidated ops/sec for the whole database |
60+
| persistence | boolean | Indicates if persistence is enabled |
61+
| provisioned_memory | number | Provisioned memory in bytes |
62+
| replication | boolean | Indicates if replication is enabled |
63+
| software_version | string | The Redis Enterprise Software version |
64+
| used_memory | number | Used memory in bytes |
65+
| using_redis_search | boolean | Indicates if RediSearch is in use |
66+
| master_shards_count | number | Amount of primary shards |
67+
68+
#### Example response
69+
70+
```json
71+
{
72+
"cluster_name": "mycluster.local",
73+
"cluster_uuid": "7e9f93c6-825e-4bbb-a067-7f6306b98609",
74+
"date": "2024-08-08T13:16:00.000000Z",
75+
"software_version": "7.0.0",
76+
"api_version" "1",
77+
"bdb_uid": "1",
78+
"type": "auto_tiering",
79+
"shard_type": "auto_tiering",
80+
"dominant_shard_criteria": "rof",
81+
"provisioned_memory": 1073741824,
82+
"used_memory": 5828776,
83+
"master_shards_count": 3,
84+
"no_eviction": false,
85+
"persistence": false,
86+
"backup": false,
87+
"using_redis_search": false,
88+
"ops_sec": 0,
89+
"replication": false,
90+
"active_active": false
91+
}
92+
{
93+
"cluster_name": "mycluster.local",
94+
"cluster_uuid": "7e9f93c6-825e-4bbb-a067-7f6306b98609",
95+
"date": "2024-08-08T13:17:00.000000Z",
96+
"software_version": "7.0.0",
97+
"api_version" "1",
98+
"bdb_uid": "1",
99+
"type": "auto_tiering",
100+
"shard_type": "auto_tiering",
101+
"dominant_shard_criteria": "rof",
102+
"provisioned_memory": 1073741824,
103+
"used_memory": 5828776,
104+
"master_shards_count": 3,
105+
"no_eviction": false,
106+
"persistence": false,
107+
"backup": false,
108+
"using_redis_search": false,
109+
"ops_sec": 0,
110+
"replication": false,
111+
"active_active": false
112+
}
113+
...
114+
<MD5 hash of the entire response>
115+
```
116+
117+
#### Status codes {#get-status-codes}
118+
119+
| Code | Description |
120+
|------|-------------|
121+
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error |
122+
| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Invalid date format |
123+
| [503 Service Unavailable](https://www.rfc-editor.org/rfc/rfc9110.html#name-503-service-unavailable) | Unreachable node |

0 commit comments

Comments
 (0)