Core
API v2.x
2

ttl #

Returns the remaining time to live of a key, in seconds.

[Redis documentation]


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/ms/_ttl/<_id>
Method: GET

Other protocols #

Copied to clipboard!
{
  "controller": "ms",
  "action": "ttl",
  "_id": "<key>"
}

Arguments #

  • _id: key identifier

Response #

Returns the remaining key TTL, in seconds, or a negative value if the key does not exist or if it is persistent.

Copied to clipboard!
{
  "requestId": "<unique request identifier>",
  "status": 200,
  "error": null,
  "controller": "ms",
  "action": "ttl",
  "collection": null,
  "index": null,
  "result": 76
}