Get a deployment by ID or URL
GET
/__remote/api.vercel.com/v13/deployments/{idOrUrl}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.Request
import { Edgenivo } from "@vercel/sdk";
const vercel = new Edgenivo({ 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", });
console.log(result);}
run();Response
{ "alias": [], "aliasAssigned": "false", "aliasError": { "code": "string", "message": "string" }, "aliasWarning": { "action": "string", "code": "string", "link": "string", "message": "string" }, "duration": { "endTime": "123", "endTimeCapped": "123", "startTime": "123", "timeForBilling": "123", "timeToContainerExit": "123", "timeToContainerExitCapped": "123", "timeToReady": "123" }, "errorCode": "string", "errorMessage": "string", "id": "dpl_89qyp1cskzkLrVicDaZoDbjyHuDJ", "readyState": "READY", "target": "null"}AuthorizationbearerToken
Default authentication mechanism
When
true, the response includes the gitSource object with the commit SHA, branch name, and connected repository metadata. Defaults to false.200Returns a reduced view of the deployment with public information only. Private fields are omitted when the requester is not the deployment owner.
Returns the reduced deployment view for anonymous (`vcn_`) callers. Pool-team details are withheld.
An object that will contain a
code and a message when the aliasing fails, otherwise the value will be nullThe state of the deployment depending on the process of deploying, or if it is ready or in an error state
400One of the provided values in the request query is invalid.
401Error
403You do not have permission to access this resource.
404The deployment was not found
410Error
429Error