deployments
Get a deployment by ID or URL
Endpoints
- access-groups
- artifacts
- checks
- projects
- deployments
- domains
- dns
- logDrains
- edge-config
- user
- marketplace
- integrations
- authentication
- projectMembers
- environment
- security
- teams
- webhooks
- aliases
- certs
deployments
Get a deployment by ID or URL
Retrieves information for a deployment either by supplying its ID (id
property) or Hostname (url
property). Additional details will be included when the authenticated user or team is an owner of the deployment.
GET
/
v13
/
deployments
/
{idOrUrl}
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.deployments.getDeployment({
idOrUrl: "dpl_89qyp1cskzkLrVicDaZoDbjyHuDJ",
withGitRepoInfo: "true",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
// Handle the result
console.log(result);
}
run();
{
"aliasAssignedAt": 123,
"alwaysRefuseToBuild": true,
"build": {
"env": [
"<string>"
]
},
"buildArtifactUrls": [
"<string>"
],
"builds": [
{
"use": "<string>",
"src": "<string>",
"config": {}
}
],
"env": [
"<string>"
],
"inspectorUrl": "<string>",
"isInConcurrentBuildsQueue": true,
"isInSystemBuildsQueue": true,
"projectSettings": {
"buildCommand": "<string>",
"devCommand": "<string>",
"framework": "blitzjs",
"commandForIgnoringBuildStep": "<string>",
"installCommand": "<string>",
"outputDirectory": "<string>",
"speedInsights": {
"id": "<string>",
"enabledAt": 123,
"disabledAt": 123,
"canceledAt": 123,
"hasData": true,
"paidAt": 123
},
"webAnalytics": {
"id": "<string>",
"disabledAt": 123,
"canceledAt": 123,
"enabledAt": 123,
"hasData": true
}
},
"readyStateReason": "<string>",
"integrations": {
"status": "error",
"startedAt": 123,
"completedAt": 123,
"skippedAt": 123,
"skippedBy": "<string>"
},
"images": {
"sizes": [
123
],
"qualities": [
123
],
"domains": [
"<string>"
],
"remotePatterns": [
{
"protocol": "http",
"hostname": "<string>",
"port": "<string>",
"pathname": "<string>",
"search": "<string>"
}
],
"localPatterns": [
{
"pathname": "<string>",
"search": "<string>"
}
],
"minimumCacheTTL": 123,
"formats": [
"image/avif"
],
"dangerouslyAllowSVG": true,
"contentSecurityPolicy": "<string>",
"contentDispositionType": "inline"
},
"alias": [
"<string>"
],
"aliasAssigned": true,
"bootedAt": 123,
"buildingAt": 123,
"buildContainerFinishedAt": 123,
"buildSkipped": true,
"creator": {
"uid": "<string>",
"username": "<string>",
"avatar": "<string>"
},
"initReadyAt": 123,
"isFirstBranchDeployment": true,
"lambdas": [
{
"id": "<string>",
"createdAt": 123,
"entrypoint": "<string>",
"readyState": "BUILDING",
"readyStateAt": 123,
"output": [
{
"path": "<string>",
"functionName": "<string>"
}
]
}
],
"public": true,
"ready": 123,
"status": "QUEUED",
"team": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"avatar": "<string>"
},
"userAliases": [
"<string>"
],
"previewCommentsEnabled": true,
"ttyBuildLogs": true,
"customEnvironment": {
"id": "<string>",
"slug": "<string>",
"type": "production",
"description": "<string>",
"branchMatcher": {
"type": "startsWith",
"pattern": "<string>"
},
"domains": [
{
"name": "<string>",
"apexName": "<string>",
"projectId": "<string>",
"redirect": "<string>",
"redirectStatusCode": 307,
"gitBranch": "<string>",
"customEnvironmentId": "<string>",
"updatedAt": 123,
"createdAt": 123,
"verified": true,
"verification": [
{
"type": "<string>",
"domain": "<string>",
"value": "<string>",
"reason": "<string>"
}
]
}
],
"currentDeploymentAliases": [
"<string>"
],
"createdAt": 123,
"updatedAt": 123
},
"aliasWarning": {
"code": "<string>",
"message": "<string>",
"link": "<string>",
"action": "<string>"
},
"id": "<string>",
"name": "<string>",
"type": "LAMBDAS",
"createdAt": 123,
"readyState": "QUEUED",
"aliasError": {
"code": "<string>",
"message": "<string>"
},
"aliasFinal": "<string>",
"autoAssignCustomDomains": true,
"automaticAliases": [
"<string>"
],
"buildErrorAt": 123,
"checksState": "registered",
"checksConclusion": "succeeded",
"deletedAt": 123,
"defaultRoute": "<string>",
"canceledAt": 123,
"errorCode": "<string>",
"errorLink": "<string>",
"errorMessage": "<string>",
"errorStep": "<string>",
"passiveRegions": [
"<string>"
],
"gitSource": {
"type": "github",
"repoId": "<string>",
"ref": "<string>",
"sha": "<string>",
"prId": 123
},
"meta": {},
"originCacheRegion": "<string>",
"project": {
"id": "<string>",
"name": "<string>",
"framework": "<string>"
},
"readySubstate": "STAGED",
"regions": [
"<string>"
],
"softDeletedByRetention": true,
"source": "api-trigger-git-deploy",
"target": "staging",
"undeletedAt": 123,
"url": "<string>",
"version": 2,
"oidcTokenClaims": {
"iss": "<string>",
"sub": "<string>",
"scope": "<string>",
"aud": "<string>",
"owner": "<string>",
"owner_id": "<string>",
"project": "<string>",
"project_id": "<string>",
"environment": "<string>"
},
"projectId": "<string>",
"plan": "pro",
"connectBuildsEnabled": true,
"connectConfigurationId": "<string>",
"createdIn": "<string>",
"crons": [
{
"schedule": "<string>",
"path": "<string>"
}
],
"functions": {},
"monorepoManager": "<string>",
"ownerId": "<string>",
"passiveConnectConfigurationId": "<string>",
"routes": [
{
"src": "<string>",
"dest": "<string>",
"headers": {},
"methods": [
"<string>"
],
"continue": true,
"override": true,
"caseSensitive": true,
"check": true,
"important": true,
"status": 123,
"has": [
{
"type": "host",
"value": "<string>"
}
],
"missing": [
{
"type": "host",
"value": "<string>"
}
],
"locale": {
"redirect": {},
"cookie": "<string>"
},
"middlewarePath": "<string>",
"middlewareRawSrc": [
"<string>"
],
"middleware": 123
}
],
"gitRepo": {
"namespace": "<string>",
"projectId": 123,
"type": "gitlab",
"url": "<string>",
"path": "<string>",
"defaultBranch": "<string>",
"name": "<string>",
"private": true,
"ownerType": "team"
},
"flags": {
"definitions": {}
},
"microfrontends": {
"isDefaultApp": true,
"defaultRoute": "<string>",
"groupIds": [
"<string>"
]
},
"config": {
"version": 123,
"functionType": "fluid",
"functionMemoryType": "standard",
"functionTimeout": 123,
"secureComputePrimaryRegion": "<string>",
"secureComputeFallbackRegion": "<string>"
}
}
Authorizations
Default authentication mechanism
Path Parameters
The unique identifier or hostname of the deployment.
Example:
"dpl_89qyp1cskzkLrVicDaZoDbjyHuDJ"
Query Parameters
Whether to add in gitRepo information.
Example:
"true"
The Team identifier to perform the request on behalf of.
Example:
"team_1a2b3c4d5e6f7g8h9i0j1k2l"
The Team slug to perform the request on behalf of.
Example:
"my-team-url-slug"
Response
200
application/json
The deployment including only public information
The deployment including both public and private information
The deployment including both public and private information
The deployment including both public and private information
The deployment including only public information
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.deployments.getDeployment({
idOrUrl: "dpl_89qyp1cskzkLrVicDaZoDbjyHuDJ",
withGitRepoInfo: "true",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
// Handle the result
console.log(result);
}
run();
{
"aliasAssignedAt": 123,
"alwaysRefuseToBuild": true,
"build": {
"env": [
"<string>"
]
},
"buildArtifactUrls": [
"<string>"
],
"builds": [
{
"use": "<string>",
"src": "<string>",
"config": {}
}
],
"env": [
"<string>"
],
"inspectorUrl": "<string>",
"isInConcurrentBuildsQueue": true,
"isInSystemBuildsQueue": true,
"projectSettings": {
"buildCommand": "<string>",
"devCommand": "<string>",
"framework": "blitzjs",
"commandForIgnoringBuildStep": "<string>",
"installCommand": "<string>",
"outputDirectory": "<string>",
"speedInsights": {
"id": "<string>",
"enabledAt": 123,
"disabledAt": 123,
"canceledAt": 123,
"hasData": true,
"paidAt": 123
},
"webAnalytics": {
"id": "<string>",
"disabledAt": 123,
"canceledAt": 123,
"enabledAt": 123,
"hasData": true
}
},
"readyStateReason": "<string>",
"integrations": {
"status": "error",
"startedAt": 123,
"completedAt": 123,
"skippedAt": 123,
"skippedBy": "<string>"
},
"images": {
"sizes": [
123
],
"qualities": [
123
],
"domains": [
"<string>"
],
"remotePatterns": [
{
"protocol": "http",
"hostname": "<string>",
"port": "<string>",
"pathname": "<string>",
"search": "<string>"
}
],
"localPatterns": [
{
"pathname": "<string>",
"search": "<string>"
}
],
"minimumCacheTTL": 123,
"formats": [
"image/avif"
],
"dangerouslyAllowSVG": true,
"contentSecurityPolicy": "<string>",
"contentDispositionType": "inline"
},
"alias": [
"<string>"
],
"aliasAssigned": true,
"bootedAt": 123,
"buildingAt": 123,
"buildContainerFinishedAt": 123,
"buildSkipped": true,
"creator": {
"uid": "<string>",
"username": "<string>",
"avatar": "<string>"
},
"initReadyAt": 123,
"isFirstBranchDeployment": true,
"lambdas": [
{
"id": "<string>",
"createdAt": 123,
"entrypoint": "<string>",
"readyState": "BUILDING",
"readyStateAt": 123,
"output": [
{
"path": "<string>",
"functionName": "<string>"
}
]
}
],
"public": true,
"ready": 123,
"status": "QUEUED",
"team": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"avatar": "<string>"
},
"userAliases": [
"<string>"
],
"previewCommentsEnabled": true,
"ttyBuildLogs": true,
"customEnvironment": {
"id": "<string>",
"slug": "<string>",
"type": "production",
"description": "<string>",
"branchMatcher": {
"type": "startsWith",
"pattern": "<string>"
},
"domains": [
{
"name": "<string>",
"apexName": "<string>",
"projectId": "<string>",
"redirect": "<string>",
"redirectStatusCode": 307,
"gitBranch": "<string>",
"customEnvironmentId": "<string>",
"updatedAt": 123,
"createdAt": 123,
"verified": true,
"verification": [
{
"type": "<string>",
"domain": "<string>",
"value": "<string>",
"reason": "<string>"
}
]
}
],
"currentDeploymentAliases": [
"<string>"
],
"createdAt": 123,
"updatedAt": 123
},
"aliasWarning": {
"code": "<string>",
"message": "<string>",
"link": "<string>",
"action": "<string>"
},
"id": "<string>",
"name": "<string>",
"type": "LAMBDAS",
"createdAt": 123,
"readyState": "QUEUED",
"aliasError": {
"code": "<string>",
"message": "<string>"
},
"aliasFinal": "<string>",
"autoAssignCustomDomains": true,
"automaticAliases": [
"<string>"
],
"buildErrorAt": 123,
"checksState": "registered",
"checksConclusion": "succeeded",
"deletedAt": 123,
"defaultRoute": "<string>",
"canceledAt": 123,
"errorCode": "<string>",
"errorLink": "<string>",
"errorMessage": "<string>",
"errorStep": "<string>",
"passiveRegions": [
"<string>"
],
"gitSource": {
"type": "github",
"repoId": "<string>",
"ref": "<string>",
"sha": "<string>",
"prId": 123
},
"meta": {},
"originCacheRegion": "<string>",
"project": {
"id": "<string>",
"name": "<string>",
"framework": "<string>"
},
"readySubstate": "STAGED",
"regions": [
"<string>"
],
"softDeletedByRetention": true,
"source": "api-trigger-git-deploy",
"target": "staging",
"undeletedAt": 123,
"url": "<string>",
"version": 2,
"oidcTokenClaims": {
"iss": "<string>",
"sub": "<string>",
"scope": "<string>",
"aud": "<string>",
"owner": "<string>",
"owner_id": "<string>",
"project": "<string>",
"project_id": "<string>",
"environment": "<string>"
},
"projectId": "<string>",
"plan": "pro",
"connectBuildsEnabled": true,
"connectConfigurationId": "<string>",
"createdIn": "<string>",
"crons": [
{
"schedule": "<string>",
"path": "<string>"
}
],
"functions": {},
"monorepoManager": "<string>",
"ownerId": "<string>",
"passiveConnectConfigurationId": "<string>",
"routes": [
{
"src": "<string>",
"dest": "<string>",
"headers": {},
"methods": [
"<string>"
],
"continue": true,
"override": true,
"caseSensitive": true,
"check": true,
"important": true,
"status": 123,
"has": [
{
"type": "host",
"value": "<string>"
}
],
"missing": [
{
"type": "host",
"value": "<string>"
}
],
"locale": {
"redirect": {},
"cookie": "<string>"
},
"middlewarePath": "<string>",
"middlewareRawSrc": [
"<string>"
],
"middleware": 123
}
],
"gitRepo": {
"namespace": "<string>",
"projectId": 123,
"type": "gitlab",
"url": "<string>",
"path": "<string>",
"defaultBranch": "<string>",
"name": "<string>",
"private": true,
"ownerType": "team"
},
"flags": {
"definitions": {}
},
"microfrontends": {
"isDefaultApp": true,
"defaultRoute": "<string>",
"groupIds": [
"<string>"
]
},
"config": {
"version": 123,
"functionType": "fluid",
"functionMemoryType": "standard",
"functionTimeout": 123,
"secureComputePrimaryRegion": "<string>",
"secureComputeFallbackRegion": "<string>"
}
}