Tag
  • 16 Jun 2022
  • 2 Minutes to read
  • Dark
    Light

Tag

  • Dark
    Light

Article summary

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:

NameTypeDescription
idguidId of the tag.
namestringName of the tag.
kbIdguidId of the knowledage base.
createdByIdguidId of the agent who modified the tag.
createdTimedatetimeTime when the tag was last modified.
articlesintegerCounts of the article the tag belong to.

Get the list of Tags

GET kb/tags

  • Parameters:

NameTypeinRequiredDescription
kbIdguidquerynoId of the knowledage base.
includestringquerynoAllowed 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:

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

NameTypeinRequiredDescription
namestringbodyyesName of the tag.
kbIdguidbodyyesId of the knowledage base.
createdByIdguidbodynoId 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:

NameTypeinRequiredDescription
namestringbodyyesName of the tag.
kbIdguidbodyyesId of the knowledage base.
createdByIdguidbodynoId 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


Was this article helpful?

What's Next