---
title: "Read a GitHub check's log"
method: GET
path: "/api/repos/{owner}/{repo}/ci/github/checks/{checkId}/log"
tags: ["CI"]
---

# Read a GitHub check's log

`GET /api/repos/{owner}/{repo}/ci/github/checks/{checkId}/log`

## Request

- Base URL: `https://git.cafe`
- URL: `https://git.cafe/api/repos/{owner}/{repo}/ci/github/checks/{checkId}/log`
- Auth: one of:
  - none
  - API key in cookie `gc-session`
  - HTTP bearer
  - HTTP basic
  - HTTP token
  - OAuth 2
    - Authorization code: `/api/oauth/authorize`
    - Token URL: `/api/oauth/token` scopes: `repo:contents:read`

Returns one UTF-8 excerpt of the job log of a GitHub Actions check run this repository mirrors from GitHub, in the shape of a CI job log excerpt (tailBytes, or startByte and endByte), with the check's name and result. GitCafe keeps no GitHub log: each request reads it from GitHub with the repository's GitHub App installation (it needs Actions read permission), so it is slower than a CI job log. The check id is the GitHub check run id (`checks.contexts[].url` of the pull request status ends in `/runs/<id>`). GitHub keeps no log for a check run from another app: that is the problem `ci-logs-github-not-actions`, whose `url` is the check's GitHub page. That, a job that has not finished and a log GitHub no longer keeps are problems, never an empty log; logs over 64 MiB are refused. Public repositories allow anonymous reads; supplied credentials are validated and may expand access to private resources.

## Path parameters

- `owner` string, required
- `repo` string, required
- `checkId` string, required

## Query parameters

- `tailBytes` integer
- `startByte` integer
- `endByte` integer

## Response `200`

Response for status 200

- object
  - `content` string, required
  - `startByte` integer, required
  - `endByte` integer, required
  - `totalBytes` integer, required
  - `truncated` boolean, required
  - `complete` boolean, required
  - `url` string, required
  - `check` object, required
    - `name` string, required
    - `status` string, required
    - `conclusion` string, nullable, required
  - `steps` object[], nullable, required
    - `number` integer, required
    - `name` string, required
    - `status` string, required
    - `conclusion` string, nullable, required
    - `startedAt` string, date-time, nullable, required
    - `completedAt` string, date-time, nullable, required

## Other responses

- `400`: The request is invalid.
- `401`: Authentication is required, or the supplied credential is invalid.
- `403`: The credential does not permit this operation. A `code`, when present, names the refusal.
- `404`: The resource does not exist or is not visible to the caller.
- `409`: The request conflicts with the current state. A `code`, when present, names the refusal; `retryable` says whether the same request can succeed later, and `operationId` names the operation in the way.
- `429`: A rate limit is exhausted. Wait Retry-After seconds; the value is a hint, so back off on a repeat 429.
- `503`: A required service is temporarily unavailable; retry later.

---

[API](https://skmtc.dev/gitcafe/apis/git-cafe-api.md) - [All operations](https://skmtc.dev/gitcafe/apis/git-cafe-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gitcafe/apis/git-cafe-api/revisions/9fa233d2986d?raw)
