Get log lines for a specific task run attempt
GET
https://api.vercel.com/v1/vercel-ci/invocations/{invocationId}/attempts/{attempt}/job-definitions/{jobDefinitionId}/runs/{runAttempt}/task-definitions/{taskDefinitionId}/runs/{taskRunAttempt}/logsGet Task Run Logs With
follow=1 the response is a newline-delimited JSON stream of log lines that ends once the task run has finished and its logs are flushed, or when the stream reaches its maximum duration.https://api.vercel.com/v1/vercel-ci/invocations/{invocationId}/attempts/{attempt}/job-definitions/{jobDefinitionId}/runs/{runAttempt}/task-definitions/{taskDefinitionId}/runs/{taskRunAttempt}/logs
const response = await fetch('https://api.vercel.com/v1/vercel-ci/invocations/invocationId/attempts/attempt/job-definitions/jobDefinitionId/runs/runAttempt/task-definitions/taskDefinitionId/runs/taskRunAttempt/logs?follow=123&since=123&level=[]&teamId=string&slug=string', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', },});
const data = await response.json();console.log(data);Response
{ "lines": [ { "level": "string", "timestamp": "123", "message": "string" } ]}Errors
{ "error": { "code": "string", "message": "string" }}AuthorizationbearerToken
Default authentication mechanism