--- title: "Knowledge Base" slug: "server-api-kb-knowledge-base" updated: 2022-06-16T07:59:47Z published: 2022-06-16T07:59:47Z canonical: "developer.comm100.com/server-api-kb-knowledge-base" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # Knowledge Base ## Knowledge Base You need the Manage multiple knowledge bases permission to manage knowledge bases. - `Knowledge Bases` - Knowledge Bases Manage - `GET kb/knowledgeBases` - [Get the list of Knowledge Bases](/docs/server-api-kb-knowledge-base#get-the-list-of-knowledge-bases) - `GET kb/knowledgeBases/{id}` - [Get a single Knowledge Base](/docs/server-api-kb-knowledge-base#get-a-single-knowledge-base) - `POST kb/knowledgeBases` - [Create a new Knowledge Base](/docs/server-api-kb-knowledge-base#create-a-new-knowledge-base) - `PUT kb/knowledgeBases/{id}` - [Update the Knowledge Base](/docs/server-api-kb-knowledge-base#update-the-knowledge-base) - `DELETE kb/knowledgeBases/{id}` - [Remove the Knowledge Base](/docs/server-api-kb-knowledge-base#remove-the-knowledge-base) ### Knowledge Base JSON Format Knowledge Base is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the knowledage base. | | `name` | string | Name of the knowledage base. | | `homePageType` | string | Allowed values are "category", "customPage". | | `homePageId` | guid | Id of the home page. | | `visibility` | string | Allowed values are "private", "public". | | `status` | string | Allowed values are "closed", "open". | | `ifAllowRateHelpfulOrNotHelpful` | bool | Time when the custom page was last modified. | | `ifRemovePoweredBy` | bool | Whether to remove the PoweredBy or not. | | `images` | integer | Counts of the image belong to the knowledge base. | | `articles` | integer | Counts of the article belong to the knowledge base. | | `customPages` | integer | Counts of the custom page belong to the knowledge base. | ### Get the list of Knowledge Bases `GET kb/knowledgeBases` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "design". | - #### Response: An array of [Knowledge Base](/docs/server-api-kb-knowledge-base#knowledge-base-json-format) - #### 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: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "design". | - #### Response: [Knowledge Base](/docs/server-api-kb-knowledge-base#knowledge-base-json-format) - #### 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: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `name` | string | body | yes | Name of the knowledage base. | | `homePageType` | string | body | no | Allowed values are "category", "customPage". | | `homePageId` | guid | body | yes | Id of the home page. | | `visibility` | string | body | no | Allowed values are "private", "public". | | `status` | string | body | no | Allowed values are "closed", "open". | | `ifAllowRateHelpfulOrNotHelpful` | bool | body | no | Time when the custom page was last modified. | | `ifRemovePoweredBy` | bool | body | no | Whether to remove the PoweredBy or not. | - #### Response: [Knowledge Base](/docs/server-api-kb-knowledge-base#knowledge-base-json-format) - #### 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: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `name` | string | body | yes | Name of the knowledage base. | | `homePageType` | string | body | no | Allowed values are "category", "customPage". | | `homePageId` | guid | body | yes | Id of the home page. | | `visibility` | string | body | no | Allowed values are "private", "public". | | `status` | string | body | no | Allowed values are "closed", "open". | | `ifAllowRateHelpfulOrNotHelpful` | bool | body | no | Time when the custom page was last modified. | | `ifRemovePoweredBy` | bool | body | no | Whether to remove the PoweredBy or not. | - #### Response: [Knowledge Base](/docs/server-api-kb-knowledge-base#knowledge-base-json-format) - #### 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