Core
API v2.x
2

expireat #

Sets an expiration timestamp on a key. After the timestamp has been reached, the key will automatically be deleted.

The timestamp parameter accepts an Epoch time value.

[Redis documentation]


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/ms/_expireat/<_id>
Method: POST
Body:
Copied to clipboard!
{
  "timestamp": 1538640821
}

Other protocols #

Copied to clipboard!
{
  "controller": "ms",
  "action": "expireat",
  "_id": "<key>",
  "body": {
    "timestamp": 1538640821
  }
}

Arguments #

  • _id: key to update

Body properties #

  • timestamp: timestamp of when the key expires, in Epoch format (integer)

Response #

Returns either 0 (command failed), or 1 (command succeeded).

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