Skip to content
Docs

Get log lines for the tasks of an invocation attempt

GEThttps://api.vercel.com/v1/vercel-ci/invocations/{invocationId}/attempts/{attempt}/task-logs
Returns log lines for the tasks of an invocation attempt in a single request, grouped by task. Tasks can be narrowed by name and by conclusion, for example conclusion=failed to fetch only the logs of failed tasks. With search, every matching task is searched at once and only tasks with matching lines are returned.
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.vercelCi.getVercelCiTaskLogs({
invocationId: "<id>",
attempt: "<value>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();
Response
{
"tasks": [
{
"jobDefinitionId": "example_id",
"jobName": "Example Name",
"jobRunAttempt": "123",
"taskDefinitionId": "example_id",
"taskName": "Example Name",
"taskRunAttempt": "123",
"conclusion": {
"result": "string"
},
"lines": [
{
"level": "string",
"timestamp": "123",
"message": "string"
}
]
}
],
"hasMore": "true"
}
Errors
{
"error": {
"code": "string",
"message": "string"
}
}
AuthorizationbearerToken

Default authentication mechanism

invocationIdstringRequired
attemptstringRequired
taskarrayOptional
Only return tasks with one of these names (e.g., "web#test").
conclusionarrayOptional
Only return completed tasks with one of these conclusions.
levelarrayOptional
Only return log lines with one of these levels.
limitnumberOptional
Maximum number of tasks to return (default: 10, max: 25).
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 log lines.
tasksarrayRequired
hasMorebooleanRequired
Whether more tasks matched the filters than were returned. With search, whether more than 1000 lines matched.
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