Skip to content

Commit

Permalink
Document the create stack API (#12085)
Browse files Browse the repository at this point in the history
* Document the create stack api

* Fix parameter type

Co-authored-by: Luke Hoban <[email protected]>

---------

Co-authored-by: Luke Hoban <[email protected]>
  • Loading branch information
komalali and lukehoban committed Jun 20, 2024
1 parent 6ab0840 commit 6d9e19b
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions content/docs/pulumi-cloud/cloud-rest-api/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,34 @@ Content-Type: application/json

## Stacks

### Create Stack

Creates a new stack in the Pulumi Cloud. If the project does not exist, it will also be created.

```
POST /api/stacks/{organization}/{project}
```

#### Parameters

| Parameter | Type | In | Description |
|----------------|--------|------|--------------------------------------------------------------------------------------------------|
| `organization` | string | path | Organization name |
| `project` | string | path | Name of the project to create the stack under. If the project doesn't exist, it will be created. |
| `stackName` | string | body | Name of the stack being created. |

#### Example

```bash
curl \
-H "Accept: application/vnd.pulumi+8" \
-H "Content-Type: application/json" \
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
--request POST \
--data '{"stackName":"{stackName}"}' \
https://api.pulumi.com/api/stacks/{organization}/{project}
```

### List Stacks

Lists stacks available to the authenticated user.
Expand Down

0 comments on commit 6d9e19b

Please sign in to comment.