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.

linsert #

Inserts a value in a list, either before or after a pivot value.

[Redis documentation]


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/ms/_linsert/<_id>
Method: POST
Body:
Copied to clipboard!
{
  "position": "[before|after]",
  "pivot": "<pivot value>",
  "value": "<value to insert>"
}

Other protocols #

Copied to clipboard!
{
  "controller": "ms",
  "action": "linsert",
  "_id": "<key>",
  "body": {
    "position": "[before|after]",
    "pivot": "<pivot value>",
    "value": "<value to insert>"
  }
}

Argument #

  • _id: list key identifier

Body properties #

  • position: tell whether the value is to be inserted before or after the pivot value. Accepted values: before, after
  • pivot: value in the list used as a pivot
  • value: new value to insert in the list

Response #

Returns the updated length of the list.

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