Task Bot

Prev Next

Task Bot

Task Bot JSON Format

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

Name Type Description
latestVersionId guid Id of the latest taskbot version.
id guid Id of the taskbot.
name string Name of the chatbot.
ifCustomizeAvatar bool Whether avatar of bot is customize or not.
customizeAvatar image URL of the customize avatar.
systemAvatarId guid Id of system avatar.
avatar string

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:

Name Type in Required Description
latestVersionId guid body no Id of the latest taskbot version.
name string body yes Name of the chatbot.
ifCustomizeAvatar bool body no Whether avatar of bot is customize or not.
customizeAvatar image body no URL of the customize avatar.
systemAvatarId guid body no Id of system avatar.
avatar string body no
  • 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:

Name Type in Required Description
latestVersionId guid body no Id of the latest taskbot version.
name string body yes Name of the chatbot.
ifCustomizeAvatar bool body no Whether avatar of bot is customize or not.
customizeAvatar image body no URL of the customize avatar.
systemAvatarId guid body no Id of system avatar.
avatar string body no
  • 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

Copyright © 2022 Comm100 Network Corporation. All Rights Reserved.