Custom Page

You need the Manage custom pages permission to manage custom pages.

Custom Pages
- Custom Pages Manage
GET kb/customPages
GET kb/customPages/{id}
POST kb/customPages
PUT kb/customPages/{id}
DELETE kb/customPages/{id}
Model
Custom Page JSON Format

Custom Page is represented as simple flat JSON objects with the following keys:

Name Type Description
id guid Id of the custom page.
title string Title of the custom page.
kbId guid Id of the knowledage base.
status string Allowed values are "draft", "published".
customUrl string Custom url of the article.
body string Content of the custom page. 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 custom page was last modified.
createdTime datetime Time when the custom page was created.
Endpoint
Get the list of Custom Pages

GET kb/customPages

Parameters:
Name Type In Required Description
keywords string query no Search keywords.
status string query no Allowed values are "draft", "published".
kbId guid query no Id of the knowledage base.
Response:

An array of   Custom Page

Example

Sample Request:

curl https://api15.comm100.io/v4/kb/customPages \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

[{"id":"87a9aac0-1f99-eb11-a80f-00155d081c1b","title":"Sample Custom Page","kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","status":"draft","customUrl":"sample-custom-page","body":"<!DOCTYPE html>\r\n?<html>\r\n?<head>\r\n? <title>{{title}}</title>\r\n? <meta charset=\"UTF-8\" />\r\n? <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\r\n? <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\r\n? <script type=\"text/javascript\" src=\"/kb/resources/js/jquery-1.10.2.min.js\"></script>\r\n? <script type=\"text/javascript\" src=\"/kb/resources/js/common.js?v=gbrqhch3oj0lob1m2w\"></script>\r\n? <link href=\"{{cssUrl}}\" rel=\"stylesheet\" type=\"text/css\" />\r\n? <link rel=\"canonical\" href=\"{{url}}\" />\r\n?</head>\r\n?<body>\r\n? <div class=\"header\">\r\n? <div class=\"container\">\r\n? <div class=\"header_logo\"><img src=\"/kb/resources/your_logo.png\" /></div>\r\n? <div class=\"header__title\"><span>Find answers in our Knowledge Base</span></div>\r\n? <div class=\"header__search\">\r\n? <input type=\"text\" class=\"search-input header__searchinput\" placeholder=\"Enter your question...\" autocomplete=\"off\" />\r\n? <i class=\"iconfont icon-search\"></i>\r\n? </div>\r\n? </div>\r\n? </div>\r\n? <div class=\"content\">\r\n? <div class=\"container\">\r\n? <div class=\"breadcrumbs\">\r\n? {{breadcrumbs}}\r\n? </div>\r\n? <div class=\"category-list\">\r\n? {% for category in categories %}\r\n? <div class=\"category-list__item\">\r\n? <div class=\"category-list__item__header\" onclick=\"showHide();\">\r\n? <i class=\"iconfont icon-folder\"></i>\r\n? <div class=\"category-list__item__name\"><a href=\"{{category.url}}\">{{category.name}}</a></div>\r\n? <i class=\"iconfont icon-fold\"></i>\r\n? </div>\r\n? <div class=\"category-list__item__content collapse\">\r\n? <div class=\"article-list\" id=\"{{category.id}}\">\r\n? {% for article in articles %}\r\n? {% if category.id == article.category_id %}\r\n? <div class=\"article-list__title\">\r\n? {% if article.if_featured %}\r\n? <i class=\"iconfont icon-feature\"></i>\r\n? {% endif %}\r\n? <a href=\"{{article.url}}\">{{article.title}}</a>\r\n? </div>\r\n? {% endif %}\r\n? {% endfor %}\r\n? </div>\r\n? </div>\r\n? </div>\r\n? {% endfor %}\r\n? </div>\r\n? </div>\r\n? </div>\r\n?</body>\r\n?</html>","modifiedTime":"2021-04-09T10:38:47.243Z","createdTime":"2021-04-09T10:38:47.243Z"}]
Get a single Custom Page

