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.
The struct of the MetadataAttribute is listed as bellow.
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.
The ExposedMetadataAttribute struct is listed as follow:
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.
The QueryMetadataResponse struct is listed as follow:
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
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
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
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
Authorization
Bearer Token
Header
string
metadata_id
The id of the metadata
Path
Integer
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
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
Authorization
Bearer Token
Header
string
page
Page Query
query
integer
1
limit
Page Query
query
integer
10
count
The number of the uploaded files
integer
items
The files information
[]QueryMetadataRsponse
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
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
Error with https://824600799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3Ln5WTo00HxQnwIT1nSu%2Fuploads%2Fgit-blob-b7eb9a491644b192bf198732c032444b2d93114f%2Fswagger.json?alt=media: Failed to convert Swagger 2.0 to OpenAPI 3.0: Operation DeployContract has multiple requestBodies
Error with https://824600799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3Ln5WTo00HxQnwIT1nSu%2Fuploads%2Fgit-blob-b7eb9a491644b192bf198732c032444b2d93114f%2Fswagger.json?alt=media: Failed to convert Swagger 2.0 to OpenAPI 3.0: Operation DeployContract has multiple requestBodies
Error with https://824600799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3Ln5WTo00HxQnwIT1nSu%2Fuploads%2Fgit-blob-b7eb9a491644b192bf198732c032444b2d93114f%2Fswagger.json?alt=media: Failed to convert Swagger 2.0 to OpenAPI 3.0: Operation DeployContract has multiple requestBodies