The sendspace Application Programming Interface (API) allows you to embed sendspace services in your applications, programs, or scripts, regardless of platform and programming language.
All communication with the sendspace API (1.2) assumes a UTF-8 encoding.
< Return to Method List
Method: folders.getContents
- Description
Obtains the full contents of a folder, including files and any sub-folders.
- Arguments
Name | Mandatory | Description |
session_key | Yes | Received from auth.login |
folder_id | Yes | A folder_id code or 0 for root folder |
- Returns
Files & folders information list
- Response
<result method="folders.getContents" status="ok">
<folder id="" name="" shared="" public_url="" rss_url="" parent_folder_id=""/>
...
<folder id="" name="" shared="" public_url="" rss_url="" parent_folder_id=""/>
<file id="" name="" description="" password="" folder_id="" download_page_url="" direct_download_url="" upload_time="" file_size="" downloads="" time_limit="" download_limit="" limit_action="" limit_action_to_folder=""/>
...
<file id="" name="" description="" password="" folder_id="" download_page_url="" direct_download_url="" upload_time="" file_size="" downloads="" time_limit="" download_limit="" limit_action="" limit_action_to_folder=""/>
</result>
- Usage Example
http://api.sendspace.com/rest/?method=folders.getcontents&session_key=9i96woykgory1crglmykgycjwa5k2cq2&folder_id=0
- Possible Errors
Code | Name | Description |
6 | API_ERROR_SESSION_BAD | Session expired or not found |
10 | API_ERROR_FOLDER_NOT_FOUND | Folder not found |