Core
API v1.x
1

psetex #

Sets a key with the provided value, and an expiration delay expressed in milliseconds. If the key does not exist, it is created beforehand.

[Redis documentation]


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/ms/_psetex/<_id>
Method: POST
Body:
Copied to clipboard!
{
  "milliseconds": 60000,
  "value": "<value>"
}

Other protocols #

Copied to clipboard!
{
  "controller": "ms",
  "action": "psetex",
  "_id": "<key>",
  "body": {
    "milliseconds": 60000,
    "value": "<value>"
  }
}

Argument #

  • _id: key identifier

Body properties #

  • milliseconds: the key time to live, in milliseconds
  • value: new value

Response #

Returns an acknowledgement.

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