Uwierzytelnianie | wymagane |
Format odpowiedzi | json |
Metoda HTTP | GET |
https://your-system-name.thulium.com/api/system/transfer_shortcuts
W polu icon zwracany jest obrazek zakodowany przy pomocy Base64. |
GET | https://your-system-name.thulium.com/api/system/transfer_shortcuts |
[ { "transfer_shortcut_id": 1, "queue": "BOK", "number": "", "icon": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8\/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAe9JREFUeNqMUz1rG0EQfbva08fJsmwQCbLgirhyYYhcqAop1BnjJqDCfQIK+QEp3bhJEVKFCJJ\/kV4gVKXSL3CQDxxd4UJGHyBp9y4zK22IjKxkYJhhdt7bt7O7otFowFlydGSjEOKcQhmP2yBJku+cqL+r4uYGcRCAFg++XV62jNZYxDG0MYiTxPZkMhm8u7pq2v67u3UCTKcQYQhTqQhJQCYAkywWmFE0VGOLjRGp21sI6mcClnvwRwWTRNHLbrttCRgSE3BOKlhJmhTwOvWxpF\/KGFNptVpfGNzr9VCtVu2O2+zFycmF53kXzWbzLROI2WxmFygH568+\/4D2CpjP51iQswJFO+fyeezs7uJpXuHTaYn7hdJaS81nXRFwnmT38Pz4GJPxGJPJxBLJdBq5QgE7+\/vg+Wh9z71yjYAje8lPIYoiiOWdIpvNwiPPkQqPbqPkS9e7meDj2RNIKR+cnOdybz22CiyJlDQw6YDOu90uxiS\/0+lsjLyul9e7JOCps6+KqNVqNt8WV5jNCtr0Bv4nOoKUO6WbRb1eh1Jqa7RTIawaDofpfr9vC6PRCJwPBgP8y8rlMhgrisXia5rqs\/UvMZVhGL5\/DBwEwQff92O6qZ+iQI\/DSXeWOjx8kzwgXfu1BDTX11\/5OL8FGABX1Xth+tuNFgAAAABJRU5ErkJggg==", "name": "BOK" }, { "transfer_shortcut_id": 3, "queue": "", "number": "123456789", "icon": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8\/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAe9JREFUeNqMUz1rG0EQfbva08fJsmwQCbLgirhyYYhcqAop1BnjJqDCfQIK+QEp3bhJEVKFCJJ\/kV4gVKXSL3CQDxxd4UJGHyBp9y4zK22IjKxkYJhhdt7bt7O7otFowFlydGSjEOKcQhmP2yBJku+cqL+r4uYGcRCAFg++XV62jNZYxDG0MYiTxPZkMhm8u7pq2v67u3UCTKcQYQhTqQhJQCYAkywWmFE0VGOLjRGp21sI6mcClnvwRwWTRNHLbrttCRgSE3BOKlhJmhTwOvWxpF\/KGFNptVpfGNzr9VCtVu2O2+zFycmF53kXzWbzLROI2WxmFygH568+\/4D2CpjP51iQswJFO+fyeezs7uJpXuHTaYn7hdJaS81nXRFwnmT38Pz4GJPxGJPJxBLJdBq5QgE7+\/vg+Wh9z71yjYAje8lPIYoiiOWdIpvNwiPPkQqPbqPkS9e7meDj2RNIKR+cnOdybz22CiyJlDQw6YDOu90uxiS\/0+lsjLyul9e7JOCps6+KqNVqNt8WV5jNCtr0Bv4nOoKUO6WbRb1eh1Jqa7RTIawaDofpfr9vC6PRCJwPBgP8y8rlMhgrisXia5rqs\/UvMZVhGL5\/DBwEwQff92O6qZ+iQI\/DSXeWOjx8kzwgXfu1BDTX11\/5OL8FGABX1Xth+tuNFgAAAABJRU5ErkJggg==", "name": "FAX" } ]
<?php
$request = curl_init('https://your-system-name.thulium.com/api/system/transfer_shortcuts');
curl_setopt($request, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=utf-8'));
curl_setopt($request, CURLOPT_USERPWD, "api_user:api_pass");
curl_setopt($request, CURLOPT_TIMEOUT, 30);
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($request);
if ($response) {
$httpCode = curl_getinfo($request, CURLINFO_HTTP_CODE);
if ($httpCode == 200){
print_r(json_decode($response));
} else {
echo $response;
}
} else {
trigger_error(curl_error($request), E_USER_WARNING);
}
curl_close($request);
public class Example {
public static void main(String[] args) throws Exception {
ThuliumRestClient restClient = new ThuliumRestClient("api_user", "api_pass", true);
ThuliumRestClient.ThuliumRestResponse response = restClient.get("https://your-system-name.thulium.com/api/system/transfer_shortcuts");
System.out.println(response);
}
}
curl -u api_user:api_pass -k -X GET -H "Accept: application/json" "https://your-system-name.thulium.com/api/system/transfer_shortcuts"
http -a api_user:api_pass GET https://your-system-name.thulium.com/api/system/transfer_shortcuts Accept:application/json