/api/v0/cid/format

Format and convert a CID in various useful ways.

Arguments

  • arg [string]: CIDs to format. Required: yes.

  • f [string]: Printf style format string. Default: %s. Default: %s. Required: no.

  • v [string]: CID version to convert to. Required: no.

  • mc [string]: CID multicodec to convert to. Required: no.

  • b [string]: Multibase to display CID in. Required: no.

Response

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

{
  "CidStr": "<string>",
  "ErrorMsg": "<string>",
  "Formatted": "<string>"
}

cURL Example

curl -X POST "http://127.0.0.1:5001/api/v0/cid/format?arg=<cid>&f=%s&v=<value>&mc=<value>&b=<value>"


Last updated