upload file with multipart/form-data.
POST
/submit
upload file with multipart/form-data..
Path parameters
-
access_token
string
optional
token to be passed as a header -
media_type
string
optional
file media type , like audio/vnd.wave -
username
string
optional
username -
password
string
optional
password
Request body
application/json
-
fileName
string
required
Sample Request
curl -v -X POST http://127.0.0.1:8990/api/filemetadata/submit \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
-d '{}'
Responses
200
Successful operation
application/json
-
fileName
string
name of file. -
id
string
-
size
integer
Size of file. -
fid
string
The unique id of file. use http://127.0.0.1:9333/$fileid to download file.
Sample Response
{
"fileName": "filename",
"size": 300,
"fid": "7BFAD01C977E407B832CE510C2B015BD"
}
Remove an FileMetaData entry.
POST
/destroy
Deletes a certain FileMetaData entry.
Path parameters
-
access_token
string
required
token to be passed as a header
Request body
application/json
-
id
string
required
Sample Request
curl -v -X POST http://127.0.0.1:8990/api/filemetadata/destroy \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
-d '{}'
Responses
200
Successful operation
404
User not found
400
Invalid fileid supplied
Sample Response
Show IP FileMetaData
GET
/show
Path parameters
-
access_token
string
required
token to be passed as a header -
id
integer
required
The unique id of file.
Sample Request
curl -v -X GET http://127.0.0.1:8990/api/filemetadata/show \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
Responses
200
Successful operation
application/json
-
fileid
string
The unique id of file. use http://127.0.0.1:9333/$fileid to download file. -
crc32
string
crc32 of the file. -
filesize
integer
Size of file. -
id
string
-
creation_time
integer
creation_time of the file. -
filename
string
name of file. -
media_type
string
file formats and format contents transmitted on the Internet.
Sample Response
{
"fileid": "7BFAD01C977E407B832CE510C2B015BD",
"crc32": "7BFAD01C977E407B",
"filesize": 300,
"filename": "filename",
"creation_time": 14444444,
"media_type": "audio/vnd.wave"
}
list FileMetaDatas.
GET
/list
list FileMetaDatas.
Path parameters
-
access_token
string
required
token to be passed as a header -
pagination
integer
required
The pagination of paging. -
pagesize
integer
required
The size of paging. -
media_type
string
required
file formats and format contents transmitted on the Internet. -
sort_by
string
optional
Default value will be used when user does not specify value for this field.
Sample Request
curl -v -X GET http://127.0.0.1:8990/api/filemetadata/list \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
Responses
200
Successful operation
application/json
-
pagesize
integer
-
sort_by
string
-
pagination
integer
-
filemetas
array
-
count
integer
Sample Response
{
"pagesize": 10,
"sort_by": "DEFAULT",
"pagination": 8,
"count": 100
}