Implement Requirements for Cloud BOT RESTful API Callback Endpoint (4.0)

Download OpenAPI specification:Download

By setting a endpoint URL as a callback_endpoint paramater or subscribe BOT(event hook) in BOT Execution, you can POST your execution result to the endpoint.
This paper compiled the Endpoint implement requirements.

All the multi-byte characters contained in the request payload must be treated as UTF-8 format.

Receive POST data

To receive the posted result.
Respond with response code 200 after receiving.
When the callback_endpoint get response code other than 200 series, retry callback post will be executed. The smallest retrying interval is 30 seconds.
Time will be added to bot execution time during the callback post retrying.

header Parameters
content-type
required
string
Value: "application/json"
Request Body schema: application/json
code
required
integer

Response Code

job_id
required
string

Job ID

bot_id
required
string

BOT ID

bot_name
required
string

BOT Name

status
required
integer [ 0 .. 2 ]

Status(0:Succeeded 1:Error 2:Executing)

start_time
required
string <date-time>

Execution start time(ISO 8601)

elapsed_time
integer

Elapsed time(in seconds)

object (datalist_output)

An object that represents an output value.

message
string

Message

Responses

Request samples

Content type
application/json
{
  • "code": 201,
  • "job_id": "00000000-0000-0000-0000-000000000000",
  • "bot_id": "get_items",
  • "bot_name": "GETTING ITEMS BOT",
  • "status": 0,
  • "start_time": "2019-12-02T05:30:13Z",
  • "elapsed_time": 6,
  • "output": {
    }
}