Custom Page
  • 16 Jun 2022
  • 6 Minutes to read
  • Dark
    Light

Custom Page

  • Dark
    Light

Article summary

Custom Page

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

Custom Page JSON Format

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

NameTypeDescription
idguidId of the custom page.
titlestringTitle of the custom page.
kbIdguidId of the knowledage base.
statusstringAllowed values are "draft", "published".
customUrlstringCustom url of the article.
bodystringContent 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.
modifiedTimetimestampTime when the custom page was last modified.
createdTimedatetimeTime when the custom page was created.

Get the list of Custom Pages

GET kb/customPages

  • Parameters:

NameTypeinRequiredDescription
keywordsstringquerynoSearch keywords.
statusstringquerynoAllowed values are "draft", "published".
kbIdguidquerynoId of the knowledage base.
  • Response:

An array of Custom Page

  • Example

Sample Request:

curl https://api11.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": "\n?\n?\n?    \n?    \n?    \n?    \n?    \n?    \n?    \n?    \n?\n?\n?    <div class="\&quot;header\&quot;">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;header_logo\&quot;"><img src="\&quot;/kb/resources/your_logo.png\&quot;"></div>\n?            <div class="\&quot;header__title\&quot;"><span>Find answers in our Knowledge Base</span></div>\n?            <div class="\&quot;header__search\&quot;">\n?                <input type="\&quot;text\&quot;" class="\&quot;search-input" placeholder="\&quot;Enter" autocomplete="\&quot;off\&quot;">\n?                <i class="\&quot;iconfont"></i>\n?            </div>\n?        </div>\n?    </div>\n?    <div class="\&quot;content\&quot;">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;breadcrumbs\&quot;">\n?                {{breadcrumbs}}\n?            </div>\n?            <div class="\&quot;category-list\&quot;">\n?                {% for category in categories %}\n?                <div class="\&quot;category-list__item\&quot;">\n?                    <div class="\&quot;category-list__item__header\&quot;">\n?                        <i class="\&quot;iconfont"></i>\n?                        <div class="\&quot;category-list__item__name\&quot;"><a href="\&quot;{{category.url}}\&quot;">{{category.name}}</a></div>\n?                          <i class="\&quot;iconfont"></i>\n?                    </div>\n?                    <div class="\&quot;category-list__item__content">\n?                        <div class="\&quot;article-list\&quot;">\n?                            {% for article in articles %}\n?                            {% if category.id == article.category_id %}\n?                            <div class="\&quot;article-list__title\&quot;">\n?                                {% if article.if_featured %}\n?                                <i class="\&quot;iconfont"></i>\n?                                {% endif %}\n?                                <a href="\&quot;{{article.url}}\&quot;">{{article.title}}</a>\n?                            </div>\n?                            {% endif %}\n?                            {% endfor %}\n?                        </div>\n?                    </div>\n?                </div>\n?                {% endfor %}\n?            </div>\n?        </div>\n?    </div>\n?\n?",
      "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:

Custom Page

  • Example

Sample Request:

curl https://api11.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": "\n?\n?\n?    \n?    \n?    \n?    \n?    \n?    \n?    \n?    \n?\n?\n?    <div class="\&quot;header\&quot;">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;header_logo\&quot;"><img src="\&quot;/kb/resources/your_logo.png\&quot;"></div>\n?            <div class="\&quot;header__title\&quot;"><span>Find answers in our Knowledge Base</span></div>\n?            <div class="\&quot;header__search\&quot;">\n?                <input type="\&quot;text\&quot;" class="\&quot;search-input" placeholder="\&quot;Enter" autocomplete="\&quot;off\&quot;">\n?                <i class="\&quot;iconfont"></i>\n?            </div>\n?        </div>\n?    </div>\n?    <div class="\&quot;content\&quot;">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;breadcrumbs\&quot;">\n?                {{breadcrumbs}}\n?            </div>\n?            <div class="\&quot;category-list\&quot;">\n?                {% for category in categories %}\n?                <div class="\&quot;category-list__item\&quot;">\n?                    <div class="\&quot;category-list__item__header\&quot;">\n?                        <i class="\&quot;iconfont"></i>\n?                        <div class="\&quot;category-list__item__name\&quot;"><a href="\&quot;{{category.url}}\&quot;">{{category.name}}</a></div>\n?                          <i class="\&quot;iconfont"></i>\n?                    </div>\n?                    <div class="\&quot;category-list__item__content">\n?                        <div class="\&quot;article-list\&quot;">\n?                            {% for article in articles %}\n?                            {% if category.id == article.category_id %}\n?                            <div class="\&quot;article-list__title\&quot;">\n?                                {% if article.if_featured %}\n?                                <i class="\&quot;iconfont"></i>\n?                                {% endif %}\n?                                <a href="\&quot;{{article.url}}\&quot;">{{article.title}}</a>\n?                            </div>\n?                            {% endif %}\n?                            {% endfor %}\n?                        </div>\n?                    </div>\n?                </div>\n?                {% endfor %}\n?            </div>\n?        </div>\n?    </div>\n?\n?",
  "modifiedTime": "2021-04-09T10:38:47.243Z",
  "createdTime": "2021-04-09T10:38:47.243Z"
} 

