Endpoint: console-rpa.aliyun.com/rpa/openapi/task/createServiceTask
Method: POST
Response format: JSON
Description: Creates a service task.
Request parameters
Parameter |
Type |
Required |
Example |
Description |
appId |
String |
Yes |
fb6a99a1-****-****-****-2ed9cb5a0c0d |
The unique identifier for the application. |
appParams |
JSON array |
No |
[{"name":"parameter1","value":""},{"name":"parameter2","value":""}] |
name: The name of the parameter. value: The value of the parameter. |
clientId |
String |
No |
5E77DA******CFB62A8B9527626A47F4 |
The robot ID. |
callbackUrl |
String |
No |
http://console-rpa.aliyun.com/callback |
The callback URL. |
appVersion |
String |
No |
1.0.0 |
The version of the application to run.
Important
If you use an on-premises version of the RPA server:
|
renderEnabled |
Boolean |
No |
false |
Specifies whether to enable desktop rendering. The default value is false. |
The clientId is the robot ID. You can find the robot ID in the "About" menu after you log on to the robot client, as shown in the following figure:
Response parameters
For information about common response parameters, see Return Results. The following table describes the fields in the data object.
Name |
Type |
Example |
Description |
taskId |
String |
fa2e5fb6-****-****-****-5797490eaa98 |
The unique identifier for the task. |
resultUrl |
String |
/rpa/openapi/task/queryServiceResult?taskId=fa2e5fb6-****-****-****-5797490eaa98 |
The URL for retrieving the task result. |
Examples
Sample request:
https://console-rpa.aliyun.com/rpa/openapi/task/createServiceTask?<common request parameters>
&appId=fb6a99a1-****-****-****-2ed9cb5a0c0d
&appParams=[{"name":"parameter1","value":""},{"name":"parameter2","value":""}]
&clientId=5E77DA******CFB62A8B9527626A47F4
&callbackUrl=http://console-rpa.aliyun.com/callback
Sample response:
{
"requestId":"e6cc72d4-****-****-****-1aba346181e0",
"success":true,
"code":0,
"msg":"The request was successful.",
"msgCode":"result.success",
"data":{
"taskId":"fa2e5fb6-****-****-****-5797490eaa98",
"resultUrl":"/rpa/openapi/task/queryServiceResult?taskId=fa2e5fb6-****-****-****-5797490eaa98"
},
"pager":null
}
Error code table
Code |
Description |
Message |
0 |
result.success |
The request was successful. |
10000 |
system.systemError |
A system error occurred. Please try again later. |
10004 |
system.lockedFailed |
Failed to update data. Please try again later. |
20000 |
permission.denied |
Permission denied. You do not have permission to access this application. |
20110 |
param.ParamError |
A parameter error occurred. |
20201 |
user.userNotExist |
The user does not exist. |
30102 |
client.clientNotExist |
The robot does not exist. |
30202 |
task.taskScheduleNotExist |
The scheduled task does not exist. |
30206 |
task.taskCreateServiceTaskFailed |
Failed to create the service task. |
30800 |
app.appNotExist |
The application does not exist. |
30801 |
app.appNotInMarket |
The application is not published to the app market. |