Informacje

Uwierzytelnianie wymagane
Format odpowiedzi json
Metoda HTTP GET

GET system/transfer_shortcuts

Ostatnia modyfikacja 2024-11-20 13:20:36
Zwraca skróty do przekierowań.

URL

https://your-system-name.thulium.com/api/system/transfer_shortcuts

Uwagi

W polu icon zwracany jest obrazek zakodowany przy pomocy Base64.

Przykładowy request

GET https://your-system-name.thulium.com/api/system/transfer_shortcuts

Przykładowy response

[
    {
        "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"
    }
]

Przykładowe wywołanie


PHP

<?php
$request 
curl_init('https://your-system-name.thulium.com/api/system/transfer_shortcuts');
curl_setopt($requestCURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=utf-8'));
curl_setopt($requestCURLOPT_USERPWD"api_user:api_pass");
curl_setopt($requestCURLOPT_TIMEOUT30);
curl_setopt($requestCURLOPT_RETURNTRANSFERtrue);

$response curl_exec($request);
if (
$response) {
    
$httpCode curl_getinfo($requestCURLINFO_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);
JAVA

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

curl -u api_user:api_pass -k -X GET -H "Accept: application/json" "https://your-system-name.thulium.com/api/system/transfer_shortcuts"

HTTPie

http -a api_user:api_pass GET https://your-system-name.thulium.com/api/system/transfer_shortcuts Accept:application/json