Endpoint Details
Authentication
Request
Header
Field | Value |
Content-Type | application/json |
Body
Parameters | Type | Required | Description |
loginName |
| Yes | Username to login |
password |
| Yes | Password to the account |
Example:
{
"loginName": "rpa", "password": "octopusrpa1234"
}
Response
Parameters | Type | Required | Description |
accessToken |
| Yes | Access token used for authentication |
accessTokenExpirationTime |
| Yes | Token expiration time |
Example:
{
"accessToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImdXS3hWc0F4SHhaMDlDcWh6NkNJb3ciLCJ0eXAiOiJhdCtqd3QifQ.eyJuYmYiOjE3MTUyNDc4OTQsImV4cCI6MTcxNTMzNDI5NCwiaXNzIjoiaHR0cHM6Ly9wcmUtaWRlbnRpdHkuYmF6aHVheXUuY29tIiwiYXVkIjpbIkNsaWVudEFwaSIsIkRhdGFBcGkiLCJBZHZhbmNlZEFwaSIsIkNsb3VkQWdlbnQiLCJDbHVzdGVyU2VydmljZSJdLCJjbGllbnRfaWQiOiJPY3RvcHVzIiwic3ViIjoiOTliYjYwYTEtNWI1Mi00MzAwLTlmZmQtNjgxNTMzYzZmMzQ4IiwiYXV0aF90aW1lIjoxNzE1MjQ3ODk0LCJpZHAiOiJsb2NhbCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL25hbWVpZGVudGlmaWVyIjoiOTliYjYwYTEtNWI1Mi00MzAwLTlmZmQtNjgxNTMzYzZmMzQ4IiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbmFtZSI6InNraWVlcndlbiIsInByZWZlcnJlZF91c2VybmFtZSI6InNraWVlcndlbiIsInVuaXF1ZV9uYW1lIjoic2tpZWVyd2VuIiwicmVnaXN0ZXJfZGF0ZSI6IjIwMTYtMTEtMDNUMDY6Mzk6MjArMDg6MDAiLCJsYXN0X2xvZ2luX2RhdGUiOiIyMDI0LTA1LTA5VDEwOjI1OjU3KzA4OjAwIiwibGFzdF9wYXNzd29yZF9jaGFuZ2VkX2RhdGUiOiIyMDIyLTEwLTI2VDEyOjI5OjQ2KzA4OjAwIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoid2VuZGlAc2tpZWVyLmNvbSIsImVtYWlsIjoid2VuZGlAc2tpZWVyLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOlsiT3BzIiwiQnVzaW5lc3NDZW50ZXIiXSwic2NvcGUiOlsib3BlbmlkIiwicHJvZmlsZSIsImVtYWlsIiwiQ2xpZW50QXBpIiwiRGF0YUFwaSIsIkFkdmFuY2VkQXBpIiwiQ2xvdWRBZ2VudCIsIkNsdXN0ZXJTZXJ2aWNlIl19.NQd3dvRRpgakAd653JyBZ9sGPmC1GeTVzqE2Yks2L2hVmHSd6NtVGittVLg2wF5jTKSBq_Yk3vqO_pZR_ng18VC9xwxS6ikZVyCxJ0pFyrXGkfOiQH3coflecFHCvNOEc6iRAcYnvtbP-vW7RzsbsEoZGFnD3HsBX9y8lrf3X2lESJWwRXXopy0Sxq_BsTBqZE-aH-7edMA2nuacuiGbZ4etkLwJHi8jiPC1IG6nQT-nGc5A2IXL11vVVXi4vgYq8yzFOWx4Df1d67mZOkCrFY7FohPiqK95qGKPLVY5SkqbxOk2qyDgMsfEwQUmEB6KNZsgHL10Pqbys2rHTP8MSg",
"accessTokenExpirationTime": "2024-05-10T09:44:54+00:00",
"refreshToken": "5jUQ8TZqlFz72CmuRgnSzwAOf5UCSxosxDI5GLpmq54",
"refreshTokenExpirationTime": "2024-05-16T09:44:54+00:00"
}
Webhook
Url | retrieve from Webhook trigger |
Type |
|
Request
Header
Field | Value |
Content-Type | application/json |
Body
Parameters | Type | Required | Description |
loginName |
| Yes | Generated by encrypting the timestamp combined with the signing key using the HmacSHA256 algorithm. The signature string is constructed as |
params |
| No | { |
specifiedBot |
| Yes | The ID of a specific bot, which can be obtained from the Enterprise Console. |
timestamp |
| Yes | The current time, represented as a Unix timestamp (in seconds). |
Example:
{
"loginName": "rpa", "password": "octopusrpa1234"
}
Response
Http Code 200: Successfully started
Parameters | Type | Required | Description |
enterpriseId |
| Yes | The ID of enterprise account |
flowId |
| Yes | The ID of a specific app |
processNo |
| Yes | The execution batch number of the app |
Example:
{
"enterpriseId": "65d413751fdff0e15cad6627",
"flowId": "660b796f5db3eedaa9587bbd",
"flowProcessNo": "638508224789866966"
}
Http Code 400: Failed to start
Parameters | Type | Required | Description |
code |
| Yes | Failure code |
description |
| No | Failure description |
requestId |
| Yes | The ID of request |
Task Status Query
Url |
|
Type |
|
Request
Header
Field | Value |
Content-Type | application/json |
Authorization | "Bearer" + " " + |
EnterpriseId |
|
Request URL Example
GET https://api.octoparse.ai/api/v1/bots/runningRecords/flow-660b796f5db3eedaa9587bbd/process-638506737195684939
Request Header Example
Field | Value |
EnterpriseId | 65d413751fdff0e15cad6627 |
Authorization |
|
Response
Http Code 200: Query successful
Parameters | Type | Required | Description |
flowId |
| Yes | The ID of a specific app |
flowProcessNo |
| Yes | The execution batch number of the app |
botId |
| No | The ID of a specific bot |
botName |
| No | The name of a specific bot |
startWay |
| Yes | Start mode:
|
status |
| Yes | Bot status:
|
statusMessage |
| No | Information of the bot status |
startTime |
| Yes | When the bot starts |
endTime |
| No | When the bot ends |
executionStartTime |
| No | When the app starts execution |
Response example
{
"flowId": "660b796f5db3eedaa9587bbd",
"flowProcessNo": "638506737195684939",
"flowName": "Get news",
"botId": "65d413751fdff0e15cad6627_99bb60a1-5b52-4300-9ffd-681533c6f348_TRZMNZQ1G8YZ0D5NC9A1HF3QD99Z4DMAZ3X8GXG5PZFVE27YMWP0",
"botName": "Bot-DESKTOP-NJDIBNV",
"starterId": null,
"starterName": null,
"triggerId": "6639f1689273785531999a5b",
"triggerName": "OpenAPI_Test",
"timingTriggerId": "6639f1689273785531999a5b",
"timingTriggerName": "OpenAPI_Test",
"startWay": "Webhook",
"status": "Executing",
"statusMessage": null,
"startTime": "2024-05-07T10:15:19.567+00:00",
"endTime": null,
"executionStartTime": "2024-05-07T10:42:44.877+00:00"
}
Http Code 400: Query failed
Parameters | Type | Required | Description |
code |
| Yes | Failure code |
description |
| No | Failure description |
requestId |
| Yes | The ID of request |
Response example:
{
"code": "SignatureVerificationFailureOrTimestampExpired",
"description": "Signature mismatch or the timestamp is not within one hour of the current time.",
"requestId": "0HN3EGCVKSHDK:00000001"
}
Stop Task
Request
Header
Field | Value |
Content-Type | application/json |
EnterpriseId | |
Body
Parameters | Type | Required | Description |
flowId |
| Yes | The ID of a specific app |
flowProcessNo |
| Yes | The execution batch number of the app |
Request URL Example
POST https://api.octoparse.ai/api/v1/bots/scheduling/stop
Request Header Example
parameters | Value |
EnterpriseId | 65d413751fdff0e15cad6627 |
Authorization |
|
Request Body Example
{
"flowId": "660b796f5db3eedaa9587bbd",
"flowProcessNo": "638508434307732021",
}
Response
Http Code 200: Success
Http Code 400: Failed
Parameters | Type | Required | Description |
code |
| Yes | Failure code |
description |
| No | Failure description |
requestId |
| Yes | The ID of request |
Bot List
Url | https://api.octoparse.ai/api/v1/bots/management/bots?search= |
Type |
|
Request
Header
Field | Value |
Content-Type | application/json |
Authorization | "Bearer" + " " + returned by the Authentication endpoint. |
EnterpriseId |
returned by the Webhook endpoint. |
URL parameters
Parameters | Type | Required | Description |
search |
| No | The search keyword. You can search by bot name, machine name, or description. (Note: URL encoding is required.) |
start |
| No | The starting position, starting from 0. Default is 0. |
take |
| No | The number of records to retrieve. Default is 20. |
Request example
GET https://api.octoparse.ai/api/v1/bots/management/bots?search=%E6%9C%BA%E5%99%A8%E4%BA%BA&start=0&take=20
Header example
parameters | Value |
EnterpriseId | 65d413751fdff0e15cad6627 |
Authorization |
|
Response
Http Code 200: Query successful
Parameters | Type | Required | Description |
item |
Please refer to the Bot Entity part | Yes | Bot information |
total |
| Yes | Quantity of bots |
Response Example
{
"items": [
{
"id": "99bb60a1-5b52-4300-9ffd-681533c6f348_TRZMNZQ1G8YZ0D5NC9A1HF3QD99Z4DMAZ3X8GXG5PZFVE27YMWP0",
"name": "Bot-DESKTOP-NJDIBNV",
"intro": null,
"machineName": "DESKTOP-NJDIBNV",
"machineIp": "172.22.0.1",
"version": "0.2.22.1118",
"isConnected": false,
"isEnabled": true,
"executionStatus": "Empty",
"lastConnectingTime": "2024-11-20T02:44:01.007+00:00", "lastDisconnectingTime": "2024-11-20T02:48:30.189+00:00",
"isBusy": false,
"flowId": null,
"flowProcessNo": null
}
],
"total": 1
}
Get Bot Information
Url | |
Type |
|
Request
Header
Field | Value |
Content-Type | application/json |
Authorization | "Bearer" + " " + returned by the Authentication endpoint. |
EnterpriseId |
returned by the Webhook endpoint. |
URL parameters
Parameters | Type | Required | Description |
botId |
| Yes | ID of the bot |
Request URL Example
GET https://api.octoparse.ai/api/v1/bots/management/bots/99bb60a1-5b52-4300-9ffd-681533c6f348_TRZMNZQ1G8YZ0D5NC9A1HF3QD99Z4DMAZ3X8GXG5PZFVE27YMWP0
Header Example
parameters | Value |
EnterpriseId | 65d413751fdff0e15cad6627 |
Authorization |
|
Response
Http Code 200: Query successful
Example
{
"id": "99bb60a1-5b52-4300-9ffd-681533c6f348_TRZMNZQ1G8YZ0D5NC9A1HF3QD99Z4DMAZ3X8GXG5PZFVE27YMWP0",
"name": "Bot-DESKTOP-NJDIBNV",
"intro": null,
"machineName": "DESKTOP-NJDIBNV",
"machineIp": "172.22.0.1",
"version": "0.2.22.1118",
"isConnected": false,
"isEnabled": true,
"executionStatus": "Empty",
"lastConnectingTime": "2024-11-20T02:44:01.007+00:00", "lastDisconnectingTime": "2024-11-20T02:48:30.189+00:00",
"isBusy": false, "flowId": null,
"flowProcessNo": null
}
Entity Definitions
Bot Entity
Parameters | Type | Required | Description |
id |
| Yes | ID of the bot |
name |
| Yes | Name of the bot |
intro |
| No | Description of the bot |
machineName |
| Yes | The name of the device where the bot installed |
machineIp |
| Yes | The IP of the device where the bot installed |
version |
| Yes | Version of the bot client |
isConnected |
| Yes | Whether the bot is connected |
isEnabled |
| Yes | Whether the bot is enabled |
executionStatus |
| Yes | Bot status:
|
lastConnectingTime |
| Yes | Time for the last connection |
flowId |
| No | The Id of the currently running app |
flowProcessNo |
| No | The batch number of the currently running app |