From 717b4de75f10a27076bf206226ddbfa401e00234 Mon Sep 17 00:00:00 2001 From: Casey Date: Fri, 6 Sep 2024 14:07:59 -0700 Subject: [PATCH 1/3] Add documentation for get stacks metadata, downstream refs --- .../pulumi-cloud/cloud-rest-api/_index.md | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/content/docs/pulumi-cloud/cloud-rest-api/_index.md b/content/docs/pulumi-cloud/cloud-rest-api/_index.md index 8f3e5077bc35..de37149379ce 100644 --- a/content/docs/pulumi-cloud/cloud-rest-api/_index.md +++ b/content/docs/pulumi-cloud/cloud-rest-api/_index.md @@ -197,6 +197,90 @@ Status: 200 OK +### Get Stack Downstream References + +``` +GET /api/stacks/{organization}/{project}/{stack}/downstreamreferences +``` + +#### Parameters + +| Parameter | Type | In | Description | +|----------------|--------|------|-------------------| +| `organization` | string | path | organization name | +| `project` | string | path | project name | +| `stack` | string | path | stack name | + +#### Example + +```bash +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}/downstreamreferences +``` + +#### Default Response + +``` +Status: 200 OK +``` + +``` +{ + "referencedStacks": [ + { + "organization": "demo", + "routingProject": "demo-aws-ts-webserver", + "name": "dev-user1", + "version": 3 + } + ] +} +``` + + + +### Get Stack Metadata + +``` +GET /api/stacks/{organization}/{project}/{stack}/metadata +``` + +#### Parameters + +```bash +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}/metadata +``` + +#### Example + +``` +Status: 200 OK +``` + +``` +{ + "orgName": "demo", + "projectName": "demo-aws-ts-webserver", + "stackName": "dev-user1", + "userPermission": 103, + "notificationSettings": { + "notifyUpdateFailure": false, + "notifyUpdateSuccess": false + } +} +``` + +#### Default Response + + + ### Get Stack State ``` From adcd522e713c2d836b0f03ae19fb996823a4a96c Mon Sep 17 00:00:00 2001 From: Casey Date: Fri, 6 Sep 2024 14:10:11 -0700 Subject: [PATCH 2/3] Fixup --- content/docs/pulumi-cloud/cloud-rest-api/_index.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/content/docs/pulumi-cloud/cloud-rest-api/_index.md b/content/docs/pulumi-cloud/cloud-rest-api/_index.md index de37149379ce..7d3d7bed1c7c 100644 --- a/content/docs/pulumi-cloud/cloud-rest-api/_index.md +++ b/content/docs/pulumi-cloud/cloud-rest-api/_index.md @@ -250,6 +250,15 @@ GET /api/stacks/{organization}/{project}/{stack}/metadata #### Parameters + +| Parameter | Type | In | Description | +|----------------|--------|------|-------------------| +| `organization` | string | path | organization name | +| `project` | string | path | project name | +| `stack` | string | path | stack name | + +#### Example + ```bash curl \ -H "Accept: application/vnd.pulumi+8" \ @@ -258,7 +267,7 @@ curl \ https://api.pulumi.com/api/stacks/{organization}/{project}/{stack}/metadata ``` -#### Example +#### Default Response ``` Status: 200 OK @@ -277,8 +286,6 @@ Status: 200 OK } ``` -#### Default Response - ### Get Stack State From e7989297ba7c0285e0de855be2d4fb23e527cef3 Mon Sep 17 00:00:00 2001 From: Casey Date: Fri, 6 Sep 2024 14:15:06 -0700 Subject: [PATCH 3/3] Lint --- content/docs/pulumi-cloud/cloud-rest-api/_index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/docs/pulumi-cloud/cloud-rest-api/_index.md b/content/docs/pulumi-cloud/cloud-rest-api/_index.md index 7d3d7bed1c7c..09a4af794bda 100644 --- a/content/docs/pulumi-cloud/cloud-rest-api/_index.md +++ b/content/docs/pulumi-cloud/cloud-rest-api/_index.md @@ -250,7 +250,6 @@ GET /api/stacks/{organization}/{project}/{stack}/metadata #### Parameters - | Parameter | Type | In | Description | |----------------|--------|------|-------------------| | `organization` | string | path | organization name |