Core
API v1.x
1

rename #

Renames a key.

If the new key name is already used, then it is overwritten.

[Redis documentation]


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/ms/_rename/<_id>
Method: POST
Body:
Copied to clipboard!
{
  "newkey": "<new key name>"
}

Other protocols #

Copied to clipboard!
{
  "controller": "ms",
  "action": "rename",
  "_id": "<key>",
  "body": {
    "newkey": "<new key name>"
  }
}

Argument #

  • _id: key to rename

Body properties #

  • newkey: the new key name

Response #

Returns an acknowledgement.

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