For the complete documentation index, see llms.txt. This page is also available as Markdown.

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
/v1/metadata/

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

Authorizations
Header parameters
AuthorizationstringRequired

Bearer openapi_token

Body
animation_urlstringOptional
descriptionstringRequired
external_linkstringOptional
imagestringRequired
namestringRequired
Responses
200

OK

application/json
animation_urlstringOptional
app_idintegerOptional
created_atstringOptional
descriptionstringRequired
external_linkstringOptional
idintegerOptional
imagestringRequired
metadata_idstringOptional
namestringRequired
updated_atstringOptional
uristringOptional
post/v1/metadata/
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

Name
Meaning
Param Type
Data Type
Required

name

The name of the metadata

body

string

image

The file url of the metadata

body

string

external_link

The externanl link of the metadata

body

string

description

The description of the metadata

body

string

animation_url

A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA.

body

string

attributes

The attributes of the metadata

array

attribute

The struct of the MetadataAttribute is listed as bellow.

Name
Meaning
Param Type
Type
Required

attribute_name

The name of the attribute

body

string

display_type

The display type of the attribute

body

string

trait_type

The trait type of the attribute

body

string

value

The value of the attribute

body

string

Name
Meaning
Type

uri

The uri of the metadata

string

metadata_id

The id of the metadata

string

description

The description of the metadata

string

external_link

The external link of the metadata

string

image

The file url of the metadata

string

metadata_id

The id of the metadata

string

name

The name of the metadata

string

animation_url

A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA.

string

attributes

The attribute of the metadata

[]ExposedMetadataAttribute

The ExposedMetadataAttribute struct is listed as follow:

Name
Meaning
Type

attribute_name

The name of the attribute

string

display_type

The display type of the attribut

string

trait_type

The trait type of the attribute

string

value

The value of the attribute

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
/v1/metadata/{metadata_id}

Query the metadata according to metadata_id

Authorizations
Path parameters
metadata_idstringRequired

metadata_id

Header parameters
AuthorizationstringRequired

Bearer openapi_token

Responses
200

OK

application/json
animation_urlstringOptional
app_idintegerOptional
created_atstringOptional
descriptionstringRequired
external_linkstringOptional
idintegerOptional
imagestringRequired
metadata_idstringOptional
namestringRequired
updated_atstringOptional
uristringOptional
get/v1/metadata/{metadata_id}
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

Name
Meaning
Param Type
Data Type
Required

metadata_id

The id of the metadata

Path

Integer

Name
Meaning
Data Type

attributes

The attribute of the metadata

[]ExposedMetadataAttribute

description

The description of the metadata

string

external_link

The external link of the metadata

string

animation_url

A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA.

string

image

The file url of the metadata

string

metadata_id

The id of the metadata

string

name

The name of the metadata

string

The ExposedMetadataAttribute struct is listed as follow:

Name
Meaning
Type

attribute_name

The name of the attribute

string

display_type

The display type of the attribut

string

trait_type

The trait type of the attribute

string

value

The value of the attribute

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
/v1/metadata/

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

Authorizations
Query parameters
pagestringOptional

page

limitstringOptional

limit

Header parameters
AuthorizationstringRequired

Bearer openapi_token

Responses
200

OK

application/json
countintegerOptional
get/v1/metadata/
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

Name
Meaning
Param Type
Data Type
Required
Default

page

Page Query

query

integer

1

limit

Page Query

query

integer

10

Name
Meaning
Type

count

The number of the uploaded files

integer

items

The files information

[]QueryMetadataRsponse

The QueryMetadataResponse struct is listed as follow:

Name
Meaning
Data Type

attributes

The attribute of the

[]attributes

description

The description of the metadata

string

external_link

The external link of the metadata

string

animation_url

A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA.

string

image

The file url of the metadata

string

metadata_id

The id of the metadata

string

name

The name of the metadata

string

The attributes struct is listed as follow:

Name
Meaning
Type

attribute_name

The name of the attribute

string

display_type

The display type of the attribut

string

trait_type

The trait type of the attribute

string

value

The value of the attribute

string

Last updated