SDK
SDK Javascript v7.x
2

stats #

Available since Kuzzle 2.10.0
Available since 7.6.0

Gets detailed storage usage statistics.


Copied to clipboard!
stats([options]);

Arguments Type Description
options
object
Query options

options #

Additional query options

Property Type
(default)
Description
queuable
boolean

(true)
If true, queues the request during downtime, until connected to Kuzzle again

Resolves #

Returns detailed storage usage statistics: overall index/collection sizes and the number of documents per collection.

Usage #

Copied to clipboard!
const stats = await kuzzle.index.stats();
console.log(JSON.stringify(stats));
/*
  {
    "indexes":[
      {
        "name":"nyc-open-data",
        "size":42,
        "collections":[
          {
            "name":"yellow-taxi",
            "documentCount":42,
            "size":42
          }
        ]
      }
    ],
    "size":42
  }
*/