Endpointy
| Metoda |
Ścieżka |
Opis |
| GET |
/kb/comments.json |
Lista komentarzy |
| GET |
/kb/comments/:id.json |
Pojedynczy komentarz |
| POST |
/kb/comments.json |
Utworzenie komentarza |
| PATCH |
/kb/comments/:id.json |
Aktualizacja komentarza |
| DELETE |
/kb/comments/:id.json |
Usunięcie komentarza |
| POST |
/kb/comments/:id/accept_comment |
Zatwierdzenie |
| POST |
/kb/comments/:id/unaccept_comment |
Odrzucenie |
| POST |
/kb/comments/:id/operator_hide |
Ukrycie |
| POST |
/kb/comments/:id/operator_show |
Pokazanie |
| POST |
/kb/comments/:id/set_is_response |
Oznaczenie jako odpowiedź |
| POST |
/kb/comments/:id/set_as_main_response |
Przypięcie jako główna odpowiedź |
| POST |
/kb/comments/create_public_comment |
Komentarz publiczny (bez autoryzacji) |
Autoryzacja: Authorization: Bearer TOKEN (uprawnienie: kb)
| Pole |
Typ |
Wymagane |
Opis |
content |
text |
tak |
Treść komentarza |
commentable_id |
integer |
tak |
ID wpisu |
commentable_type |
string |
tak |
Kb::Entry |
comment_id |
integer |
nie |
ID komentarza nadrzędnego (odpowiedź) |
email |
string |
nie |
E-mail autora (komentarze publiczne) |
username |
string |
nie |
Imię autora (komentarze publiczne) |
private |
boolean |
nie |
Ukryty przed publicznością |
accepted |
boolean |
nie |
Zatwierdzony |
priority |
integer |
nie |
Priorytet |
Filtrowanie
| Parametr |
Opis |
knowledge_base_id |
Filtruj po bazie wiedzy |
accepted |
true/false
|
private |
true/false
|
moderation_status |
pending, approved, rejected
|
created_by_id |
Filtruj po autorze |
Przykład utworzenia
{
"api_token": "TOKEN",
"kb_comment": {
"content": "Bardzo pomocny artykuł, dziękuję!",
"commentable_id": 123,
"commentable_type": "Kb::Entry"
}
}