Core
API v2.x
2

lrem #

Removes the first occurences of an element from a list.

[Redis documentation]


Query Syntax #

HTTP #

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

Other protocols #

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

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