Przejdź do treści

Delete Knowledge Base Entry

Usuwanie artykułu z bazy wiedzy

DELETE /knowledge_base_entry/{knowledge_base_entry_id}

URL Parameters

Nazwa Rodzaj Przykład Opis
knowledge_base_entry_id <STRING> 608bdd875141c0758ca83971 Identyfikator artykułu bazy wiedzy

Response Body

{
    "success": <BOOLEAN>
}

Response Code

Status Opis
200 Pomyślnie obsłużono żądanie
404 Nie znaleziono zasobu

Example

curl -X DELETE \
$CONPEEK_URL/knowledge_base_entry/608bdd875141c0758ca83971 \
-H 'Authorization: '$CONPEEK_KEY \
-H 'Content-Type: application/json' \
import requests
import os
from urllib import parse

knowledge_base_entry_id = "608bdd875141c0758ca83971"
url = parse.urljoin(os.environ["CONPEEK_URL"], f"/knowledge_base_entry/{knowledge_base_entry_id}")

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

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

curl_setopt_array($curl, array(
    CURLOPT_URL => getenv("CONPEEK_URL")."/knowledge_base_entry/$knowledge_base_entry_id",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_POSTFIELDS => 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;
}