Overview
This request will return a subset of your lists. Use the page and count parameters to get the whole list.
The Method
API | - | Method |
---|---|---|
REST | GET | https://[Your URL]/api/2.0/lists |
XML-RPC | Call | lists.ListLists |
Your URL is the address of your install.
Your method must be structured as follows:
ListLists(int $page, int $count, string $order, string $direction, \struct | array $filters) : array
Parameters
Optional Parameters
You can use the following optional parameters to refine the list that the system returns:
Property | Type | Description | Required |
---|---|---|---|
$page | integer | The page number of the list. | no |
$count | integer | The number of results to return. | no |
$order | string | The name of the field to order the listing with. | no |
$direction | string | The direction to order the list in: ‘asc’ or ‘desc’. | no |
$filters | structarray | The fields to filter on. | no |
Responses
Type | Description |
---|---|
array | An array of lists. |
Code Samples
PHP (using REST API):
$url = '(Your URL)/api/2.0/lists'; $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);