"title":"Command for listing datastore usage info",
"description":[
"The **datastoreusage** RPC command allows the caller to fetch the total bytes that are stored under a certain *key* (or from the root), including the size of the *key*.",
"",
"All descendants of the *key* (or root) are taken into account."
],
"request":{
"required":[],
"properties":{
"key":{
"oneOf":[
{
"type":"array",
"description":[
"Key is an array of values (though a single value is treated as a one-element array). Used as the starting point to traverse the datastore."
],
"items":{
"type":"string"
}
},
{
"type":"string"
}
]
}
}
},
"response":{
"required":[
"datastoreusage"
],
"properties":{
"datastoreusage":{
"type":"object",
"additionalProperties":false,
"required":[
"key",
"total_bytes"
],
"properties":{
"key":{
"type":"string",
"added":"v23.11",
"description":[
"The key from which the database was traversed."
]
},
"total_bytes":{
"type":"u64",
"added":"v23.11",
"description":[
"The total bytes that are stored under the *key*, including the all descendants data and the size of the keys themselves."