Skip to main content

KV_COUNT

Returns the number of keys present:

  • With sessions enabled, count is the number of keys in the session
  • With sessions disabled, count is the total number of keys

Response

KV_COUNT_RSP

ParamTypeMeaning
stunsigned intStatus
cntunsigned intNumber of keys in the session

Possible status values:

  • Ok
  • CommandSyntax

Request:

{
"KV_COUNT":{}
}

Response:

Database contains 3,457 keys
{
"KV_COUNT_RSP":
{
"st": 1,
"cnt": 3457
}
}