API for Re-Run Checks

Hello, 

I wanted to run Re-run checks by using an API instead of pressing the Re-run checks button, If the workflow run is failed  . Can anyone tell me on how to consume the API for the Re-run checks? That will be great. 

Hi @ibakshay ,

You can use the GitHub REST API Rerequest check suite to do this.

POST https://api.github.com/repos/<org>/<repo>/check-suites/<check_suite_id>/rerequest

More details about this API, please reference here: https://developer.github.com/v3/checks/suites/#rerequest-check-suite .
Below is an example for this API.

1 Like

Hey, I’m using the octokit API to re-request the suite, but it doesn’t re-run the checks in the suite.
Edit: The API request does show success with a status of 201.