GET kb/customPages/{id}

Parameters:
No Parameters
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/kb/customPages/87a9aac0-1f99-eb11-a80f-00155d081c1b \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

{"id":"87a9aac0-1f99-eb11-a80f-00155d081c1b","title":"Sample Custom Page","kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","status":"draft","customUrl":"sample-custom-page","body":"<!DOCTYPE html>\r\n?<html>\r\n?<head>\r\n? <title>{{title}}</title>\r\n? <meta charset=\"UTF-8\" />\r\n? <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\r\n? <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\r\n? <script type=\"text/javascript\" src=\"/kb/resources/js/jquery-1.10.2.min.js\"></script>\r\n? <script type=\"text/javascript\" src=\"/kb/resources/js/common.js?v=gbrqhch3oj0lob1m2w\"></script>\r\n? <link href=\"{{cssUrl}}\" rel=\"stylesheet\" type=\"text/css\" />\r\n? <link rel=\"canonical\" href=\"{{url}}\" />\r\n?</head>\r\n?<body>\r\n? <div class=\"header\">\r\n? <div class=\"container\">\r\n? <div class=\"header_logo\"><img src=\"/kb/resources/your_logo.png\" /></div>\r\n? <div class=\"header__title\"><span>Find answers in our Knowledge Base</span></div>\r\n? <div class=\"header__search\">\r\n? <input type=\"text\" class=\"search-input header__searchinput\" placeholder=\"Enter your question...\" autocomplete=\"off\" />\r\n? <i class=\"iconfont icon-search\"></i>\r\n? </div>\r\n? </div>\r\n? </div>\r\n? <div class=\"content\">\r\n? <div class=\"container\">\r\n? <div class=\"breadcrumbs\">\r\n? {{breadcrumbs}}\r\n? </div>\r\n? <div class=\"category-list\">\r\n? {% for category in categories %}\r\n? <div class=\"category-list__item\">\r\n? <div class=\"category-list__item__header\" onclick=\"showHide();\">\r\n? <i class=\"iconfont icon-folder\"></i>\r\n? <div class=\"category-list__item__name\"><a href=\"{{category.url}}\">{{category.name}}</a></div>\r\n? <i class=\"iconfont icon-fold\"></i>\r\n? </div>\r\n? <div class=\"category-list__item__content collapse\">\r\n? <div class=\"article-list\" id=\"{{category.id}}\">\r\n? {% for article in articles %}\r\n? {% if category.id == article.category_id %}\r\n? <div class=\"article-list__title\">\r\n? {% if article.if_featured %}\r\n? <i class=\"iconfont icon-feature\"></i>\r\n? {% endif %}\r\n? <a href=\"{{article.url}}\">{{article.title}}</a>\r\n? </div>\r\n? {% endif %}\r\n? {% endfor %}\r\n? </div>\r\n? </div>\r\n? </div>\r\n? {% endfor %}\r\n? </div>\r\n? </div>\r\n? </div>\r\n?</body>\r\n?</html>","modifiedTime":"2021-04-09T10:38:47.243Z","createdTime":"2021-04-09T10:38:47.243Z"}
Create a new Custom Page

POST kb/customPages

