nerdexam
GitHub

GITHUB-ACTIONS · Question #5

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?

The correct answer is C. GET /repos/:owner/:repo/actions/runs/:run_id/logs. 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

Monitor and manage workflow runs

Question

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?

Options

  • APOST /repos/:owner/:repo/actions/runs/:run_id
  • BGET /repos/:owner/:repo/actions/artifacts/logs
  • CGET /repos/:owner/:repo/actions/runs/:run_id/logs
  • DPOST /repos/:owner/:repo/actions/runs/:run_id/logs

How the community answered

(22 responses)
  • A
    5% (1)
  • C
    91% (20)
  • D
    5% (1)

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

Topics

#GitHub REST API#workflow logs#run_id#API endpoints

Community Discussion

No community discussion yet for this question.

Full GITHUB-ACTIONS Practice