Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2019-03-14 12:49 PM
I am currently unable to find any API documentation related to Schedules. Is there any documentation related to this or is this type of API call not available within Archer?
Looking at the Archer Toolbox that @Jeff Letterman designed I was unable to find a call which would work for this case.
2019-03-14 03:43 PM
Unfortunately, there is not a documented, public API way of doing this. But using a browser's F12 developer mode, we can see the internal API calls being made when clicking the Run Now button for a Schedule. In the following example, the Schedule Id is 5.
Verb: POST
URL: /api/V2/internal/ScheduleRules(5)/EnqueueJob
Sample Response:
{
"@odata.context": "http://localhost/RSAarcher/api/V2/Internal/$metadata#EntityModel.JobStartResult",
"JobId": "e896f81f-a61f-4883-9833-6f22743dfff5",
"JobToken": 107,
"Id": null,
"IsSuccessful": false,
"ValidationMessages": []
}
From the response, use the JobToken value to check the status of the job.
Verb: GET
URL: /api/V2/internal/JobStatus(107)?value=107
Sample Response:
{
"@odata.context": "http://localhost/RSAarcher/api/V2/Internal/$metadata#JobStatus/$entity",
"JobToken": 107,
"Type": "ScheduleRule",
"Status": "Running",
"TotalCount": 100,
"PrcocessedCount": 100,
"SuceededCount": 100,
"FailedCount": 0,
"CreatedDate": "2019-03-14T19:13:44.963Z",
"CompletedDate": null,
"LogId": 107
}
I'll be posting a PowerShell script soon to list Bulk Action Schedules and Calculation Schedules with last run details from a single window. One nice detail not available in Archer UI is the ability to see how many records currently meet the schedule's criteria before running...see HitCount column. Here are a couple teaser pics...
2019-03-14 12:54 PM
Denis, I don't think there's any exposed APIs around schedule execution.
Advisory Consultant
2019-03-14 02:00 PM
Appreciate the quick response David.
2019-03-14 03:43 PM
Unfortunately, there is not a documented, public API way of doing this. But using a browser's F12 developer mode, we can see the internal API calls being made when clicking the Run Now button for a Schedule. In the following example, the Schedule Id is 5.
Verb: POST
URL: /api/V2/internal/ScheduleRules(5)/EnqueueJob
Sample Response:
{
"@odata.context": "http://localhost/RSAarcher/api/V2/Internal/$metadata#EntityModel.JobStartResult",
"JobId": "e896f81f-a61f-4883-9833-6f22743dfff5",
"JobToken": 107,
"Id": null,
"IsSuccessful": false,
"ValidationMessages": []
}
From the response, use the JobToken value to check the status of the job.
Verb: GET
URL: /api/V2/internal/JobStatus(107)?value=107
Sample Response:
{
"@odata.context": "http://localhost/RSAarcher/api/V2/Internal/$metadata#JobStatus/$entity",
"JobToken": 107,
"Type": "ScheduleRule",
"Status": "Running",
"TotalCount": 100,
"PrcocessedCount": 100,
"SuceededCount": 100,
"FailedCount": 0,
"CreatedDate": "2019-03-14T19:13:44.963Z",
"CompletedDate": null,
"LogId": 107
}
I'll be posting a PowerShell script soon to list Bulk Action Schedules and Calculation Schedules with last run details from a single window. One nice detail not available in Archer UI is the ability to see how many records currently meet the schedule's criteria before running...see HitCount column. Here are a couple teaser pics...
2019-03-14 03:46 PM
Thank you for the info Jeff.