API de programación de automatización de listas
Recupere detalles de los programas de automatización que tiene permisos para ver.
Antes de empezar
Nota: Puede ver el Control Room APIs en Community Edition, pero la funcionalidad de la API es limitada. Necesita una Automation 360 edición con licencia para acceder a la funcionalidad completa de las API.
- Utilice la API de autenticación para generar un token web JSON. Consulte API de autenticación.
- Debe tener asignado un rol que incluya el permiso
Ver y administrar toda la actividad programada desde mis
carpetas.
En este ejemplo, se enumeran todas las automatizaciones programadas ordenadas por fecha y hora de la siguiente ejecución.
Procedimiento
- Agregue el token de autenticación al encabezado de la solicitud.
-
Utilice el método POST y la URL del terminal:
<control_room_url>/
v1/schedule/automations/list.Cuerpo de la solicitud:{ "sort":[ { "field":"zonedNextRunDateTime", "direction":"asc" } ] }
-
Envíe la solicitud.
Cuerpo de la respuesta: La respuesta incluye los siguientes datos sobre cada automatización:
- id: el valor numérico que identifica la automatización. Utilice este parámetro en las API Actualizar automatizaciones o Eliminar automatizaciones.
- estado: devuelve si la automatización programada está
ACTIVA
o
{ "page": { "offset": 0, "total": 3, "totalFilter": 3 }, "list": [ { "id": "661", "name": "eodReport_28.20.10.12.23.02.48", "fileId": "6598", "status": "ACTIVE", "deviceIds": [], "description": "", "rdpEnabled": false, "scheduleType": "DAILY", "dailyRecurrence": { "interval": 3 }, "timeZone": "America/Los_Angeles", "startDate": "2020-10-12", "endDate": "", "startTime": "23:30", "repeatEnabled": true, "repeatOccurrence": { "runEvery": "3", "timeUnit": "HOURS", "endTime": "23:59" }, "zonedNextRunDateTime": "2021-01-14T07:30:00Z", "createdBy": "251", "createdOn": "2020-10-13T06:01:51.992433Z", "updatedBy": "251", "updatedOn": "2021-01-11T07:30:00.082057Z", "tenantId": "1", "fileName": "wlm_28", "filePath": "Automation Anywhere\\Bots\\West Coast", "runAsUserIds": [ "251" ], "botInput": {}, "tenantUuid": "e100fbce-008c-04ec-4063-7af0af91fb2f", "poolId": [ "23" ], "overrideDefaultDevice": false, "runElevated": false }, { "id": "990", "name": "accounts.20.12.16.10.51.59", "fileId": "12501", "status": "ACTIVE", "deviceIds": [], "description": "", "rdpEnabled": false, "scheduleType": "WEEKLY", "weeklyRecurrence": { "interval": 1, "daysOfWeek": [ "TUE", "THU", "FRI" ] }, "timeZone": "Australia/Melbourne", "startDate": "2021-01-16", "endDate": "2021-12-24", "startTime": "20:45", "repeatEnabled": true, "repeatOccurrence": { "runEvery": "1", "timeUnit": "HOURS", "endTime": "23:59" }, "zonedNextRunDateTime": "2021-01-19T09:45:00Z", "createdBy": "1103", "createdOn": "2021-01-11T18:59:31.182663Z", "updatedBy": "1103", "updatedOn": "2021-01-11T18:59:31.182669Z", "tenantId": "1", "fileName": "a_trigger", "filePath": "Automation Anywhere\\Bots\\APAC", "runAsUserIds": [ "80", "36", "1103" ], "botInput": {}, "tenantUuid": "e100fbce-008c-04ec-4063-7af0af91fb2f", "poolId": [ "7" ], "overrideDefaultDevice": false, "runElevated": false }, { "id": "989", "name": "UpdateInventory.20.12.16.10.40.48", "fileId": "11201", "status": "ACTIVE", "deviceIds": [], "description": "", "rdpEnabled": false, "scheduleType": "NONE", "timeZone": "Asia/Calcutta", "startDate": "2021-12-16", "endDate": "", "startTime": "15:00", "repeatEnabled": false, "zonedNextRunDateTime": "2021-12-16T09:30:00Z", "createdBy": "1103", "createdOn": "2021-01-11T18:57:18.932407Z", "updatedBy": "1103", "updatedOn": "2021-01-11T18:57:18.932422Z", "tenantId": "1", "fileName": "appsheet", "filePath": "Automation Anywhere\\Bots\\spreadsheets", "runAsUserIds": [ "480", "80", "472" ], "botInput": {}, "tenantUuid": "e100fbce-008c-04ec-4063-7af0af91fb2f", "poolId": [ "11" ], "overrideDefaultDevice": false, "runElevated": false } ] }
La API REST responde a cada solicitud con un código de respuesta HTTP. Para ver los códigos de respuesta, consulte Códigos de respuesta de API.