GET /projects/{project_id}/webhooks
List endpoints
Console session only (signed-in console).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_id | path | string · required |
Responses
| Status | Description | Body |
|---|---|---|
200 | Endpoints without secret | WebhookListResponse |
Examples
curl
curl -X GET "$GALON_API_BASE/projects/<project_id>/webhooks" \
-H "Authorization: Bearer $GALON_API_KEY"Node.js (SDK)
import { Galon } from "galon";
const galon = new Galon(process.env.GALON_API_KEY);
const result = await galon.webhooks.list({ limit: 20 });Python (SDK)
from galon import Galon
galon = Galon() # reads GALON_API_KEY
result = galon.webhooks.list({"limit": 20})POST /projects/{project_id}/webhooks
Create an endpoint and display its secret once
Console session only (signed-in console).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_id | path | string · required |
Request body
application/json · schema WebhookCreate
| Field | Type | Description |
|---|---|---|
url | string · required | |
events | array<"job.queued" | "job.started" | "job.succeeded" | "job.failed" | "job.cancelled" | "job.uncertain" | "artifact.ready" | "email.sent"> · required |
Responses
| Status | Description | Body |
|---|---|---|
201 | Endpoint created | WebhookCreateResponse |
422 | Invalid parameters | Error |
Examples
curl
curl -X POST "$GALON_API_BASE/projects/<project_id>/webhooks" \
-H "Authorization: Bearer $GALON_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "string", "events": ["job.queued"]}'Node.js (SDK)
import { Galon } from "galon";
const galon = new Galon(process.env.GALON_API_KEY);
const result = await galon.webhooks.create({"url": "string", "events": ["job.queued"]});Python (SDK)
from galon import Galon
galon = Galon() # reads GALON_API_KEY
result = galon.webhooks.create({"url": "string", "events": ["job.queued"]})