getFolderById

Returns the details of a specific Folder.

getFolderById

Returns the details of a specific Folder.

Top ↑

Syntax

array getFolderById( int api_key, int folder_id );

Parameters

api_key (int)

The key required to access the API. See Getting Started for more information.

folder_id (int)

The ID of the Folder.

Return Value

Returns an array containing a single associative array of Folder details. See searchFolders for a description of the values returned.

Examples

The following example gets details of Folder 287394.

$folder_id = 123456;

// API Call
$api = new Api($url, 'YOURAPIKEY');
$folder_details = $api->invokeMethod('getFolderById', array($folder_id));
{
    "id": 1,
    "method": "getFolderById",
    "params": [
        "YOURAPIKEY",
        123456
    ]
}
{
    "id": 1,
    "result": [
        {
            "id": "123456",
            "name": "example",
            "creation_time": "1362100176",
            "type": "list",
            "item_count": "0"
        }
    ],
    "error": null
}

Error Codes

This method may return the following error code in addition to the standard error codes:

Code Error Description
306 Unable to load Folder folder_id is not a valid Folder

See Also