Ticket Attachment Delete
Usunięcie załącznika
DELETE /ticket/{ticket_id}/attachment/{attachment_id}
URL Parameters
Nazwa | Rodzaj | Opcjonalne | Opis |
---|---|---|---|
ticket_id | <STRING> |
5dcd6173f03d645ca3ec6b23 | Identyfikator Zgłoszenia |
attachment_id | <STRING> |
5ocd6173fm3d605ca3ec6b20 | Identyfikator Załącznika |
Response Body
{
"success": true
}
Response Code
Status | Opis |
---|---|
200 | Żądanie wykonane |
404 | Nie znaleziono zasobu |
Example
curl -X DELETE \
$CONPEEK_URL/ticket/5dcd6173f03d645ca3ec6b23/attachment/5ocd6173fm3d605ca3ec6b20 \
-H 'Authorization: '$CONPEEK_KEY \
-H 'Content-Type: application/json'
import requests
import json
import os
from urllib import parse
url = parse.urljoin(os.environ["CONPEEK_URL"], "/ticket/%(ticket_id)s/attachment/%(attachment_id)s" % {
"ticket_id": "5dcd6173f03d645ca3ec6b23",
"attachment_id": "5ocd6173fm3d605ca3ec6b20"
})
headers = {
'Content-Type': "application/json",
'Authorization': os.environ["CONPEEK_KEY"]
}
response = requests.request("DELETE", url, headers=headers)
print(response.text)
<?php
$curl = curl_init();
$ticket_id = "5dcd6173f03d645ca3ec6b23";
$attachment_id = "5ocd6173fm3d605ca3ec6b20";
curl_setopt_array($curl, array(
CURLOPT_URL => getenv("CONPEEK_URL")."/ticket/$ticket_id/attachment/$attachment_id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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;
}