Core
API v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

lset #

Sets the list element at index with the provided value.

[Redis documentation]


Query Syntax #

HTTP #

URL: http://kuzzle:7512/ms/_lset/<_id>
Method: POST
Body:
{
  "index": 0,
  "value": "<value>"
}

Other protocols #

{
  "controller": "ms",
  "action": "lset",
  "_id": "<key>",
  "body": {
    "index": 0,
    "value": "<value>"
  }
}

Argument #

  • _id: list key identifier

Body properties #

  • index: index of the list. Lists are 0-indexed. If negative, it goes backward from the end of the list
  • value: the new value to set

Response #

Returns an acknowledgement.

{
  "requestId": "<unique request identifier>",
  "status": 200,
  "error": null,
  "controller": "ms",
  "action": "lset",
  "collection": null,
  "index": null,
  "result": "OK"
}