KnowledgeBase_Design
You need the Manage design permission to manage design.
Designs
- Designs Manage
GET kb/designs
GET kb/designs/{id}
PUT kb/designs/{id}
Model
KnowledgeBase_Design JSON Format
KnowledgeBase_Design is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id |
guid | Id of the design. |
pageType |
string | Allowed values are "cssFile", "categoryPage", "articlePage", "searchResultPage", "pageNotFound", "livechatSideWindow". |
kbId |
guid | Id of the knowledage base. |
body |
string | Content of the design. You can pass both plaintext and base64 encode text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. |
modifiedTime |
timestamp | Time when the design was last modified. |
modifiedById |
guid | Id of the agent who modified the design. |
Endpoint
Get the list of Designs
GET kb/designs
Parameters:
Name | Type | In | Required | Description |
---|---|---|---|---|
kbId |
guid | query | no | Id of the knowledage base. |
Response:
An array of KnowledgeBase_Design
Example
Sample Request:
curl https://api11.comm100.io/v4/kb/designs \
-X
'GET'
\
-H
'Authorization: Bearer {access_token}'
\
Response:
HTTP/1.1 200 OK
Get a single KnowledgeBase_Design
GET kb/designs/{id}
Example
Sample Request:
curl https://api11.comm100.io/v4/kb/designs/8aa9aac0-1f99-eb11-a80f-00155d081c1b \
-X
'GET'
\
-H
'Authorization: Bearer {access_token}'
\
Response:
HTTP/1.1 200 OK
Update the KnowledgeBase_Design
PUT kb/designs/{id}
Parameters:
Name | Type | In | Required | Description |
---|---|---|---|---|
pageType |
string | body | no | Allowed values are "cssFile", "categoryPage", "articlePage", "searchResultPage", "pageNotFound", "livechatSideWindow". |
kbId |
guid | body | yes | Id of the knowledage base. |
body |
string | body | no | Content of the design. You can pass both plaintext and base64 encode text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. |
modifiedById |
guid | body | no | Id of the agent who modified the design. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/kb/designs/8aa9aac0-1f99-eb11-a80f-00155d081c1b \
-X
'PUT'
\
-H
'Authorization: Bearer {access_token}'
\
-H
'Content-Type: application/json'
\
-D
'{"pageType":"articlePage","kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","body":"<!DOCTYPE html>\n?<html>\n?<head>\n? <title>{{title}}</title>\n? <meta charset=\"UTF-8\" />\n? <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\n? <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n? <script type=\"text/javascript\" src=\"/kb/resources/js/jquery-3.6.0.min.js\"></script>\n? <script type=\"text/javascript\" src=\"/kb/resources/js/common.js?v=gbrqhch3oj0lob\"></script>\n? <link href=\"{{cssUrl}}\" rel=\"stylesheet\" type=\"text/css\" />\n? <link rel=\"canonical\" href=\"{{url}}\" />\n?</head>\n?<body>\n? <div class=\"header header--compact\">\n? <div class=\"container\">\n? <div class=\"header__logo header__logo--compact\"><img src=\"/kb/resources/your_logo.png\" /></div>\n? <div class=\"header__search\">\n? <input type=\"text\" class=\"search-input header__searchinput\" placeholder=\"Enter your question...\" autocomplete=\"off\" />\n? <i class=\"iconfont icon-search\"></i>\n? </div>\n? </div>\n? </div>\n? <div class=\"content\">\n? <div class=\"container\">\n? <div class=\"breadcrumbs\">\n? {{breadcrumbs}}\n? </div>\n? <div class=\"article\">\n? <div class=\"article__title \">\n? {{title}}\n? </div>\n? <div class=\"article__content\">\n? {{body}}\n? </div>\n? {% if ifAllowFeedback %}\n? <div class=\"clear\"></div>\n? <div class=\"article__feedback\">\n? <span>Helpful?</span>\n? <a class=\"article__feedbackbtn iconfont icon-helpful\" title=\"Helpful\" href=\"javascript:void(0)\" onclick=\"calculateHelpful('{{id}}',true)\"></a>\n? <a class=\"article__feedbackbtn iconfont icon-not-helpful\" title=\"Not helpful\" href=\"javascipt:void(0)\" onclick=\"calculateHelpful('{{id}}', false)\"></a>\n?\n? <div class=\"article__feedbacklabel {% if helpful <= 0 or notHelpful <= 0 %} collapse {% endif %}\"><span class=\"article__feedbackcount\">{{feedBackCount | round: 2}}</span>% of people found this helpful</div>\n?\n? </div>\n? {% endif %}\n? </div>\n? {% if ifShowPoweredBy %}\n? <div class=\"poweredby\">\n? <a id=\"poweredby\" rel=\"noopener noreferrer nofollow\" target=\"_blank\"\n? href=\"https://www.comm100.com/?utm_source=Poweredby&utm_medium=KB&utm_campaign=BottomLink\"\n? hreflang=\"en\" aria-label=\"This knowledge base solution is powered by Comm100.\"><svg viewBox=\"0 0 75.1 13.5\"\n? focusable=\"false\" style=\"width: 75.1px;\">\n? <polygon points=\"9.1,4.9 5.4,4.9 7.8,0.3 3,0.3 0,8 3.6,8 1.6,13.5\"></polygon>\n? <path\n? d=\"M33.6,2.5c0.5,0.1,1,0.4,1.4,0.8c0.3-0.3,0.7-0.6,1-0.8c-0.5-0.6-1.3-1-2.1-1.2c-2.1-0.4-4.1,1-4.5,3c-0.4,2.1,1,4.1,3,4.5c0.9,0.2,1.7,0,2.4-0.3c-0.2-0.3-0.5-0.8-0.6-1.1c-0.5,0.1-1,0.2-1.6,0.1c-1.4-0.3-2.3-1.6-2-3C30.9,3.1,32.2,2.2,33.6,2.5z M23.1,6.2C23,6.6,22.9,7,22.8,7.3c-0.1-0.3-0.2-0.8-0.3-1.2l-1.1-3.4H20l2.1,5.6c0.1,0.2,0.1,0.2,0.1,0.3c0,0.2-0.5,1.4-1.8,1.9l0.3,1.1c0.3-0.1,0.9-0.3,1.4-0.8C22.8,10.1,23.3,9,24,7l1.4-4.2h-1.3L23.1,6.2zM38,3c-1.6,0-2.9,1.3-2.9,2.9c0,1.6,1.3,2.9,2.9,2.9s2.9-1.3,2.9-2.9C40.9,4.3,39.6,3,38,3z M38,7.7c-1,0-1.8-0.8-1.8-1.8S37,4.1,38,4.1s1.8,0.8,1.8,1.8S39.1,7.7,38,7.7z M17.7,2.6c-0.8,0-1.4,0.4-1.8,1L15.8,0h-1.3v8.8h1.1l0.1-0.9c0.4,0.7,1,1,1.8,1c1.2,0,2.5-1,2.5-3.2C20,3.8,19.1,2.6,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.7h1V1.1h-1.8V2.1z\">\n? </path>\n? </svg></a>\n? </div>\n? {% endif %}\n? </div>\n? </div>\n? <script type=\"text/javascript\">\n? window.onload = function () {\n? var articleId = $(\"#id\").val();\n? var hasComment = getCookie(\"commentlist\");\n? if (hasComment != \"\" && hasComment && hasComment.indexOf(articleId) >= 0) {\n? $('.article__feedbackbtn').addClass(\"disabled\");\n? }\n? }\n? </script>\n?</body>\n?</html>","modifiedById":"21b5d834-b98b-48ba-ae45-0d1316cb382f"}'
Response:
HTTP/1.1 200 OK