Metadata

The metadata APIs provide users to make preparations for creating NFTs including creating NFT metadata and the corresponding query functions.

Create NFT Metadata

Create NFT metadata API helps users to create their own metadata after calling Upload File to get the corresponding file url. To call Create NFT metadata , users have to provide the metadata information including name, file, external_link and so on.

Create NFT metadata

post

Create NFT metadata by providing the info including name, description and so on

Header parameters
AuthorizationstringRequired

Bearer openapi_token

Body
animation_urlstringOptional
descriptionstringRequired
external_linkstringOptional
imagestringRequired
namestringRequired
Responses
200
OK
application/json
post
POST /v1/metadata/ HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 195

{
  "animation_url": "text",
  "attributes": [
    {
      "attribute_name": "text",
      "display_type": "text",
      "trait_type": "text",
      "value": "text"
    }
  ],
  "description": "text",
  "external_link": "text",
  "image": "text",
  "name": "text"
}
{
  "animation_url": "text",
  "app_id": 1,
  "attributes": [
    {
      "attribute_name": "text",
      "display_type": "text",
      "trait_type": "text",
      "value": "text"
    }
  ],
  "created_at": "text",
  "deleted_at": {
    "time": "text",
    "valid": true
  },
  "description": "text",
  "external_link": "text",
  "id": 1,
  "image": "text",
  "metadata_id": "text",
  "name": "text",
  "updated_at": "text",
  "uri": "text"
}
Name
Meaning
Param Type
Data Type

Authorization

Bearer Token

Header

string

Query Metadata

Query metadata API helps users to query the detailed information of the specified metadata according to metadata_id. This api returns the name, description, external link, file and attributes of the queried metada.

Query metadata

get

Query the metadata according to metadata_id

Path parameters
metadata_idstringRequired

metadata_id

Header parameters
AuthorizationstringRequired

Bearer openapi_token

Responses
200
OK
application/json
get
GET /v1/metadata/{metadata_id} HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Accept: */*
{
  "animation_url": "text",
  "app_id": 1,
  "attributes": [
    {
      "attribute_name": "text",
      "display_type": "text",
      "trait_type": "text",
      "value": "text"
    }
  ],
  "created_at": "text",
  "deleted_at": {
    "time": "text",
    "valid": true
  },
  "description": "text",
  "external_link": "text",
  "id": 1,
  "image": "text",
  "metadata_id": "text",
  "name": "text",
  "updated_at": "text",
  "uri": "text"
}
Name
Meaning
Param Type
Data Type

Authorization

Bearer Token

Header

string

Obtain Metadata List

Query metadata list API helps users to obain the metadata list including the information of the metadata created in the specified app. This API returns the array of the result from calling Query matadata.

Obtain metadata list

get

Get the metadata list containing the info of the metadata created in the specified app

Query parameters
pagestringOptional

page

limitstringOptional

limit

Header parameters
AuthorizationstringRequired

Bearer openapi_token

Responses
200
OK
application/json
get
GET /v1/metadata/ HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Accept: */*
{
  "count": 1,
  "items": [
    {
      "animation_url": "text",
      "app_id": 1,
      "attributes": [
        {
          "attribute_name": "text",
          "display_type": "text",
          "trait_type": "text",
          "value": "text"
        }
      ],
      "created_at": "text",
      "deleted_at": {
        "time": "text",
        "valid": true
      },
      "description": "text",
      "external_link": "text",
      "id": 1,
      "image": "text",
      "metadata_id": "text",
      "name": "text",
      "updated_at": "text",
      "uri": "text"
    }
  ]
}
Name
Meaning
Param Type
Data Type

Authorization

Bearer Token

Header

string

Last updated