Design

Prev Next

Design

You need the Manage design permission to manage 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="\&quot;header">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;header__logo"><img src="\&quot;/kb/resources/your_logo.png\&quot;"></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;article\&quot;">\n?                <div class="\&quot;article__title">\n?                    {{title}}\n?                </div>\n?                <div class="\&quot;article__content\&quot;">\n?                    {{body}}\n?                </div>\n?                {% if ifAllowFeedback %}\n?                <div class="\&quot;clear\&quot;"></div>\n?                <div class="\&quot;article__feedback\&quot;">\n?                    <span>Helpful?</span>\n?                    <a class="\&quot;article__feedbackbtn" title="\&quot;Helpful\&quot;"></a>\n?                    <a class="\&quot;article__feedbackbtn" title="\&quot;Not"></a>\n?\n?                    <div class="\&quot;article__feedbacklabel"><span class="\&quot;article__feedbackcount\&quot;">{{feedBackCount | round: 2}}</span>% of people found this helpful</div>\n?\n?                </div>\n?                {% endif %}\n?            </div>\n?            {% if ifShowPoweredBy %}\n?            <div class="\&quot;poweredby\&quot;">\n?                <a rel="\&quot;noopener" target="\&quot;_blank\&quot;\n?" hreflang="\&quot;en\&quot;"><svg viewBox="\&quot;0" focusable="\&quot;false\&quot;">\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:

Design

  • 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="\&quot;header">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;header__logo"><img src="\&quot;/kb/resources/your_logo.png\&quot;"></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;article\&quot;">\n?                <div class="\&quot;article__title">\n?                    {{title}}\n?                </div>\n?                <div class="\&quot;article__content\&quot;">\n?                    {{body}}\n?                </div>\n?                {% if ifAllowFeedback %}\n?                <div class="\&quot;clear\&quot;"></div>\n?                <div class="\&quot;article__feedback\&quot;">\n?                    <span>Helpful?</span>\n?                    <a class="\&quot;article__feedbackbtn" title="\&quot;Helpful\&quot;"></a>\n?                    <a class="\&quot;article__feedbackbtn" title="\&quot;Not"></a>\n?\n?                    <div class="\&quot;article__feedbacklabel"><span class="\&quot;article__feedbackcount\&quot;">{{feedBackCount | round: 2}}</span>% of people found this helpful</div>\n?\n?                </div>\n?                {% endif %}\n?            </div>\n?            {% if ifShowPoweredBy %}\n?            <div class="\&quot;poweredby\&quot;">\n?                <a rel="\&quot;noopener" target="\&quot;_blank\&quot;\n?" hreflang="\&quot;en\&quot;"><svg viewBox="\&quot;0" focusable="\&quot;false\&quot;">\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:

Design

  • 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="\&quot;header">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;header__logo"><img src="\&quot;/kb/resources/your_logo.png\&quot;"></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;article\&quot;">\n?                <div class="\&quot;article__title">\n?                    {{title}}\n?                </div>\n?                <div class="\&quot;article__content\&quot;">\n?                    {{body}}\n?                </div>\n?                {% if ifAllowFeedback %}\n?                <div class="\&quot;clear\&quot;"></div>\n?                <div class="\&quot;article__feedback\&quot;">\n?                    <span>Helpful?</span>\n?                    <a class="\&quot;article__feedbackbtn" title="\&quot;Helpful\&quot;"></a>\n?                    <a class="\&quot;article__feedbackbtn" title="\&quot;Not"></a>\n?\n?                    <div class="\&quot;article__feedbacklabel"><span class="\&quot;article__feedbackcount\&quot;">{{feedBackCount | round: 2}}</span>% of people found this helpful</div>\n?\n?                </div>\n?                {% endif %}\n?            </div>\n?            {% if ifShowPoweredBy %}\n?            <div class="\&quot;poweredby\&quot;">\n?                <a rel="\&quot;noopener" target="\&quot;_blank\&quot;\n?" hreflang="\&quot;en\&quot;"><svg viewBox="\&quot;0" focusable="\&quot;false\&quot;">\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="\&quot;header">\n?        <div class="\&quot;container\&quot;">\n?            <div class="\&quot;header__logo"><img src="\&quot;/kb/resources/your_logo.png\&quot;"></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;article\&quot;">\n?                <div class="\&quot;article__title">\n?                    {{title}}\n?                </div>\n?                <div class="\&quot;article__content\&quot;">\n?                    {{body}}\n?                </div>\n?                {% if ifAllowFeedback %}\n?                <div class="\&quot;clear\&quot;"></div>\n?                <div class="\&quot;article__feedback\&quot;">\n?                    <span>Helpful?</span>\n?                    <a class="\&quot;article__feedbackbtn" title="\&quot;Helpful\&quot;"></a>\n?                    <a class="\&quot;article__feedbackbtn" title="\&quot;Not"></a>\n?\n?                    <div class="\&quot;article__feedbacklabel"><span class="\&quot;article__feedbackcount\&quot;">{{feedBackCount | round: 2}}</span>% of people found this helpful</div>\n?\n?                </div>\n?                {% endif %}\n?            </div>\n?            {% if ifShowPoweredBy %}\n?            <div class="\&quot;poweredby\&quot;">\n?                <a rel="\&quot;noopener" target="\&quot;_blank\&quot;\n?" hreflang="\&quot;en\&quot;"><svg viewBox="\&quot;0" focusable="\&quot;false\&quot;">\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"
} 
Copyright © 2022 Comm100 Network Corporation. All Rights Reserved.