IPNS Manager API

4EVERLAND IPNS API can help with IPNS creation, retrieval, CID preservation and publishing, etc.

Auth Token

An Auth Token is a token used for identity verification and authorization purposes. To utilize the 4EVERLAND IPNS Manager API, you need to first create an Auth Token on the 4EVERLAND Dashboard.

You can do so by navigating to your 4EVERLAND Dashboard, selecting Gateway > Auth Token, and then clicking "Generate".

Create IPNS Name

Create IPNS Name

post

Request

curl -X "POST" "https://api.4everland.dev/ipns/v1/names" \
-H 'Authorization: $AUTH_TOKEN' \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{
  "name": "example.eth"
}'

Response

HTTP 200 OK
{
    "code":"SUCCESS",
    "message":"success",
    "data":{
        "key":"k51qzi5uqu5dlam30k8825vcss6lc11iytluqb5h1glc2fpqh7pfjs9r18idy6"
    }
}
Header parameters
AuthorizationstringRequired

Authorization (Only:)

Body
namestringRequired

The IPNS name.

Responses
200
successful operation
application/json
post
POST /v1/names HTTP/1.1
Host: ipns
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "name": "text"
}
200

successful operation

{
  "code": "SUCCESS",
  "message": "success",
  "data": {
    "key": "text"
  }
}

List IPNS Names

List IPNS Names

get

Request

curl "https://api.4everland.dev/ipns/v1/names?cursor=0" \
     -H 'Authorization: $AUTH_TOKEN'

Response

HTTP 200 OK
{
  "code": "SUCCESS",
  "message": "success",
  "data": {
    "list": [
      {
        "name": "example.eth",
        "key": "k51qzi5uqu5dhzjrd6l7s4ba8cspzctm1d96efloxcqkokvgg0f77ied7nc6zz",
        "ipfsPath": "/ipns/k51qzi5uqu5dhzjrd6l7s4ba8cspzctm1d96efloxcqkokvgg0f77ied7nc6zz",
        "createdAt": 1667806756,
        "lifetime": 1
      },
      {
        "name": "example",
        "key": "k51qzi5uqu5dlam30k8825vcss6lc11iytluqb5h1glc2fpqh7pfjs9r18idy6",
        "ipfsPath": "/ipfs/bafybeifx7yeb55armcsxwwitkymga5xf53dxiarykms3ygqic223w5sk3m",
        "createdAt": 1667538738,
        "lifetime": 1
      }
    ],
    "page": {
      "next": "1667538738773825",
      "total": 2,
      "hasNext": false
    }
  }
}
Query parameters
cursorstringOptional

First page default 0.

Header parameters
AuthorizationstringRequired

Authorization (Only:)

Body
namestringRequired

The IPNS name.

Responses
200
successful operation
application/json
get
GET /v1/names HTTP/1.1
Host: ipns
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "name": "text"
}
200

successful operation

{
  "code": "SUCCESS",
  "message": "success",
  "data": {
    "list": [
      {
        "name": "text",
        "key": "text",
        "ipfsPath": "text",
        "createdAt": 1,
        "lifetime": 1
      }
    ],
    "page": {
      "next": "text",
      "total": 1,
      "hasNext": true
    }
  }
}

The time parameter corresponding to lifetime is the maximum period for which the node in the network will keep the ipfs path, in fact the IPNS corresponding to the ipfs path will be published every few hours to achieve a state of preservation.

Delete IPNS

Delete IPNS

delete

Request

curl -X "DELETE" "https://api.4everland.dev/ipns/v1/names/example.eth"
-H 'Authorization: $AUTH_TOKEN'

Response

HTTP 200 OK
{
  "code": "SUCCESS",
  "message": "success",
  "data": {}
}
Path parameters
namestringRequired

The IPNS name.

Header parameters
AuthorizationstringRequired

Authorization (Only:)

Responses
200
successful operation
application/json
delete
DELETE /v1/names/{name} HTTP/1.1
Host: ipns
Authorization: text
Accept: */*
200

successful operation

{
  "code": "text",
  "message": "text",
  "data": {}
}

Publish IPNS name

Publish IPNS name

post

Request

curl -X "POST" "https://api.4everland.dev/ipns/v1/names/example.eth"
-H 'Authorization: $AUTH_TOKEN'
-H 'Content-Type: application/json; charset=utf-8'
-d $'{
  "ipfsPath": "/ipfs/bafybeihrmwcuv7z4vqhp7grzy52qnwwhwulslkdnetlaegohm2ibawtlni",
  "lifetime": 1
}'

Response

HTTP 200 OK
{
  "code": "SUCCESS",
  "message": "success",
  "data": {}
}
Path parameters
namestringRequired

The IPNS name.

Header parameters
AuthorizationstringRequired

Authorization (Only:)

Body
ipfsPpathstringRequired
lifetimenumberOptional

The default value is 1 day, and the maximum is 365 days. If it is 0, it is based on the configuration of the last lifetime.

Default: 1
Responses
200
successful operation
application/json
post
POST /v1/names/{name} HTTP/1.1
Host: ipns
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 35

{
  "ipfsPpath": "text",
  "lifetime": "1"
}
200

successful operation

{
  "code": "text",
  "message": "text",
  "data": {}
}

Retrieve IPNS Name

Retrieve IPNS Name

get

Request

curl "https://api.4everland.dev/ipns/v1/names/example.eth" \
     -H 'Authorization: $AUTH_TOKEN'

Response

HTTP 200 OK
{
  "code": "SUCCESS",
  "message": "success",
  "data": {
    "name": "example.eth",
    "key": "k51qzi5uqu5dhzjrd6l7s4ba8cspzctm1d96efloxcqkokvgg0f77ied7nc6zz",
    "ipfsPath": "/ipns/k51qzi5uqu5dlam30k8825vcss6lc11iytluqb5h1glc2fpqh7pfjs9r18idy6",
    "createdAt": 1667806756,
    "lifetime": 1
  }
}
Path parameters
namestringRequired

IPNS name.

Header parameters
AuthorizationstringRequired

Authorization (Only:)

Body
namestringRequired

The IPNS name.

Responses
200
successful operation
application/json
get
GET /v1/names/{name} HTTP/1.1
Host: ipns
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "name": "text"
}
200

successful operation

{
  "code": "text",
  "message": "text",
  "data": {
    "name": "text",
    "key": "text",
    "ipfsPath": "text",
    "createdAt": 1,
    "lifetime": 1
  }
}

If you have any questions, please join our Discord server, or send us an email at [email protected].

Last updated