nerdexam
MicrosoftMicrosoft

GH-200 · Question #3

GH-200 Question #3: Real Exam Question with Answer & Explanation

The correct answer is B: GET /repos/:owner/:repo/actions/runs/:run_id/logs. REST API endpoints for workflow jobs You can use the REST API to view logs and workflow jobs in GitHub Actions. Download job logs for a workflow run Gets a redirect URL to download a plain text file of logs for a workflow job. Code samples for "Download job logs for a workflow ru

Implement and manage GitHub Actions workflows

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/logs
  • BGET /repos/:owner/:repo/actions/runs/:run_id/logs
  • CPOST /repos/:owner/:repo/actions/runs/:run_id
  • DGET /repos/:owner/:repo/actions/artifacts/logs

Explanation

REST API endpoints for workflow jobs You can use the REST API to view logs and workflow jobs in GitHub Actions. Download job logs for a workflow run Gets a redirect URL to download a plain text file of logs for a workflow job. Code samples for "Download job logs for a workflow run" Get /repos/{owner}/{repo}/actions/jobs/{job_id}/logs https://docs.github.com/en/rest/actions/workflow-jobs

Topics

#GitHub API#Workflow Logs#REST API#API Endpoints

Community Discussion

No community discussion yet for this question.

Full GH-200 PracticeBrowse All GH-200 Questions