GET
/
v3
/
deployments
/
{idOrUrl}
/
events
import { Vercel } from "@vercel/sdk";

const vercel = new Vercel({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await vercel.deployments.getDeploymentEvents({
    idOrUrl: "dpl_5WJWYSyB7BpgTj3EuwF37WMRBXBtPQ2iTMJHJBJyRfd",
    follow: 1,
    limit: 100,
    name: "bld_cotnkcr76",
    since: 1540095775941,
    until: 1540106318643,
    statusCode: "5xx",
    delimiter: 1,
    builds: 1,
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    slug: "my-team-url-slug",
  });

  // Handle the result
  console.log(result);
}

run();
[
  {
    "type": "delimiter",
    "created": 123,
    "payload": {
      "deploymentId": "<string>",
      "info": {
        "type": "<string>",
        "name": "<string>",
        "entrypoint": "<string>",
        "path": "<string>",
        "step": "<string>",
        "readyState": "<string>"
      },
      "text": "<string>",
      "id": "<string>",
      "date": 123,
      "serial": "<string>",
      "created": 123,
      "statusCode": 123,
      "requestId": "<string>",
      "proxy": {
        "timestamp": 123,
        "method": "<string>",
        "host": "<string>",
        "path": "<string>",
        "statusCode": 123,
        "userAgent": [
          "<string>"
        ],
        "referer": "<string>",
        "clientIp": "<string>",
        "region": "<string>",
        "scheme": "<string>",
        "responseByteSize": 123,
        "cacheId": "<string>",
        "pathType": "<string>",
        "pathTypeVariant": "<string>",
        "vercelId": "<string>",
        "vercelCache": "MISS",
        "lambdaRegion": "<string>",
        "wafAction": "log",
        "wafRuleId": "<string>"
      }
    }
  }
]

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

idOrUrl
string
required

The unique identifier or hostname of the deployment.

Example:

"dpl_5WJWYSyB7BpgTj3EuwF37WMRBXBtPQ2iTMJHJBJyRfd"

Query Parameters

direction
enum<string>
default:forward

Order of the returned events based on the timestamp.

Available options:
backward,
forward
Example:

"backward"

follow
enum<number>

When enabled, this endpoint will return live events as they happen.

Available options:
0,
1
Example:

1

limit
number

Maximum number of events to return. Provide -1 to return all available logs.

Example:

100

name
string

Deployment build ID.

Example:

"bld_cotnkcr76"

since
number

Timestamp for when build logs should be pulled from.

Example:

1540095775941

until
number

Timestamp for when the build logs should be pulled up until.

Example:

1540106318643

statusCode

HTTP status code range to filter events by.

Example:

"5xx"

delimiter
enum<number>
Available options:
0,
1
Example:

1

builds
enum<number>
Available options:
0,
1
Example:

1

teamId
string

The Team identifier to perform the request on behalf of.

Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

slug
string

The Team slug to perform the request on behalf of.

Example:

"my-team-url-slug"

Response

200
application/json