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

Stack Tags

    Stack tags are key-value metadata attached to Pulumi stacks. They can be used for organization, filtering, and to store additional information about your stacks.

    Tag Operations

    The API provides endpoints for the following operations:

    • Getting all tags for a stack
    • Setting a specific tag value
    • Deleting tags from a stack

    Get Stack Tags

    Use Get Stack to retrieve a stack’s details including its tags.

    Set Stack Tag

    POST /api/stacks/{organization}/{project}/{stack}/tags
    

    Parameters

    ParameterTypeInDescription
    organizationstringpathorganization name
    projectstringpathproject name
    stackstringpathstack name
    namestringbodytag name
    valuestringbodytag value

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      --request POST \
      --data '{"name":"{tagName}","value":"{tagValue}"}' \
      https://api.pulumi.com/api/stacks/{organization}/{project}/{stack}/tags
    

    Default response

    Status: 204 OK
    
    EMPTY RESPONSE BODY
    

    Delete Stack Tag

    DELETE /api/stacks/{organization}/{project}/{stack}/tags/{tagName}
    

    Parameters

    ParameterTypeInDescription
    organizationstringpathorganization name
    projectstringpathproject name
    stackstringpathstack name
    tagNamestringpathtag name

    Example

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

    Default response

    Status: 204 OK
    
    EMPTY RESPONSE BODY
    
      IDP Builder Course. Register Now.