Parameters:
Name Type In Required Description
title string body yes Title of the custom page.
kbId guid body yes Id of the knowledage base.
status string body yes Allowed values are "draft", "published".
customUrl string body no Custom url of the article.
body string body no Content of the custom page. 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.
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/kb/customPages \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"title":"Sample Custom Page","kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","status":"draft","customUrl":"sample-custom-page","body":"<!DOCTYPE html>\r\n?<html>\r\n?<head>\r\n? <title>{{title}}</title>\r\n? <meta charset=\"UTF-8\" />\r\n? <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\r\n? <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\r\n? <script type=\"text/javascript\" src=\"/kb/resources/js/jquery-1.10.2.min.js\"></script>\r\n? <script type=\"text/javascript\" src=\"/kb/resources/js/common.js?v=gbrqhch3oj0lob1m2w\"></script>\r\n? <link href=\"{{cssUrl}}\" rel=\"stylesheet\" type=\"text/css\" />\r\n? <link rel=\"canonical\" href=\"{{url}}\" />\r\n?</head>\r\n?<body>\r\n? <div class=\"header\">\r\n? <div class=\"container\">\r\n? <div class=\"header_logo\"><img src=\"/kb/resources/your_logo.png\" /></div>\r\n? <div class=\"header__title\"><span>Find answers in our Knowledge Base</span></div>\r\n? <div class=\"header__search\">\r\n? <input type=\"text\" class=\"search-input header__searchinput\" placeholder=\"Enter your question...\" autocomplete=\"off\" />\r\n? <i class=\"iconfont icon-search\"></i>\r\n? </div>\r\n? </div>\r\n? </div>\r\n? <div class=\"content\">\r\n? <div class=\"container\">\r\n? <div class=\"breadcrumbs\">\r\n? {{breadcrumbs}}\r\n? </div>\r\n? <div class=\"category-list\">\r\n? {% for category in categories %}\r\n? <div class=\"category-list__item\">\r\n? <div class=\"category-list__item__header\" onclick=\"showHide();\">\r\n? <i class=\"iconfont icon-folder\"></i>\r\n? <div class=\"category-list__item__name\"><a href=\"{{category.url}}\">{{category.name}}</a></div>\r\n? <i class=\"iconfont icon-fold\"></i>\r\n? </div>\r\n? <div class=\"category-list__item__content collapse\">\r\n? <div class=\"article-list\" id=\"{{category.id}}\">\r\n? {% for article in articles %}\r\n? {% if category.id == article.category_id %}\r\n? <div class=\"article-list__title\">\r\n? {% if article.if_featured %}\r\n? <i class=\"iconfont icon-feature\"></i>\r\n? {% endif %}\r\n? <a href=\"{{article.url}}\">{{article.title}}</a>\r\n? </div>\r\n? {% endif %}\r\n? {% endfor %}\r\n? </div>\r\n? </div>\r\n? </div>\r\n? {% endfor %}\r\n? </div>\r\n? </div>\r\n? </div>\r\n?</body>\r\n?</html>"}'

Response:

 HTTP/1.1 201 Created

{"id":"87a9aac0-1f99-eb11-a80f-00155d081c1b","title":"Sample Custom Page","kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","status":"draft","customUrl":"sample-custom-page","body":"<!DOCTYPE html>\r\n?<html>\r\n?<head>\r\n? <title>{{title}}</title>\r\n? <meta charset=\"UTF-8\" />\r\n? <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\r\n? <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\r\n? <script type=\"text/javascript\" src=\"/kb/resources/js/jquery-1.10.2.min.js\"></script>\r\n? <script type=\"text/javascript\" src=\"/kb/resources/js/common.js?v=gbrqhch3oj0lob1m2w\"></script>\r\n? <link href=\"{{cssUrl}}\" rel=\"stylesheet\" type=\"text/css\" />\r\n? <link rel=\"canonical\" href=\"{{url}}\" />\r\n?</head>\r\n?<body>\r\n? <div class=\"header\">\r\n? <div class=\"container\">\r\n? <div class=\"header_logo\"><img src=\"/kb/resources/your_logo.png\" /></div>\r\n? <div class=\"header__title\"><span>Find answers in our Knowledge Base</span></div>\r\n? <div class=\"header__search\">\r\n? <input type=\"text\" class=\"search-input header__searchinput\" placeholder=\"Enter your question...\" autocomplete=\"off\" />\r\n? <i class=\"iconfont icon-search\"></i>\r\n? </div>\r\n? </div>\r\n? </div>\r\n? <div class=\"content\">\r\n? <div class=\"container\">\r\n? <div class=\"breadcrumbs\">\r\n? {{breadcrumbs}}\r\n? </div>\r\n? <div class=\"category-list\">\r\n? {% for category in categories %}\r\n? <div class=\"category-list__item\">\r\n? <div class=\"category-list__item__header\" onclick=\"showHide();\">\r\n? <i class=\"iconfont icon-folder\"></i>\r\n? <div class=\"category-list__item__name\"><a href=\"{{category.url}}\">{{category.name}}</a></div>\r\n? <i class=\"iconfont icon-fold\"></i>\r\n? </div>\r\n? <div class=\"category-list__item__content collapse\">\r\n? <div class=\"article-list\" id=\"{{category.id}}\">\r\n? {% for article in articles %}\r\n? {% if category.id == article.category_id %}\r\n? <div class=\"article-list__title\">\r\n? {% if article.if_featured %}\r\n? <i class=\"iconfont icon-feature\"></i>\r\n? {% endif %}\r\n? <a href=\"{{article.url}}\">{{article.title}}</a>\r\n? </div>\r\n? {% endif %}\r\n? {% endfor %}\r\n? </div>\r\n? </div>\r\n? </div>\r\n? {% endfor %}\r\n? </div>\r\n? </div>\r\n? </div>\r\n?</body>\r\n?</html>","modifiedTime":"2021-04-09T10:38:47.243Z","createdTime":"2021-04-09T10:38:47.243Z"}
Update the Custom Page

