ci.jobs.logs

Read one page of a job’s log

GET /ci/api/jobs/{jobId}/logsIAM ci:GetRunLogsReadSensitive read, audited

Answers `{ lines, nextCursor, hasMore }`. Pass nextCursor back as `cursor` for the next page; while the job runs, an empty page means no new lines yet.

Request syntax

GET /ci/api/jobs/{jobId}/logs

Path parameters

  • jobIdRequired

    string

    Constraints: uuid

Query parameters

  • afterOptional

    number

    Older clients: the sequence number to read after (lines are numbered from 0). Prefer cursor, which wins when both are given; neither: from the first line

    Constraints: integer, min 0

  • cursorOptional

    string

    nextCursor from the previous page, passed back unchanged; an altered one is refused with 400 (Invalid cursor)

  • limitOptional

    number

    Lines per page, 1 to 1000; 500 when omitted. A page also stops at 2 MiB of text (always at least one line)

    Constraints: integer, 1-1000

Response

200 with { lines, cursor, nextCursor, hasMore }: up to limit lines after the cursor, oldest first, each with seq, stepPosition, stream (stdout or stderr), content and at; cursor is the last seq returned (older clients); nextCursor is always set; hasMore: more lines are there now. 404 when the job is not in this organization; 403, recorded in the audit log, without ci:GetRunLogs.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow ci:GetRunLogs on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud ci jobs logs jobId

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_ci_jobs_logs.