upload file with multipart/form-data.
POST
/submit
upload file with multipart/form-data..
Path parameters
-
access_tokenstring
optional
token to be passed as a header -
media_typestring
optional
file media type , like audio/vnd.wave -
usernamestring
optional
username -
passwordstring
optional
password
Request body
application/json
-
fileNamestring
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
-
fileNamestring
name of file. -
idstring
-
sizeinteger
Size of file. -
fidstring
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_tokenstring
required
token to be passed as a header
Request body
application/json
-
idstring
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_tokenstring
required
token to be passed as a header -
idinteger
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
-
fileidstring
The unique id of file. use http://127.0.0.1:9333/$fileid to download file. -
crc32string
crc32 of the file. -
filesizeinteger
Size of file. -
idstring
-
creation_timeinteger
creation_time of the file. -
filenamestring
name of file. -
media_typestring
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_tokenstring
required
token to be passed as a header -
paginationinteger
required
The pagination of paging. -
pagesizeinteger
required
The size of paging. -
media_typestring
required
file formats and format contents transmitted on the Internet. -
sort_bystring
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
-
pagesizeinteger
-
sort_bystring
-
paginationinteger
-
filemetasarray
Show child attributes -
countinteger
Sample Response
{
"pagesize": 10,
"sort_by": "DEFAULT",
"pagination": 8,
"count": 100
}