API - Inbound Routes Read¶
The Inbound Routes API is used to read queues from the PBX.
API URL¶
https://[YOUR-PBX-URL]/api/inbound-routes
The data is transmitted by POST or GET and must be of the form:¶
Array
(
[action] => read
[filters] => Array
(
[project_id] =>
[search] =>
)
[api_hash] => 07112231a9c89f5b108af08608a97b07
)
The parameter action must have the value read.
HTTP Headers:¶
Content-Type: text/xml Authorization: Bearer <token>
Filtre:¶
- project_id: Project ID from the PBX
- search: Search by number, comments, destination, description
Example of parameters generation:
$params = array(
'action' => 'read',
'filters' => array(
'project_id' => null,
'search' => null,
)
);
Example of hash generation:
$params['api_hash'] = md5(http_build_query($params) . 'your_api_key'); // make hash
Example of sending data:
$url = 'https://[YOUR-PBX-URL]/api/inbound-routes';
$token = 'your_api_token';
echo curlPost($url, http_build_query($params), array("Authorization: Bearer {$token}"));
Data sent JSON¶
{
"action": "read",
"filters": {
"project_id": null,
"search": null,
},
"api_hash": "de1b56d49bf027503ef3ecee05b9c59d"
}
Response¶
In case of successful response:
{
"has_error": false,
"messages": [ ],
"results": [ ]
}
Or in case of error:
{
"has_error": true,
"messages": [
"Invalid filter: xxx"
],
"results": [ ]
}
Available in other languages: RO