Read Dialog Chat Recording
Pobranie historii chatu dla danego dialogu
GET /cdr_dialog/{dialog_uuid}/chat_recording
URL Parameters
Nazwa | Rodzaj | Opis | Zasób |
---|---|---|---|
dialog_uuid | <STRING> |
Identyfikator połączenia (dialogu) w systemie | Dialog |
Query Parameters
Możliwe parametry w URL:
Parametr | Domyślnie | Przykład | Opis |
---|---|---|---|
limit | 100 | 300 | Limit pobranych rekordów |
offset | 0 | 200 | Rekord początkowy |
Response file
{
"success": true,
"data": <LIST<DialogChatRecording>>,
"count": <INTEGER>,
}
Nazwa | Rodzaj | Opis | Zasób |
---|---|---|---|
data | <LIST<DialogChatRecording>> |
Lista obiektów | DialogChatRecording |
Response Code
Status | Opis |
---|---|
200 | Rekordy zostały pobrane pomyślnie |
404 | Nie znaleziono danego dialogu |
Example
curl -X GET \
$CONPEEK_URL/cdr_dialog/c73cb58b-2442-4650-8es1-4ca4dd78abg2/chat_recording \
-H 'Authorization: '$CONPEEK_KEY \
-H 'Content-Type: application/json'
import requests
import os
from urllib import parse
dialog_uuid = "c73cb58b-2442-4650-8es1-4ca4dd78abg2"
url = parse.urljoin(os.environ["CONPEEK_URL"], f"/cdr_dialog/{dialog_uuid}/chat_recording")
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 = "c73cb58b-2442-4650-8es1-4ca4dd78abg2";
curl_setopt_array($curl, array(
CURLOPT_URL => getenv("CONPEEK_URL")."/cdr_dialog/$dialog_uuid/chat_recording",
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;
}