API

Trash Can

Content

URL: http(s)://alfafile.net/api/v1/trashcan/content
Description: Returns a trash can file's details
Method: (GET|POST)
Required params:
  • token - Access Token to authenticate the user's current session
Optional params:
  • page - Page number. Default is 1
  • per_page - Number of files per page. Default is 500
  • sort_column - Sort column name. Possible values: 'name', 'created', 'size', 'nb_downloads'. Default is 'name'
  • sort_direction - Sort direction. Possible values: 'ASC', 'DESC'. Default is 'ASC'
Request example: api/v1/trashcan/content?&token=arsd4h37ecfkdqd16uolf5nai1
Success response example:
        
{
    "response":{
        "files":[
            {
                "file_id":"GA",
                "mode":1,
                "mode_label":"Public",
                "folder_id":null,
                "name":"file2.png",
                "hash":"0a9efe3280143218fa9bad5e36bd3d81",
                "size":15128,
                "url":null,
                "created":1426764695
            },
            {
                "file_id":"Gu",
                "mode":1,
                "mode_label":"Public",
                "folder_id":null,
                "name":"file_1.zip",
                "hash":"03a8b5ceb55d9be5ec57aea62d6628d6",
                "size":2010338,
                "url":null,
                "created":1426764700
            }
        ],
        "pager": {
            "current": 1,
            "total": 1
        }
    },
    "status":200,
    "details":null
}
        
    

Restore

URL: http(s)://alfafile.net/api/v1/trashcan/restore
Description: Restore file(s) to root folder.
Method: (GET|POST)
Required params:
  • token - Access Token to authenticate the user's current session
Optional params:
  • file_id - The key that identifies the file. You can also specify multiple file keys separated by comma. If not specified will be restored all files
Request example: /api/v1/trashcan/restore?file_id=Gu&token=&&token=arsd4h37ecfkdqd16uolf5nai1
Success response example:
        
{
    "response":{
        "result":{
            "success":1,
            "success_ids":[
                "Gu"
            ],
            "fail":0,
            "fail_ids":[

            ],
            "errors":[

            ]
        }
    },
    "status":200,
    "details":null
}
        
    

Empty

URL: http(s)://alfafile.net/api/v1/trashcan/empty
Description: Empty trash can.
Method: (GET|POST)
Required params:
  • token - Access Token to authenticate the user's current session
Optional params:
  • file_id - The key that identifies the file. You can also specify multiple file keys separated by comma. If not specified will be deleted all files
Request example: /api/v1/trashcan/empty?file_id=Gu&token=&&token=arsd4h37ecfkdqd16uolf5nai1
Success response example:
        
{
    "response":{
        "result":{
            "success":1,
            "success_ids":[
                "Gu"
            ],
            "fail":0,
            "fail_ids":[

            ],
            "errors":[

            ]
        }
    },
    "status":200,
    "details":null
}