Skip to content
Docs

Get log lines for a specific task run attempt

GEThttps://api.vercel.com/v1/vercel-ci/invocations/{invocationId}/attempts/{attempt}/job-definitions/{jobDefinitionId}/runs/{runAttempt}/task-definitions/{taskDefinitionId}/runs/{taskRunAttempt}/logs
Get 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

invocationIdstringRequired
attemptstringRequired
jobDefinitionIdstringRequired
runAttemptstringRequired
taskDefinitionIdstringRequired
taskRunAttemptstringRequired
follownumberOptional
When 1, stream log lines as newline-delimited JSON until the task run finishes.
sincenumberOptional
levelarrayOptional
Only return log lines with one of these levels.
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
200Successfully fetched task run log lines.
linesarrayRequired
400One of the provided values in the request query is invalid.
401The request is not authorized.
errorobjectRequired
403You do not have permission to access this resource.
errorobjectRequired
404Error
410Error
429Error
errorobjectRequired
500Error
errorobjectRequired