Design
- 16 Jun 2022
- 3 Minutes to read
- Print
- DarkLight
Design
- Updated on 16 Jun 2022
- 3 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Design
You need the Manage design permission to manage design.
Designs
- Designs ManageGET kb/designs
- Get the list of DesignsGET kb/designs/{id}
- Get a single DesignPUT kb/designs/{id}
- Update the Design
Design JSON Format
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". |
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. |
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 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
[
{
"id": "8aa9aac0-1f99-eb11-a80f-00155d081c1b",
"pageType": "articlePage",
"kbId": "b2754e68-b380-4a61-9c5b-a9570f1a4fcc",
"body": "\n?\n?\n? \n? \n? \n? \n? \n? \n? \n? \n?\n?\n? <div class="\"header">\n? <div class="\"container\"">\n? <div class="\"header__logo"><img src="\"/kb/resources/your_logo.png\""></div>\n? <div class="\"header__search\"">\n? <input type="\"text\"" class="\"search-input" placeholder="\"Enter" autocomplete="\"off\"">\n? <i class="\"iconfont"></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" title="\"Helpful\""></a>\n? <a class="\"article__feedbackbtn" title="\"Not"></a>\n?\n? <div class="\"article__feedbacklabel"><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 rel="\"noopener" target="\"_blank\"\n?" hreflang="\"en\""><svg viewBox="\"0" focusable="\"false\"">\n? \n? </svg></a>\n? </div>\n? {% endif %}\n? </div>\n? </div>\n? \n?\n?",
"modifiedTime": "2021-04-09T10:38:47.25Z",
"modifiedById": "21b5d834-b98b-48ba-ae45-0d1316cb382f"
}
]
Get a single Design
GET kb/designs/{id}
Parameters:
No Parameters
Response:
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
{
"id": "8aa9aac0-1f99-eb11-a80f-00155d081c1b",
"pageType": "articlePage",
"kbId": "b2754e68-b380-4a61-9c5b-a9570f1a4fcc",
"body": "\n?\n?\n? \n? \n? \n? \n? \n? \n? \n? \n?\n?\n? <div class="\"header">\n? <div class="\"container\"">\n? <div class="\"header__logo"><img src="\"/kb/resources/your_logo.png\""></div>\n? <div class="\"header__search\"">\n? <input type="\"text\"" class="\"search-input" placeholder="\"Enter" autocomplete="\"off\"">\n? <i class="\"iconfont"></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" title="\"Helpful\""></a>\n? <a class="\"article__feedbackbtn" title="\"Not"></a>\n?\n? <div class="\"article__feedbacklabel"><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 rel="\"noopener" target="\"_blank\"\n?" hreflang="\"en\""><svg viewBox="\"0" focusable="\"false\"">\n? \n? </svg></a>\n? </div>\n? {% endif %}\n? </div>\n? </div>\n? \n?\n?",
"modifiedTime": "2021-04-09T10:38:47.25Z",
"modifiedById": "21b5d834-b98b-48ba-ae45-0d1316cb382f"
}
Update the Design
PUT kb/designs/{id}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
pageType | string | body | no | Allowed values are "cssFile", "categoryPage", "articlePage", "searchResultPage", "pageNotFound". |
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":"\n?\n?\n? \n? \n? \n? \n? \n? \n? \n? \n?\n?\n? <div class="\"header">\n? <div class="\"container\"">\n? <div class="\"header__logo"><img src="\"/kb/resources/your_logo.png\""></div>\n? <div class="\"header__search\"">\n? <input type="\"text\"" class="\"search-input" placeholder="\"Enter" autocomplete="\"off\"">\n? <i class="\"iconfont"></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" title="\"Helpful\""></a>\n? <a class="\"article__feedbackbtn" title="\"Not"></a>\n?\n? <div class="\"article__feedbacklabel"><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 rel="\"noopener" target="\"_blank\"\n?" hreflang="\"en\""><svg viewBox="\"0" focusable="\"false\"">\n? \n? </svg></a>\n? </div>\n? {% endif %}\n? </div>\n? </div>\n? \n?\n?","modifiedById":"21b5d834-b98b-48ba-ae45-0d1316cb382f"}'
Response:
HTTP/1.1 200 OK
{
"id": "8aa9aac0-1f99-eb11-a80f-00155d081c1b",
"pageType": "articlePage",
"kbId": "b2754e68-b380-4a61-9c5b-a9570f1a4fcc",
"body": "\n?\n?\n? \n? \n? \n? \n? \n? \n? \n? \n?\n?\n? <div class="\"header">\n? <div class="\"container\"">\n? <div class="\"header__logo"><img src="\"/kb/resources/your_logo.png\""></div>\n? <div class="\"header__search\"">\n? <input type="\"text\"" class="\"search-input" placeholder="\"Enter" autocomplete="\"off\"">\n? <i class="\"iconfont"></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" title="\"Helpful\""></a>\n? <a class="\"article__feedbackbtn" title="\"Not"></a>\n?\n? <div class="\"article__feedbacklabel"><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 rel="\"noopener" target="\"_blank\"\n?" hreflang="\"en\""><svg viewBox="\"0" focusable="\"false\"">\n? \n? </svg></a>\n? </div>\n? {% endif %}\n? </div>\n? </div>\n? \n?\n?",
"modifiedTime": "2021-04-09T10:38:47.25Z",
"modifiedById": "21b5d834-b98b-48ba-ae45-0d1316cb382f"
}
Was this article helpful?