/api/v0/key/rename

Rename a keypair.

Arguments

  • arg [string]: name of key to rename Required: yes.

  • arg [string]: new name of the key Required: yes.

  • force [bool]: Allow to overwrite an existing key. Required: no.

  • ipns-base [string]: Encoding used for keys: Can either be a multibase encoded CID or a base58btc encoded multihash. Takes {b58mh|base36|k|base32|b...}. Default: base36. Required: no.

Response

On success, the call to this endpoint will return with 200 and the following body:

{
  "Id": "<string>",
  "Now": "<string>",
  "Overwrite": "<bool>",
  "Was": "<string>"
}

cURL Example

curl -X POST "http://127.0.0.1:5001/api/v0/key/rename?arg=<name>&arg=<newName>&force=<value>&ipns-base=base36"

Last updated