Cloady Docs
API ReferenceEndpointsApplications

Sample a cache's keyspace

Samples up to 2,000 keys of database 0 within two seconds, without touching their LRU or LFU clocks where the server allows it, and groups them by the text before the first colon: share of sampled memory, keys, TTLs and the largest keys. Key names can carry data, so this needs the developer role.

GET
/api/workspaces/{workspaceSlug}/apps/{appSlug}/services/{serviceName}/engine/keyspace
AuthorizationBearer <token>

Personal API token (cldy_…)

In: header

Path Parameters

workspaceSlug*string
appSlug*string
serviceName*string

Query Parameters

env?string

Value in

  • "production"
  • "preview"
  • "development"
region?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/apps/string/services/string/engine/keyspace"
{  "ts": 0,  "dbsize": 0,  "sampled": 0,  "method": "scan",  "prefixes": [    {      "prefix": "string",      "keys": 0,      "estimated": 0,      "bytes": 0,      "share": 0,      "noTtl": 0,      "ttlMs": 0    }  ],  "biggest": [    {      "key": "string",      "prefix": "string",      "type": "string",      "bytes": 0,      "ttlMs": 0    }  ]}