Przejdź do treści

Get Dialog

Pobranie informacji o połączeniu.

GET /dialog/{dialog_uuid}

URL Parameters

Nazwa Rodzaj Przykład Opis
dialog_uuid <STRING> a52cb58b-2442-4650-8ef8-4ca4dd78a390 Identyfikator połączenia (dialogu) w systemie

Response Body

{
    "data": <DialogInfo>
}
Nazwa Rodzaj Opis Zasób
data <DialogInfo> Informacje o dialogu DialogInfo

Response Code

Status Opis
200 Żądanie przyjęte do realizacji
403 Nie można wykonać takiej akcji
404 Nie znaleziono zasobu

Example

curl -X GET \
$CONPEEK_URL/dialog/a52cb58b-2442-4650-8ef8-4ca4dd78a390 \
-H 'Authorization: '$CONPEEK_KEY \
-H 'Content-Type: application/json'
import requests
import os
from urllib import parse

url = parse.urljoin(os.environ["CONPEEK_URL"], "/dialog/%(dialog_uuid)s" % {
    "dialog_uuid": "a52cb58b-2442-4650-8ef8-4ca4dd78a390"
})

headers = {
    'Content-Type': "application/json",
    'Authorization': os.environ["CONPEEK_KEY"]
}

response = requests.request("GET", url, headers=headers)
print(response.text)
<?php
$curl = curl_init();

$dialog_uuid = "a52cb58b-2442-4650-8ef8-4ca4dd78a390";

curl_setopt_array($curl, array(
    CURLOPT_URL => getenv("CONPEEK_URL")."/dialog/$dialog_uuid",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: ".getenv("CONPEEK_KEY"),
        "Content-Type: application/json"
    ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $response;
}

Response

200 OK

{
    "data": {
        "dialog_uuid": "a52cb58b-2442-4650-8ef8-4ca4dd78a390",
        "display_name": "Jan",
        "display_number": "48123123789",
        "peer_presentation_name": null,
        "peer_presentation_number": null,
        "dialog_type": "TENANT_USER",
        "direction": "OUTBOUND",
        "state": "talking",
        "answered": "true",
        "on_hold": "false",
        "start_time": "2018-09-01 10:00:03",
        "answer_time": "2018-09-01 10:00:05",
        "serve_time": "2018-09-01 10:00:05",
        "ring_time": "2018-09-01 10:00:04",
        "alert_time": "2018-09-01 10:00:04",
        "media": ["audio"],
        "contact_id": "45",
        "contact_data": {
            "firstname": "XYZ",
            "surname": "BB",
            "id": "45"
        },
        "crm_id": "5f2d216ef03d640e9102c508",
        "contact_verification_level_code": null,
        "contact_verification_level_display": null
    }
}