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.https://api.vercel.com/v1/vercel-ci/log-search
const response = await fetch('https://api.vercel.com/v1/vercel-ci/log-search?invocation=[]&search=string&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
{ "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