KV Store

Get time-to-live for a key

post/kv/ttl

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/kv/ttl
  • Auth: HTTP bearer

Request body

keystring required

The key to check TTL for

project_idinteger nullable

Project ID (required for API key/session auth, optional for deployment tokens)

Example request

{
  "key": "session:abc",
  "project_id": 1
}

Response

TTL retrieved

ttlinteger required

TTL in seconds, -1 if no expiration, -2 if key doesn't exist

Example response

{
  "ttl": 3600
}

Changes

No recorded changes to this operation across all 53 revisions of this API.