Overview
You can use this request to retrieve a list with a specific ID.
The Method
API | - | Method |
---|---|---|
REST | GET | https://[Your URL]/api/2.0/lists/:id |
XML-RPC | Call | lists.GetList |
Your URL is the address of your install.
Your method must be structured as follows:
GetList(integer $id) : object
Parameters
Property | Type | Description | Required |
---|---|---|---|
$id | integer | The ID of the list you want to retrieve. | yes |
Responses
Type | Description |
---|---|
object | The list object. |
Code Samples
PHP (using REST API):
$url = '(Your URL)/api/2.0/lists/:list_id'; $method = 'GET'; $cSession = curl_init(); $headers = array(); $auth = base64_encode($username . ':' . $apikey); $headers[] = 'Authorization: Basic ' . $auth; curl_setopt($cSession, CURLOPT_URL, $url); curl_setopt($cSession, CURLOPT_RETURNTRANSFER, true); curl_setopt($cSession, CURLOPT_HEADER, false); curl_setopt($cSession, CURLOPT_CUSTOMREQUEST, strtoupper($method)); curl_setopt($cSession, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($cSession); curl_close($cSession);