Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub Actions API: Get view workflow run history

I am looking for an API to retrieve previous runs of a specific workflow in GitHub Actions. I found the API that returns the previous runs of my entire repository, but I only need the runs of a specific workflow.

This link perfectly describes what I am looking for as an API: https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/viewing-workflow-run-history

like image 442
lghh Avatar asked Sep 20 '25 23:09

lghh


1 Answers

Use the /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs endpoint to list the runs of a given workflow ID in a given repository.

For example, to get all of the runs of the CI job for the rust-lang/rust repository, use https://api.github.com/repos/rust-lang/rust/actions/workflows/817415/runs.

like image 81
Smitop Avatar answered Sep 23 '25 11:09

Smitop