接口详情
1 授权接口
Url
|
https://api-rpa.bazhuayu.com/api/v1/identity/authentication/password
|
请求方式
|
POST
|
-
请求
-
请求头
字段值Content-Typeapplication/json-
请求参数
参数名称类型必须描述loginNamestring是账号用户名passwordstring是账号密码-
请求示例
请求体:{ "loginName": "rpa账号", "password": "rpa账号密码" } -
-
返回结果
参数名称
|
类型
|
必须
|
描述
|
---|---|---|---|
accessToken
|
string
|
是
|
Token
|
accessTokenExpirationTime
|
string
|
是
|
Token 过期时间
|
返回示例:
{ "accessToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImdXS3hWc0F4SHhaMDlDcWh6NkNJb3ciLCJ0eXAiOiJhdCtqd3QifQ.eyJuYmYiOjE3MTUyNDc4OTQsImV4cCI6MTcxNTMzNDI5NCwiaXNzIjoiaHR0cHM6Ly9wcmUtaWRlbnRpdHkuYmF6aHVheXUuY29tIiwiYXVkIjpbIkNsaWVudEFwaSIsIkRhdGFBcGkiLCJBZHZhbmNlZEFwaSIsIkNsb3VkQWdlbnQiLCJDbHVzdGVyU2VydmljZSJdLCJjbGllbnRfaWQiOiJPY3RvcHVzIiwic3ViIjoiOTliYjYwYTEtNWI1Mi00MzAwLTlmZmQtNjgxNTMzYzZmMzQ4IiwiYXV0aF90aW1lIjoxNzE1MjQ3ODk0LCJpZHAiOiJsb2NhbCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL25hbWVpZGVudGlmaWVyIjoiOTliYjYwYTEtNWI1Mi00MzAwLTlmZmQtNjgxNTMzYzZmMzQ4IiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbmFtZSI6InNraWVlcndlbiIsInByZWZlcnJlZF91c2VybmFtZSI6InNraWVlcndlbiIsInVuaXF1ZV9uYW1lIjoic2tpZWVyd2VuIiwicmVnaXN0ZXJfZGF0ZSI6IjIwMTYtMTE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:54+00:00" }
2 触发器 Webhook 接口
参考 WebHook触发任务
Url
|
从 Webhook 触发器获取
|
请求方式
|
POST
|
-
请求
-
请求头
字段值Content-Typeapplication/json -
-
请求参数
参数名称
|
类型
|
必须
|
描述
|
---|---|---|---|
sign
|
string
|
是
|
时间戳与创建 Webhook 触发器时生成的签名密钥进行算法加密,将 timestamp + "\n" + 密钥 当做签名字符串;先使用 HmacSHA256 算法计算签名,再进行 Base64 编码。
![]() |
params
|
object
|
否
|
{ "应用参数1": "任务的自定义参数", // 例如账号 "应用参数2": "任务的自定义参数" // 例如密码 }
|
specifiedBot
|
string
|
是
|
机器人 Id。从 RPA 企业账号管理平台中获取。
|
timestamp
|
string
|
是
|
当前时间的时间戳(秒)。
|
-
返回结果
【Http Code 200】启动成功:
参数名称
|
类型
|
必须
|
描述
|
---|---|---|---|
enterpriseId
|
string
|
是
|
企业账号 Id
|
flowId
|
string
|
是
|
应用 Id
|
processNo
|
string
|
是
|
运行批次
|
返回示例:
{ "enterpriseId": "65d413751fdff0e15cad6627", "flowId": "660b796f5db3eedaa9587bbd", "flowProcessNo": "638508224789866966" }
【Http Code 400】启动失败:
参数名称
|
类型
|
必须
|
描述
|
---|---|---|---|
code
|
string
|
是
|
错误码
|
description
|
string
|
|
错误描述
|
requestId
|
string
|
是
|
请求 Id
|
3 查询任务状态接口
Url
|
https://api-rpa.bazhuayu.com/api/v1/bots/runningRecords/flow-
{flowId} /process-{flowProcessNo}
|
请求方式
|
GET
|
-
请求
-
请求头字段值Content-Typeapplication/jsonAuthorization"Bearer" + " " + 授权接口返回的 accessTokenEnterpriseId调用启动接口返回的 enterpriseId
- 请求示例
请求 URL:GET https://api-rpa.bazhuayu.com/api/v1/bots/runningRecords/flow-660b796f5db3eedaa9587bbd/process-638506737195684939请求头:名称值EnterpriseId65d413751fdff0e15cad6627AuthorizationBearer
eyJhbGciOiJSUzI1NiIsImtpZCI6ImdXS3hWc0F4SHhaMDlDcWh6NkNJb3ciLCJ0eXAiOiJh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Oi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOlsiT3BzIiwiQnVzaW5lc3NDZW50ZXIiXSwic2NvcGUiOlsib3BlbmlkIiwicHJvZmlsZSIsImVtYWlsIiwiQ2xpZW50QXBpIiwiRGF0YUFwaSIsIkFkdmFuY2VkQXBpIiwiQ2xvdWRBZ2VudCIsIkNsdXN0ZXJTZXJ2aWNlIl19.hkFNws955sUm3jvAp2ijf6YVz9z10eGuvwez0aT4wi9b5il7zfD5DU2xDcp44CKhN9Wc-9Cy7-RSjDtkmF4EM8CLNs4VPda9EC1BV8md94WaHZIbyJzTyiOXQXEhVtpS8Y_9cQZyhh5WGanD8G2GOWv4cntKMkC4OLmGSXPO95RRkC3DNUXcTwspNVnHt72C7EmQW0kipuPQ83sRXvStuIvvdzb9kNNn5T-6s3ROcvofi1BYeE_19hF0UBs1IA3IJq8oyjUw4MvffzV6ihLVklmbWjWl3VjFoq9p2G5X2dWvqzhJ0am9QazX3e9MNmOBhYlEx0n-1PM90c5xfs-0zA -
-
返回结果
-
【Http Code 200】查询成功:参数名称类型必须描述flowIdstring是应用 IdflowProcessNostring是应用运行批次botIdstring机器人 IdbotNamestring机器人名称startWaystring是启动方式:
-
Manual
-
TimingTrigger
-
WebhookTrigger(应为该值)
statusstring是状态:-
Empty - 空
-
Waiting - 待执行
-
Scheduled - 任务已分配
-
Delivered - 机器人已接收任务
-
Executing - 执行中
-
Stopping - 停止中
-
Stopped - 已停止
-
Finished - 已完成
-
Failed - 执行失败
-
Cancelled - 已取消
statusMessagestring状态信息startTimestring是启动时间endTimestring结束时间executionStartTimestring执行开始时间返回结果示例:{ "flowId": "660b796f5db3eedaa9587bbd", "flowProcessNo": "638506737195684939", "flowName": "百度新闻", "botId": "65d413751fdff0e15cad6627_99bb60a1-5b52-4300-9ffd-681533c6f348_TRZMNZQ1G8YZ0D5NC9A1HF3QD99Z4DMAZ3X8GXG5PZFVE27YMWP0", "botName": "Bot-DESKTOP-NJDIBNV", "starterId": null, "starterName": null, "triggerId": "6639f1689273785531999a5b", "triggerName": "OpenAPI调用测试", "timingTriggerId": "6639f1689273785531999a5b", "timingTriggerName": "OpenAPI调用测试", "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】查询失败:参数名称类型必须描述codestring是错误码descriptionstring错误描述requestIdstring是请求 Id失败结果示例:{ "code": "SignatureVerificationFailureOrTimestampExpired", "description": "签名匹配失败或时间戳距离当前时间不在一小时内", "requestId": "0HN3EGCVKSHDK:00000001" }
4 停止任务接口
Url
|
https://api-rpa.bazhuayu.com/api/v1/bots/scheduling/stop
|
请求方式
|
POST
|
-
请求
-
请求头
字段值Content-Typeapplication/jsonEnterpriseId调用启动接口返回的 enterpriseId-
请求参数
参数名称类型必须描述flowIdstring是RPA 应用 IdflowProcessNostring是应用运行批次 -
-
请求示例
请求 URL:
POST https://api-rpa.bazhuayu.com/api/v1/bots/scheduling/stop
请求头:
名称
|
值
|
---|---|
EnterpriseId
|
65d413751fdff0e15cad6627
|
Authorization
|
Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6ImdXS3hWc0F4SHhaMDlDcWh6NkNJb3ciLCJ0eXAiOiJhdCtqd3QifQ.eyJuYmYiOjE3MTUxNjI4MjQsImV4cCI6MTcxNTI0OTIyNCwiaXNzIjoiaHR0cHM6Ly9wcmUtaWRlbnRpdHkuYmF6aHVheXUuY29tIiwiYXVkIjpbIkNsaWVudEFwaSIsIkRhdGFBcGkiLCJBZHZhbmNlZEFwaSIsIkNsb3VkQWdlbnQiLCJDbHVzdGVyU2VydmljZSJdLCJjbGllbnRfaWQiOiJPY3RvcHVzIiwic3ViIjoiOTliYjYwYTEtNWI1Mi00MzAwLTlmZmQtNjgxNTMzYzZmMzQ4IiwiYXV0aF90aW1lIjoxNzE1MTYyOD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mF4EM8CLNs4VPda9EC1BV8md94WaHZIbyJzTyiOXQXEhVtpS8Y_9cQZyhh5WGanD8G2GOWv4cntKMkC4OLmGSXPO95RRkC3DNUXcTwspNVnHt72C7EmQW0kipuPQ83sRXvStuIvvdzb9kNNn5T-6s3ROcvofi1BYeE_19hF0UBs1IA3IJq8oyjUw4MvffzV6ihLVklmbWjWl3VjFoq9p2G5X2dWvqzhJ0am9QazX3e9MNmOBhYlEx0n-1PM90c5xfs-0zA |
请求体:
{ "flowId": "660b796f5db3eedaa9587bbd", "flowProcessNo": "638508434307732021", }
-
返回结果
-
【Http Code 200】成功。
-
【Http Code 400】失败:参数名称类型必须描述codestring是错误码descriptionstring错误描述requestIdstring是请求 Id
-