1. Docs
  2. Reference
  3. REST API Docs
  4. Deployments

Deployments

    The Deployments API allows you to configure and manage Pulumi Deployments, which enable you to execute Pulumi updates and other operations through the Pulumi Cloud. With this API, you can configure deployment settings for your stacks, trigger deployments, view deployment status and logs, and manage deployment execution.

    See Pulumi Deployments for conceptual documentation and getting-started guides.

    Get Deployments Status

    GET /api/deployments/{deploymentId}/status

    Returns the current execution status of a Pulumi Deployments run. This endpoint is used by self-hosted deployment agents running in agent pools to check whether a deployment is still active. Authenticated using an agent pool secret rather than a user access token.

    Request Parameters

    • deploymentId string path required
      The deployment identifier

    Responses

    200 OK

    Get Pulumi Deploy Executor

    GET /api/deployments/executor

    Streams the Linux/AMD64 Pulumi Deployments executor binary to the requester. The executor is the component that runs inside a deployment container and executes the actual Pulumi operations. The binary is retrieved from the Docker image/filesystem and proxied through the service to control access. This API is for internal use by workflow runners and requires valid credentials.

    Responses

    200 OK

    Poll Deployments Queue

    GET /api/deployments/poll

    Polls the Pulumi Deployments queue for available work to execute. This endpoint is used by self-hosted deployment agents running in agent pools to pick up queued deployment jobs. Returns 200 with the next available deployment’s workflow definition if work is available, or 204 No Content if the queue is empty. Agents should poll this endpoint repeatedly. Authenticated using an agent pool secret rather than a user access token.

    Responses

    200 OK
    • jobToken string required
      Authentication token for the workflow agent to make API calls to the Pulumi Service.
    • oidcToken string required
      OIDC token for authenticating with cloud providers during workflow execution.
    • typeSpecificID string required
      The unique identifier specific to the workflow type. For deployments, this is the deployment ID. For insights scans, this is the account ID.
    • deploymentID string optional
      Deprecated: use typeSpecificID instead.
    • jobID string required
      The unique identifier for the workflow job.
    • runID string required
      The unique identifier for the workflow run.
    204 No Content
    Errors: 403 Forbidden

    List Org Deployments

    GET /api/orgs/{orgName}/deployments

    Returns a paginated list of all Pulumi Deployments executions across an organization, filtered to only include deployments for stacks the requesting user has access to. The response includes each deployment’s ID, status, version, creation time, the requesting user, project and stack names, Pulumi operation type, job details, and associated update results. Use ‘page’ (minimum 1, default 1) and ‘pageSize’ (1-100, default 10) for pagination, ‘sort’ to specify the sort field, and ‘asc’ to control sort direction (default descending). The response also includes the total count of matching deployments.

    Request Parameters

    • orgName string path required
      The organization name
    • asc boolean query optional
      Sort in ascending order when true (default false)
    • page integer query optional
      Page number (min 1, default 1)
    • pageSize integer query optional
      Results per page (1-100, default 10)
    • sort string query optional
      Field to sort results by

    Responses

    200 OK
    • deployments array[ListDeploymentSnapshot] required
      The list of deployment snapshots
    • id string required
      Unique identifier for this deployment.
    • projectName string optional
      ProjectName is the name of the project.
    • created string required
      Created defines when the Deployment was created.
    • stackName string optional
      StackName is the name of the stack.
    • modified string required
      Created defines when the corresponding WorkflowRun was modified.
    • paused boolean optional
      Paused indicates whether or not deployments are paused for this program.
    • pulumiOperation enum required
      PulumiOperation is the operation that was performed.
      Values: update, preview, destroy, refresh, detect-drift, remediate-drift
    • status enum required
      Status is the current status of the workflow runID.
      Values: not-started, accepted, running, failed, succeeded, skipped
    • updates array[DeploymentNestedUpdate] required
      Updates
    • version integer required
      Version is the ordinal ID for the stack
    • jobs array[DeploymentJob] required
      The list of jobs in this deployment
    • requestedBy UserInfo required
      RequestedBy contains the user information about the user who created the Deployment
    • initiator string optional
      Initiator is the initiation source of the deployment.
    • agentPool ListDeploymentSnapshotAgentPool optional
      The agent pool used for this deployment, if any
    • itemsPerPage integer required
      The number of items per page
    • total integer required
      The total number of deployments
    Errors: 400 Invalid query parameter 404 Run

    Org Deployments Metadata

    GET /api/orgs/{orgName}/deployments/metadata

    Returns metadata about the organization’s Pulumi Deployments state. The response includes the overall pause status, a list of individually paused stacks (as stack references like project/stack), the configured concurrency limit (maximum number of concurrent deployments), and deployment counts broken down by status (notStarted, accepted, running, failed, succeeded, skipped, and total). This endpoint is useful for monitoring deployment health and capacity across an organization.

    Request Parameters

    • orgName string path required
      The organization name

    Responses

    200 OK
    • paused boolean required
      Paused is true if all new deployments for this org are paused right now.
    • concurrency integer required
      Concurrency is the number of concurrent deployments allowed for this org.
    • deploymentCounts DeploymentCounts required
      DeploymentCounts is the number of deployments with different statuses for this org.
    • notStarted integer required
      The number of deployments that have not started.
    • accepted integer required
      The number of deployments that have been accepted.
    • running integer required
      The number of deployments currently running.
    • failed integer required
      The number of deployments that have failed.
    • succeeded integer required
      The number of deployments that have succeeded.
    • skipped integer required
      The number of deployments that have been skipped.
    • total integer required
      The total number of deployments.

    Pause Org Deployments

    POST /api/orgs/{orgName}/deployments/pause

    Pauses all future Pulumi Deployments executions across an entire organization. While paused, new deployments can still be queued and currently executing deployments will continue to run to completion. However, queued deployments will not be picked up for execution until deployments are resumed. This provides a safety mechanism to temporarily halt all deployment activity across the organization, for example during maintenance windows or incident response. Requires organization administrator permissions. Use the ResumeOrgDeployments endpoint to resume processing.

    Request Parameters

    • orgName string path required
      The organization name

    Responses

    200 OK

    Resume Org Deployments

    POST /api/orgs/{orgName}/deployments/resume

    Resumes Pulumi Deployments executions for an organization that was previously paused via PauseOrgDeployments. Any queued deployments that accumulated while the organization was paused will begin processing according to the organization’s concurrency limits. Requires organization administrator permissions.

    Request Parameters

    • orgName string path required
      The organization name

    Responses

    200 OK

    Get Usage Summary Deploy Compute

    GET /api/orgs/{orgName}/deployments/summary

    Retrieves a summary of Pulumi Deployments compute usage (deployment minutes) for an organization. The response provides aggregated deployment minute consumption over the specified time period. Use the ‘granularity’ parameter to control time bucketing (e.g. ‘daily’ or ‘hourly’), and either ’lookbackDays’ (number of days from the current date) or ’lookbackStart’ (a Unix timestamp) to define the reporting window. Returns 204 No Content if no usage data is available for the specified period.

    Request Parameters

    • orgName string path required
      The organization name
    • granularity string query optional
      Time granularity for the summary (e.g. ‘daily’, ‘hourly’)
    • lookbackDays integer query optional
      Number of days to look back from the current date
    • lookbackStart integer query optional
      Start of the lookback period (Unix timestamp)

    Responses

    200 OK
    • summary array[ResourceCountSummary] required
      The list of resource count summaries
    • year integer required
      The 4-digit year.
    • month integer optional
      The month of the year. Ranges from 1 to 12.
    • day integer optional
      The day of month. Ranges from 1 to 31.
    • weekNumber integer optional
      The week number in the year with Sunday marking the start of the week. Ranges from 0-53.
    • hour integer optional
      The hour of the day. Ranges from 0 to 23.
    • resources integer required
      The RUM (total number of resources under management at a given time). Calculated by getting the average of the all the resources for the given time frame.
    • resourceHours integer required
      The RHUM, which is the number of hours the resources under management have been running. Calculated by getting the sum of all the resources for the given time frame. 1 resource hour = 1 Pulumi credit.
    204 No Content
    Errors: 400 Bad granularity value or invalid lookbackDays/lookbackStart parameter

    Get Deploy Usage Report

    GET /api/orgs/{orgName}/deployments/usagereport

    Retrieves raw deployment usage records for self-hosted Pulumi Cloud customers to self-report deployment consumption. Returns aggregated deployment usage records for the specified organization. The ’lookbackDays’ query parameter controls how far back in time to retrieve records. This endpoint is primarily used by self-hosted customers for usage reporting and billing reconciliation purposes.

    Request Parameters

    • orgName string path required
      The organization name
    • lookbackDays integer query optional
      Number of days to look back

    Responses

    200 successful operation
    Errors: 400 Invalid query parameter

    List Stack Deployments Handler V2

    GET /api/stacks/{orgName}/{projectName}/{stackName}/deployments

    Returns a paginated list of Pulumi Deployments executions for a specific stack. The response includes each deployment’s ID, status, version, creation and modification timestamps, the requesting user, Pulumi operation type, job details with step-level progress, and associated stack update results. Use ‘page’ (minimum 1, default 1) and ‘pageSize’ (1-100, default 10) for pagination, ‘sort’ to specify the sort field, and ‘asc’ to control sort direction (default descending). The response also includes the total count of deployments for the stack.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name
    • asc boolean query optional
      Sort in ascending order when true (default false)
    • page integer query optional
      Page number (min 1, default 1)
    • pageSize integer query optional
      Results per page (1-100, default 10)
    • sort string query optional
      Field to sort results by

    Responses

    200 OK
    • deployments array[ListDeploymentSnapshot] required
      The list of deployment snapshots
    • id string required
      Unique identifier for this deployment.
    • projectName string optional
      ProjectName is the name of the project.
    • created string required
      Created defines when the Deployment was created.
    • stackName string optional
      StackName is the name of the stack.
    • modified string required
      Created defines when the corresponding WorkflowRun was modified.
    • paused boolean optional
      Paused indicates whether or not deployments are paused for this program.
    • pulumiOperation enum required
      PulumiOperation is the operation that was performed.
      Values: update, preview, destroy, refresh, detect-drift, remediate-drift
    • status enum required
      Status is the current status of the workflow runID.
      Values: not-started, accepted, running, failed, succeeded, skipped
    • updates array[DeploymentNestedUpdate] required
      Updates
    • version integer required
      Version is the ordinal ID for the stack
    • jobs array[DeploymentJob] required
      The list of jobs in this deployment
    • requestedBy UserInfo required
      RequestedBy contains the user information about the user who created the Deployment
    • initiator string optional
      Initiator is the initiation source of the deployment.
    • agentPool ListDeploymentSnapshotAgentPool optional
      The agent pool used for this deployment, if any
    • itemsPerPage integer required
      The number of items per page
    • total integer required
      The total number of deployments
    Errors: 400 Invalid query parameter 404 Run

    Create API Deployment Handler V2

    POST /api/stacks/{orgName}/{projectName}/{stackName}/deployments

    Initiates a new Pulumi Deployments execution for a stack. Pulumi Deployments is a managed service that executes Pulumi operations (update, preview, refresh, or destroy) in a secure, hosted environment.

    Important: The stack must already exist before a deployment can be created for it.

    The operation field is required and accepts: update, preview, refresh, or destroy. Three usage modes are supported:

    1. Stack settings only: Send {"operation": "update"} to use the stack’s saved deployment settings.
    2. Merged settings: Include partial settings in the request body alongside operation. When inheritSettings is true (the default), request settings are merged with saved stack settings, with request values taking precedence.
    3. Request settings only: Set inheritSettings to false and provide all settings in the request body.

    Settings include source context (git repo, branch, directory), operation context (environment variables, pre-run commands, OIDC configuration), executor context, GitHub integration settings, and cache options.

    This is v2 with breaking changes from CreateAPIDeploymentHandler: inheritSettings defaults to true, and operation is a required top-level field and no longer valid as part of operationContext.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Request Body

    • operation enum optional
      The Pulumi operation to perform.
      Values: update, preview, destroy, refresh, detect-drift, remediate-drift
    • tag string optional
      A tag to identify the deployment settings configuration.
    • executorContext ExecutorSettingsRequest optional
      The executor context defining the execution environment.
    • executorImage DockerImageRequest optional
      The Docker image to use for the execution environment.
    • executorRootPath string optional
      The root path for the executor binary and working directory.
    • inheritSettings boolean optional
      Whether this deployment should inherit the stack’s deployment settings. Defaults to true.
    • sourceContext SourceContextRequest optional
      The source context defining where the source code is located.
    • git SourceContextGitRequest optional
      Git-based source context configuration.
    • hg SourceContextHgRequest optional
      Mercurial-based source context configuration.
    • template SourceContextTemplateRequest optional
      Template-based source context configuration.
    • GitHub-specific deployment settings
    • repository string optional
      The GitHub repository in the format owner/repo.
    • deployCommits boolean optional
      Whether to automatically deploy commits pushed to the target branch.
    • previewPullRequests boolean optional
      Whether to automatically preview pull requests.
    • pullRequestTemplate boolean required
      Whether to use a pull request template for deployment previews.
    • deployPullRequest integer optional
      The pull request number to deploy, if targeting a specific pull request.
    • paths array[string] optional
      The list of file paths to filter deployment triggers.
    • installationId string optional
      The GitHub App installation ID.
    • VCS provider settings
    • repository string optional
      The VCS repository reference (format varies by provider)
    • deployCommits boolean optional
      Whether to deploy all commits to the default branch
    • paths array[string] optional
      Paths within the repository that trigger deployments when changed
    • installationId string optional
      VCS installation/integration ID linking to the VCS provider
    • pullRequestTemplate boolean optional
      Whether to use pull request templates for deployment PRs
    • previewPullRequests boolean optional
      Whether to create preview deployments for pull requests
    • deployPullRequest integer optional
      Specific pull request number to deploy (overrides automatic deployment)
    • provider string required
    • operationContext OperationContextRequest optional
      The operation context defining pre-run and post-run commands and environment variables.
    • The OIDC configuration for the operation.
    • preRunCommands array[string] optional
      Optional list of commands to run before Pulumi is invoked.
    • operation enum optional
      The Pulumi operation to perform (e.g. update, preview, destroy).
      Values: update, preview, destroy, refresh, detect-drift, remediate-drift
    • environmentVariables map[string]SecretValue optional
      Environment variables to apply during execution.
    • options OperationContextOptionsRequest optional
      Options to specify or override default behavior.
    • role DeploymentRoleRequest optional
      The deployment role to assume for the operation.
    • agentPoolID string optional
      The identifier of the agent pool to use for deployments.
    • cacheOptions CacheOptionsRequest optional
      Cache options for the deployment.
    • enable boolean optional
      Whether build caching should be enabled for deployments on this stack.

    Responses

    202 Accepted
    • id string required
      The generated deployment identifier.
    • consoleUrl string required
      The Pulumi Console URL for the deployment.
    • version integer required
      The numerical sequential version for the deployment.
    Errors: 400 Missing top level required field 'operation' or 'operation' must only be set at the top level or the agent pool specified in the deployment settings does not exist 402 Drift remediation requires Business Critical subscription 404 Stack

    Get Deployment

    GET /api/stacks/{orgName}/{projectName}/{stackName}/deployments/{deploymentId}

    Retrieves detailed information about a specific Pulumi Deployments execution by its deployment ID. The response includes the deployment’s current status, creation and modification timestamps, version number, the user who requested the deployment, the Pulumi operation type (update, preview, refresh, or destroy), and detailed job information. Each job contains an array of steps with their individual statuses (not-started, running, succeeded, or failed), start times, and last update timestamps. The response also includes any associated stack update results with update IDs, versions, start/end times, and result status.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name
    • deploymentId string path required
      The deployment identifier

    Responses

    200 OK
    • id string required
      Unique identifier for this deployment.
    • created string required
      Created defines when the Deployment was created.
    • modified string required
      Created defines when the corresponding WorkflowRun was modified.
    • status enum required
      Status is the current status of the workflow runID.
      Values: not-started, accepted, running, failed, succeeded, skipped
    • version integer required
      Version is the ordinal ID for the stack
    • requestedBy UserInfo required
      RequestedBy contains the user information about the user who created the Deployment
    • name string required
      The user’s display name.
    • githubLogin string required
      The user’s login name.
    • avatarUrl string required
      The URL of the user’s avatar image.
    • email string optional
      IMPORTANT: The email address of the user is only included on a few admin-only APIs. For nearly all APIs that return a UserInfo object, this will not be provided. considered sensitive information.
    • jobs array[DeploymentJob] optional
      Jobs make up all the Jobs of the Deployment. Omitted for deployments that have not started yet.
    • status enum required
      The current status of the deployment job.
      Values: not-started, accepted, running, failed, succeeded, skipped
    • started string optional
      The timestamp when the job started.
    • lastUpdated string optional
      The timestamp when the job was last updated.
    • steps array[StepRun] required
      The list of steps in the deployment job.
    • latestVersion integer required
      LatestVersion is the most recent version number for deployments for the given programID
    • configuration DeploymentConfiguration optional
      Configuration contains the environment variables and source information for a deployment
    • environmentVariables array[EnvironmentVariable] required
      The list of environment variables for the deployment.
    • source DeploymentSource optional
      The source configuration for the deployment.
    • initiator string optional
      Initiator is the initiation source of the deployment.
    • pulumiOperation enum optional
      PulumiOperation is the operation that was performed. Omitted for historical deployments that predate this field.
      Values: update, preview, destroy, refresh, detect-drift, remediate-drift
    Errors: 404 Deployment

    Cancel Deployment

    POST /api/stacks/{orgName}/{projectName}/{stackName}/deployments/{deploymentId}/cancel

    Terminates an in-progress Pulumi Deployments execution for a specific stack. If the deployment is currently running, it is stopped immediately. If the deployment is queued but has not yet started, it is removed from the queue.

    Warning: Canceling a deployment is a dangerous action and may leave the stack in an inconsistent state if the deployment is canceled during the execution of a Pulumi operation.

    Note that this serves two endpoints:

    • /{orgName}/{projectName}/{stackName}/deployments/{deploymentId}/cancel
    • /admin/deployments/{deploymentId}/cancel

    The former requires that the requesting user has stack deployment create permissions. The latter requires that the requesting user is a site administrator.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name
    • deploymentId string path required
      The deployment identifier

    Responses

    200 OK
    Errors: 404 Deployment or Queued Deployment

    Get Deployment Logs

    GET /api/stacks/{orgName}/{projectName}/{stackName}/deployments/{deploymentId}/logs

    Retrieves execution logs for a Pulumi Deployments run. Supports two retrieval modes: streaming mode and step mode. In streaming mode, omit job/step parameters and use the continuationToken to incrementally fetch logs from the beginning through completion. Each response includes a nextToken field; continue requesting with this token until nextToken is absent, indicating all logs have been retrieved. In step mode, specify job and step indices to retrieve logs for a specific step within a specific job, with offset and count parameters for pagination within that step’s logs. In step mode, count must be between 1 and 499 (default 100), and the response includes a nextOffset field for fetching subsequent pages. Log lines include timestamps and the log line content.

    Note that this serves two endpoints:

    • /{orgName}/{projectName}/{stackName}/deployments/{deploymentId}/logs
    • /admin/deployments/{deploymentId}/logs

    The former requires stack deployment read permissions. The latter requires site administrator privileges.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name
    • deploymentId string path required
      The deployment identifier
    • continuationToken string query optional
      Continuation token for streaming logs; use nextToken from the previous response to fetch subsequent log entries
    • count integer query optional
      Number of log lines to return (1-499, default 100)
    • job integer query optional
      Zero-based job index to retrieve logs for
    • offset integer query optional
      Zero-based line offset within the step logs
    • step integer query optional
      Zero-based step index within the specified job

    Responses

    200 OK
    • __type string required
    Errors: 400 Count must be less than 500 and more than 0 404 Deployment or Run

    Get Deployment Updates

    GET /api/stacks/{orgName}/{projectName}/{stackName}/deployments/{deploymentId}/updates

    Retrieves all stack updates (program updates) associated with a specific Pulumi Deployments execution. A single deployment may produce one or more stack updates depending on the operation performed. Each update in the response includes details such as the update ID, version, start and end times, result status, and resource changes. This is useful for correlating deployment executions with their resulting infrastructure changes.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name
    • deploymentId string path required
      The deployment identifier

    Responses

    200 OK
    Errors: 404 Deployment or Program

    Clear Project Cache

    DELETE /api/stacks/{orgName}/{projectName}/{stackName}/deployments/cache

    Clears all cached dependency and build artifacts associated with the project for Pulumi Deployments. The deployment cache stores dependencies and other artifacts between deployment runs to speed up execution. Use this endpoint to force a clean build on the next deployment, for example when cached dependencies become stale or corrupted.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Responses

    200 OK
    Errors: 403 Forbidden 404 Stack

    Get Presigned Cache URL

    POST /api/stacks/{orgName}/{projectName}/{stackName}/deployments/cache/url

    Returns a presigned URL for saving or restoring the Pulumi Deployments dependency cache. The cache stores build artifacts and dependencies between deployment runs to speed up execution. The request body must specify a method (PUT to upload a cache archive, or GET to download one) and a non-empty cache key identifying the cached content. The returned presigned URL can be used directly for the corresponding HTTP operation against the object store without additional authentication.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Request Body

    • method string required
      S3 method of the presigned URL
    • key string required
      The key

    Responses

    200 OK
    • url string required
      The URL
    Errors: 400 Invalid method. Must be PUT or GET. or Invalid key. Must be non-empty. 403 Forbidden 404 Stack

    Stack Deployments Metadata

    GET /api/stacks/{orgName}/{projectName}/{stackName}/deployments/metadata

    Returns metadata about the Pulumi Deployments state for a specific stack. The response distinguishes the source of any pause:

    • paused: overall pause status (true if either stack or org is paused)
    • stackPaused: whether the stack itself is paused
    • organizationPaused: whether the containing organization is paused

    This is useful for determining whether new deployments will be processed or held in the queue.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Responses

    200 OK
    • paused boolean required
      Paused is true if new deployments for this stack right now would be paused. This could be due to a stack-level or org-level pause.
    • stackPaused boolean required
      StackPaused is true if deployments for this stack specifically are paused.
    • organizationPaused boolean required
      OrgPaused is true if all deployments are paused for the org.
    • hasSchedules boolean required
      HasSchedules is true if the stack has at least one schedule.
    • drift StackDriftStatus optional
      Drift contains the drift status of the stack and associated metadata
    • driftDetected boolean required
      Whether drift was detected in the latest run.
    • latestDriftRun string required
      The identifier of the latest drift detection run.
    • runInProgress boolean required
      Whether a drift detection run is currently in progress.

    Pause Stack Deployments

    POST /api/stacks/{orgName}/{projectName}/{stackName}/deployments/pause

    Pauses all future Pulumi Deployments executions for a specific stack. While paused, new deployments can still be queued and currently executing deployments will continue to run to completion. However, queued deployments will not be picked up for execution until deployments are resumed. The stack must have deployment settings configured before it can be paused. Requires stack deployment create permissions. Use the ResumeStackDeployments endpoint to resume processing.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Responses

    200 OK
    Errors: 400 Attempted to pause or resume deployments on stack before it has been configured for deployments

    Resume Stack Deployments

    POST /api/stacks/{orgName}/{projectName}/{stackName}/deployments/resume

    Resumes Pulumi Deployments executions for a stack that was previously paused via PauseStackDeployments. Any queued deployments that accumulated while the stack was paused will begin processing. The stack must have deployment settings configured. Requires stack deployment create permissions.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Responses

    200 OK
    Errors: 400 Attempted to pause or resume deployments on stack before it has been configured for deployments

    Get Deployment Settings

    GET /api/stacks/{orgName}/{projectName}/{stackName}/deployments/settings

    Retrieves the Pulumi Deployments configuration for a specified stack. The response includes all saved deployment settings: source context (git repository URL, branch, and directory), operation context (environment variables, pre-run commands, OIDC provider configuration), executor context (deployment executor configuration), GitHub integration settings (repository, paths, deployment triggers), and cache options for dependency caching between runs. These settings serve as the baseline configuration for deployments when inheritSettings is true on a deployment request. Returns 404 if the stack has no deployment settings configured.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Responses

    200 OK
    • version integer optional
      The version of the deployment settings.
    • tag string optional
      A tag to identify the deployment settings configuration.
    • executorContext ExecutorContext optional
      The executor context defining the execution environment.
    • executorImage DockerImage optional
      Defines the image that the pulumi operations should run in.
    • executorRootPath string optional
      Defines the root path for the executor binary and working directory.
    • sourceContext SourceContext optional
      The source context defining where the source code is located.
    • git SourceContextGit optional
      Git-based source context for obtaining source code from a repository.
    • hg SourceContextHg optional
      Mercurial-based source context for obtaining source code from a repository.
    • template SourceContextTemplate optional
      Template-based source context for obtaining source code from a template URL.
    • gitHub DeploymentSettingsGitHub optional
      GitHub-specific deployment settings
    • repository string optional
      The GitHub repository in the format owner/repo.
    • pullRequestTemplate boolean optional
      Whether to use a pull request template for deployment previews.
    • deployCommits boolean optional
      Whether to automatically deploy commits pushed to the target branch.
    • previewPullRequests boolean optional
      Whether to automatically preview pull requests.
    • deployPullRequest integer optional
      The pull request number to deploy, if targeting a specific pull request.
    • paths array[string] optional
      The list of file paths to filter deployment triggers.
    • installationId string optional
      The GitHub App installation ID.
    • VCS provider settings
    • repository string optional
      The VCS repository reference (format varies by provider)
    • deployCommits boolean optional
      Whether to deploy all commits to the default branch
    • paths array[string] optional
      Paths within the repository that trigger deployments when changed
    • installationId string optional
      VCS installation/integration ID linking to the VCS provider
    • pullRequestTemplate boolean optional
      Whether to use pull request templates for deployment PRs
    • previewPullRequests boolean optional
      Whether to create preview deployments for pull requests
    • deployPullRequest integer optional
      Specific pull request number to deploy (overrides automatic deployment)
    • provider string required
    • operationContext OperationContext optional
      The operation context defining pre-run and post-run commands and environment variables.
    • OIDC contains the OIDC configuration for the operation.
    • preRunCommands array[string] optional
      PreRunCommands is an optional list of arbitrary commands to run before Pulumi is invoked. ref: https://github.com/pulumi/pulumi/issues/9397
    • operation enum optional
      The Pulumi operation to perform (e.g. update, preview, refresh, destroy).
      Values: update, preview, destroy, refresh, detect-drift, remediate-drift
    • environmentVariables map[string]SecretValue optional
      EnvironmentVariables contains environment variables to be applied during the execution.
    • options OperationContextOptions optional
      Options is a bag of settings to specify or override default behavior
    • role DeploymentRole optional
      Role defines the deployment role to assume for the operation.
    • source enum optional
      The source from which the deployment settings were created.
      Values: console, api, provider, github-review-stack, azure-devops-review-stack, gitlab-review-stack, bitbucket-review-stack, github-gitops
    • agentPoolID string optional
      The identifier of the agent pool to use for deployments.
    • cacheOptions CacheOptions optional
      Cache options for the deployment.
    • enable boolean required
      Whether build caching is enabled for deployments on this stack.
    Errors: 404 Stack

    Patch Deployment Settings

    POST /api/stacks/{orgName}/{projectName}/{stackName}/deployments/settings

    Creates or updates Pulumi Deployments settings for a stack using a merge operation. If no settings exist, they are created. If settings already exist, the request body is merged with the current settings using the following logic: for each property, start with the current value, remove it if the patch specifies null, or merge the new non-null value with the existing one. Non-object properties (strings, numbers, booleans) are replaced entirely. Settings include source context (git repository URL, branch, directory), operation context (environment variables, pre-run commands, OIDC configuration), executor context, GitHub integration settings, and cache options. Requires a Team Growth or higher subscription. Cannot be used to configure Pulumi Deployments for Terraform stacks.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Request Body

    • tag string optional
      A tag to identify the deployment settings configuration.
    • executorContext ExecutorSettingsRequest optional
      The executor context defining the execution environment.
    • executorImage DockerImageRequest optional
      The Docker image to use for the execution environment.
    • executorRootPath string optional
      The root path for the executor binary and working directory.
    • sourceContext SourceContextRequest optional
      The source context defining where the source code is located.
    • git SourceContextGitRequest optional
      Git-based source context configuration.
    • hg SourceContextHgRequest optional
      Mercurial-based source context configuration.
    • template SourceContextTemplateRequest optional
      Template-based source context configuration.
    • GitHub-specific deployment settings
    • repository string optional
      The GitHub repository in the format owner/repo.
    • deployCommits boolean optional
      Whether to automatically deploy commits pushed to the target branch.
    • previewPullRequests boolean optional
      Whether to automatically preview pull requests.
    • pullRequestTemplate boolean required
      Whether to use a pull request template for deployment previews.
    • deployPullRequest integer optional
      The pull request number to deploy, if targeting a specific pull request.
    • paths array[string] optional
      The list of file paths to filter deployment triggers.
    • installationId string optional
      The GitHub App installation ID.
    • VCS provider settings
    • repository string optional
      The VCS repository reference (format varies by provider)
    • deployCommits boolean optional
      Whether to deploy all commits to the default branch
    • paths array[string] optional
      Paths within the repository that trigger deployments when changed
    • installationId string optional
      VCS installation/integration ID linking to the VCS provider
    • pullRequestTemplate boolean optional
      Whether to use pull request templates for deployment PRs
    • previewPullRequests boolean optional
      Whether to create preview deployments for pull requests
    • deployPullRequest integer optional
      Specific pull request number to deploy (overrides automatic deployment)
    • provider string required
    • operationContext OperationContextRequest optional
      The operation context defining pre-run and post-run commands and environment variables.
    • The OIDC configuration for the operation.
    • preRunCommands array[string] optional
      Optional list of commands to run before Pulumi is invoked.
    • operation enum optional
      The Pulumi operation to perform (e.g. update, preview, destroy).
      Values: update, preview, destroy, refresh, detect-drift, remediate-drift
    • environmentVariables map[string]SecretValue optional
      Environment variables to apply during execution.
    • options OperationContextOptionsRequest optional
      Options to specify or override default behavior.
    • role DeploymentRoleRequest optional
      The deployment role to assume for the operation.
    • agentPoolID string optional
      The identifier of the agent pool to use for deployments.
    • cacheOptions CacheOptionsRequest optional
      Cache options for the deployment.
    • enable boolean optional
      Whether build caching should be enabled for deployments on this stack.

    Responses

    200 OK
    • version integer optional
      The version of the deployment settings.
    • tag string optional
      A tag to identify the deployment settings configuration.
    • executorContext ExecutorContext optional
      The executor context defining the execution environment.
    • executorImage DockerImage optional
      Defines the image that the pulumi operations should run in.
    • executorRootPath string optional
      Defines the root path for the executor binary and working directory.
    • sourceContext SourceContext optional
      The source context defining where the source code is located.
    • git SourceContextGit optional
      Git-based source context for obtaining source code from a repository.
    • hg SourceContextHg optional
      Mercurial-based source context for obtaining source code from a repository.
    • template SourceContextTemplate optional
      Template-based source context for obtaining source code from a template URL.
    • gitHub DeploymentSettingsGitHub optional
      GitHub-specific deployment settings
    • repository string optional
      The GitHub repository in the format owner/repo.
    • pullRequestTemplate boolean optional
      Whether to use a pull request template for deployment previews.
    • deployCommits boolean optional
      Whether to automatically deploy commits pushed to the target branch.
    • previewPullRequests boolean optional
      Whether to automatically preview pull requests.
    • deployPullRequest integer optional
      The pull request number to deploy, if targeting a specific pull request.
    • paths array[string] optional
      The list of file paths to filter deployment triggers.
    • installationId string optional
      The GitHub App installation ID.
    • VCS provider settings
    • repository string optional
      The VCS repository reference (format varies by provider)
    • deployCommits boolean optional
      Whether to deploy all commits to the default branch
    • paths array[string] optional
      Paths within the repository that trigger deployments when changed
    • installationId string optional
      VCS installation/integration ID linking to the VCS provider
    • pullRequestTemplate boolean optional
      Whether to use pull request templates for deployment PRs
    • previewPullRequests boolean optional
      Whether to create preview deployments for pull requests
    • deployPullRequest integer optional
      Specific pull request number to deploy (overrides automatic deployment)
    • provider string required
    • operationContext OperationContext optional
      The operation context defining pre-run and post-run commands and environment variables.
    • OIDC contains the OIDC configuration for the operation.
    • preRunCommands array[string] optional
      PreRunCommands is an optional list of arbitrary commands to run before Pulumi is invoked. ref: https://github.com/pulumi/pulumi/issues/9397
    • operation enum optional
      The Pulumi operation to perform (e.g. update, preview, refresh, destroy).
      Values: update, preview, destroy, refresh, detect-drift, remediate-drift
    • environmentVariables map[string]SecretValue optional
      EnvironmentVariables contains environment variables to be applied during the execution.
    • options OperationContextOptions optional
      Options is a bag of settings to specify or override default behavior
    • role DeploymentRole optional
      Role defines the deployment role to assume for the operation.
    • source enum optional
      The source from which the deployment settings were created.
      Values: console, api, provider, github-review-stack, azure-devops-review-stack, gitlab-review-stack, bitbucket-review-stack, github-gitops
    • agentPoolID string optional
      The identifier of the agent pool to use for deployments.
    • cacheOptions CacheOptions optional
      Cache options for the deployment.
    • enable boolean required
      Whether build caching is enabled for deployments on this stack.
    Errors: 400 Invalid agent pool id or invalid role id or validation error or sourceContext.template.sourceUrl is required when using a template or Pulumi Deployments cannot be configured for Terraform stacks 402 Pulumi Deployments requires Team Growth subscription 404 Stack or project

    Replace Deployment Settings

    PUT /api/stacks/{orgName}/{projectName}/{stackName}/deployments/settings

    Fully replaces the Pulumi Deployments settings for a stack. Unlike the PATCH endpoint (PatchDeploymentSettings) which merges changes, this endpoint replaces all settings with the provided values. Any previously configured settings not included in the request body will be removed. Settings include source context (git repository URL, branch, directory), operation context (environment variables, pre-run commands, OIDC configuration), executor context, GitHub integration settings, and cache options. Requires a Team Growth or higher subscription. Cannot be used to configure Pulumi Deployments for Terraform stacks.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Request Body

    • tag string optional
      A tag to identify the deployment settings configuration.
    • executorContext ExecutorSettingsRequest optional
      The executor context defining the execution environment.
    • executorImage DockerImageRequest optional
      The Docker image to use for the execution environment.
    • executorRootPath string optional
      The root path for the executor binary and working directory.
    • sourceContext SourceContextRequest optional
      The source context defining where the source code is located.
    • git SourceContextGitRequest optional
      Git-based source context configuration.
    • hg SourceContextHgRequest optional
      Mercurial-based source context configuration.
    • template SourceContextTemplateRequest optional
      Template-based source context configuration.
    • GitHub-specific deployment settings
    • repository string optional
      The GitHub repository in the format owner/repo.
    • deployCommits boolean optional
      Whether to automatically deploy commits pushed to the target branch.
    • previewPullRequests boolean optional
      Whether to automatically preview pull requests.
    • pullRequestTemplate boolean required
      Whether to use a pull request template for deployment previews.
    • deployPullRequest integer optional
      The pull request number to deploy, if targeting a specific pull request.
    • paths array[string] optional
      The list of file paths to filter deployment triggers.
    • installationId string optional
      The GitHub App installation ID.
    • VCS provider settings
    • repository string optional
      The VCS repository reference (format varies by provider)
    • deployCommits boolean optional
      Whether to deploy all commits to the default branch
    • paths array[string] optional
      Paths within the repository that trigger deployments when changed
    • installationId string optional
      VCS installation/integration ID linking to the VCS provider
    • pullRequestTemplate boolean optional
      Whether to use pull request templates for deployment PRs
    • previewPullRequests boolean optional
      Whether to create preview deployments for pull requests
    • deployPullRequest integer optional
      Specific pull request number to deploy (overrides automatic deployment)
    • provider string required
    • operationContext OperationContextRequest optional
      The operation context defining pre-run and post-run commands and environment variables.
    • The OIDC configuration for the operation.
    • preRunCommands array[string] optional
      Optional list of commands to run before Pulumi is invoked.
    • operation enum optional
      The Pulumi operation to perform (e.g. update, preview, destroy).
      Values: update, preview, destroy, refresh, detect-drift, remediate-drift
    • environmentVariables map[string]SecretValue optional
      Environment variables to apply during execution.
    • options OperationContextOptionsRequest optional
      Options to specify or override default behavior.
    • role DeploymentRoleRequest optional
      The deployment role to assume for the operation.
    • agentPoolID string optional
      The identifier of the agent pool to use for deployments.
    • cacheOptions CacheOptionsRequest optional
      Cache options for the deployment.
    • enable boolean optional
      Whether build caching should be enabled for deployments on this stack.

    Responses

    200 OK
    • version integer optional
      The version of the deployment settings.
    • tag string optional
      A tag to identify the deployment settings configuration.
    • executorContext ExecutorContext optional
      The executor context defining the execution environment.
    • executorImage DockerImage optional
      Defines the image that the pulumi operations should run in.
    • executorRootPath string optional
      Defines the root path for the executor binary and working directory.
    • sourceContext SourceContext optional
      The source context defining where the source code is located.
    • git SourceContextGit optional
      Git-based source context for obtaining source code from a repository.
    • hg SourceContextHg optional
      Mercurial-based source context for obtaining source code from a repository.
    • template SourceContextTemplate optional
      Template-based source context for obtaining source code from a template URL.
    • gitHub DeploymentSettingsGitHub optional
      GitHub-specific deployment settings
    • repository string optional
      The GitHub repository in the format owner/repo.
    • pullRequestTemplate boolean optional
      Whether to use a pull request template for deployment previews.
    • deployCommits boolean optional
      Whether to automatically deploy commits pushed to the target branch.
    • previewPullRequests boolean optional
      Whether to automatically preview pull requests.
    • deployPullRequest integer optional
      The pull request number to deploy, if targeting a specific pull request.
    • paths array[string] optional
      The list of file paths to filter deployment triggers.
    • installationId string optional
      The GitHub App installation ID.
    • VCS provider settings
    • repository string optional
      The VCS repository reference (format varies by provider)
    • deployCommits boolean optional
      Whether to deploy all commits to the default branch
    • paths array[string] optional
      Paths within the repository that trigger deployments when changed
    • installationId string optional
      VCS installation/integration ID linking to the VCS provider
    • pullRequestTemplate boolean optional
      Whether to use pull request templates for deployment PRs
    • previewPullRequests boolean optional
      Whether to create preview deployments for pull requests
    • deployPullRequest integer optional
      Specific pull request number to deploy (overrides automatic deployment)
    • provider string required
    • operationContext OperationContext optional
      The operation context defining pre-run and post-run commands and environment variables.
    • OIDC contains the OIDC configuration for the operation.
    • preRunCommands array[string] optional
      PreRunCommands is an optional list of arbitrary commands to run before Pulumi is invoked. ref: https://github.com/pulumi/pulumi/issues/9397
    • operation enum optional
      The Pulumi operation to perform (e.g. update, preview, refresh, destroy).
      Values: update, preview, destroy, refresh, detect-drift, remediate-drift
    • environmentVariables map[string]SecretValue optional
      EnvironmentVariables contains environment variables to be applied during the execution.
    • options OperationContextOptions optional
      Options is a bag of settings to specify or override default behavior
    • role DeploymentRole optional
      Role defines the deployment role to assume for the operation.
    • source enum optional
      The source from which the deployment settings were created.
      Values: console, api, provider, github-review-stack, azure-devops-review-stack, gitlab-review-stack, bitbucket-review-stack, github-gitops
    • agentPoolID string optional
      The identifier of the agent pool to use for deployments.
    • cacheOptions CacheOptions optional
      Cache options for the deployment.
    • enable boolean required
      Whether build caching is enabled for deployments on this stack.
    Errors: 400 Invalid agent pool id or invalid role id or validation error or sourceContext.template.sourceUrl is required when using a template or Pulumi Deployments cannot be configured for Terraform stacks 402 Pulumi Deployments requires Team Growth subscription 404 Stack or project

    Delete Deployment Settings

    DELETE /api/stacks/{orgName}/{projectName}/{stackName}/deployments/settings

    Removes all Pulumi Deployments settings for a stack, including source context, operation context, executor context, GitHub integration settings, and cache options. After deletion, the stack can no longer run deployments until new settings are configured. Any active schedules (drift detection, TTL, or custom) associated with the stack may also be affected.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Responses

    200 OK
    Errors: 404 Stack

    Encrypt Deployment Settings Secret

    POST /api/stacks/{orgName}/{projectName}/{stackName}/deployments/settings/encrypt

    Encrypts a plaintext secret value for secure storage in Pulumi Deployments settings. Use this endpoint to encrypt sensitive values such as cloud provider credentials, API keys, or other secrets before including them in deployment settings (e.g. as environment variables in operationContext). The encrypted value can then be safely stored in the deployment settings and will be decrypted at deployment execution time. The request body must contain a non-empty plaintext value to encrypt.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Request Body

    Schema: SecretValue
    • secret string required
      The secret value in plaintext.
    • ciphertext array[string] optional
      The encrypted representation of the secret value.

    Responses

    200 OK
    Schema: SecretValue
    • secret string required
      The secret value in plaintext.
    • ciphertext array[string] optional
      The encrypted representation of the secret value.
    Errors: 400 Invalid empty value 404 Stack

    Get Deployment

    GET /api/stacks/{orgName}/{projectName}/{stackName}/deployments/version/{version}

    Retrieves detailed information about a specific Pulumi Deployments execution by its version number within the stack. This is an alternative to fetching by deployment ID and returns the same response structure: deployment status, creation and modification timestamps, the user who requested the deployment, the Pulumi operation type, job details with step-level progress, and any associated stack update results.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name
    • version string path required
      The deployment version number

    Responses

    200 OK
    • id string required
      Unique identifier for this deployment.
    • created string required
      Created defines when the Deployment was created.
    • modified string required
      Created defines when the corresponding WorkflowRun was modified.
    • status enum required
      Status is the current status of the workflow runID.
      Values: not-started, accepted, running, failed, succeeded, skipped
    • version integer required
      Version is the ordinal ID for the stack
    • requestedBy UserInfo required
      RequestedBy contains the user information about the user who created the Deployment
    • name string required
      The user’s display name.
    • githubLogin string required
      The user’s login name.
    • avatarUrl string required
      The URL of the user’s avatar image.
    • email string optional
      IMPORTANT: The email address of the user is only included on a few admin-only APIs. For nearly all APIs that return a UserInfo object, this will not be provided. considered sensitive information.
    • jobs array[DeploymentJob] optional
      Jobs make up all the Jobs of the Deployment. Omitted for deployments that have not started yet.
    • status enum required
      The current status of the deployment job.
      Values: not-started, accepted, running, failed, succeeded, skipped
    • started string optional
      The timestamp when the job started.
    • lastUpdated string optional
      The timestamp when the job was last updated.
    • steps array[StepRun] required
      The list of steps in the deployment job.
    • latestVersion integer required
      LatestVersion is the most recent version number for deployments for the given programID
    • configuration DeploymentConfiguration optional
      Configuration contains the environment variables and source information for a deployment
    • environmentVariables array[EnvironmentVariable] required
      The list of environment variables for the deployment.
    • source DeploymentSource optional
      The source configuration for the deployment.
    • initiator string optional
      Initiator is the initiation source of the deployment.
    • pulumiOperation enum optional
      PulumiOperation is the operation that was performed. Omitted for historical deployments that predate this field.
      Values: update, preview, destroy, refresh, detect-drift, remediate-drift
    Errors: 404 Deployment

    List Drift Runs

    GET /api/stacks/{orgName}/{projectName}/{stackName}/drift/runs

    Returns a paginated list of all drift detection runs for a stack. Each drift run represents a scheduled or manually triggered drift detection execution and includes details about whether drift was detected and any remediation actions taken. Use the ‘page’ (minimum 1, default 1) and ‘pageSize’ (1-100, default 10) query parameters for pagination.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name
    • page integer query optional
      Page number (min 1, default 1)
    • pageSize integer query optional
      Results per page (1-100, default 10)

    Responses

    200 OK
    • driftRuns array[DriftRun] required
      The list of drift runs
    • id string required
      The unique identifier of the drift run.
    • driftDetected boolean required
      Whether drift was detected during the run.
    • created string required
      The timestamp when the drift run was created.
    • status enum required
      The current status of the drift run.
      Values: not-started, accepted, running, failed, succeeded, skipped
    • deploymentId string optional
      The deployment identifier associated with the drift run.
    • deploymentVersion integer optional
      The deployment version associated with the drift run.
    • detectUpdate DriftRunUpdate optional
      The update that performed drift detection.
    • remediateUpdate DriftRunUpdate optional
      The update that performed drift remediation.
    • itemsPerPage integer required
      The number of items per page
    • total integer required
      The total number of drift runs
    Errors: 400 Invalid query parameter

    Get Stack Drift Status

    GET /api/stacks/{orgName}/{projectName}/{stackName}/drift/status

    Retrieves the current drift detection status and associated metadata for a stack. Drift occurs when the actual state of cloud resources diverges from the state declared in the Pulumi program. The response indicates whether drift has been detected, when the last drift check was performed, and details about any detected differences. This is used in conjunction with drift detection schedules to monitor infrastructure compliance.

    Request Parameters

    • orgName string path required
      The organization name
    • projectName string path required
      The project name
    • stackName string path required
      The stack name

    Responses

    200 OK
    • driftDetected boolean required
      Whether drift was detected in the latest run.
    • latestDriftRun string required
      The identifier of the latest drift detection run.
    • runInProgress boolean required
      Whether a drift detection run is currently in progress.