PUT kb/customPages/{id}

Parameters:
Name Type In Required Description
title string body yes Title of the custom page.
kbId guid body yes Id of the knowledage base.
status string body yes Allowed values are "draft", "published".
customUrl string body no Custom url of the article.
body string body no Content of the custom page. 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.
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/kb/customPages/87a9aac0-1f99-eb11-a80f-00155d081c1b \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"title":"Sample Custom Page","kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","status":"draft","customUrl":"sample-custom-page","body":"<!DOCTYPE html>\r\n?<html>\r\n?<head>\r\n? <title>{{title}}</title>\r\n? <meta charset=\"UTF-8\" />\r\n? <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\r\n? <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\r\n? <script type=\"text/javascript\" src=\"/kb/resources/js/jquery-1.10.2.min.js\"></script>\r\n? <script type=\"text/javascript\" src=\"/kb/resources/js/common.js?v=gbrqhch3oj0lob1m2w\"></script>\r\n? <link href=\"{{cssUrl}}\" rel=\"stylesheet\" type=\"text/css\" />\r\n? <link rel=\"canonical\" href=\"{{url}}\" />\r\n?</head>\r\n?<body>\r\n? <div class=\"header\">\r\n? <div class=\"container\">\r\n? <div class=\"header_logo\"><img src=\"/kb/resources/your_logo.png\" /></div>\r\n? <div class=\"header__title\"><span>Find answers in our Knowledge Base</span></div>\r\n? <div class=\"header__search\">\r\n? <input type=\"text\" class=\"search-input header__searchinput\" placeholder=\"Enter your question...\" autocomplete=\"off\" />\r\n? <i class=\"iconfont icon-search\"></i>\r\n? </div>\r\n? </div>\r\n? </div>\r\n? <div class=\"content\">\r\n? <div class=\"container\">\r\n? <div class=\"breadcrumbs\">\r\n? {{breadcrumbs}}\r\n? </div>\r\n? <div class=\"category-list\">\r\n? {% for category in categories %}\r\n? <div class=\"category-list__item\">\r\n? <div class=\"category-list__item__header\" onclick=\"showHide();\">\r\n? <i class=\"iconfont icon-folder\"></i>\r\n? <div class=\"category-list__item__name\"><a href=\"{{category.url}}\">{{category.name}}</a></div>\r\n? <i class=\"iconfont icon-fold\"></i>\r\n? </div>\r\n? <div class=\"category-list__item__content collapse\">\r\n? <div class=\"article-list\" id=\"{{category.id}}\">\r\n? {% for article in articles %}\r\n? {% if category.id == article.category_id %}\r\n? <div class=\"article-list__title\">\r\n? {% if article.if_featured %}\r\n? <i class=\"iconfont icon-feature\"></i>\r\n? {% endif %}\r\n? <a href=\"{{article.url}}\">{{article.title}}</a>\r\n? </div>\r\n? {% endif %}\r\n? {% endfor %}\r\n? </div>\r\n? </div>\r\n? </div>\r\n? {% endfor %}\r\n? </div>\r\n? </div>\r\n? </div>\r\n?</body>\r\n?</html>"}'

