1. Docs
  2. Pulumi Cloud
  3. Pulumi Cloud REST API
  4. Stack Updates

Stack Updates

    Stack updates are operations that create, update, or delete resources in a Pulumi stack. The Stack Updates API allows you to list updates, check status, and view detailed events for each operation.

    Update Operations

    The API provides endpoints for the following operations:

    • Listing stack updates with optional pagination
    • Getting the status of a specific update
    • Viewing detailed events for an update
    • Listing preview operations

    List Stack Updates

    GET /api/stacks/{organization}/{project}/{stack}/updates
    

    By default the results are not paginated. You can specify page and pageSize query parameters to paginate the results.

    ?pageSize=1&page=1 can be used to return only the most recent update.

    Parameters

    ParameterTypeInDescription
    organizationstringpathorganization name
    projectstringpathproject name
    stackstringpathstack name
    pagenumberqueryOptional. page of the results to return
    pageSizenumberqueryOptional. number of results per page
    output-typenumberqueryOptional. the response format to return - possible values are service or cli (default)

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      https://api.pulumi.com/api/stacks/{organization}/{project}/{stack}/updates?output-type=service
    

    Default response (output type = cli)

    Status: 200 OK
    
    {
      "updates": [
        {
          "kind": "update",
          "startTime": 1733780162,
          "message": "",
          "environment": {},
          "config": {
            "aws:region": {
              "string": "us-east-1",
              "secret": false,
              "object": false
            },
            "pulumi:template": {
              "string": "aws-typescript",
              "secret": false,
              "object": false
            }
          },
          "result": "succeeded",
          "endTime": 1733780162,
          "version": 1,
          "resourceChanges": {
            "create": 1,
            "delete": 0,
            "same": 0,
            "update": 0
          },
          "resourceCount": 1
        }
      ]
    }
    

    Get Update Status

    GET /api/stacks/{organization}/{project}/{stack}/update/{updateID}
    

    Parameters

    ParameterTypeInDescription
    organizationstringpathorganization name
    projectstringpathproject name
    stackstringpathstack name
    updateIDuuidpathupdate id - UUID as retrieved from List Stack Updates using ?output-type=service

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      https://api.pulumi.com/api/stacks/{organization}/{project}/{stack}/update/{updateID}
    

    Default response

    Status: 200 OK
    
    {
      "status": "succeeded",
      "events": []
    }
    

    List Update Events

    GET /api/stacks/{organization}/{project}/{stack}/update/{updateID}/events
    

    Parameters

    ParameterTypeInDescription
    organizationstringpathorganization name
    projectstringpathproject name
    stackstringpathstack name
    updateIDuuidpathupdate id - UUID as retrieved from List Stack Updates using ?output-type=service

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      https://api.pulumi.com/api/stacks/{organization}/{project}/{stack}/update/{updateID}/events
    

    Default response

    Status: 200 OK
    
    {
      "events": [
        {
          "timestamp": 1615872590,
          "type": "preludeEvent",
          "preludeEvent": {
            "config": {
              "aws:region": "us-west-2"
            }
          }
        },
        {
          "timestamp": 1615872590,
          "type": "resourcePreEvent",
          "resourcePreEvent": {
            "metadata": {
              "op": "create",
              "urn": "urn:pulumi:dev-user1::demo-aws-ts-webserver::pulumi:pulumi:Stack::demo-aws-ts-webserver-dev-user1",
              "type": "pulumi:pulumi:Stack",
              "old": null,
              "new": {
                "type": "pulumi:pulumi:Stack",
                "urn": "urn:pulumi:dev-user1::demo-aws-ts-webserver::pulumi:pulumi:Stack::demo-aws-ts-webserver-dev-user1",
                "id": "",
                "parent": "",
                "inputs": {},
                "outputs": {},
                "provider": ""
              },
              "logical": true,
              "provider": ""
            }
          }
        },
        {
          "timestamp": 1615872593,
          "type": "summaryEvent",
          "summaryEvent": {
            "maybeCorrupt": false,
            "durationSeconds": 4,
            "resourceChanges": {
              "create": 2
            },
            "PolicyPacks": {
              "aws": "23",
              "azure": "12",
              "azure-nextgen": "3",
              "cost-optimization": "9",
              "gcp": "19",
              "k8s": "13"
            }
          }
        }
      ],
      "continuationToken": null
    }
    

    List Previews

    List all previews since the last update operation.

    GET /api/stacks/{organization}/{project}/{stack}/updates/latest/previews
    

    Parameters

    ParameterTypeInDescription
    organizationstringpathorganization name
    projectstringpathproject name
    stackstringpathstack name

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      https://api.pulumi.com/api/stacks/{organization}/{project}/{stack}/updates/latest/previews
    

    Default response

    Status: 200 OK
    
    {
      "updates": [
        {
          "info": {
            "kind": "Pupdate",
            "startTime": 1624932955,
            "message": "triggered by pr #12",
            "environment": {
              "exec.kind": "cli",
              "git.author": "First Last",
              "git.author.email": "user1@example.com",
              "git.committer": "GitHub",
              "git.committer.email": "noreply@github.com",
              "git.dirty": "true",
              "git.head": "35caae8d73c3ecb0eac1256ba0e03775f24514da",
              "git.headName": "refs/heads/master",
              "vcs.kind": "github.com",
              "vcs.owner": "pulumi",
              "vcs.repo": "examples"
            },
            "config": {
              "aws:region": {
                "string": "us-west-2",
                "secret": false,
                "object": false
              }
            },
            "result": "failed",
            "endTime": 1624932956,
            "version": 1,
            "resourceChanges": {
              "create": 0,
              "delete": 0,
              "same": 0,
              "update": 0
            }
          },
          "updateID": "c30c74e6-9576-4c63-95a4-4f96e7793ebb",
          "version": 1,
          "latestVersion": 0
        }
      ],
      "itemsPerPage": 10,
      "total": 4
    }