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.

lrem #

Removes the first occurences of an element from a list.

[Redis documentation]


Query Syntax #

HTTP #

URL: http://kuzzle:7512/ms/_lrem/<_id>
Method: DELETE
Body:
{
  "count": 4,
  "value": "foobar"
}

Other protocols #

{
  "controller": "ms",
  "action": "lrem",
  "_id": "<key>",
  "body": {
    "count": 4,
    "value": "foobar"
  }
}

Argument #

  • _id: list key identifier

Body properties #

  • count: the number of the first found occurences to remove
  • value: the value to remove

Response #

Returns the number of removed elements.

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