Skip to main content

I am trying to switch over to use the new v2/schedule/automations endpoint to schedule bots since we’ve learned v1 is deprecated now…

Is the part in the sample request body referencing a callback service actually required now?? I’m hoping not, because we’ve never set that up. But if it is required, that would explain why I can’t get anything to go through… been tinkering with the request body and keep getting a 400 error with message that just says “Invalid request parameters”

has anyone else managed to get this working without a callback and maybe have some advice on translating the old version’s request body to the new one? (in terms of a field/fields you may have found that didn’t map to the new request body format as expected)

answered my own question. in case it helps someone else, I was able to put together a working payload below by scheduling a task from the control room web app and spying on the network traffic in chrome dev tools to see what was being sent via the web app. this is working for me with the v2 endpoint now in production, and confirms that a callback url is definitely not required.

this is a good example/baseline for the minimum required stuff to form a request and schedule a bot to run once on a single runner, but could be tweaked and added onto with other stuff shown in the AA docs’ payload example for this endpoint.  

{
"schedule": {
"status": "ACTIVE",
"scheduleType": "NONE",
"timeZone": "America/New_York",
"startDate": "$vStartDate$",
"startTime": "$vStartTime$",
"repeatEnabled": false,
"misfireScheduleConfig": false,
"scheduleResiliency": {
"common": {
"detectAndNotify": {
"enabled": false
},
"recording": {
"enabled": false,
"botStatus": "FAILED"
},
"handleUnexpectedPopups": true
}
}
},
"deployment": {
"botId": "$vBotFileID$",
"automationName": "Bot Created Schedule",
"description": "Bot Created schedule for this task - $vBotFilePath$",
"botLabel": null,
"automationPriority": "PRIORITY_MEDIUM",
"botInput": {},
"runElevated": true,
"hideBotAgentUi": true,
"unattendedRequest": {
"runAsUserIds": I
"$vUserID$"
],
"poolIds": I],
"numOfRunAsUsersToUse": "1",
"deviceUsageType": "RUN_ONLY_ON_DEFAULT_DEVICE"
}
}
}

 


Reply