Design
  • 16 Jun 2022
  • 3 Minutes to read
  • Dark
    Light

Design

  • Dark
    Light

Article summary

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:

NameTypeDescription
idguidId of the design.
pageTypestringAllowed values are "cssFile", "categoryPage", "articlePage", "searchResultPage", "pageNotFound".
kbIdguidId of the knowledage base.
bodystringContent 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.
modifiedTimetimestampTime when the design was last modified.
modifiedByIdguidId of the agent who modified the design.

Get the list of Designs

GET kb/designs

  • Parameters:

NameTypeinRequiredDescription
kbIdguidquerynoId 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:

NameTypeinRequiredDescription
pageTypestringbodynoAllowed values are "cssFile", "categoryPage", "articlePage", "searchResultPage", "pageNotFound".
kbIdguidbodyyesId of the knowledage base.
bodystringbodynoContent 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.
modifiedByIdguidbodynoId 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"
} 

Was this article helpful?

What's Next