Search the task logs of several invocation attempts
GET
https://api.vercel.com/v1/vercel-ci/log-searchSearches 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