Which is the correct API to download a workflow run log?

You need to make a script to retrieve workflow run logs via the API.

Which is the correct API to download a workflow run log?
A . POST /repos/:owner/:repo/actions/runs/:run_id
B . GET /repos/:owner/:repo/actions/artifacts/logs
C . GET /repos/:owner/:repo/actions/runs/:run_id/logs
D . POST /repos/:owner/:repo/actions/runs/:run_id/logs

Answer: C

Explanation:

The GET /repos/:owner/:repo/actions/runs/:run_id/logs API endpoint is used to retrieve the logs of a specific workflow run identified by run_id. This is the correct method for downloading logs from a workflow run.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments