API Documentation
On this page we provide you with a way to automate your file uploads / downloads.
The URL syntax is the same as the links on the web page interface, just with an api prefix. The API also works with our onion address.
By using the API, you agree to the Terms of Service.
Upload
Use POST request to upload files:
curl -X POST -F file=@/path/to/your/file/pics.zip api.trao.soon.it/upload
{
"Status": true,
"File": {
"Name": "pics.zip",
"URL": "trao.soon.it/file/X-DMBYFK",
"URL delete": "trao.soon.it/delete/X-DMBYFK5JP8MH"
}
}
Pro tip: check the value of the Status variable: true indicates all went well, false indicates an error occurred.
File info
Use GET request to find information about a file:
curl -X GET api.trao.soon.it/file/X-DMBYFK
{
"Status": true,
"File": {
"Name": "pics.zip",
"Size": "59132473",
"Human size": "56.39 MB",
"URL": "trao.soon.it/file/X-DMBYFK",
"Password protected": false
}
}
Download
Not part of the API, so no api prefix here:
wget trao.soon.it/download/X-ABCD12 --content-disposition
Delete
Use DELETE request to delete a file:
curl -X DELETE api.trao.soon.it/delete/X-DMBYFK5JP8MH
{
"Status": true,
"Deleted file": "pics.zip"
}
Folder info
Use GET request to find contents of a given folder:
curl -X GET api.trao.soon.it/folder/Y-ABCD12
{
"Status": true,
"Files": [
"X-FJSZ95",
"X-GFHPVI",
"X-GUE9FX"
]
}