Create a new Custom Page

POST kb/customPages

  • Parameters:

NameTypeinRequiredDescription
titlestringbodyyesTitle of the custom page.
kbIdguidbodyyesId of the knowledage base.
statusstringbodyyesAllowed values are "draft", "published".
customUrlstringbodynoCustom url of the article.
bodystringbodynoContent 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:

Custom Page

  • Example

Sample Request:

curl https://api11.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":"\n?\n?\n?    \n?    \n?    \n?    \n?    \n?    \n?    \n?    \n?\n?\n?    <div class="\&quot;header\&quot;">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;header_logo\&quot;"><img src="\&quot;/kb/resources/your_logo.png\&quot;"></div>\n?            <div class="\&quot;header__title\&quot;"><span>Find answers in our Knowledge Base</span></div>\n?            <div class="\&quot;header__search\&quot;">\n?                <input type="\&quot;text\&quot;" class="\&quot;search-input" placeholder="\&quot;Enter" autocomplete="\&quot;off\&quot;">\n?                <i class="\&quot;iconfont"></i>\n?            </div>\n?        </div>\n?    </div>\n?    <div class="\&quot;content\&quot;">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;breadcrumbs\&quot;">\n?                {{breadcrumbs}}\n?            </div>\n?            <div class="\&quot;category-list\&quot;">\n?                {% for category in categories %}\n?                <div class="\&quot;category-list__item\&quot;">\n?                    <div class="\&quot;category-list__item__header\&quot;">\n?                        <i class="\&quot;iconfont"></i>\n?                        <div class="\&quot;category-list__item__name\&quot;"><a href="\&quot;{{category.url}}\&quot;">{{category.name}}</a></div>\n?                          <i class="\&quot;iconfont"></i>\n?                    </div>\n?                    <div class="\&quot;category-list__item__content">\n?                        <div class="\&quot;article-list\&quot;">\n?                            {% for article in articles %}\n?                            {% if category.id == article.category_id %}\n?                            <div class="\&quot;article-list__title\&quot;">\n?                                {% if article.if_featured %}\n?                                <i class="\&quot;iconfont"></i>\n?                                {% endif %}\n?                                <a href="\&quot;{{article.url}}\&quot;">{{article.title}}</a>\n?                            </div>\n?                            {% endif %}\n?                            {% endfor %}\n?                        </div>\n?                    </div>\n?                </div>\n?                {% endfor %}\n?            </div>\n?        </div>\n?    </div>\n?\n?"}' 

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": "\n?\n?\n?    \n?    \n?    \n?    \n?    \n?    \n?    \n?    \n?\n?\n?    <div class="\&quot;header\&quot;">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;header_logo\&quot;"><img src="\&quot;/kb/resources/your_logo.png\&quot;"></div>\n?            <div class="\&quot;header__title\&quot;"><span>Find answers in our Knowledge Base</span></div>\n?            <div class="\&quot;header__search\&quot;">\n?                <input type="\&quot;text\&quot;" class="\&quot;search-input" placeholder="\&quot;Enter" autocomplete="\&quot;off\&quot;">\n?                <i class="\&quot;iconfont"></i>\n?            </div>\n?        </div>\n?    </div>\n?    <div class="\&quot;content\&quot;">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;breadcrumbs\&quot;">\n?                {{breadcrumbs}}\n?            </div>\n?            <div class="\&quot;category-list\&quot;">\n?                {% for category in categories %}\n?                <div class="\&quot;category-list__item\&quot;">\n?                    <div class="\&quot;category-list__item__header\&quot;">\n?                        <i class="\&quot;iconfont"></i>\n?                        <div class="\&quot;category-list__item__name\&quot;"><a href="\&quot;{{category.url}}\&quot;">{{category.name}}</a></div>\n?                          <i class="\&quot;iconfont"></i>\n?                    </div>\n?                    <div class="\&quot;category-list__item__content">\n?                        <div class="\&quot;article-list\&quot;">\n?                            {% for article in articles %}\n?                            {% if category.id == article.category_id %}\n?                            <div class="\&quot;article-list__title\&quot;">\n?                                {% if article.if_featured %}\n?                                <i class="\&quot;iconfont"></i>\n?                                {% endif %}\n?                                <a href="\&quot;{{article.url}}\&quot;">{{article.title}}</a>\n?                            </div>\n?                            {% endif %}\n?                            {% endfor %}\n?                        </div>\n?                    </div>\n?                </div>\n?                {% endfor %}\n?            </div>\n?        </div>\n?    </div>\n?\n?",
  "modifiedTime": "2021-04-09T10:38:47.243Z",
  "createdTime": "2021-04-09T10:38:47.243Z"
} 

