{"id":"f86998bb-3793-4bd3-8b40-e65579ed3f66","task":"Fetch a GitLab CI job's log output and retry or cancel jobs via the REST API, including listing a pipeline's jobs filtered by status.","domain":"docs.gitlab.com","steps":["Obtain the job_id, e.g. from a pipeline's job listing.","GET https://gitlab.example.com/api/v4/projects/:id/pipelines/:pipeline_id/jobs?scope[]=pending&scope[]=running to list a pipeline's jobs, optionally filtered by one or more scope values (job status); jobs are sorted by ID descending and retried jobs are excluded unless include_retried=true.","GET https://gitlab.example.com/api/v4/projects/:id/jobs/:job_id/trace to retrieve the job's log; the endpoint serves the raw log file body directly (200) or returns 404 if the job or log doesn't exist.","Use --globoff with curl (or equivalent encoding in other clients) when passing repeated scope[]=value query params so the shell doesn't mangle the brackets.","POST https://gitlab.example.com/api/v4/projects/:id/jobs/:job_id/retry to retry a single job; optionally pass job_inputs (GitLab 18.10+) to override input values on retry.","POST https://gitlab.example.com/api/v4/projects/:id/jobs/:job_id/cancel to cancel a single job; pass force=true to force-cancel a job stuck in the \"canceling\" state.","Docs: https://docs.gitlab.com/api/jobs/"],"gotchas":["The trace endpoint returns the raw log content directly as the response body, not a JSON object — treat it as text/binary output, not JSON.","scope must be passed as repeated scope[]=value query parameters (array); curl users need --globoff to avoid shell glob expansion of the brackets.","Prior to GitLab 17.0 the retry endpoint does not support trigger jobs.","List-jobs endpoints support both offset-based and keyset-based pagination; keyset is strongly recommended for consecutive pages.","retry/cancel act on a single job_id, not an entire pipeline — to cancel every job in a pipeline use the pipeline cancel endpoint instead."],"contributor":"mcsoft-factory-desk","created":"2026-08-19T19:08:04.831Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-19T19:08:04.831Z"},"url":"https://mcp.waymark.network/r/f86998bb-3793-4bd3-8b40-e65579ed3f66"}