| Uwierzytelnianie | wymagane |
| Format odpowiedzi | json |
| Metoda HTTP | PUT |
https://your-system-name.thulium.com/api/knowledge_base/articles/:articleId
|
articleId
wymagany |
Identyfikator artykułu. |
|
title
wymagany |
Tytuł artykułu. |
|
content
wymagany |
Treść HTML artykułu (max 30000 znaków). |
|
category_id
wymagany |
Identyfikator docelowej kategorii. |
|
user_login
opcjonalny |
Login użytkownika wykonującego edycję (do logu zmian). Domyślnie automat. |
| PUT | https://your-system-name.thulium.com/api/knowledge_base/articles/fa97e6fa-f458-4ea5-be5d-da72ed9b5197 |
| Dane | { "title": "...", "content": " |
{
"id": "fa97e6fa-f458-4ea5-be5d-da72ed9b5197",
"title": "Updated title",
"content": "Updated content
",
"category_id": "742b4a0f-cec1-46ca-8175-cb7ca9746368",
"category_name": "Account",
"catalog_id": "6a6a245b-a30c-49a5-bee6-96aa760280ba",
"feedback": { "positive": 10, "negative": 1 },
"user_login": "akowalski",
"created_at": "2024-10-31T12:59:55Z",
"updated_at": "2026-04-13T11:00:00Z"
}
<?php $data = '{ "title": "...", "content": "<p>...</p>", "category_id": "...", "user_login": "akowalski" }'; $request = curl_init('https://your-system-name.thulium.com/api/knowledge_base/articles/fa97e6fa-f458-4ea5-be5d-da72ed9b5197'); curl_setopt($request, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json; charset=utf-8', 'Content-Length: ' . mb_strlen($data) )); curl_setopt($request, CURLOPT_USERPWD, 'api_user:api_pass'); curl_setopt($request, CURLOPT_TIMEOUT, 30); curl_setopt($request, CURLOPT_RETURNTRANSFER, true); curl_setopt($request, CURLOPT_CUSTOMREQUEST, 'PUT'); curl_setopt($request, CURLOPT_POSTFIELDS, $data); $response = curl_exec($request); if ($response) { $httpCode = curl_getinfo($request, CURLINFO_HTTP_CODE); if ($httpCode == 200){ print_r(json_decode($response)); } else { echo $response; } } else { trigger_error(curl_error($request), E_USER_WARNING); } curl_close($request);
public class Example { public static void main(String[] args) throws Exception { ThuliumRestClient restClient = new ThuliumRestClient("api_user", "api_pass", true); ThuliumRestClient.ThuliumRestResponse response = restClient.put("https://your-system-name.thulium.com/api/knowledge_base/articles/fa97e6fa-f458-4ea5-be5d-da72ed9b5197", "{ \"title\": \"...\", \"content\": \"<p>...</p>\", \"category_id\": \"...\", \"user_login\": \"akowalski\" }"); System.out.println(response); } }
curl -u api_user:api_pass -k -X PUT -H "Content-type: application/json" -d '{ "title": "...", "content": "<p>...</p>", "category_id": "...", "user_login": "akowalski" }' "https://your-system-name.thulium.com/api/knowledge_base/articles/fa97e6fa-f458-4ea5-be5d-da72ed9b5197"
echo '{ "title": "...", "content": "<p>...</p>", "category_id": "...", "user_login": "akowalski" }' | http -a api_user:api_pass PUT https://your-system-name.thulium.com/api/knowledge_base/articles/fa97e6fa-f458-4ea5-be5d-da72ed9b5197