Przejdź do treści

Update CDR Dialog

Modyfikacja CDR dialogu

PUT /cdr_dialog/{dialog_uuid}

Body

{
    "ticket_id": <STRING>
    "custom_tag_id_list": <LIST>
}
Nazwa Rodzaj Opis Zasób
ticket_id <STRING> ID zgłoszenia
custom_tag_id_list <LIST> Lista identyfikatorów Tagów

Response

{
    "success": <BOOLEAN>
}

Response Code

Status Opis
200 Aktualizacja powiodła się
400 Nieprawidłowa wartość
404 Nie znaleziono rekordu

Example

curl -X PUT \
$CONPEEK_URL/cdr_dialog/c73cb58b-2442-4650-8es1-4ca4dd78abg2 \
-H 'Authorization: '$CONPEEK_KEY \
-H 'Content-Type: application/json' \
-d '{
    "ticket_id": "65314f297786e3d61b9e7129",
}'
import requests
import os
from urllib import parse

url = parse.urljoin(os.environ["CONPEEK_URL"], "/cdr_dialog/c73cb58b-2442-4650-8es1-4ca4dd78abg2")

payload = {
    "ticket_id": "65314f297786e3d61b9e7129",
}

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

response = requests.request("PUT", url, data=json.dumps(payload), headers=headers)
print(response.text)
<?php
$curl = curl_init();

$payload = array(
    "ticket_id": "65314f297786e3d61b9e7129",
);

curl_setopt_array($curl, array(
    CURLOPT_URL => getenv("CONPEEK_URL")."/cdr_dialog/c73cb58b-2442-4650-8es1-4ca4dd78abg2",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_PUTFIELDS => json_encode($payload),
    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;
}