Skip to content

Commit 05d5d4a

Browse files
jkodroffclaude
andauthored
Add dedicated REST API reference for Pulumi Cloud webhooks (#16145)
Extracts webhook REST API documentation from the organizations page into its own dedicated reference page for better organization and discoverability. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
1 parent 03a8511 commit 05d5d4a

File tree

3 files changed

+267
-63
lines changed

3 files changed

+267
-63
lines changed

content/docs/pulumi-cloud/reference/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ The Pulumi Cloud REST API is organized into the following resource categories:
5656
- [Stack Tags](/docs/pulumi-cloud/reference/stack-tags/) - Manage metadata tags on stacks
5757
- [Stack Updates](/docs/pulumi-cloud/reference/stack-updates/) - Manage the update lifecycle for stacks
5858
- [Stacks](/docs/pulumi-cloud/reference/stacks/) - Create, update, and manage Pulumi stacks
59+
- [Webhooks](/docs/pulumi-cloud/reference/webhooks/) - Create and manage webhooks for organizations and stacks

content/docs/pulumi-cloud/reference/organizations/_index.md

Lines changed: 2 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Organizations
33
title_tag: "Pulumi Cloud REST API: Organizations"
4-
meta_desc: Learn about the Pulumi Cloud REST API endpoints for managing organizations, teams, members, and organization-level access tokens and webhooks.
4+
meta_desc: Learn about the Pulumi Cloud REST API endpoints for managing organizations, teams, members, and organization-level access tokens.
55
menu:
66
cloud:
77
parent: pulumi-cloud-reference
@@ -18,7 +18,6 @@ The API provides endpoints for the following categories of operations:
1818
- Managing organization access tokens
1919
- Creating and managing teams
2020
- Managing team access tokens
21-
- Creating and managing webhooks
2221

2322
## User Management
2423

@@ -396,64 +395,4 @@ curl \
396395

397396
## Webhooks
398397

399-
### Create Webhook
400-
401-
Create a new webhook for an organization or stack.
402-
403-
```plain
404-
// To create an organization webhook
405-
POST /api/orgs/{organization}/hooks
406-
407-
// To create a stack webhook
408-
POST /api/stacks/{organization}/{project}/{stack}/hooks
409-
```
410-
411-
#### Parameters
412-
413-
| Parameter | Type | In | Description |
414-
|--------------------|---------------|------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
415-
| `active` | boolean | body | enable webhook |
416-
| `displayName` | string | body | name of webhook |
417-
| `organizationName` | string | body | organization name |
418-
| `payloadUrl` | string | body | URL to send request to |
419-
| `projectName` | string | body | **Optional.** project name (required for stack webhooks) |
420-
| `stackName` | string | body | **Optional.** stack name (required for stack webhooks) |
421-
| `format` | string | body | **Optional.** format of the payload. Possible values are `raw`, `slack`, `ms_teams` or `pulumi_deployments`. Default is `raw`. |
422-
| `filters` | array[string] | body | **Optional.** list of filters for events the webhook should receive. See [webhook docs](/docs/pulumi-cloud/webhooks#filters) for more information on what filters are available |
423-
| `secret` | string | body | **Optional.** secret used as the HMAC key. See [webhook docs](/docs/pulumi-cloud/webhooks#headers) for more information |
424-
425-
### List Webhooks
426-
427-
List all webhooks for an organization or stack.
428-
429-
```plain
430-
// List organization webhooks
431-
GET /api/orgs/{organization}/hooks
432-
433-
// List stack webhooks
434-
GET /api/stacks/{organization}/{project}/{stack}/hooks
435-
```
436-
437-
### Get Webhook
438-
439-
Get details about a specific webhook.
440-
441-
```plain
442-
// Get organization webhook
443-
GET /api/orgs/{organization}/hooks/{webhookname}
444-
445-
// Get stack webhook
446-
GET /api/stacks/{organization}/{project}/{stack}/hooks/{webhookname}
447-
```
448-
449-
### Ping Webhook
450-
451-
Send a test ping to a webhook to validate it's working.
452-
453-
```plain
454-
// Ping organization webhook
455-
POST /api/orgs/{organization}/hooks/{webhookname}/ping
456-
457-
// Ping stack webhook
458-
POST /api/stacks/{organization}/{project}/{stack}/hooks/{webhookname}/ping
459-
```
398+
For comprehensive information about webhooks including setup, configuration, event filtering, and complete API reference, see the [Webhooks documentation](/docs/pulumi-cloud/webhooks/) and [Webhooks REST API reference](/docs/pulumi-cloud/reference/webhooks/).
Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
---
2+
title: Webhooks
3+
title_tag: "Pulumi Cloud REST API: Webhooks"
4+
meta_desc: Learn about the Pulumi Cloud REST API endpoints for creating and managing webhooks for organizations and stacks.
5+
menu:
6+
cloud:
7+
parent: pulumi-cloud-reference
8+
weight: 30
9+
---
10+
11+
The Webhooks API allows you to create and manage webhooks for organizations and stacks. Webhooks notify external services of events happening within your Pulumi organization, such as stack updates, deployments, or policy violations.
12+
13+
For comprehensive information about webhooks including event filtering, payload formats, and UI setup, see the [Webhooks documentation](/docs/pulumi-cloud/webhooks/).
14+
15+
## Webhook Operations
16+
17+
The API provides endpoints for the following operations:
18+
19+
- Creating new webhooks for organizations or stacks
20+
- Listing webhooks with filtering options
21+
- Getting webhook details
22+
- Updating webhook configuration
23+
- Testing webhooks with ping functionality
24+
- Deleting webhooks
25+
26+
## Create Webhook
27+
28+
Create a new webhook for an organization or stack.
29+
30+
```plain
31+
// To create an organization webhook
32+
POST /api/orgs/{organization}/hooks
33+
34+
// To create a stack webhook
35+
POST /api/stacks/{organization}/{project}/{stack}/hooks
36+
```
37+
38+
### Parameters
39+
40+
| Parameter | Type | In | Description |
41+
|--------------------|---------------|------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
42+
| `organization` | string | path | Organization name |
43+
| `project` | string | path | **Optional.** Project name (required for stack webhooks) |
44+
| `stack` | string | path | **Optional.** Stack name (required for stack webhooks) |
45+
| `active` | boolean | body | Enable webhook |
46+
| `displayName` | string | body | Name of webhook |
47+
| `organizationName` | string | body | Organization name |
48+
| `payloadUrl` | string | body | URL to send request to |
49+
| `projectName` | string | body | **Optional.** Project name (required for stack webhooks) |
50+
| `stackName` | string | body | **Optional.** Stack name (required for stack webhooks) |
51+
| `format` | string | body | **Optional.** Format of the payload. Possible values are `raw`, `slack`, `ms_teams` or `pulumi_deployments`. Default is `raw`. |
52+
| `filters` | array[string] | body | **Optional.** List of filters for events the webhook should receive. See [webhook docs](/docs/pulumi-cloud/webhooks#event-filtering) for more information on what filters are available |
53+
| `secret` | string | body | **Optional.** Secret used as the HMAC key. See [webhook docs](/docs/pulumi-cloud/webhooks#headers) for more information |
54+
55+
### Example
56+
57+
```bash
58+
# Create organization webhook
59+
curl \
60+
-H "Accept: application/vnd.pulumi+8" \
61+
-H "Content-Type: application/json" \
62+
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
63+
--request POST \
64+
--data '{"active": true, "displayName": "My Webhook", "organizationName": "myorg", "payloadUrl": "https://example.com/webhook"}' \
65+
https://api.pulumi.com/api/orgs/{organization}/hooks
66+
67+
# Create stack webhook
68+
curl \
69+
-H "Accept: application/vnd.pulumi+8" \
70+
-H "Content-Type: application/json" \
71+
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
72+
--request POST \
73+
--data '{"active": true, "displayName": "Stack Webhook", "organizationName": "myorg", "projectName": "myproject", "stackName": "production", "payloadUrl": "https://example.com/webhook"}' \
74+
https://api.pulumi.com/api/stacks/{organization}/{project}/{stack}/hooks
75+
```
76+
77+
## List Webhooks
78+
79+
List all webhooks for an organization or stack.
80+
81+
```plain
82+
// List organization webhooks
83+
GET /api/orgs/{organization}/hooks
84+
85+
// List stack webhooks
86+
GET /api/stacks/{organization}/{project}/{stack}/hooks
87+
```
88+
89+
### Parameters
90+
91+
| Parameter | Type | In | Description |
92+
|---------------------|--------|-------|--------------------------------------------------------------------------------------------------------------|
93+
| `organization` | string | path | Organization name |
94+
| `project` | string | path | **Optional.** Project name (required for stack webhooks) |
95+
| `stack` | string | path | **Optional.** Stack name (required for stack webhooks) |
96+
| `continuationToken` | string | query | **Optional.** The continuation token to use for retrieving the next set of results if results were truncated |
97+
98+
### Example
99+
100+
```bash
101+
# List organization webhooks
102+
curl \
103+
-H "Accept: application/vnd.pulumi+8" \
104+
-H "Content-Type: application/json" \
105+
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
106+
https://api.pulumi.com/api/orgs/{organization}/hooks
107+
108+
# List stack webhooks
109+
curl \
110+
-H "Accept: application/vnd.pulumi+8" \
111+
-H "Content-Type: application/json" \
112+
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
113+
https://api.pulumi.com/api/stacks/{organization}/{project}/{stack}/hooks
114+
```
115+
116+
## Get Webhook
117+
118+
Get details about a specific webhook.
119+
120+
```plain
121+
// Get organization webhook
122+
GET /api/orgs/{organization}/hooks/{webhookname}
123+
124+
// Get stack webhook
125+
GET /api/stacks/{organization}/{project}/{stack}/hooks/{webhookname}
126+
```
127+
128+
### Parameters
129+
130+
| Parameter | Type | In | Description |
131+
|----------------|--------|------|-----------------------------------------------------------|
132+
| `organization` | string | path | Organization name |
133+
| `project` | string | path | **Optional.** Project name (required for stack webhooks) |
134+
| `stack` | string | path | **Optional.** Stack name (required for stack webhooks) |
135+
| `webhookname` | string | path | Name of the webhook |
136+
137+
### Example
138+
139+
```bash
140+
# Get organization webhook
141+
curl \
142+
-H "Accept: application/vnd.pulumi+8" \
143+
-H "Content-Type: application/json" \
144+
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
145+
https://api.pulumi.com/api/orgs/{organization}/hooks/{webhookname}
146+
147+
# Get stack webhook
148+
curl \
149+
-H "Accept: application/vnd.pulumi+8" \
150+
-H "Content-Type: application/json" \
151+
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
152+
https://api.pulumi.com/api/stacks/{organization}/{project}/{stack}/hooks/{webhookname}
153+
```
154+
155+
## Update Webhook
156+
157+
Update an existing webhook.
158+
159+
```plain
160+
// Update organization webhook
161+
PATCH /api/orgs/{organization}/hooks/{webhookname}
162+
163+
// Update stack webhook
164+
PATCH /api/stacks/{organization}/{project}/{stack}/hooks/{webhookname}
165+
```
166+
167+
### Parameters
168+
169+
The update endpoint accepts the same body parameters as the create endpoint. Only include the fields you want to update.
170+
171+
### Example
172+
173+
```bash
174+
# Update organization webhook
175+
curl \
176+
-H "Accept: application/vnd.pulumi+8" \
177+
-H "Content-Type: application/json" \
178+
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
179+
--request PATCH \
180+
--data '{"active": false, "displayName": "Updated Webhook Name"}' \
181+
https://api.pulumi.com/api/orgs/{organization}/hooks/{webhookname}
182+
```
183+
184+
## Delete Webhook
185+
186+
Delete a webhook.
187+
188+
```plain
189+
// Delete organization webhook
190+
DELETE /api/orgs/{organization}/hooks/{webhookname}
191+
192+
// Delete stack webhook
193+
DELETE /api/stacks/{organization}/{project}/{stack}/hooks/{webhookname}
194+
```
195+
196+
### Parameters
197+
198+
| Parameter | Type | In | Description |
199+
|----------------|--------|------|-----------------------------------------------------------|
200+
| `organization` | string | path | Organization name |
201+
| `project` | string | path | **Optional.** Project name (required for stack webhooks) |
202+
| `stack` | string | path | **Optional.** Stack name (required for stack webhooks) |
203+
| `webhookname` | string | path | Name of the webhook |
204+
205+
### Example
206+
207+
```bash
208+
# Delete organization webhook
209+
curl \
210+
-H "Accept: application/vnd.pulumi+8" \
211+
-H "Content-Type: application/json" \
212+
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
213+
--request DELETE \
214+
https://api.pulumi.com/api/orgs/{organization}/hooks/{webhookname}
215+
216+
# Delete stack webhook
217+
curl \
218+
-H "Accept: application/vnd.pulumi+8" \
219+
-H "Content-Type: application/json" \
220+
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
221+
--request DELETE \
222+
https://api.stacks/{organization}/{project}/{stack}/hooks/{webhookname}
223+
```
224+
225+
## Ping Webhook
226+
227+
Send a test ping to a webhook to validate it's working.
228+
229+
```plain
230+
// Ping organization webhook
231+
POST /api/orgs/{organization}/hooks/{webhookname}/ping
232+
233+
// Ping stack webhook
234+
POST /api/stacks/{organization}/{project}/{stack}/hooks/{webhookname}/ping
235+
```
236+
237+
### Parameters
238+
239+
| Parameter | Type | In | Description |
240+
|----------------|--------|------|-----------------------------------------------------------|
241+
| `organization` | string | path | Organization name |
242+
| `project` | string | path | **Optional.** Project name (required for stack webhooks) |
243+
| `stack` | string | path | **Optional.** Stack name (required for stack webhooks) |
244+
| `webhookname` | string | path | Name of the webhook |
245+
246+
### Example
247+
248+
```bash
249+
# Ping organization webhook
250+
curl \
251+
-H "Accept: application/vnd.pulumi+8" \
252+
-H "Content-Type: application/json" \
253+
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
254+
--request POST \
255+
https://api.pulumi.com/api/orgs/{organization}/hooks/{webhookname}/ping
256+
257+
# Ping stack webhook
258+
curl \
259+
-H "Accept: application/vnd.pulumi+8" \
260+
-H "Content-Type: application/json" \
261+
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
262+
--request POST \
263+
https://api.pulumi.com/api/stacks/{organization}/{project}/{stack}/hooks/{webhookname}/ping
264+
```

0 commit comments

Comments
 (0)