lset

Sets the list element at index with the provided value.

[Redis documentation]


Query Syntax

HTTP

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

Other protocols

Copied to clipboard!
{
  "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.

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