Response:

 HTTP/1.1 200 OK

{"id":"87a9aac0-1f99-eb11-a80f-00155d081c1b","title":"Sample Custom Page","kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","status":"draft","customUrl":"sample-custom-page","body":"<!DOCTYPE html>\r\n?<html>\r\n?<head>\r\n? <title>{{title}}</title>\r\n? <meta charset=\"UTF-8\" />\r\n? <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\r\n? <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\r\n? <script type=\"text/javascript\" src=\"/kb/resources/js/jquery-1.10.2.min.js\"></script>\r\n? <script type=\"text/javascript\" src=\"/kb/resources/js/common.js?v=gbrqhch3oj0lob1m2w\"></script>\r\n? <link href=\"{{cssUrl}}\" rel=\"stylesheet\" type=\"text/css\" />\r\n? <link rel=\"canonical\" href=\"{{url}}\" />\r\n?</head>\r\n?<body>\r\n? <div class=\"header\">\r\n? <div class=\"container\">\r\n? <div class=\"header_logo\"><img src=\"/kb/resources/your_logo.png\" /></div>\r\n? <div class=\"header__title\"><span>Find answers in our Knowledge Base</span></div>\r\n? <div class=\"header__search\">\r\n? <input type=\"text\" class=\"search-input header__searchinput\" placeholder=\"Enter your question...\" autocomplete=\"off\" />\r\n? <i class=\"iconfont icon-search\"></i>\r\n? </div>\r\n? </div>\r\n? </div>\r\n? <div class=\"content\">\r\n? <div class=\"container\">\r\n? <div class=\"breadcrumbs\">\r\n? {{breadcrumbs}}\r\n? </div>\r\n? <div class=\"category-list\">\r\n? {% for category in categories %}\r\n? <div class=\"category-list__item\">\r\n? <div class=\"category-list__item__header\" onclick=\"showHide();\">\r\n? <i class=\"iconfont icon-folder\"></i>\r\n? <div class=\"category-list__item__name\"><a href=\"{{category.url}}\">{{category.name}}</a></div>\r\n? <i class=\"iconfont icon-fold\"></i>\r\n? </div>\r\n? <div class=\"category-list__item__content collapse\">\r\n? <div class=\"article-list\" id=\"{{category.id}}\">\r\n? {% for article in articles %}\r\n? {% if category.id == article.category_id %}\r\n? <div class=\"article-list__title\">\r\n? {% if article.if_featured %}\r\n? <i class=\"iconfont icon-feature\"></i>\r\n? {% endif %}\r\n? <a href=\"{{article.url}}\">{{article.title}}</a>\r\n? </div>\r\n? {% endif %}\r\n? {% endfor %}\r\n? </div>\r\n? </div>\r\n? </div>\r\n? {% endfor %}\r\n? </div>\r\n? </div>\r\n? </div>\r\n?</body>\r\n?</html>","modifiedTime":"2021-04-09T10:38:47.243Z","createdTime":"2021-04-09T10:38:47.243Z"}
Remove the Custom Page

DELETE kb/customPages/{id}

Parameters:
No Parameters
Response:

No Content

Example

Sample Request:

curl https://api15.comm100.io/v4/kb/customPages/87a9aac0-1f99-eb11-a80f-00155d081c1b \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 204 No Content