Skip to content

Commit

Permalink
Update REST API docs: add get team endpoint and minor fixes (#13758)
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyyh authored Jan 9, 2025
1 parent 09a186c commit 381bfd4
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 3 deletions.
101 changes: 99 additions & 2 deletions content/docs/pulumi-cloud/reference/cloud-rest-api/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

```
Expand Down Expand Up @@ -5194,7 +5291,7 @@ Status: 200 OK
### List issuers

```
GET /api/org/{organization}/oidc/issuers
GET /api/orgs/{organization}/oidc/issuers
```

#### Parameters
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 381bfd4

Please sign in to comment.