Update the Custom Page

PUT kb/customPages/{id}

  • Parameters:

NameTypeinRequiredDescription
titlestringbodyyesTitle of the custom page.
kbIdguidbodyyesId of the knowledage base.
statusstringbodyyesAllowed values are "draft", "published".
customUrlstringbodynoCustom url of the article.
bodystringbodynoContent 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:

Custom Page

  • Example

Sample Request:

curl https://api11.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":"\n?\n?\n?    \n?    \n?    \n?    \n?    \n?    \n?    \n?    \n?\n?\n?    <div class="\&quot;header\&quot;">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;header_logo\&quot;"><img src="\&quot;/kb/resources/your_logo.png\&quot;"></div>\n?            <div class="\&quot;header__title\&quot;"><span>Find answers in our Knowledge Base</span></div>\n?            <div class="\&quot;header__search\&quot;">\n?                <input type="\&quot;text\&quot;" class="\&quot;search-input" placeholder="\&quot;Enter" autocomplete="\&quot;off\&quot;">\n?                <i class="\&quot;iconfont"></i>\n?            </div>\n?        </div>\n?    </div>\n?    <div class="\&quot;content\&quot;">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;breadcrumbs\&quot;">\n?                {{breadcrumbs}}\n?            </div>\n?            <div class="\&quot;category-list\&quot;">\n?                {% for category in categories %}\n?                <div class="\&quot;category-list__item\&quot;">\n?                    <div class="\&quot;category-list__item__header\&quot;">\n?                        <i class="\&quot;iconfont"></i>\n?                        <div class="\&quot;category-list__item__name\&quot;"><a href="\&quot;{{category.url}}\&quot;">{{category.name}}</a></div>\n?                          <i class="\&quot;iconfont"></i>\n?                    </div>\n?                    <div class="\&quot;category-list__item__content">\n?                        <div class="\&quot;article-list\&quot;">\n?                            {% for article in articles %}\n?                            {% if category.id == article.category_id %}\n?                            <div class="\&quot;article-list__title\&quot;">\n?                                {% if article.if_featured %}\n?                                <i class="\&quot;iconfont"></i>\n?                                {% endif %}\n?                                <a href="\&quot;{{article.url}}\&quot;">{{article.title}}</a>\n?                            </div>\n?                            {% endif %}\n?                            {% endfor %}\n?                        </div>\n?                    </div>\n?                </div>\n?                {% endfor %}\n?            </div>\n?        </div>\n?    </div>\n?\n?"}' 

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": "\n?\n?\n?    \n?    \n?    \n?    \n?    \n?    \n?    \n?    \n?\n?\n?    <div class="\&quot;header\&quot;">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;header_logo\&quot;"><img src="\&quot;/kb/resources/your_logo.png\&quot;"></div>\n?            <div class="\&quot;header__title\&quot;"><span>Find answers in our Knowledge Base</span></div>\n?            <div class="\&quot;header__search\&quot;">\n?                <input type="\&quot;text\&quot;" class="\&quot;search-input" placeholder="\&quot;Enter" autocomplete="\&quot;off\&quot;">\n?                <i class="\&quot;iconfont"></i>\n?            </div>\n?        </div>\n?    </div>\n?    <div class="\&quot;content\&quot;">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;breadcrumbs\&quot;">\n?                {{breadcrumbs}}\n?            </div>\n?            <div class="\&quot;category-list\&quot;">\n?                {% for category in categories %}\n?                <div class="\&quot;category-list__item\&quot;">\n?                    <div class="\&quot;category-list__item__header\&quot;">\n?                        <i class="\&quot;iconfont"></i>\n?                        <div class="\&quot;category-list__item__name\&quot;"><a href="\&quot;{{category.url}}\&quot;">{{category.name}}</a></div>\n?                          <i class="\&quot;iconfont"></i>\n?                    </div>\n?                    <div class="\&quot;category-list__item__content">\n?                        <div class="\&quot;article-list\&quot;">\n?                            {% for article in articles %}\n?                            {% if category.id == article.category_id %}\n?                            <div class="\&quot;article-list__title\&quot;">\n?                                {% if article.if_featured %}\n?                                <i class="\&quot;iconfont"></i>\n?                                {% endif %}\n?                                <a href="\&quot;{{article.url}}\&quot;">{{article.title}}</a>\n?                            </div>\n?                            {% endif %}\n?                            {% endfor %}\n?                        </div>\n?                    </div>\n?                </div>\n?                {% endfor %}\n?            </div>\n?        </div>\n?    </div>\n?\n?",
  "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://api11.comm100.io/v4/kb/customPages/87a9aac0-1f99-eb11-a80f-00155d081c1b \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content


Was this article helpful?

What's Next