Knowledge Base
  • 16 Jun 2022
  • 3 Minutes to read
  • Dark
    Light

Knowledge Base

  • Dark
    Light

Article summary

Knowledge Base

You need the Manage multiple knowledge bases permission to manage knowledge bases.

Knowledge Base JSON Format

Knowledge Base is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of the knowledage base.
namestringName of the knowledage base.
homePageTypestringAllowed values are "category", "customPage".
homePageIdguidId of the home page.
visibilitystringAllowed values are "private", "public".
statusstringAllowed values are "closed", "open".
ifAllowRateHelpfulOrNotHelpfulboolTime when the custom page was last modified.
ifRemovePoweredByboolWhether to remove the PoweredBy or not.
imagesintegerCounts of the image belong to the knowledge base.
articlesintegerCounts of the article belong to the knowledge base.
customPagesintegerCounts of the custom page belong to the knowledge base.

Get the list of Knowledge Bases

GET kb/knowledgeBases

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "design".
  • Response:

An array of Knowledge Base

  • Example

Sample Request:

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

Response:

HTTP/1.1 200 OK

[
  {
      "id": "7eb475fe-ea75-4ae7-a7da-fe25ad2891fa",
      "name": "Knowledge Base",
      "homePageType": "category",
      "homePageId": "00000000-0000-0000-0000-000000000000",
      "visibility": "public",
      "status": "open",
      "ifAllowRateHelpfulOrNotHelpful": true,
      "ifRemovePoweredBy": true,
      "images": 5,
      "articles": 1,
      "customPages": 1
  }
] 

Get a single Knowledge Base

GET kb/knowledgeBases/{id}

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "design".
  • Response:

Knowledge Base

  • Example

Sample Request:

curl https://api11.comm100.io/v4/kb/knowledgeBases/7eb475fe-ea75-4ae7-a7da-fe25ad2891fa \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "id": "7eb475fe-ea75-4ae7-a7da-fe25ad2891fa",
  "name": "Knowledge Base",
  "homePageType": "category",
  "homePageId": "00000000-0000-0000-0000-000000000000",
  "visibility": "public",
  "status": "open",
  "ifAllowRateHelpfulOrNotHelpful": true,
  "ifRemovePoweredBy": true,
  "images": 5,
  "articles": 1,
  "customPages": 1
} 

Create a new Knowledge Base

POST kb/knowledgeBases

  • Parameters:

NameTypeinRequiredDescription
namestringbodyyesName of the knowledage base.
homePageTypestringbodynoAllowed values are "category", "customPage".
homePageIdguidbodyyesId of the home page.
visibilitystringbodynoAllowed values are "private", "public".
statusstringbodynoAllowed values are "closed", "open".
ifAllowRateHelpfulOrNotHelpfulboolbodynoTime when the custom page was last modified.
ifRemovePoweredByboolbodynoWhether to remove the PoweredBy or not.
  • Response:

Knowledge Base

  • Example

Sample Request:

curl https://api11.comm100.io/v4/kb/knowledgeBases \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"name":"Knowledge Base","homePageType":"category","homePageId":"00000000-0000-0000-0000-000000000000","visibility":"public","status":"open","ifAllowRateHelpfulOrNotHelpful":true,"ifRemovePoweredBy":true}' 

Response:

HTTP/1.1 201 Created

{
  "id": "7eb475fe-ea75-4ae7-a7da-fe25ad2891fa",
  "name": "Knowledge Base",
  "homePageType": "category",
  "homePageId": "00000000-0000-0000-0000-000000000000",
  "visibility": "public",
  "status": "open",
  "ifAllowRateHelpfulOrNotHelpful": true,
  "ifRemovePoweredBy": true,
  "images": 5,
  "articles": 1,
  "customPages": 1
} 

Update the Knowledge Base

PUT kb/knowledgeBases/{id}

  • Parameters:

NameTypeinRequiredDescription
namestringbodyyesName of the knowledage base.
homePageTypestringbodynoAllowed values are "category", "customPage".
homePageIdguidbodyyesId of the home page.
visibilitystringbodynoAllowed values are "private", "public".
statusstringbodynoAllowed values are "closed", "open".
ifAllowRateHelpfulOrNotHelpfulboolbodynoTime when the custom page was last modified.
ifRemovePoweredByboolbodynoWhether to remove the PoweredBy or not.
  • Response:

Knowledge Base

  • Example

Sample Request:

curl https://api11.comm100.io/v4/kb/knowledgeBases/7eb475fe-ea75-4ae7-a7da-fe25ad2891fa \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"name":"Knowledge Base","homePageType":"category","homePageId":"00000000-0000-0000-0000-000000000000","visibility":"public","status":"open","ifAllowRateHelpfulOrNotHelpful":true,"ifRemovePoweredBy":true}' 

Response:

HTTP/1.1 200 OK

{
  "id": "7eb475fe-ea75-4ae7-a7da-fe25ad2891fa",
  "name": "Knowledge Base",
  "homePageType": "category",
  "homePageId": "00000000-0000-0000-0000-000000000000",
  "visibility": "public",
  "status": "open",
  "ifAllowRateHelpfulOrNotHelpful": true,
  "ifRemovePoweredBy": true,
  "images": 5,
  "articles": 1,
  "customPages": 1
} 

Remove the Knowledge Base

DELETE kb/knowledgeBases/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/kb/knowledgeBases/7eb475fe-ea75-4ae7-a7da-fe25ad2891fa \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content


Was this article helpful?

What's Next