List deployments
GET
https://api.vercel.com/v7/deploymentsList deployments under the authenticated user or team. If a deployment hasn't finished uploading (is incomplete), the
url property will have a value of null.Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",});
async function run() { const result = await vercel.deployments.getDeployments({ app: "docs", from: 1612948664566, limit: 10, projectId: "QmXGTs7mvAMMC7WW5ebrM33qKG32QK3h4vmQMjmY", projectIds: [ "prj_123", "prj_456", ], target: "production", to: 1612948664566, users: "kr1PsOIzqEL5Xg6M4VZcZosf,K4amb7K9dAt5R2vBJWF32bmY", since: 1540095775941, until: 1540095775951, state: "BUILDING,READY", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", });
console.log(result);}
run();Response
{ "deployments": [ { "aliasAssigned": "123", "aliasError": { "code": "string", "message": "string" }, "attribution": { "commitMeta": { "email": "user@example.com", "isVerified": "false", "name": "Example Name" }, "gitUser": { "id": "icfg_1234567890", "login": "string", "provider": "example_id", "type": "string" }, "vercelUser": { "id": "icfg_1234567890", "teamRoles": [], "username": "string" } }, "buildingAt": "1609492210000", "checks": { "deployment-alias": { "completedAt": "123", "startedAt": "123", "state": "failed" } }, "checksConclusion": "canceled", "checksState": "completed", "connectBuildsEnabled": "false", "connectConfigurationId": "example_id", "created": "1609492210000", "createdAt": "123", "creator": { "email": "example@example.com", "githubLogin": "johndoe", "gitlabLogin": "johndoe", "type": "app", "uid": "eLrCnEgbKhsHyfbiNR7E8496", "username": "johndoe" }, "customEnvironment": { "id": "icfg_1234567890", "slug": "string" }, "defaultRoute": "/docs", "deleted": "1609492210000", "errorCode": "BUILD_FAILED", "errorMessage": "The Deployment has been canceled because this project was not affected", "expiration": "123", "inspectorUrl": "https://vercel.com/acme/nextjs/J1hXN00qjUeoYfpEEf7dnDtpSiVq", "isRollbackCandidate": "false", "manualProvisioning": { "completedAt": "123", "state": "COMPLETE" }, "meta": "value", "name": "docs", "oomReport": "out-of-memory", "passiveConnectConfigurationId": "example_id", "platform": { "creator": { "avatar": "string", "name": "Example Name" }, "meta": "value", "origin": { "type": "id", "value": "string" }, "source": { "name": "Example Name" } }, "prebuilt": "false", "projectId": "example_id", "projectSettings": { "buildCommand": "string", "commandForIgnoringBuildStep": "string", "createdAt": "123", "customerSupportCodeVisibility": "false", "devCommand": "string", "framework": "actix-web", "gitComments": { "onCommit": "false", "onPullRequest": "false" }, "gitForkProtection": "false", "gitLFS": "false", "installCommand": "string", "nodeVersion": "10.x", "outputDirectory": "string", "rootDirectory": "string", "skipGitConnectDuringLink": "false", "sourceFilesOutsideRootDirectory": "false", "speedInsights": { "canceledAt": "123", "dataReceivedAt": "123", "disabledAt": "123", "enabledAt": "123", "hasData": "false", "id": "icfg_1234567890", "paidAt": "123" }, "webAnalytics": { "canceledAt": "123", "disabledAt": "123", "enabledAt": "123", "hasData": "true", "id": "icfg_1234567890" } }, "proposedExpiration": "123", "ready": "1609492210000", "readyState": "BLOCKED", "readySubstate": "PROMOTED", "seatBlock": { "blockCode": "COMMIT_AUTHOR_REQUIRED", "gitProvider": "bitbucket", "gitUserId": "example_id", "isVerified": "false", "userId": "example_id" }, "softDeletedByRetention": "true", "source": "cli", "state": "READY", "target": "production", "type": "LAMBDAS", "uid": "dpl_2euZBFqxYdDMDG1jTrHFnNZ2eUVa", "undeleted": "1609492210000", "url": "docs-9jaeg38me.vercel.app" } ], "pagination": { "count": "20", "next": "1540095775951", "prev": "1540095775951" }}AuthorizationbearerToken
Default authentication mechanism
Gets the deployment created after this Date timestamp. (default: current time)
Filter deployments from the given project IDs. Cannot be used when projectId is specified.
Gets the deployment created before this Date timestamp. (default: current time)
Filter deployments based on their state (
BUILDING, ERROR, INITIALIZING, QUEUED, READY, CANCELED, BLOCKED)400One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error
422Error