This section describes the new FAQ CRUD operations available via the GenericInterface webservice in OTRS. These operations allow external systems to create, read, update, delete, and search FAQ articles using REST API endpoints.
Overview
The FAQ GenericInterface connector provides the following operations:
-
FAQCreate: Create a new FAQ article
-
FAQGet: Retrieve details of a specific FAQ article
-
FAQUpdate: Update an existing FAQ article
-
FAQDelete: Delete an FAQ article
-
FAQSearch: Search for FAQ articles
Each operation is available via REST endpoints and can be integrated with external systems for automated knowledge base management.
FAQCreate Operation
Use the FAQCreate operation to create a new FAQ article.
Required fields:
– Title
– CategoryID
– LanguageID
– StateID
– Field1 (main content)
Optional fields:
– Keywords
– ValidID
– Custom fields
Example request (JSON, with inline image in HTML and authentication):
{
"UserLogin": "apiuser",
"Password": "apipassword",
"FAQ": {
"Title": "How to reset password?",
"CategoryID": 1,
"LanguageID": 2,
"StateID": 3,
"Field1": "<p>To reset your password, click <b>Forgot Password</b>.<br><img src=\"cid:reset-password-image\" alt=\"Reset Password Screenshot\"></p>",
"Keywords": "password,reset,login"
},
"Attachment": [
{
"Content": "<base64-encoded-image-data>",
"ContentType": "image/png",
"Filename": "reset-password.png",
"Inline": 1,
"ContentID": "reset-password-image"
}
]
}
Example response:
{
"Success": 1,
"ErrorMessage": "",
"Data": {
"ItemID": 42,
"Number": 100042
}
}
FAQGet Operation
Use the FAQGet operation to retrieve details of a specific FAQ article by FAQID.
Example request (with authentication):
{
"UserLogin": "apiuser",
"Password": "apipassword",
"ItemID": "42"
}
Example response:
{
"Success": 1,
"ErrorMessage": "",
"Data": {
"FAQ": [
{
"ItemID": 42,
"FAQID": 42,
"Number": 100042,
"CategoryID": 1,
"CategoryName": "General",
"LanguageID": 2,
"Language": "en",
"Title": "How to reset password?",
"Field1": "<p>To reset your password, click <b>Forgot Password</b>.<br><img src=\"cid:reset-password-image\"></p>",
"Keywords": "password,reset,login",
"Attachment": [
{
"ContentType": "image/png",
"Filename": "reset-password.png",
"FilesizeRaw": 12345,
"Content": "<base64-encoded-image-data>",
"Inline": 1
}
],
"DynamicField": [
{
"Name": "Priority",
"Value": "High"
}
]
}
]
}
}
FAQUpdate Operation
Use the FAQUpdate operation to update an existing FAQ article.
Required fields:
– FAQID
– Any fields to update (e.g., Title, Field1, etc.)
Example request (updating HTML and inline image, with authentication):
{
"UserLogin": "apiuser",
"Password": "apipassword",
"ItemID": 42,
"FAQ": {
"Title": "How to reset your password?",
"Field1": "<p>Updated instructions.<br><img src=\"cid:new-image\" alt=\"New Screenshot\"></p>"
},
"Attachment": [
{
"Content": "<base64-encoded-image-data>",
"ContentType": "image/png",
"Filename": "new-screenshot.png",
"Inline": 1,
"ContentID": "new-image"
}
]
}
Example response:
{
"Success": 1,
"ErrorMessage": "",
"Data": {
"ItemID": 42,
"Number": 100042
}
}
FAQDelete Operation
Use the FAQDelete operation to delete an FAQ article by FAQID.
Example request (with authentication):
{
"UserLogin": "apiuser",
"Password": "apipassword",
"ItemID": 42
}
Example response:
{
"Success": 1,
"ErrorMessage": "",
"Data": {
"ItemID": 42
}
}
FAQSearch Operation
Use the FAQSearch operation to search for FAQ articles by keywords, category, language, or other criteria.
Example request (with authentication):
{
"UserLogin": "apiuser",
"Password": "apipassword",
"Keywords": "password",
"CategoryID": 1
}
Example response:
{
"Success": 1,
"ErrorMessage": "",
"Data": {
"ItemIDs": [42, 43, 44]
}
}
Configuration
To enable the FAQ GenericInterface connector, import the provided YAML configuration file (see GenericFAQConnectorREST_CRUD.yml).
Testing
Sample Postman collections are provided in the development folder for testing all FAQ CRUD operations. See GenericFAQConnector.postman_collection.json for ready-to-use API requests.
See Also
-
FAQ Category
-
FAQ Language
-
Import/Export
-
System Configuration
For further details, refer to the OTRS admin documentation and the webservice configuration guides.
