Question

API for Automation Schedules

  • 7 April 2023
  • 2 replies
  • 506 views

Badge +3

Do we have any API calls to enable and disable all the schedules at once ? if yes any input will be appreciated. 

 

Note : I know there are API calls which will trigger the bot , but i am looking only for schedules.


2 replies

Userlevel 5
Badge +10

@Chaitukvs 

Title

How to schedule one-time/recurring bot for a specific date and time using Control Room APIs

Summary

We can schedule bots on bot runners using the below options:

A. From the Control Room UI using the schedule bot option.

B. With the help of Control Room APIs, we can schedule bot deployment from an external system or a third-party application.

Instructions

1. First use the authentication API to authenticate the user. Authentication API is used to generate a token and this token will be passed as a header to the subsequent APIs.

API: <Control Room URL>/v1/authentication

On how to use the authentication API, please refer to the below documentation:
https://docs.automationanywhere.com/bundle/enterprise-v11.3/page/enterprise/topics/control-room/control-room-api/api-authentication.html

2. Now use the Automation API to schedule the bot at a particular time in the future. 

API: <Control Room URL>/v1/schedule/automations
 

Sample body of the schedule automation API:

 

{

"name": "Test",

"fileId": "10",

"startDate": "2020-07-21",

"endDate": "2020-07-25",

"startTime": "13:00",

"description": "",

"rdpEnabled": false,

"scheduleType": "DAILY",

"repeatEnabled": false,

"status": "ACTIVE",

"timeZone": "Europe/London",

"deviceIds": ["3"],

"dailyRecurrence": {"interval":"1"}

}
 

For run once option the below is the sample request body:

 

{

"name": "Test",

"fileId": "10",

"startDate": "2020-07-25",

"startTime": "13:00",

"description": "",

"rdpEnabled": false,

"status": "ACTIVE",

"timeZone": "Europe/London",

"deviceIds": ["3"],

"dailyRecurrence": {}

}

The device ID can be found using the below API.
API: <Control Room URL>/v2/devices/list

The file ID can be found using the below API:
API: <Control Room URL>/v2/repository/file/list

Additional Information

Refer to the below link for all the exposed APIs of Control Room:

https://docs.automationanywhere.com/bundle/enterprise-v11.3/page/enterprise/topics/control-room/control-room-api/control-room-apis.html

Badge +3

@rbkadiyam : As mentioned in my post i am looking for the scheduled activity to be disabled and enable back. I am not looking for running a bot in a specific time. Thanks for your reply

Reply