Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Execute Schedule API

DenisKasapovic
Contributor III

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.

1 ACCEPTED SOLUTION

Accepted Solutions

JeffLetterman
Archer Employee
Archer Employee

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...

pastedImage_15.png

pastedImage_17.png

View solution in original post

4 REPLIES 4

DavidPetty
Archer Employee
Archer Employee

Denis, I don't think there's any exposed APIs around schedule execution.

 Advisory Consultant

Appreciate the quick response David.

JeffLetterman
Archer Employee
Archer Employee

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...

pastedImage_15.png

pastedImage_17.png

Thank you for the info Jeff.