Tag

Prev Next

Tag

You need the Manage articles permission to manage tags.

Tag JSON Format

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

Name Type Description
id guid Id of the tag.
name string Name of the tag.
kbId guid Id of the knowledage base.
createdById guid Id of the agent who modified the tag.
createdTime datetime Time when the tag was last modified.
articles integer Counts of the article the tag belong to.

Get the list of Tags

GET kb/tags

  • Parameters:

Name Type in Required Description
kbId guid query no Id of the knowledage base.
include string query no Allowed value is "image".
  • Response:

An array of Tag

  • Example

Sample Request:

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

Response:

HTTP/1.1 200 OK

[
  {
      "id": "d7a30ec8-1eb8-455f-8f28-b7e68429c432",
      "name": "customize",
      "kbId": "b2754e68-b380-4a61-9c5b-a9570f1a4fcc",
      "createdById": "21b5d834-b98b-48ba-ae45-0d1316cb382f",
      "createdTime": "2021-05-08T05:51:31.123Z",
      "articles": 5
  }
] 

Get a single Tag

GET kb/tags/{id}

  • Parameters:

Name Type in Required Description
include string query no Allowed value is "image".
  • Response:

Tag

  • Example

Sample Request:

curl https://api11.comm100.io/v4/kb/tags/d7a30ec8-1eb8-455f-8f28-b7e68429c432 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "id": "d7a30ec8-1eb8-455f-8f28-b7e68429c432",
  "name": "customize",
  "kbId": "b2754e68-b380-4a61-9c5b-a9570f1a4fcc",
  "createdById": "21b5d834-b98b-48ba-ae45-0d1316cb382f",
  "createdTime": "2021-05-08T05:51:31.123Z",
  "articles": 5
} 

Create a new Tag

POST kb/tags

  • Parameters:

Name Type in Required Description
name string body yes Name of the tag.
kbId guid body yes Id of the knowledage base.
createdById guid body no Id of the agent who modified the tag.
  • Response:

Tag

  • Example

Sample Request:

curl https://api11.comm100.io/v4/kb/tags \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"name":"customize","kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","createdById":"21b5d834-b98b-48ba-ae45-0d1316cb382f"}' 

Response:

HTTP/1.1 201 Created

{
  "id": "d7a30ec8-1eb8-455f-8f28-b7e68429c432",
  "name": "customize",
  "kbId": "b2754e68-b380-4a61-9c5b-a9570f1a4fcc",
  "createdById": "21b5d834-b98b-48ba-ae45-0d1316cb382f",
  "createdTime": "2021-05-08T05:51:31.123Z",
  "articles": 5
} 

Update the Tag

PUT kb/tags/{id}

  • Parameters:

Name Type in Required Description
name string body yes Name of the tag.
kbId guid body yes Id of the knowledage base.
createdById guid body no Id of the agent who modified the tag.
  • Response:

Tag

  • Example

Sample Request:

curl https://api11.comm100.io/v4/kb/tags/d7a30ec8-1eb8-455f-8f28-b7e68429c432 \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"name":"customize","kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","createdById":"21b5d834-b98b-48ba-ae45-0d1316cb382f"}' 

Response:

HTTP/1.1 200 OK

{
  "id": "d7a30ec8-1eb8-455f-8f28-b7e68429c432",
  "name": "customize",
  "kbId": "b2754e68-b380-4a61-9c5b-a9570f1a4fcc",
  "createdById": "21b5d834-b98b-48ba-ae45-0d1316cb382f",
  "createdTime": "2021-05-08T05:51:31.123Z",
  "articles": 5
} 

Remove the Tag

DELETE kb/tags/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/kb/tags/d7a30ec8-1eb8-455f-8f28-b7e68429c432 \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content

Copyright © 2022 Comm100 Network Corporation. All Rights Reserved.