Skip to content
Console
On this page

List length in KV

Reads the length of a list (LLEN); an absent key has length zero.

Reads the length of a list (LLEN); an absent key has length zero.

  • Path POST https://api.data.sylphx.com/v1/kv-list-lens
  • Scope data:read
  • Effect read — nothing is written.
  • Collection kv
  • Host https://api.data.sylphx.com

Request

FieldTypeWhat it is
namespace_idstringThe namespace's id. Required.
keystringThe list's key. Required.

Response

FieldTypeWhat it is
lengthuint64The list's length.

Errors

Every error arrives in the body Errors describes.

Examples

curl -X POST "https://api.data.sylphx.com/v1/kv-list-lens" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"key":"…","namespace_id":"…"}'