Core
API v2.x
2

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
}