Task Bot
  • 16 Jun 2022
  • 2 Minutes to read
  • Dark
    Light

Task Bot

  • Dark
    Light

Article summary

Task Bot

Task Bot JSON Format

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

NameTypeDescription
latestVersionIdguidId of the latest taskbot version.
idguidId of the taskbot.
namestringName of the chatbot.
ifCustomizeAvatarboolWhether avatar of bot is customize or not.
customizeAvatarimageURL of the customize avatar.
systemAvatarIdguidId of system avatar.
avatarstring

Get the list of Taskbots

GET bot/taskbots

  • Parameters:

No Parameters

  • Response:

An array of Task Bot

  • Example

Sample Request:

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

Response:

HTTP/1.1 200 OK

[
  {
      "latestVersionId": "5842fc45-3154-42da-b657-5a489c96d8b5",
      "id": "c44fada7-961b-42fd-abac-d080355f6ed6",
      "name": "chatbot",
      "ifCustomizeAvatar": false,
      "customizeAvatar": "",
      "systemAvatarId": "00000000-0000-0000-0000-000000000001",
      "avatar": "https://api11.comm100.io/v4/Bot/taskbots/c44fada7-961b-42fd-abac-d080355f6ed6/avatar"
  }
] 

Get a single Task Bot

GET bot/taskbots/{id}

  • Parameters:

No Parameters

  • Response:

Task Bot

  • Example

Sample Request:

curl https://api11.comm100.io/v4/bot/taskbots/c44fada7-961b-42fd-abac-d080355f6ed6 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "latestVersionId": "5842fc45-3154-42da-b657-5a489c96d8b5",
  "id": "c44fada7-961b-42fd-abac-d080355f6ed6",
  "name": "chatbot",
  "ifCustomizeAvatar": false,
  "customizeAvatar": "",
  "systemAvatarId": "00000000-0000-0000-0000-000000000001",
  "avatar": "https://api11.comm100.io/v4/Bot/taskbots/c44fada7-961b-42fd-abac-d080355f6ed6/avatar"
} 

Create a new Task Bot

POST bot/taskbots

  • Parameters:

NameTypeinRequiredDescription
latestVersionIdguidbodynoId of the latest taskbot version.
namestringbodyyesName of the chatbot.
ifCustomizeAvatarboolbodynoWhether avatar of bot is customize or not.
customizeAvatarimagebodynoURL of the customize avatar.
systemAvatarIdguidbodynoId of system avatar.
avatarstringbodyno
  • Response:

Task Bot

  • Example

Sample Request:

curl https://api11.comm100.io/v4/bot/taskbots \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"latestVersionId":"5842fc45-3154-42da-b657-5a489c96d8b5","name":"chatbot","ifCustomizeAvatar":false,"customizeAvatar":"","systemAvatarId":"00000000-0000-0000-0000-000000000001"}' 

Response:

HTTP/1.1 201 Created

{
  "latestVersionId": "5842fc45-3154-42da-b657-5a489c96d8b5",
  "id": "c44fada7-961b-42fd-abac-d080355f6ed6",
  "name": "chatbot",
  "ifCustomizeAvatar": false,
  "customizeAvatar": "",
  "systemAvatarId": "00000000-0000-0000-0000-000000000001",
  "avatar": "https://api11.comm100.io/v4/Bot/taskbots/c44fada7-961b-42fd-abac-d080355f6ed6/avatar"
} 

Update the Task Bot

PUT bot/taskbots/{id}

  • Parameters:

NameTypeinRequiredDescription
latestVersionIdguidbodynoId of the latest taskbot version.
namestringbodyyesName of the chatbot.
ifCustomizeAvatarboolbodynoWhether avatar of bot is customize or not.
customizeAvatarimagebodynoURL of the customize avatar.
systemAvatarIdguidbodynoId of system avatar.
avatarstringbodyno
  • Response:

Task Bot

  • Example

Sample Request:

curl https://api11.comm100.io/v4/bot/taskbots/c44fada7-961b-42fd-abac-d080355f6ed6 \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"latestVersionId":"5842fc45-3154-42da-b657-5a489c96d8b5","name":"chatbot","ifCustomizeAvatar":false,"customizeAvatar":"","systemAvatarId":"00000000-0000-0000-0000-000000000001"}' 

Response:

HTTP/1.1 200 OK

{
  "latestVersionId": "5842fc45-3154-42da-b657-5a489c96d8b5",
  "id": "c44fada7-961b-42fd-abac-d080355f6ed6",
  "name": "chatbot",
  "ifCustomizeAvatar": false,
  "customizeAvatar": "",
  "systemAvatarId": "00000000-0000-0000-0000-000000000001",
  "avatar": "https://api11.comm100.io/v4/Bot/taskbots/c44fada7-961b-42fd-abac-d080355f6ed6/avatar"
} 

Remove the Task Bot

DELETE bot/taskbots/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/bot/taskbots/c44fada7-961b-42fd-abac-d080355f6ed6 \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content


Was this article helpful?