Skip to content
Docs

Search the task logs of several invocation attempts

GEThttps://api.vercel.com/v1/vercel-ci/log-search
Searches the task logs of up to 50 invocation attempts at once, for example the most recent runs of a branch from GET /v2/vercel-ci/invocations. Only invocations and tasks with matching lines are returned. When more than 1000 lines match, the newest are kept.
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.vercelCi.searchVercelCiLogs({
invocation: [
"<value 1>",
"<value 2>",
],
search: "<value>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();
Response
{
"invocations": [
{
"invocationId": "example_id",
"attempt": "123",
"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

invocationarrayRequired
Invocation attempts to search, as ":" (at most 50).
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 searched task logs.
invocationsarrayRequired
hasMorebooleanRequired
Whether more than 1000 lines matched. The newest lines are returned.
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