From 381bfd4cde551cada51b3b202ad5fb885ef2fd88 Mon Sep 17 00:00:00 2001 From: Casey Huang <98487934+caseyyh@users.noreply.github.com> Date: Thu, 9 Jan 2025 10:09:12 -0800 Subject: [PATCH] Update REST API docs: add get team endpoint and minor fixes (#13758) --- .../reference/cloud-rest-api/_index.md | 101 +++++++++++++++++- package.json | 2 +- yarn.lock | 12 +++ 3 files changed, 112 insertions(+), 3 deletions(-) diff --git a/content/docs/pulumi-cloud/reference/cloud-rest-api/_index.md b/content/docs/pulumi-cloud/reference/cloud-rest-api/_index.md index 9b1f92986da9..7a5666262460 100644 --- a/content/docs/pulumi-cloud/reference/cloud-rest-api/_index.md +++ b/content/docs/pulumi-cloud/reference/cloud-rest-api/_index.md @@ -928,7 +928,48 @@ curl \ https://api.pulumi.com/api/stacks/{organization}/{project}/{stack}/updates?output-type=service ``` -#### Default response +#### 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 + } + ] +} +``` + +#### Example response (output type = service) ``` Status: 200 OK @@ -2223,6 +2264,62 @@ Status: 200 OK +### Get Team + +``` +Get /api/orgs/{org}/teams/{teamName} +``` + +#### Parameters + +| Parameter | Type | In | Description | +|----------------|--------|------|---------------------------------------------------------------------| +| `organization` | string | path | organization name | +| `teamName` | string | body | team name | + +#### Example + +```bash +curl \ + -H "Accept: application/vnd.pulumi+8" \ + -H "Content-Type: application/json" \ + -H "Authorization: token $PULUMI_ACCESS_TOKEN" \ + --request GET \ + https://api.pulumi.com/api/orgs/{org}/teams/{teamName} +``` + +#### Default response + +``` +Status: 200 OK +``` + +``` +{ + "kind": "github", + "name": "example-team", + "displayName": "My Example Team", + "description": "An example team of exemplary people", + "members": [ + { + "name": "First Last", + "githubLogin": "user1", + "avatarUrl": "https://en.gravatar.com/userimage/17756222/cabc55626abae89ebe2d8ae946521e15.png?size=300", + "role": "member" + }, + { + "name": "First Last", + "githubLogin": "user2", + "avatarUrl": "https://en.gravatar.com/userimage/17756222/cabc55626abae89ebe2d8ae946521e15.png?size=300", + "role": "admin" + } + ], + "userRole": "admin" +} +``` + + + ### Delete Team ``` @@ -5194,7 +5291,7 @@ Status: 200 OK ### List issuers ``` -GET /api/org/{organization}/oidc/issuers +GET /api/orgs/{organization}/oidc/issuers ``` #### Parameters diff --git a/package.json b/package.json index 2fed403a13aa..c83fa7c1a3d9 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "glob": "^7.2.0", "gray-matter": "^4.0.3", "http-server": "^0.12.1", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "jsdom": "^22.0.0", "markdownlint": "^0.17.2", "parse-diff": "^0.8.1", diff --git a/yarn.lock b/yarn.lock index eff349608b2d..90efc3f48592 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1538,6 +1538,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + array-union@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" @@ -3172,6 +3177,13 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz"