Files
The files APIs provide users to make preparations for creating NFTs including uploading files and the corresponding query functions.
Upload File
Upload file
API helps users to upload a file to get the corresponding url for creating NFT metadata. The file can be a video, a figure and so on.
Upload a file which can be a video, an image and so on
Bearer openapi_token
uploaded file
POST /v1/files/ HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 15
"file='text'"
{
"file_name": "text",
"file_size": 1,
"file_type": "text",
"file_url": "text"
}
Authorization
Bearer Token
Header
string
Upload File to OSS
OSS is a storage service provided by Alibaba. Users can choose to upload the files to OSS storage. Upload file to OSS
API helps users to achieve the target. The file can be a video, a figure and so on.
Upload a file to OSS, which can be a video, an image and so on
Bearer openapi_token
uploaded file
POST /v1/files/oss HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 15
"file='text'"
{
"file_name": "text",
"file_size": 1,
"file_type": "text",
"file_url": "text"
}
Authorization
Bearer Token
Header
string
Upload File List
Upload File List
API helps users to upload a folder to the server. The files can be a video, a figure and so on.
Upload a folder containing the files which can be a video, an image and so on
Bearer openapi_token
uploaded folder
POST /v1/files/folder HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 17
"folder='text'"
{
"file_num": 1,
"folder_url": "text"
}
Authorization
Bearer Token
Header
string
Upload File List To OSS
Upload File List To OSS
API helps users to upload a folder to oss. The files in this folder can be a video, a figure and so on.
Upload a folder containing the files which can be a video, an image and so on, to oss
Bearer openapi_token
uploaded folder
POST /v1/files/folder/oss HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 17
"folder='text'"
{
"file_num": 1,
"folder_url": "text"
}
Authorization
Bearer Token
Header
string
Obtain File List
Obtain file list
API helps users to obtain the list including the inforamion of the files uploaded in the specified app. The information of each file contains file_url
, file_size
, file_type
and file_name
.
Get the file list containing the info of the files uploaded in the specified app
page
limit
Bearer openapi_token
GET /v1/files/ HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Accept: */*
{
"count": 1,
"items": [
{
"created_at": "text",
"deleted_at": {
"time": "text",
"valid": true
},
"file_name": "text",
"file_size": 1,
"file_type": "text",
"file_url": "text",
"id": 1,
"updated_at": "text"
}
]
}
Authorization
Bearer Token
Header
string
Last updated