Skip to content
GitmoapAPIBeta
Buildpipeline-runs
GET/repositories/{repo_id}/pipeline-runs/{pipeline_run_id}/nodes/{node_run_id}/logs

One page of a step's logs, addressed by line.

get_node_run_logs
  • pipeline:read
    A token needs the pipeline:read scope: View pipeline runs and definitionsGranted by read_api, read_repository, write_api, write_repository.Every operation this scope unlocks
  • Metered egress · in band body

    x-gitmoap-egress: {"kind":"metered","arg":"in_band_body"}

Lines are numbered from zero across the whole log, so a page is addressed by the line it starts at, and the next page starts after the last line returned. A running step's log keeps growing; follow it with the log stream rather than reading pages repeatedly.

Parameters

Path
  • repo_idRepositoryId (string · uuid)Repository id
  • pipeline_run_idPipelineRunId (string · uuid)Pipeline run id
  • node_run_idNodeRunId (string · uuid)Node run id
Query
  • from_lineinteger · int64optionalFirst line to return, counting from zero
  • to_lineinteger · int64optionalReturn the page ending just before this line; ignored when from_line is present
  • limitinteger · int32optionalPage size (1-1000, default 500)

Responses

200One page of logsapplication/json
  • first_lineinteger · int640–∞Position of the first line in this page.
  • itemsarray of LogRecord
  • node_statusNodeStatuspendingawaiting_approvaldispatchedrunningsucceededfailedtimed_outskippedcancelledWhere a step has got to.
  • node_terminalboolean
  • run_terminalboolean
  • total_linesinteger · int640–∞Lines in the whole log — what a scrollbar is sized against.
  • truncatedbooleanWhether output collection stopped at this step's log-size ceiling.
  • next_lineinteger · int64 or nulloptional0–∞Line to ask for next, or absent at the end of the log.
200 exampleSynthesized example
{
"first_line": 23,
"items": [
{
"event": {
"capability": "capability-2426",
"node_run_id": "fe5d8aa4-6104-4a58-a8c4-ff50f7e26e71",
"pipeline_run_id": "9e2b7c41-3d5a-4f8e-b1c2-7a6d5e4f3c2b",
"type": "Started"
},
"line": 89,
"timestamp": "timestamp-0801"
},
{
"event": {
"capability": "capability-487e",
"node_run_id": "8b86c49b-17fe-4edf-a2f9-cc22b7b5b65b",
"pipeline_run_id": "9e2b7c41-3d5a-4f8e-b1c2-7a6d5e4f3c2b",
"type": "Started"
},
"line": 33,
"timestamp": "timestamp-64cf"
}
],
"node_status": "pending",
"node_terminal": false,
"run_terminal": false,
"total_lines": 7,
"truncated": false,
"next_line": 23
}
400Invalid id or paging parameterapplication/json
Error codes
  • BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-1b6a",
"message": "Stream pipeline status into the run header"
}
}
401application/json
Error codes
  • UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-07d3",
"message": "Stream pipeline status into the run header"
}
}
403application/json
Error codes
  • FORBIDDENYou are signed in but may not do this here; reason names the permission or the rule that refused it
  • INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs; required_scope names it
  • PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-f3a1",
"message": "Draw the region map from operation density"
}
}
404application/json
Error codes
  • NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-dd5f",
"message": "Pin a page's payload to the build that rendered it"
}
}

CLI

gitmoap pipeline-runs get-node-run-logs

  • --repo-ididRepository id (id or owner/repo path)
  • --pipeline-run-ididPipeline run id
  • --node-run-ididNode run id
  • --from-linenumberoptionalFirst line to return, counting from zero
  • --limitnumberoptionalPage size (1-1000, default 500)
  • --to-linenumberoptionalReturn the page ending just before this line; ignored when from_line is present

Used in these guides