/api/v0/name/publish

Publish IPNS names.

Arguments

  • arg [string]: ipfs path of the object to be published. Required: yes.

  • key [string]: Name of the key to be used or a valid PeerID, as listed by 'ipfs key list -l'. Default: self. Required: no.

  • resolve [bool]: Check if the given path can be resolved before publishing. Default: true. Required: no.

  • lifetime [string]: Time duration the signed record will be valid for. Accepts durations such as "300s", "1.5h" or "7d2h45m". Default: 48h0m0s. Required: no.

  • ttl [string]: Time duration hint, akin to --lifetime, indicating how long to cache this record before checking for updates. Default: 1h0m0s. Required: no.

  • quieter [bool]: Write only final IPNS Name encoded as CIDv1 (for use in /ipns content paths). Required: no.

  • v1compat [bool]: Produce a backward-compatible IPNS Record by including fields for both V1 and V2 signatures. Default: true. Required: no.

  • allow-offline [bool]: When --offline, save the IPNS record to the local datastore without broadcasting to the network (instead of failing). 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:

{
  "Name": "<string>",
  "Value": "<string>"
}

cURL Example

curl -X POST "http://127.0.0.1:5001/api/v0/name/publish?arg=<ipfs-path>&key=self&resolve=true&lifetime=48h0m0s&ttl=1h0m0s&quieter=<value>&v1compat=true&allow-offline=<value>&ipns-base=base36"

Last updated