Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

feat: update mgmt api docs (#49743)

supabase-supabase-autofixer[bot]e54394cfd877
diff --git a/apps/docs/content/_partials/access-control/scoped_pat_mcp_tools.mdx b/apps/docs/content/_partials/access-control/scoped_pat_mcp_tools.mdx
index acc7a113486..8b92471e540 100644
--- a/apps/docs/content/_partials/access-control/scoped_pat_mcp_tools.mdx
+++ b/apps/docs/content/_partials/access-control/scoped_pat_mcp_tools.mdx
@@ -1,37 +1,38 @@
{/* Generated by `make -C apps/docs/spec generate.partials.access-control`. Do not hand-edit; see supabase/platform#37175 and apps/docs/spec/Makefile. */}
-| MCP tool | Required permission |
-| --------------------------- | ----------------------------------------------------------------------------- |
-| `apply_migration` | **Migrations** (Read-write) |
-| `confirm_cost` | None (always available) |
-| `create_branch` | **Development Branches** (Read-write) or **Production Branches** (Read-write) |
-| `create_project` | **Organization Projects** (Read-write) |
-| `delete_branch` | **Production Branches** (Read-write) or **Development Branches** (Read-write) |
-| `deploy_edge_function` | **Edge Functions** (Read-write) |
-| `execute_sql` | **Database** (Read) |
-| `generate_typescript_types` | **Database** (Read) |
-| `get_advisors` | **Advisors** (Read) |
-| `get_cost` | **Organization Settings** (Read) and **Projects (account-wide)** (Read) |
-| `get_edge_function` | **Edge Functions** (Read) |
-| `get_logs` | **Logs** (Read) |
-| `get_organization` | **Organization Settings** (Read) |
-| `get_project` | **Project Settings** (Read) |
-| `get_project_url` | **Project Settings** (Read) |
-| `get_publishable_keys` | **API Keys** (Read) |
-| `get_storage_config` | **Storage Config** (Read) |
-| `list_branches` | **Development Branches** (Read) or **Production Branches** (Read) |
-| `list_edge_functions` | **Edge Functions** (Read) |
-| `list_extensions` | **Database** (Read) |
-| `list_migrations` | **Migrations** (Read) |
-| `list_organizations` | **Organizations** (Read) |
-| `list_projects` | **Projects (account-wide)** (Read) |
-| `list_storage_buckets` | **Storage** (Read) |
-| `list_tables` | **Database** (Read) |
-| `merge_branch` | **Production Branches** (Read-write) or **Development Branches** (Read-write) |
-| `pause_project` | **Project Settings** (Read-write) |
-| `query_logs` | **Logs** (Read) |
-| `rebase_branch` | **Production Branches** (Read-write) or **Development Branches** (Read-write) |
-| `reset_branch` | **Production Branches** (Read-write) or **Development Branches** (Read-write) |
-| `restore_project` | **Project Settings** (Read-write) |
-| `search_docs` | None (always available) |
-| `update_storage_config` | **Storage Config** (Read-write) |
+| MCP tool | Required permission |
+| ----------------------------- | ----------------------------------------------------------------------------- |
+| `apply_migration` | **Migrations** (Read-write) |
+| `confirm_cost` | None (always available) |
+| `create_branch` | **Development Branches** (Read-write) or **Production Branches** (Read-write) |
+| `create_edge_function_secret` | **Edge Function Secrets** (Read-write) and **Edge Function Secrets** (Read) |
+| `create_project` | **Organization Projects** (Read-write) |
+| `delete_branch` | **Production Branches** (Read-write) or **Development Branches** (Read-write) |
+| `deploy_edge_function` | **Edge Functions** (Read-write) |
+| `execute_sql` | **Database** (Read) |
+| `generate_typescript_types` | **Database** (Read) |
+| `get_advisors` | **Advisors** (Read) |
+| `get_cost` | **Organization Settings** (Read) and **Projects (account-wide)** (Read) |
+| `get_edge_function` | **Edge Functions** (Read) |
+| `get_logs` | **Logs** (Read) |
+| `get_organization` | **Organization Settings** (Read) |
+| `get_project` | **Project Settings** (Read) |
+| `get_project_url` | **Project Settings** (Read) |
+| `get_publishable_keys` | **API Keys** (Read) |
+| `get_storage_config` | **Storage Config** (Read) |
+| `list_branches` | **Development Branches** (Read) or **Production Branches** (Read) |
+| `list_edge_functions` | **Edge Functions** (Read) |
+| `list_extensions` | **Database** (Read) |
+| `list_migrations` | **Migrations** (Read) |
+| `list_organizations` | **Organizations** (Read) |
+| `list_projects` | **Projects (account-wide)** (Read) |
+| `list_storage_buckets` | **Storage** (Read) |
+| `list_tables` | **Database** (Read) |
+| `merge_branch` | **Production Branches** (Read-write) or **Development Branches** (Read-write) |
+| `pause_project` | **Project Settings** (Read-write) |
+| `query_logs` | **Logs** (Read) |
+| `rebase_branch` | **Production Branches** (Read-write) or **Development Branches** (Read-write) |
+| `reset_branch` | **Production Branches** (Read-write) or **Development Branches** (Read-write) |
+| `restore_project` | **Project Settings** (Read-write) |
+| `search_docs` | None (always available) |
+| `update_storage_config` | **Storage Config** (Read-write) |
diff --git a/apps/docs/content/_partials/access-control/scoped_pat_permissions.mdx b/apps/docs/content/_partials/access-control/scoped_pat_permissions.mdx
index 6a36e4ef6e8..49e0a906a08 100644
--- a/apps/docs/content/_partials/access-control/scoped_pat_permissions.mdx
+++ b/apps/docs/content/_partials/access-control/scoped_pat_permissions.mdx
@@ -54,6 +54,11 @@
| | | [Retry delivery](/docs/reference/api/v2-projects-ref-webhooks-deliveries-id-retry-post) |
| | | [Send test event](/docs/reference/api/v2-projects-ref-webhooks-endpoints-id-test-post) |
| | | [Update endpoint](/docs/reference/api/v2-projects-ref-webhooks-endpoints-id-patch) |
+| Notebooks | Read | [Get notebook](/docs/reference/api/v2-get-notebook) |
+| | | [List notebooks](/docs/reference/api/v2-list-notebooks) |
+| | Read-write | [Create notebook](/docs/reference/api/v2-create-notebook) |
+| | | [Delete notebook](/docs/reference/api/v2-delete-notebook) |
+| | | [Update notebook](/docs/reference/api/v2-update-notebook) |
| **Database** | | |
| Backups | Read | [Get backup schedule](/docs/reference/api/v1-get-backup-schedule) |
| | | [List all backups](/docs/reference/api/v1-list-all-backups) |
@@ -156,11 +161,11 @@
| Storage Config | Read | [Get project config](/docs/reference/api/v2-get-project-config)[^5] |
| | | [Get storage config](/docs/reference/api/v1-get-storage-config) |
| | Read-write | [Update storage config](/docs/reference/api/v1-update-storage-config) |
-| Compute | Read | [Get a worker](/docs/reference/api/v2-get-a-worker) |
-| | | [List all workers](/docs/reference/api/v2-list-all-workers) |
-| | Read-write | [Create worker upload](/docs/reference/api/v2-create-worker-upload) |
-| | | [Delete a worker](/docs/reference/api/v2-delete-a-worker) |
-| | | [Deploy a worker](/docs/reference/api/v2-deploy-a-worker) |
+| Compute | Read | [Get a compute instance](/docs/reference/api/v2-get-a-compute-instance) |
+| | | [List all compute instances](/docs/reference/api/v2-list-all-compute-instances) |
+| | Read-write | [Create compute instance upload](/docs/reference/api/v2-create-compute-instance-upload) |
+| | | [Delete a compute instance](/docs/reference/api/v2-delete-a-compute-instance) |
+| | | [Deploy a compute instance](/docs/reference/api/v2-deploy-a-compute-instance) |
| **Infrastructure and delivery** | | |
| Development Branches | Read | [Get a branch](/docs/reference/api/v1-get-a-branch) |
| | | [Get a branch config](/docs/reference/api/v1-get-a-branch-config) |
diff --git a/apps/docs/spec/api_v1_openapi.json b/apps/docs/spec/api_v1_openapi.json
index f283a252e38..bf0ce8ff0e5 100644
--- a/apps/docs/spec/api_v1_openapi.json
+++ b/apps/docs/spec/api_v1_openapi.json
@@ -408,7 +408,7 @@
},
"/v1/branches/{branch_id_or_ref}/diff": {
"get": {
- "description": "Diffs the specified database branch",
+ "description": "Diffs the specified database branch\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-diff-a-branch",
"parameters": [
{
@@ -461,12 +461,16 @@
"500": { "description": "Failed to diff database branch" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Diffs a database branch",
+ "summary": "Diffs a database branch",
"tags": ["Environments"],
- "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: environment:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["dev-workflows"],
"x-fga-permissions": [["branching_development_write"], ["branching_production_write"]],
- "x-oauth-scope": "environment:write"
+ "x-oauth-scope": "environment:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects": {
@@ -531,6 +535,7 @@
},
"/v1/projects/available-regions": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-available-regions",
"parameters": [
{
@@ -593,11 +598,15 @@
}
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Gets the list of available regions that can be used for a new project",
+ "summary": "Gets the list of available regions that can be used for a new project",
"tags": ["Projects"],
- "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: organizations:read", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["infra"],
- "x-oauth-scope": "organizations:read"
+ "x-oauth-scope": "organizations:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/organizations": {
@@ -664,6 +673,7 @@
},
"/v1/oauth/authorize": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-authorize-user",
"parameters": [
{
@@ -758,14 +768,16 @@
"403": { "description": "Forbidden action" },
"429": { "description": "Rate limit exceeded" }
},
- "summary": "[Beta] Authorize user through oauth",
+ "summary": "Authorize user through oauth",
"tags": ["OAuth"],
- "x-endpoint-owners": ["auth", "control-plane"]
+ "x-badges": [{ "name": "Beta", "position": "before" }],
+ "x-endpoint-owners": ["auth", "control-plane"],
+ "x-scalar-stability": "experimental"
}
},
"/v1/oauth/token": {
"post": {
- "description": "Supports `authorization_code`, `refresh_token`, and `urn:ietf:params:oauth:grant-type:jwt-bearer` grant types. The `jwt-bearer` grant type (IDJAG — identity-directed JWT assertion) is in beta and available on Team and Enterprise plans only.",
+ "description": "Supports `authorization_code`, `refresh_token`, and `urn:ietf:params:oauth:grant-type:jwt-bearer` grant types. The `jwt-bearer` grant type (IDJAG — identity-directed JWT assertion) is in beta and available on Team and Enterprise plans only.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-exchange-oauth-token",
"parameters": [],
"requestBody": {
@@ -789,13 +801,16 @@
"403": { "description": "Forbidden action" },
"429": { "description": "Rate limit exceeded" }
},
- "summary": "[Beta] Exchange auth code for user's access and refresh token",
+ "summary": "Exchange auth code for user's access and refresh token",
"tags": ["OAuth"],
- "x-endpoint-owners": ["auth", "control-plane"]
+ "x-badges": [{ "name": "Beta", "position": "before" }],
+ "x-endpoint-owners": ["auth", "control-plane"],
+ "x-scalar-stability": "experimental"
}
},
"/v1/oauth/revoke": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-revoke-token",
"parameters": [],
"requestBody": {
@@ -812,9 +827,11 @@
"403": { "description": "Forbidden action" },
"429": { "description": "Rate limit exceeded" }
},
- "summary": "[Beta] Revoke oauth app authorization and it's corresponding tokens",
+ "summary": "Revoke oauth app authorization and it's corresponding tokens",
"tags": ["OAuth"],
- "x-endpoint-owners": ["auth", "control-plane"]
+ "x-badges": [{ "name": "Beta", "position": "before" }],
+ "x-endpoint-owners": ["auth", "control-plane"],
+ "x-scalar-stability": "experimental"
}
},
"/v1/oauth/authorize/project-claim": {
@@ -1817,6 +1834,7 @@
},
"/v1/projects/{ref}/custom-hostname": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-hostname-config",
"parameters": [
{
@@ -1848,14 +1866,19 @@
"500": { "description": "Failed to retrieve project's custom hostname config" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Gets project's custom hostname config",
+ "summary": "Gets project's custom hostname config",
"tags": ["Domains"],
- "x-badges": [{ "name": "OAuth scope: domains:read", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: domains:read", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["custom_domain_read"]],
- "x-oauth-scope": "domains:read"
+ "x-oauth-scope": "domains:read",
+ "x-scalar-stability": "experimental"
},
"delete": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-Delete hostname config",
"parameters": [
{
@@ -1887,16 +1910,21 @@
"500": { "description": "Failed to delete project custom hostname configuration" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Deletes a project's custom hostname configuration",
+ "summary": "Deletes a project's custom hostname configuration",
"tags": ["Domains"],
- "x-badges": [{ "name": "OAuth scope: domains:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: domains:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["custom_domain_write"]],
- "x-oauth-scope": "domains:write"
+ "x-oauth-scope": "domains:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/custom-hostname/initialize": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-update-hostname-config",
"parameters": [
{
@@ -1936,16 +1964,21 @@
"500": { "description": "Failed to update project custom hostname configuration" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Updates project's custom hostname configuration",
+ "summary": "Updates project's custom hostname configuration",
"tags": ["Domains"],
- "x-badges": [{ "name": "OAuth scope: domains:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: domains:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["custom_domain_write"]],
- "x-oauth-scope": "domains:write"
+ "x-oauth-scope": "domains:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/custom-hostname/reverify": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-verify-dns-config",
"parameters": [
{
@@ -1977,16 +2010,21 @@
"500": { "description": "Failed to verify project custom hostname configuration" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Attempts to verify the DNS configuration for project's custom hostname configuration",
+ "summary": "Attempts to verify the DNS configuration for project's custom hostname configuration",
"tags": ["Domains"],
- "x-badges": [{ "name": "OAuth scope: domains:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: domains:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["custom_domain_write"]],
- "x-oauth-scope": "domains:write"
+ "x-oauth-scope": "domains:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/custom-hostname/activate": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-activate-custom-hostname",
"parameters": [
{
@@ -2018,16 +2056,21 @@
"500": { "description": "Failed to activate project custom hostname configuration" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Activates a custom hostname for a project.",
+ "summary": "Activates a custom hostname for a project.",
"tags": ["Domains"],
- "x-badges": [{ "name": "OAuth scope: domains:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: domains:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["custom_domain_write"]],
- "x-oauth-scope": "domains:write"
+ "x-oauth-scope": "domains:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/jit-access": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-jit-access-config",
"parameters": [
{
@@ -2087,14 +2130,19 @@
"500": { "description": "Failed to retrieve project's temporary access configuration." }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Get project's temporary access configuration.",
+ "summary": "Get project's temporary access configuration.",
"tags": ["Database"],
- "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: database:read", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["security", "control-plane"],
"x-fga-permissions": [["project_admin_read"]],
- "x-oauth-scope": "database:read"
+ "x-oauth-scope": "database:read",
+ "x-scalar-stability": "experimental"
},
"put": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-update-jit-access-config",
"parameters": [
{
@@ -2162,16 +2210,21 @@
"500": { "description": "Failed to update project's temporary access configuration." }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Update project's temporary access configuration.",
+ "summary": "Update project's temporary access configuration.",
"tags": ["Database"],
- "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: database:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["security", "control-plane"],
"x-fga-permissions": [["project_admin_write"]],
- "x-oauth-scope": "database:write"
+ "x-oauth-scope": "database:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/network-bans/retrieve": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-list-all-network-bans",
"parameters": [
{
@@ -2203,16 +2256,21 @@
"500": { "description": "Failed to retrieve project's network bans" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Gets project's network bans",
+ "summary": "Gets project's network bans",
"tags": ["Projects"],
- "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: projects:read", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [["database_network_bans_read"]],
- "x-oauth-scope": "projects:read"
+ "x-oauth-scope": "projects:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/network-bans/retrieve/enriched": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-list-all-network-bans-enriched",
"parameters": [
{
@@ -2244,16 +2302,21 @@
"500": { "description": "Failed to retrieve project's enriched network bans" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Gets project's network bans with additional information about which databases they affect",
+ "summary": "Gets project's network bans with additional information about which databases they affect",
"tags": ["Projects"],
- "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: projects:read", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [["database_network_bans_read"]],
- "x-oauth-scope": "projects:read"
+ "x-oauth-scope": "projects:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/network-bans": {
"delete": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-delete-network-bans",
"parameters": [
{
@@ -2286,16 +2349,21 @@
"500": { "description": "Failed to remove network bans." }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Remove network bans.",
+ "summary": "Remove network bans.",
"tags": ["Projects"],
- "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: projects:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [["database_network_bans_write"]],
- "x-oauth-scope": "projects:write"
+ "x-oauth-scope": "projects:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/network-restrictions": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-network-restrictions",
"parameters": [
{
@@ -2327,14 +2395,19 @@
"500": { "description": "Failed to retrieve project's network restrictions" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Gets project's network restrictions",
+ "summary": "Gets project's network restrictions",
"tags": ["Projects"],
- "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: projects:read", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["database_network_restrictions_read"]],
- "x-oauth-scope": "projects:read"
+ "x-oauth-scope": "projects:read",
+ "x-scalar-stability": "experimental"
},
"patch": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Alpha** stage.",
"operationId": "v1-patch-network-restrictions",
"parameters": [
{
@@ -2374,16 +2447,21 @@
"500": { "description": "Failed to update project network restrictions" }
},
"security": [{ "bearer": [] }],
- "summary": "[Alpha] Updates project's network restrictions by adding or removing CIDRs",
+ "summary": "Updates project's network restrictions by adding or removing CIDRs",
"tags": ["Projects"],
- "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: projects:write", "position": "after" },
+ { "name": "Alpha", "position": "before" }
+ ],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["database_network_restrictions_write"]],
- "x-oauth-scope": "projects:write"
+ "x-oauth-scope": "projects:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/network-restrictions/apply": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-update-network-restrictions",
"parameters": [
{
@@ -2423,16 +2501,21 @@
"500": { "description": "Failed to update project network restrictions" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Updates project's network restrictions",
+ "summary": "Updates project's network restrictions",
"tags": ["Projects"],
- "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: projects:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["database_network_restrictions_write"]],
- "x-oauth-scope": "projects:write"
+ "x-oauth-scope": "projects:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/pgsodium": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-pgsodium-config",
"parameters": [
{
@@ -2464,14 +2547,19 @@
"500": { "description": "Failed to retrieve project's pgsodium config" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Gets project's pgsodium config",
+ "summary": "Gets project's pgsodium config",
"tags": ["Secrets"],
- "x-badges": [{ "name": "OAuth scope: secrets:read", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: secrets:read", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["infra"],
"x-fga-permissions": [["project_admin_write"]],
- "x-oauth-scope": "secrets:read"
+ "x-oauth-scope": "secrets:read",
+ "x-scalar-stability": "experimental"
},
"put": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-update-pgsodium-config",
"parameters": [
{
@@ -2511,12 +2599,16 @@
"500": { "description": "Failed to update project's pgsodium config" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.",
+ "summary": "Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.",
"tags": ["Secrets"],
- "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: secrets:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["infra"],
"x-fga-permissions": [["project_admin_write"]],
- "x-oauth-scope": "secrets:write"
+ "x-oauth-scope": "secrets:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/postgrest": {
@@ -2861,6 +2953,7 @@
},
"/v1/projects/{ref}/ssl-enforcement": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-ssl-enforcement-config",
"parameters": [
{
@@ -2892,14 +2985,19 @@
"500": { "description": "Failed to retrieve project's SSL enforcement config" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Get project's SSL enforcement configuration.",
+ "summary": "Get project's SSL enforcement configuration.",
"tags": ["Database"],
- "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: database:read", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["database_ssl_config_read"]],
- "x-oauth-scope": "database:read"
+ "x-oauth-scope": "database:read",
+ "x-scalar-stability": "experimental"
},
"put": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-update-ssl-enforcement-config",
"parameters": [
{
@@ -2939,12 +3037,16 @@
"500": { "description": "Failed to update project's SSL enforcement configuration." }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Update project's SSL enforcement configuration.",
+ "summary": "Update project's SSL enforcement configuration.",
"tags": ["Database"],
- "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: database:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["database_ssl_config_write"]],
- "x-oauth-scope": "database:write"
+ "x-oauth-scope": "database:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/types/typescript": {
@@ -2997,6 +3099,7 @@
},
"/v1/projects/{ref}/vanity-subdomain": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-vanity-subdomain-config",
"parameters": [
{
@@ -3034,18 +3137,21 @@
"500": { "description": "Failed to get project vanity subdomain configuration" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Gets current vanity subdomain config",
+ "summary": "Gets current vanity subdomain config",
"tags": ["Domains"],
"x-allowed-plans": ["Pro", "Team", "Enterprise"],
"x-badges": [
{ "name": "OAuth scope: domains:read", "position": "after" },
+ { "name": "Beta", "position": "before" },
{ "name": "Only available on Pro, Team, Enterprise", "position": "before" }
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["vanity_subdomain_read"]],
- "x-oauth-scope": "domains:read"
+ "x-oauth-scope": "domains:read",
+ "x-scalar-stability": "experimental"
},
"delete": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-deactivate-vanity-subdomain-config",
"parameters": [
{
@@ -3070,16 +3176,21 @@
"500": { "description": "Failed to delete project vanity subdomain configuration" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Deletes a project's vanity subdomain configuration",
+ "summary": "Deletes a project's vanity subdomain configuration",
"tags": ["Domains"],
- "x-badges": [{ "name": "OAuth scope: domains:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: domains:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["vanity_subdomain_write"]],
- "x-oauth-scope": "domains:write"
+ "x-oauth-scope": "domains:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/vanity-subdomain/check-availability": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-check-vanity-subdomain-availability",
"parameters": [
{
@@ -3123,20 +3234,23 @@
"500": { "description": "Failed to check project vanity subdomain configuration" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Checks vanity subdomain availability",
+ "summary": "Checks vanity subdomain availability",
"tags": ["Domains"],
"x-allowed-plans": ["Pro", "Team", "Enterprise"],
"x-badges": [
{ "name": "OAuth scope: domains:write", "position": "after" },
+ { "name": "Beta", "position": "before" },
{ "name": "Only available on Pro, Team, Enterprise", "position": "before" }
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["vanity_subdomain_write"]],
- "x-oauth-scope": "domains:write"
+ "x-oauth-scope": "domains:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/vanity-subdomain/activate": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-activate-vanity-subdomain-config",
"parameters": [
{
@@ -3180,20 +3294,23 @@
"500": { "description": "Failed to activate project vanity subdomain configuration" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Activates a vanity subdomain for a project.",
+ "summary": "Activates a vanity subdomain for a project.",
"tags": ["Domains"],
"x-allowed-plans": ["Pro", "Team", "Enterprise"],
"x-badges": [
{ "name": "OAuth scope: domains:write", "position": "after" },
+ { "name": "Beta", "position": "before" },
{ "name": "Only available on Pro, Team, Enterprise", "position": "before" }
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["vanity_subdomain_write"]],
- "x-oauth-scope": "domains:write"
+ "x-oauth-scope": "domains:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/upgrade": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-upgrade-postgres-version",
"parameters": [
{
@@ -3231,16 +3348,21 @@
"500": { "description": "Failed to initiate project upgrade" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Upgrades the project's Postgres version",
+ "summary": "Upgrades the project's Postgres version",
"tags": ["Projects"],
- "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: projects:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [["project_admin_write", "database_write"]],
- "x-oauth-scope": "projects:write"
+ "x-oauth-scope": "projects:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/upgrade/eligibility": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-postgres-upgrade-eligibility",
"parameters": [
{
@@ -3274,16 +3396,21 @@
"500": { "description": "Failed to determine project upgrade eligibility" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Returns the project's eligibility for upgrades",
+ "summary": "Returns the project's eligibility for upgrades",
"tags": ["Projects"],
- "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: projects:read", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [["project_admin_read", "database_read"]],
- "x-oauth-scope": "projects:read"
+ "x-oauth-scope": "projects:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/upgrade/status": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-postgres-upgrade-status",
"parameters": [
{
@@ -3321,12 +3448,16 @@
"500": { "description": "Failed to retrieve project upgrade status" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Gets the latest status of the project's upgrade",
+ "summary": "Gets the latest status of the project's upgrade",
"tags": ["Projects"],
- "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: projects:read", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [["project_admin_read", "database_read"]],
- "x-oauth-scope": "projects:read"
+ "x-oauth-scope": "projects:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/readonly": {
@@ -3406,6 +3537,7 @@
},
"/v1/projects/{ref}/read-replicas/setup": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-setup-a-read-replica",
"parameters": [
{
@@ -3444,16 +3576,21 @@
"500": { "description": "Failed to set up read replica" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Set up a read replica",
+ "summary": "Set up a read replica",
"tags": ["Database"],
"x-allowed-plans": ["Pro", "Team", "Enterprise"],
- "x-badges": [{ "name": "Only available on Pro, Team, Enterprise", "position": "before" }],
+ "x-badges": [
+ { "name": "Beta", "position": "before" },
+ { "name": "Only available on Pro, Team, Enterprise", "position": "before" }
+ ],
"x-endpoint-owners": ["control-plane", "infra"],
- "x-fga-permissions": [["infra_read_replicas_write"]]
+ "x-fga-permissions": [["infra_read_replicas_write"]],
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/read-replicas/remove": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-remove-a-read-replica",
"parameters": [
{
@@ -3486,10 +3623,12 @@
"500": { "description": "Failed to remove read replica" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Remove a read replica",
+ "summary": "Remove a read replica",
"tags": ["Database"],
+ "x-badges": [{ "name": "Beta", "position": "before" }],
"x-endpoint-owners": ["control-plane", "infra"],
- "x-fga-permissions": [["infra_read_replicas_write"]]
+ "x-fga-permissions": [["infra_read_replicas_write"]],
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/health": {
@@ -4600,7 +4739,6 @@
},
"/v1/projects/{ref}/advisors/performance": {
"get": {
- "deprecated": true,
"description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.",
"operationId": "v1-get-performance-advisors",
"parameters": [
@@ -4637,12 +4775,12 @@
"x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }],
"x-endpoint-owners": ["control-plane"],
"x-fga-permissions": [["advisors_read"]],
- "x-oauth-scope": "database:read"
+ "x-oauth-scope": "database:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/advisors/security": {
"get": {
- "deprecated": true,
"description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.",
"operationId": "v1-get-security-advisors",
"parameters": [
@@ -4685,13 +4823,14 @@
"x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }],
"x-endpoint-owners": ["control-plane"],
"x-fga-permissions": [["advisors_read"]],
- "x-oauth-scope": "database:read"
+ "x-oauth-scope": "database:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/analytics/endpoints/logs.all": {
"get": {
"deprecated": true,
- "description": "Executes a SQL query on the project's logs.\n\nEither the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided.\nIf both are not provided, only the last 1 minute of logs will be queried.\nThe timestamp range must be no more than 24 hours and is rounded to the nearest minute. If the range is more than 24 hours, a validation error will be thrown.\n\nNote: Unless the `sql` parameter is provided, only edge_logs will be queried. See the [log query docs](https://supabase.com/docs/guides/monitoring-and-debugging/logs#logs-explorer) for all available sources.\n",
+ "description": "This endpoint has been removed and always responds with `410 Gone`. Use `GET /v1/projects/{ref}/analytics/endpoints/logs` instead. See the [migration guide](https://supabase.com/changelog/48235-migration-of-supabase-management-api-logs-all-analytics-endpoint-to-logs-endpoint).",
"operationId": "v1-get-project-logs-all",
"parameters": [
{
@@ -4706,52 +4845,12 @@
"example": "abcdefghijklmnopqrst",
"type": "string"
}
- },
- {
- "name": "sql",
- "required": false,
- "in": "query",
- "description": "Custom SQL query to execute on the logs. See [querying logs](https://supabase.com/docs/guides/monitoring-and-debugging/logs#querying-with-the-logs-explorer) for more details.",
- "schema": {
- "example": "select event_message from edge_logs limit 10",
- "type": "string"
- }
- },
- {
- "name": "iso_timestamp_start",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "example": "2025-03-01T00:00:00Z",
- "type": "string"
- }
- },
- {
- "name": "iso_timestamp_end",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "example": "2025-03-01T23:59:59Z",
- "type": "string"
- }
}
],
"responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": { "$ref": "#/components/schemas/AnalyticsResponse_Output" }
- }
- }
- },
"401": { "description": "Unauthorized" },
- "402": { "description": "Usage exceeded. Enable additional usage to continue querying" },
"403": { "description": "Forbidden action" },
+ "410": { "description": "This endpoint has been removed" },
"429": { "description": "Rate limit exceeded" }
},
"security": [{ "bearer": [] }],
@@ -5029,6 +5128,7 @@
},
"/v1/projects/{ref}/cli/login-role": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-create-login-role",
"parameters": [
{
@@ -5066,14 +5166,19 @@
"500": { "description": "Failed to create login role" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Create a login role for CLI with temporary password",
+ "summary": "Create a login role for CLI with temporary password",
"tags": ["Database"],
- "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: database:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["dev-workflows"],
"x-fga-permissions": [["database_write"]],
- "x-oauth-scope": "database:write"
+ "x-oauth-scope": "database:write",
+ "x-scalar-stability": "experimental"
},
"delete": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-delete-login-roles",
"parameters": [
{
@@ -5105,12 +5210,16 @@
"500": { "description": "Failed to delete login roles" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Delete existing login roles used by CLI",
+ "summary": "Delete existing login roles used by CLI",
"tags": ["Database"],
- "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: database:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["dev-workflows"],
"x-fga-permissions": [["database_write"]],
- "x-oauth-scope": "database:write"
+ "x-oauth-scope": "database:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/database/migrations": {
@@ -5382,6 +5491,7 @@
},
"/v1/projects/{ref}/database/query": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-run-a-query",
"parameters": [
{
@@ -5412,17 +5522,21 @@
"500": { "description": "Failed to run sql query" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Run sql query",
+ "summary": "Run sql query",
"tags": ["Database"],
- "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: database:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["control-plane"],
"x-fga-permissions": [["database_read"], ["database_write"]],
- "x-oauth-scope": "database:write"
+ "x-oauth-scope": "database:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/database/query/read-only": {
"post": {
- "description": "All entity references must be schema qualified.",
+ "description": "All entity references must be schema qualified.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-read-only-query",
"parameters": [
{
@@ -5453,16 +5567,21 @@
"500": { "description": "Failed to run read-only sql query" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Run a sql query as supabase_read_only_user",
+ "summary": "Run a sql query as supabase_read_only_user",
"tags": ["Database"],
- "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: database:read", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["control-plane"],
"x-fga-permissions": [["database_read"]],
- "x-oauth-scope": "database:read"
+ "x-oauth-scope": "database:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/database/webhooks/enable": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-enable-database-webhook",
"parameters": [
{
@@ -5487,17 +5606,20 @@
"500": { "description": "Failed to enable Database Webhooks on the project" }
},
"security": [{ "bearer": [] }],
- "summary": "[Beta] Enables Database Webhooks on the project",
+ "summary": "Enables Database Webhooks on the project",
"tags": ["Database"],
- "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }],
+ "x-badges": [
+ { "name": "OAuth scope: database:write", "position": "after" },
+ { "name": "Beta", "position": "before" }
+ ],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [["database_webhooks_config_write"]],
- "x-oauth-scope": "database:write"
+ "x-oauth-scope": "database:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/database/context": {
"get": {
- "deprecated": true,
"description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.",
"operationId": "v1-get-database-metadata",
"parameters": [
@@ -5534,7 +5656,8 @@
"x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }],
"x-endpoint-owners": ["control-plane"],
"x-fga-permissions": [["database_read"]],
- "x-oauth-scope": "projects:read"
+ "x-oauth-scope": "projects:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/database/password": {
@@ -8841,7 +8964,7 @@
"schema_version": { "type": "string" },
"sql": { "type": "string" }
},
- "required": ["schema_version", "sql"]
+ "required": ["sql"]
}
},
"required": [
@@ -12070,6 +12193,7 @@
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
+ "act": { "type": "string" },
"user_role": {
"type": "object",
"properties": {
@@ -12113,7 +12237,7 @@
"required": ["role"]
}
},
- "required": ["user_id", "user_role"]
+ "required": ["user_role"]
},
"JitListAccessResponse_Output": {
"type": "object",
@@ -13282,7 +13406,7 @@
"max_concurrent_users": {
"type": "integer",
"minimum": 1,
- "maximum": 50000,
+ "maximum": 300000,
"description": "Sets maximum number of concurrent users rate limit",
"nullable": true
},
@@ -13333,7 +13457,14 @@
"description": "Disables the Realtime service for this project when true. Set to false to re-enable it.",
"nullable": true
},
- "presence_enabled": { "type": "boolean", "description": "Whether to enable presence" }
+ "presence_enabled": { "type": "boolean", "description": "Whether to enable presence" },
+ "admin_suspended_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
+ "description": "If set, the Realtime service has been suspended by an admin.",
+ "nullable": true
+ }
},
"required": [
"private_only",
@@ -13347,7 +13478,8 @@
"max_presence_events_per_second",
"max_payload_size_in_kb",
"suspend",
- "presence_enabled"
+ "presence_enabled",
+ "admin_suspended_at"
]
},
"UpdateRealtimeConfigBody": {
@@ -13372,7 +13504,7 @@
"max_concurrent_users": {
"type": "integer",
"minimum": 1,
- "maximum": 50000,
+ "maximum": 300000,
"description": "Sets maximum number of concurrent users rate limit"
},
"max_events_per_second": {
diff --git a/apps/docs/spec/api_v2_openapi.json b/apps/docs/spec/api_v2_openapi.json
index c7ade37d0ad..fdac7fb7882 100644
--- a/apps/docs/spec/api_v2_openapi.json
+++ b/apps/docs/spec/api_v2_openapi.json
@@ -427,7 +427,7 @@
},
"/v2/projects/{ref}/config": {
"get": {
- "description": "Returns the project's database, pooler, Auth, Data API, Realtime and Storage configuration — the same configuration a branch inherits from its base project. Each is the effective config, so a setting the project has never overridden is reported at its platform default rather than as null. Auth secrets are returned as an HMAC of their value. `storage` is read live from the storage service; the rest come from this platform's own records.",
+ "description": "Returns the project's database, pooler, Auth, Data API, Realtime and Storage configuration — the same configuration a branch inherits from its base project. Each is the effective config, so a setting the project has never overridden is reported at its platform default rather than as null. Auth secrets are returned as an HMAC of their value. `storage` is read live from the storage service; the rest come from this platform's own records.\n\nThis endpoint is currently in its **Alpha** stage.",
"operationId": "v2-get-project-config",
"parameters": [
{
@@ -473,8 +473,9 @@
}
},
"security": [{ "bearer": [] }],
- "summary": "[Alpha] Get a project's service configuration",
+ "summary": "Get a project's service configuration",
"tags": ["Projects"],
+ "x-badges": [{ "name": "Alpha", "position": "before" }],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [
[
@@ -487,12 +488,14 @@
"realtime_config_read",
"storage_config_read"
]
- ]
+ ],
+ "x-scalar-stability": "experimental"
}
},
- "/v2/projects/{ref}/transfers/previews": {
- "post": {
- "operationId": "v2-preview-a-project-transfer",
+ "/v2/projects/{ref}/notebooks": {
+ "get": {
+ "description": "Returns a cursor-paginated list of the project notebooks. Notebook bodies are omitted — read a single notebook to get its cells.",
+ "operationId": "v2-list-notebooks",
"parameters": [
{
"name": "ref",
@@ -506,22 +509,44 @@
"example": "abcdefghijklmnopqrst",
"type": "string"
}
+ },
+ {
+ "name": "page",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "properties": {
+ "size": { "type": "integer", "minimum": 1, "maximum": 100 },
+ "after": { "type": "string", "minLength": 1 },
+ "before": { "type": "string", "minLength": 1 }
+ },
+ "type": "object"
+ },
+ "style": "deepObject"
+ },
+ {
+ "name": "filter",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "properties": { "name": { "type": "string", "minLength": 1 } },
+ "type": "object"
+ },
+ "style": "deepObject"
+ },
+ {
+ "name": "sort",
+ "required": false,
+ "in": "query",
+ "schema": { "type": "string", "enum": ["name", "-name", "inserted_at", "-inserted_at"] }
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": { "$ref": "#/components/schemas/V2TransferProjectBody" }
- }
- }
- },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
- "schema": { "$ref": "#/components/schemas/V2PreviewProjectTransferResponse_Output" }
+ "schema": { "$ref": "#/components/schemas/V2ListNotebooksResponse_Output" }
}
}
},
@@ -542,18 +567,25 @@
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
+ },
+ "500": {
+ "description": "Failed to retrieve project's notebooks",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
}
},
"security": [{ "bearer": [] }],
- "summary": "Previews transferring a project to a different organizations, shows eligibility and impact",
+ "summary": "List notebooks of a project",
"tags": ["Projects"],
+ "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }],
"x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["project_admin_read"]]
- }
- },
- "/v2/projects/{ref}/transfers": {
+ "x-fga-permissions": [["project_notebooks_read"]],
+ "x-oauth-scope": "database:read"
+ },
"post": {
- "operationId": "v2-transfer-a-project",
+ "description": "Creates a notebook shared with everyone who has access to the project. Cell ids are assigned by the server and returned in the response.",
+ "operationId": "v2-create-notebook",
"parameters": [
{
"name": "ref",
@@ -573,12 +605,25 @@
"required": true,
"content": {
"application/json": {
- "schema": { "$ref": "#/components/schemas/V2TransferProjectBody" }
+ "schema": { "$ref": "#/components/schemas/V2CreateNotebookRequest" }
}
}
},
"responses": {
- "200": { "description": "" },
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/V2NotebookResponse_Output" }
+ }
+ }
+ },
+ "400": {
+ "description": "The request repeats a cell id",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ },
"401": {
"description": "Unauthorized",
"content": {
@@ -596,18 +641,26 @@
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
+ },
+ "500": {
+ "description": "Failed to create notebook",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
}
},
"security": [{ "bearer": [] }],
- "summary": "Transfers a project to a different organization",
+ "summary": "Create a notebook",
"tags": ["Projects"],
+ "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }],
"x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["organization_admin_write"]]
+ "x-fga-permissions": [["project_notebooks_write"]],
+ "x-oauth-scope": "database:write"
}
},
- "/v2/projects/{ref}/private-link/associations": {
+ "/v2/projects/{ref}/notebooks/{id}": {
"get": {
- "operationId": "v2-list-private-link-associations",
+ "operationId": "v2-get-notebook",
"parameters": [
{
"name": "ref",
@@ -621,6 +674,17 @@
"example": "abcdefghijklmnopqrst",
"type": "string"
}
+ },
+ {
+ "name": "id",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "example": "44444444-4444-4444-8444-444444444444",
+ "type": "string"
+ }
}
],
"responses": {
@@ -628,9 +692,7 @@
"description": "",
"content": {
"application/json": {
- "schema": {
- "$ref": "#/components/schemas/V2ListPrivateLinkAssociationsResponse_Output"
- }
+ "schema": { "$ref": "#/components/schemas/V2NotebookResponse_Output" }
}
}
},
@@ -646,6 +708,12 @@
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
},
+ "404": {
+ "description": "Notebook not found",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ },
"429": {
"description": "Rate limit exceeded",
"content": {
@@ -653,21 +721,23 @@
}
},
"500": {
- "description": "Failed to retrieve AWS accounts for project",
+ "description": "Failed to retrieve notebook",
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
}
},
"security": [{ "bearer": [] }],
- "summary": "List AWS accounts attached to the project PrivateLink share",
+ "summary": "Get a notebook",
"tags": ["Projects"],
- "x-endpoint-owners": ["platform-networking", "control-plane"],
- "x-fga-permissions": [["project_admin_read"]]
+ "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["project_notebooks_read"]],
+ "x-oauth-scope": "database:read"
},
- "post": {
- "description": "Adds an AWS account to the project's PrivateLink configuration and schedules the AWS resources to be created.",
- "operationId": "v2-create-private-link-association",
+ "patch": {
+ "description": "Updates the attributes provided and leaves the rest untouched. Sending `content` replaces the whole notebook body.",
+ "operationId": "v2-update-notebook",
"parameters": [
{
"name": "ref",
@@ -681,33 +751,44 @@
"example": "abcdefghijklmnopqrst",
"type": "string"
}
+ },
+ {
+ "name": "id",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "example": "44444444-4444-4444-8444-444444444444",
+ "type": "string"
+ }
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
- "schema": { "$ref": "#/components/schemas/V2CreatePrivateLinkAssociationRequest" }
+ "schema": { "$ref": "#/components/schemas/V2UpdateNotebookRequest" }
}
}
},
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
- "schema": { "$ref": "#/components/schemas/V2PrivateLinkAssociationResponse_Output" }
+ "schema": { "$ref": "#/components/schemas/V2NotebookResponse_Output" }
}
}
},
- "401": {
- "description": "Unauthorized",
+ "400": {
+ "description": "The request references a cell that does not exist on this notebook, or repeats a cell id",
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
},
- "402": {
- "description": "This feature requires the Team, or Enterprise organization plan.",
+ "401": {
+ "description": "Unauthorized",
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
@@ -718,6 +799,12 @@
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
},
+ "404": {
+ "description": "Notebook not found",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ },
"429": {
"description": "Rate limit exceeded",
"content": {
@@ -725,25 +812,22 @@
}
},
"500": {
- "description": "Failed to add AWS account to PrivateLink share",
+ "description": "Failed to update notebook",
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
}
},
"security": [{ "bearer": [] }],
- "summary": "Add an AWS account to the project PrivateLink share",
+ "summary": "Update a notebook",
"tags": ["Projects"],
- "x-allowed-plans": ["Team", "Enterprise"],
- "x-badges": [{ "name": "Only available on Team, Enterprise", "position": "before" }],
- "x-endpoint-owners": ["platform-networking", "control-plane"],
- "x-fga-permissions": [["project_admin_write"]]
- }
- },
- "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}": {
+ "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["project_notebooks_write"]],
+ "x-oauth-scope": "database:write"
+ },
"delete": {
- "description": "Removes an AWS account from the project's PrivateLink configuration (targeting the primary database). Cleans up the associated AWS resources.",
- "operationId": "v2-delete-private-link-association",
+ "operationId": "v2-delete-notebook",
"parameters": [
{
"name": "ref",
@@ -759,11 +843,15 @@
}
},
{
- "name": "aws_account_id",
+ "name": "id",
"required": true,
"in": "path",
- "description": "AWS account ID used in PrivateLink association",
- "schema": { "type": "string" }
+ "schema": {
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "example": "44444444-4444-4444-8444-444444444444",
+ "type": "string"
+ }
}
],
"responses": {
@@ -780,6 +868,12 @@
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
},
+ "404": {
+ "description": "Notebook not found",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ },
"429": {
"description": "Rate limit exceeded",
"content": {
@@ -787,23 +881,24 @@
}
},
"500": {
- "description": "Failed to remove AWS account from PrivateLink share",
+ "description": "Failed to delete notebook",
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
}
},
"security": [{ "bearer": [] }],
- "summary": "Remove an AWS account from the project PrivateLink share",
+ "summary": "Delete a notebook",
"tags": ["Projects"],
- "x-endpoint-owners": ["platform-networking", "control-plane"],
- "x-fga-permissions": [["project_admin_write"]]
+ "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["project_notebooks_write"]],
+ "x-oauth-scope": "database:write"
}
},
- "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}/database/{database_identifier}": {
- "delete": {
- "description": "Removes an AWS account from the project's PrivateLink configuration for the given read replica. Cleans up the associated AWS resources.",
- "operationId": "v2-delete-private-link-association-for-database",
+ "/v2/projects/{ref}/transfers/previews": {
+ "post": {
+ "operationId": "v2-preview-a-project-transfer",
"parameters": [
{
"name": "ref",
@@ -817,24 +912,25 @@
"example": "abcdefghijklmnopqrst",
"type": "string"
}
- },
- {
- "name": "aws_account_id",
- "required": true,
- "in": "path",
- "description": "AWS account ID used in PrivateLink association",
- "schema": { "type": "string" }
- },
- {
- "name": "database_identifier",
- "required": true,
- "in": "path",
- "description": "Identifier of the read replica this PrivateLink association targets",
- "schema": { "type": "string" }
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/V2TransferProjectBody" }
+ }
+ }
+ },
"responses": {
- "204": { "description": "" },
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/V2PreviewProjectTransferResponse_Output" }
+ }
+ }
+ },
"401": {
"description": "Unauthorized",
"content": {
@@ -852,25 +948,18 @@
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
- },
- "500": {
- "description": "Failed to remove AWS account from PrivateLink share",
- "content": {
- "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
- }
}
},
"security": [{ "bearer": [] }],
- "summary": "Remove an AWS account from a specific database PrivateLink share",
+ "summary": "Previews transferring a project to a different organizations, shows eligibility and impact",
"tags": ["Projects"],
- "x-endpoint-owners": ["platform-networking", "control-plane"],
- "x-fga-permissions": [["project_admin_write"]]
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["project_admin_read"]]
}
},
- "/v2/projects/{ref}/workers": {
- "get": {
- "description": "Returns all workers you've previously deployed to the specified project.",
- "operationId": "v2-list-all-workers",
+ "/v2/projects/{ref}/transfers": {
+ "post": {
+ "operationId": "v2-transfer-a-project",
"parameters": [
{
"name": "ref",
@@ -886,15 +975,16 @@
}
}
],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": { "$ref": "#/components/schemas/V2ListWorkersResponse_Output" }
- }
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/V2TransferProjectBody" }
}
- },
+ }
+ },
+ "responses": {
+ "200": { "description": "" },
"401": {
"description": "Unauthorized",
"content": {
@@ -915,18 +1005,15 @@
}
},
"security": [{ "bearer": [] }],
- "summary": "[Alpha] List all workers",
- "tags": ["Workers"],
- "x-badges": [{ "name": "OAuth scope: edge_functions:read", "position": "after" }],
- "x-endpoint-owners": ["functions"],
- "x-fga-permissions": [["workers_read"]],
- "x-oauth-scope": "edge_functions:read"
+ "summary": "Transfers a project to a different organization",
+ "tags": ["Projects"],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["organization_admin_write"]]
}
},
- "/v2/projects/{ref}/workers/{name}": {
+ "/v2/projects/{ref}/private-link/associations": {
"get": {
- "description": "Returns a worker along with its instance tally. Poll this after a deploy until `build_state` leaves `building`.",
- "operationId": "v2-get-a-worker",
+ "operationId": "v2-list-private-link-associations",
"parameters": [
{
"name": "ref",
@@ -940,16 +1027,6 @@
"example": "abcdefghijklmnopqrst",
"type": "string"
}
- },
- {
- "name": "name",
- "required": true,
- "in": "path",
- "schema": {
- "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
- "example": "hello-world",
- "type": "string"
- }
}
],
"responses": {
@@ -957,7 +1034,9 @@
"description": "",
"content": {
"application/json": {
- "schema": { "$ref": "#/components/schemas/V2WorkerResponse_Output" }
+ "schema": {
+ "$ref": "#/components/schemas/V2ListPrivateLinkAssociationsResponse_Output"
+ }
}
}
},
@@ -978,19 +1057,23 @@
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
- }
- },
- "security": [{ "bearer": [] }],
- "summary": "[Alpha] Retrieve a worker",
- "tags": ["Workers"],
- "x-badges": [{ "name": "OAuth scope: edge_functions:read", "position": "after" }],
- "x-endpoint-owners": ["functions"],
- "x-fga-permissions": [["workers_read"]],
- "x-oauth-scope": "edge_functions:read"
+ },
+ "500": {
+ "description": "Failed to retrieve AWS accounts for project",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ }
+ },
+ "security": [{ "bearer": [] }],
+ "summary": "List AWS accounts attached to the project PrivateLink share",
+ "tags": ["Projects"],
+ "x-endpoint-owners": ["platform-networking", "control-plane"],
+ "x-fga-permissions": [["project_admin_read"]]
},
- "delete": {
- "description": "Tombstones the worker. Its instances and image are torn down asynchronously.",
- "operationId": "v2-delete-a-worker",
+ "post": {
+ "description": "Adds an AWS account to the project's PrivateLink configuration and schedules the AWS resources to be created.",
+ "operationId": "v2-create-private-link-association",
"parameters": [
{
"name": "ref",
@@ -1004,26 +1087,37 @@
"example": "abcdefghijklmnopqrst",
"type": "string"
}
- },
- {
- "name": "name",
- "required": true,
- "in": "path",
- "schema": {
- "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
- "example": "hello-world",
- "type": "string"
- }
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/V2CreatePrivateLinkAssociationRequest" }
+ }
+ }
+ },
"responses": {
- "204": { "description": "" },
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/V2PrivateLinkAssociationResponse_Output" }
+ }
+ }
+ },
"401": {
"description": "Unauthorized",
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
},
+ "402": {
+ "description": "This feature requires the Team, or Enterprise organization plan.",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ },
"403": {
"description": "Forbidden action",
"content": {
@@ -1035,21 +1129,27 @@
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
+ },
+ "500": {
+ "description": "Failed to add AWS account to PrivateLink share",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
}
},
"security": [{ "bearer": [] }],
- "summary": "[Alpha] Delete a worker",
- "tags": ["Workers"],
- "x-badges": [{ "name": "OAuth scope: edge_functions:write", "position": "after" }],
- "x-endpoint-owners": ["functions"],
- "x-fga-permissions": [["workers_write"]],
- "x-oauth-scope": "edge_functions:write"
+ "summary": "Add an AWS account to the project PrivateLink share",
+ "tags": ["Projects"],
+ "x-allowed-plans": ["Team", "Enterprise"],
+ "x-badges": [{ "name": "Only available on Team, Enterprise", "position": "before" }],
+ "x-endpoint-owners": ["platform-networking", "control-plane"],
+ "x-fga-permissions": [["project_admin_write"]]
}
},
- "/v2/projects/{ref}/workers/{name}/uploads": {
- "post": {
- "description": "PUT the `.tar.gz` build context to the returned `url` before `expires_at`, then deploy with the upload id as `context_upload_id`. The bytes go straight to storage — no management API request carries them.",
- "operationId": "v2-create-worker-upload",
+ "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}": {
+ "delete": {
+ "description": "Removes an AWS account from the project's PrivateLink configuration (targeting the primary database). Cleans up the associated AWS resources.",
+ "operationId": "v2-delete-private-link-association",
"parameters": [
{
"name": "ref",
@@ -1065,25 +1165,15 @@
}
},
{
- "name": "name",
+ "name": "aws_account_id",
"required": true,
"in": "path",
- "schema": {
- "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
- "example": "hello-world",
- "type": "string"
- }
+ "description": "AWS account ID used in PrivateLink association",
+ "schema": { "type": "string" }
}
],
"responses": {
- "201": {
- "description": "",
- "content": {
- "application/json": {
- "schema": { "$ref": "#/components/schemas/V2WorkerUploadResponse_Output" }
- }
- }
- },
+ "204": { "description": "" },
"401": {
"description": "Unauthorized",
"content": {
@@ -1101,21 +1191,25 @@
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
+ },
+ "500": {
+ "description": "Failed to remove AWS account from PrivateLink share",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
}
},
"security": [{ "bearer": [] }],
- "summary": "[Alpha] Mint a presigned slot for a build-context upload",
- "tags": ["Workers"],
- "x-badges": [{ "name": "OAuth scope: edge_functions:write", "position": "after" }],
- "x-endpoint-owners": ["functions"],
- "x-fga-permissions": [["workers_write"]],
- "x-oauth-scope": "edge_functions:write"
+ "summary": "Remove an AWS account from the project PrivateLink share",
+ "tags": ["Projects"],
+ "x-endpoint-owners": ["platform-networking", "control-plane"],
+ "x-fga-permissions": [["project_admin_write"]]
}
},
- "/v2/projects/{ref}/workers/{name}/deploy": {
- "post": {
- "description": "Creates the worker if it does not exist, building from a context staged through the uploads endpoint. The build runs asynchronously: this answers 202 and the worker reaches `build_state` `active` or `failed` later.",
- "operationId": "v2-deploy-a-worker",
+ "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}/database/{database_identifier}": {
+ "delete": {
+ "description": "Removes an AWS account from the project's PrivateLink configuration for the given read replica. Cleans up the associated AWS resources.",
+ "operationId": "v2-delete-private-link-association-for-database",
"parameters": [
{
"name": "ref",
@@ -1131,33 +1225,22 @@
}
},
{
- "name": "name",
+ "name": "aws_account_id",
"required": true,
"in": "path",
- "schema": {
- "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
- "example": "hello-world",
- "type": "string"
- }
+ "description": "AWS account ID used in PrivateLink association",
+ "schema": { "type": "string" }
+ },
+ {
+ "name": "database_identifier",
+ "required": true,
+ "in": "path",
+ "description": "Identifier of the read replica this PrivateLink association targets",
+ "schema": { "type": "string" }
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": { "$ref": "#/components/schemas/V2DeployWorkerRequest" }
- }
- }
- },
"responses": {
- "202": {
- "description": "",
- "content": {
- "application/json": {
- "schema": { "$ref": "#/components/schemas/V2WorkerResponse_Output" }
- }
- }
- },
+ "204": { "description": "" },
"401": {
"description": "Unauthorized",
"content": {
@@ -1175,71 +1258,38 @@
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
+ },
+ "500": {
+ "description": "Failed to remove AWS account from PrivateLink share",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
}
},
"security": [{ "bearer": [] }],
- "summary": "[Alpha] Deploy a worker",
- "tags": ["Workers"],
- "x-badges": [{ "name": "OAuth scope: edge_functions:write", "position": "after" }],
- "x-endpoint-owners": ["functions"],
- "x-fga-permissions": [["workers_write"]],
- "x-oauth-scope": "edge_functions:write"
+ "summary": "Remove an AWS account from a specific database PrivateLink share",
+ "tags": ["Projects"],
+ "x-endpoint-owners": ["platform-networking", "control-plane"],
+ "x-fga-permissions": [["project_admin_write"]]
}
},
- "/v2/organizations/{slug}/members": {
+ "/v2/projects/{ref}/compute": {
"get": {
- "description": "Returns a cursor-paginated list of organization members including their roles and project-scoped permissions.",
- "operationId": "v2-list-organization-members",
+ "description": "Returns all compute instances you've previously deployed to the specified project.\n\nThis endpoint is currently in its **Alpha** stage.",
+ "operationId": "v2-list-all-compute-instances",
"parameters": [
{
- "name": "slug",
+ "name": "ref",
"required": true,
"in": "path",
- "description": "Organization slug",
+ "description": "Project ref",
"schema": {
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst",
"type": "string"
}
- },
- {
- "name": "page",
- "required": false,
- "in": "query",
- "schema": {
- "properties": {
- "size": { "type": "integer", "minimum": 1, "maximum": 100 },
- "after": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "before": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- }
- },
- "type": "object"
- },
- "style": "deepObject"
- },
- {
- "name": "filter",
- "required": false,
- "in": "query",
- "schema": {
- "properties": {
- "username": { "type": "string" },
- "primary_email": {
- "type": "string",
- "format": "email",
- "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
- }
- },
- "type": "object"
- },
- "style": "deepObject"
}
],
"responses": {
@@ -1247,7 +1297,7 @@
"description": "",
"content": {
"application/json": {
- "schema": { "$ref": "#/components/schemas/V2ListMembersResponse_Output" }
+ "schema": { "$ref": "#/components/schemas/V2ListComputeInstancesResponse_Output" }
}
}
},
@@ -1271,55 +1321,53 @@
}
},
"security": [{ "bearer": [] }],
- "summary": "List members of an organization",
- "tags": ["Organizations"],
- "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }],
- "x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["members_read"]],
- "x-oauth-scope": "organizations:read"
+ "summary": "List all compute instances",
+ "tags": ["Compute"],
+ "x-badges": [
+ { "name": "OAuth scope: edge_functions:read", "position": "after" },
+ { "name": "Alpha", "position": "before" }
+ ],
+ "x-endpoint-owners": ["functions"],
+ "x-fga-permissions": [["workers_read"]],
+ "x-oauth-scope": "edge_functions:read",
+ "x-scalar-stability": "experimental"
}
},
- "/v2/organizations/{slug}/members/{user_id}/roles": {
- "patch": {
- "description": "Assigns an org-wide role when projects is omitted, or creates a project-scoped assignment when projects is provided. Uses an org-level role template id from GET /v2/organizations/{slug}/roles. Stale role assignments are automatically cleaned up: if a role no longer has any projects, it is deleted; overlapping project assignments in other roles are automatically removed to avoid duplication.",
- "operationId": "v2-assign-organization-member-role",
+ "/v2/projects/{ref}/compute/{name}": {
+ "get": {
+ "description": "Returns a compute instance along with the counts of its running instances. Poll this after a deploy until `build_state` leaves `building`.\n\nThis endpoint is currently in its **Alpha** stage.",
+ "operationId": "v2-get-a-compute-instance",
"parameters": [
{
- "name": "slug",
+ "name": "ref",
"required": true,
"in": "path",
- "description": "Organization slug",
+ "description": "Project ref",
"schema": {
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst",
"type": "string"
}
},
{
- "name": "user_id",
+ "name": "name",
"required": true,
"in": "path",
"schema": {
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
+ "example": "hello-world",
"type": "string"
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": { "$ref": "#/components/schemas/V2AssignOrganizationMemberRoleRequest" }
- }
- }
- },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
- "schema": { "$ref": "#/components/schemas/OrganizationMemberRoleResponse_Output" }
+ "schema": { "$ref": "#/components/schemas/V2ComputeInstanceResponse_Output" }
}
}
},
@@ -1329,12 +1377,6 @@
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
},
- "402": {
- "description": "This feature requires the Enterprise organization plan.",
- "content": {
- "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
- }
- },
"403": {
"description": "Forbidden action",
"content": {
@@ -1346,49 +1388,50 @@
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
- },
- "500": {
- "description": "Failed to assign organization member role",
- "content": {
- "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
- }
}
},
"security": [{ "bearer": [] }],
- "summary": "Assign or change an organization member role",
- "tags": ["Organizations"],
- "x-allowed-plans": ["Enterprise"],
- "x-badges": [{ "name": "Only available on Enterprise", "position": "before" }],
- "x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["organization_admin_write"]]
- }
- },
- "/v2/organizations/{slug}/roles": {
- "get": {
- "description": "Returns a list of org-level roles for the organization.",
- "operationId": "v2-list-organization-roles",
+ "summary": "Retrieve a compute instance",
+ "tags": ["Compute"],
+ "x-badges": [
+ { "name": "OAuth scope: edge_functions:read", "position": "after" },
+ { "name": "Alpha", "position": "before" }
+ ],
+ "x-endpoint-owners": ["functions"],
+ "x-fga-permissions": [["workers_read"]],
+ "x-oauth-scope": "edge_functions:read",
+ "x-scalar-stability": "experimental"
+ },
+ "delete": {
+ "description": "Tombstones the compute instance. Its running instances and image are torn down asynchronously.\n\nThis endpoint is currently in its **Alpha** stage.",
+ "operationId": "v2-delete-a-compute-instance",
"parameters": [
{
- "name": "slug",
+ "name": "ref",
"required": true,
"in": "path",
- "description": "Organization slug",
+ "description": "Project ref",
"schema": {
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst",
+ "type": "string"
+ }
+ },
+ {
+ "name": "name",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
+ "example": "hello-world",
"type": "string"
}
}
],
"responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": { "$ref": "#/components/schemas/V2ListRolesResponse_Output" }
- }
- }
- },
+ "204": { "description": "" },
"401": {
"description": "Unauthorized",
"content": {
@@ -1409,45 +1452,53 @@
}
},
"security": [{ "bearer": [] }],
- "summary": "List roles of an organization",
- "tags": ["Organizations"],
- "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }],
- "x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["members_read"]],
- "x-oauth-scope": "organizations:read"
+ "summary": "Delete a compute instance",
+ "tags": ["Compute"],
+ "x-badges": [
+ { "name": "OAuth scope: edge_functions:write", "position": "after" },
+ { "name": "Alpha", "position": "before" }
+ ],
+ "x-endpoint-owners": ["functions"],
+ "x-fga-permissions": [["workers_write"]],
+ "x-oauth-scope": "edge_functions:write",
+ "x-scalar-stability": "experimental"
}
},
- "/v2/organizations/{slug}/members/invitations": {
+ "/v2/projects/{ref}/compute/{name}/uploads": {
"post": {
- "description": "Creates member invitations for an organization. Each invitation can have different role and project scope settings.",
- "operationId": "v2-create-organization-invitations",
+ "description": "PUT the `.tar.gz` build context to the returned `url` before `expires_at`, then deploy with the upload id as `context_upload_id`. The bytes go straight to storage — no management API request carries them.\n\nThis endpoint is currently in its **Alpha** stage.",
+ "operationId": "v2-create-compute-instance-upload",
"parameters": [
{
- "name": "slug",
+ "name": "ref",
"required": true,
"in": "path",
- "description": "Organization slug",
+ "description": "Project ref",
"schema": {
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst",
"type": "string"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": { "$ref": "#/components/schemas/V2CreateInvitationsRequest" }
+ },
+ {
+ "name": "name",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
+ "example": "hello-world",
+ "type": "string"
}
}
- },
+ ],
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
- "schema": { "$ref": "#/components/schemas/V2CreateInvitationsResponse_Output" }
+ "schema": { "$ref": "#/components/schemas/V2ComputeInstanceUploadResponse_Output" }
}
}
},
@@ -1457,12 +1508,6 @@
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
},
- "402": {
- "description": "This feature requires the Enterprise organization plan.",
- "content": {
- "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
- }
- },
"403": {
"description": "Forbidden action",
"content": {
@@ -1477,29 +1522,43 @@
}
},
"security": [{ "bearer": [] }],
- "summary": "Creates organization invitations",
- "tags": ["Organizations Members Invitations"],
- "x-allowed-plans": ["Enterprise"],
+ "summary": "Mint a presigned slot for a build-context upload",
+ "tags": ["Compute"],
"x-badges": [
- { "name": "OAuth scope: organizations:write", "position": "after" },
- { "name": "Only available on Enterprise", "position": "before" }
+ { "name": "OAuth scope: edge_functions:write", "position": "after" },
+ { "name": "Alpha", "position": "before" }
],
- "x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["members_write"]],
- "x-oauth-scope": "organizations:write"
- },
- "delete": {
- "description": "Bulk delete member invitations for an organization by email address.",
- "operationId": "v2-delete-organization-invitations",
+ "x-endpoint-owners": ["functions"],
+ "x-fga-permissions": [["workers_write"]],
+ "x-oauth-scope": "edge_functions:write",
+ "x-scalar-stability": "experimental"
+ }
+ },
+ "/v2/projects/{ref}/compute/{name}/deploy": {
+ "post": {
+ "description": "Creates the compute instance if it does not exist, building from a context staged through the uploads endpoint. The build runs asynchronously: this answers 202 and the compute instance reaches `build_state` `active` or `failed` later.\n\nThis endpoint is currently in its **Alpha** stage.",
+ "operationId": "v2-deploy-a-compute-instance",
"parameters": [
{
- "name": "slug",
+ "name": "ref",
"required": true,
"in": "path",
- "description": "Organization slug",
+ "description": "Project ref",
"schema": {
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst",
+ "type": "string"
+ }
+ },
+ {
+ "name": "name",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
+ "example": "hello-world",
"type": "string"
}
}
@@ -1508,16 +1567,16 @@
"required": true,
"content": {
"application/json": {
- "schema": { "$ref": "#/components/schemas/V2DeleteInvitationsRequest" }
+ "schema": { "$ref": "#/components/schemas/V2DeployComputeInstanceRequest" }
}
}
},
"responses": {
- "200": {
+ "202": {
"description": "",
"content": {
"application/json": {
- "schema": { "$ref": "#/components/schemas/V2DeleteInvitationsResponse_Output" }
+ "schema": { "$ref": "#/components/schemas/V2ComputeInstanceResponse_Output" }
}
}
},
@@ -1527,12 +1586,6 @@
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
},
- "402": {
- "description": "This feature requires the Enterprise organization plan.",
- "content": {
- "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
- }
- },
"403": {
"description": "Forbidden action",
"content": {
@@ -1547,22 +1600,22 @@
}
},
"security": [{ "bearer": [] }],
- "summary": "Deletes organization invitations by email",
- "tags": ["Organizations Members Invitations"],
- "x-allowed-plans": ["Enterprise"],
+ "summary": "Deploy a compute instance",
+ "tags": ["Compute"],
"x-badges": [
- { "name": "OAuth scope: organizations:write", "position": "after" },
- { "name": "Only available on Enterprise", "position": "before" }
+ { "name": "OAuth scope: edge_functions:write", "position": "after" },
+ { "name": "Alpha", "position": "before" }
],
- "x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["members_write"]],
- "x-oauth-scope": "organizations:write"
+ "x-endpoint-owners": ["functions"],
+ "x-fga-permissions": [["workers_write"]],
+ "x-oauth-scope": "edge_functions:write",
+ "x-scalar-stability": "experimental"
}
},
- "/v2/organizations/{slug}/projects": {
+ "/v2/organizations/{slug}/members": {
"get": {
- "description": "Returns a cursor-paginated list of projects for the specified organization, including their databases.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the number of projects returned per page.",
- "operationId": "v2-list-organization-projects",
+ "description": "Returns a cursor-paginated list of organization members including their roles and project-scoped permissions.",
+ "operationId": "v2-list-organization-members",
"parameters": [
{
"name": "slug",
@@ -1582,30 +1635,37 @@
"schema": {
"properties": {
"size": { "type": "integer", "minimum": 1, "maximum": 100 },
- "after": { "type": "string", "minLength": 1 },
- "before": { "type": "string", "minLength": 1 }
+ "after": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "before": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ }
},
"type": "object"
},
"style": "deepObject"
},
{
- "name": "sort",
+ "name": "filter",
"required": false,
"in": "query",
- "description": "Sort order by creation time: `inserted_at` (oldest first) or `-inserted_at` (newest first). Defaults to `inserted_at`.",
"schema": {
- "example": "-inserted_at",
- "type": "string",
- "enum": ["inserted_at", "-inserted_at"]
- }
- },
- {
- "name": "search",
- "required": false,
- "in": "query",
- "description": "Case-insensitive substring match on the project name.",
- "schema": { "minLength": 1, "type": "string" }
+ "properties": {
+ "username": { "type": "string" },
+ "primary_email": {
+ "type": "string",
+ "format": "email",
+ "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
+ }
+ },
+ "type": "object"
+ },
+ "style": "deepObject"
}
],
"responses": {
@@ -1613,7 +1673,7 @@
"description": "",
"content": {
"application/json": {
- "schema": { "$ref": "#/components/schemas/V2ListProjectsResponse_Output" }
+ "schema": { "$ref": "#/components/schemas/V2ListMembersResponse_Output" }
}
}
},
@@ -1637,18 +1697,18 @@
}
},
"security": [{ "bearer": [] }],
- "summary": "List projects of an organization",
+ "summary": "List members of an organization",
"tags": ["Organizations"],
- "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }],
+ "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }],
"x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["organization_projects_read"]],
- "x-oauth-scope": "projects:read"
+ "x-fga-permissions": [["members_read"]],
+ "x-oauth-scope": "organizations:read"
}
},
- "/v2/organizations/{slug}/integrations/github/connections": {
- "get": {
- "description": "Returns a cursor-paginated list of the GitHub connections of the organization's projects.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the page size.\nPaging walks the organization projects, so a page holds at most `page[size]` connections and can hold fewer (or none) when some of its projects are not connected.\nFollow `links.next` until it is `null` rather than stopping on a short page.\n\nUse `filter[project_ref]` to narrow the list down to a single project.",
- "operationId": "v2-list-organization-github-connections",
+ "/v2/organizations/{slug}/members/{user_id}/roles": {
+ "patch": {
+ "description": "Assigns an org-wide role when projects is omitted, or creates a project-scoped assignment when projects is provided. Uses an org-level role template id from GET /v2/organizations/{slug}/roles. Stale role assignments are automatically cleaned up: if a role no longer has any projects, it is deleted; overlapping project assignments in other roles are automatically removed to avoid duplication.",
+ "operationId": "v2-assign-organization-member-role",
"parameters": [
{
"name": "slug",
@@ -1662,59 +1722,30 @@
}
},
{
- "name": "page",
- "required": false,
- "in": "query",
- "schema": {
- "properties": {
- "size": { "type": "integer", "minimum": 1, "maximum": 100 },
- "after": {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "description": "Project ref",
- "example": "abcdefghijklmnopqrst"
- },
- "before": {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "description": "Project ref",
- "example": "abcdefghijklmnopqrst"
- }
- },
- "type": "object"
- },
- "style": "deepObject"
- },
- {
- "name": "filter",
- "required": false,
- "in": "query",
+ "name": "user_id",
+ "required": true,
+ "in": "path",
"schema": {
- "properties": {
- "project_ref": {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "description": "Project ref",
- "example": "abcdefghijklmnopqrst"
- }
- },
- "type": "object"
- },
- "style": "deepObject"
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "type": "string"
+ }
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/V2AssignOrganizationMemberRoleRequest" }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
- "schema": { "$ref": "#/components/schemas/V2ListGitHubConnectionsResponse_Output" }
+ "schema": { "$ref": "#/components/schemas/OrganizationMemberRoleResponse_Output" }
}
}
},
@@ -1724,6 +1755,12 @@
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
},
+ "402": {
+ "description": "This feature requires the Enterprise organization plan.",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ },
"403": {
"description": "Forbidden action",
"content": {
@@ -1735,699 +1772,409 @@
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
+ },
+ "500": {
+ "description": "Failed to assign organization member role",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
}
},
"security": [{ "bearer": [] }],
- "summary": "List GitHub connections of an organization",
+ "summary": "Assign or change an organization member role",
"tags": ["Organizations"],
- "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }],
- "x-endpoint-owners": ["control-plane", "dev-workflows"],
- "x-fga-permissions": [["organization_projects_read"]],
- "x-oauth-scope": "projects:read"
+ "x-allowed-plans": ["Enterprise"],
+ "x-badges": [{ "name": "Only available on Enterprise", "position": "before" }],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["organization_admin_write"]]
}
},
- "/v2/projects/{ref}/webhooks/endpoints": {
+ "/v2/organizations/{slug}/roles": {
"get": {
- "operationId": "v2-projects-ref-webhooks-endpoints-get",
+ "description": "Returns a list of org-level roles for the organization.",
+ "operationId": "v2-list-organization-roles",
"parameters": [
{
+ "name": "slug",
+ "required": true,
"in": "path",
- "name": "ref",
+ "description": "Organization slug",
"schema": {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "example": "abcdefghijklmnopqrst"
- },
- "required": true,
- "description": "Project ref"
- },
- {
- "in": "query",
- "name": "page[offset]",
- "schema": { "default": "0", "type": "string", "pattern": "^\\d+$" },
- "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend."
- },
- {
- "in": "query",
- "name": "page[limit]",
- "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" },
- "description": "Up to how many records to return."
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba",
+ "type": "string"
+ }
}
],
- "tags": ["Project webhooks"],
"responses": {
"200": {
- "description": "Collection of endpoints",
+ "description": "",
"content": {
"application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [
- { "type": "string", "maxLength": 512 },
- { "type": "null" }
- ],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [{ "type": "v1.project.paused" }]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
- },
- "additionalProperties": { "type": "string" }
- },
- { "type": "null" }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": { "Authorization": "Bearer example_token" }
- },
- "created_by": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the user who created the endpoint."
- },
- "created_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of endpoint's creation."
- }
- },
- "required": [
- "id",
- "url",
- "enabled",
- "description",
- "event_types",
- "created_by",
- "created_at"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "links": {
- "type": "object",
- "properties": {
- "first": {
- "description": "URL path to the first page if available.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0",
- "anyOf": [{ "type": "string" }, { "type": "null" }]
- },
- "prev": {
- "anyOf": [{ "type": "string" }, { "type": "null" }],
- "description": "URL path to the previous page.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0"
- },
- "next": {
- "anyOf": [{ "type": "string" }, { "type": "null" }],
- "description": "URL path to the next page.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20"
- },
- "last": {
- "description": "URL path to the last page if available.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30",
- "anyOf": [{ "type": "string" }, { "type": "null" }]
- }
- },
- "required": ["prev", "next"]
- }
- },
- "required": ["data", "links"]
- }
+ "schema": { "$ref": "#/components/schemas/V2ListRolesResponse_Output" }
}
}
},
- "400": {
- "description": "Multiple error responses",
+ "401": {
+ "description": "Unauthorized",
"content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
},
- "401": {
- "description": "GenericUnauthorized",
+ "403": {
+ "description": "Forbidden action",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ },
+ "429": {
+ "description": "Rate limit exceeded",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ }
+ },
+ "security": [{ "bearer": [] }],
+ "summary": "List roles of an organization",
+ "tags": ["Organizations"],
+ "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["members_read"]],
+ "x-oauth-scope": "organizations:read"
+ }
+ },
+ "/v2/organizations/{slug}/members/invitations": {
+ "post": {
+ "description": "Creates member invitations for an organization. Each invitation can have different role and project scope settings.",
+ "operationId": "v2-create-organization-invitations",
+ "parameters": [
+ {
+ "name": "slug",
+ "required": true,
+ "in": "path",
+ "description": "Organization slug",
+ "schema": {
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba",
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/V2CreateInvitationsRequest" }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
"content": {
"application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "unauthorized" },
- "message": { "type": "string", "const": "Unauthorized" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "Default example": {
- "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } }
- }
- }
+ "schema": { "$ref": "#/components/schemas/V2CreateInvitationsResponse_Output" }
}
}
},
+ "401": {
+ "description": "Unauthorized",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ },
+ "402": {
+ "description": "This feature requires the Enterprise organization plan.",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ },
"403": {
- "description": "Multiple error responses",
+ "description": "Forbidden action",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ },
+ "429": {
+ "description": "Rate limit exceeded",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ }
+ },
+ "security": [{ "bearer": [] }],
+ "summary": "Creates organization invitations",
+ "tags": ["Organizations Members Invitations"],
+ "x-allowed-plans": ["Enterprise"],
+ "x-badges": [
+ { "name": "OAuth scope: organizations:write", "position": "after" },
+ { "name": "Only available on Enterprise", "position": "before" }
+ ],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["members_write"]],
+ "x-oauth-scope": "organizations:write"
+ },
+ "delete": {
+ "description": "Bulk delete member invitations for an organization by email address.",
+ "operationId": "v2-delete-organization-invitations",
+ "parameters": [
+ {
+ "name": "slug",
+ "required": true,
+ "in": "path",
+ "description": "Organization slug",
+ "schema": {
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba",
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/V2DeleteInvitationsRequest" }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
"content": {
"application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "forbidden.permission_denied" },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "forbidden.access_disabled" },
- "message": { "type": "string", "const": "Forbidden: Access disabled" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "PermissionDenied": {
- "value": {
- "error": {
- "code": "forbidden.permission_denied",
- "message": "Forbidden: Permission denied"
- }
- }
- },
- "AccessDisabled": {
- "value": {
- "error": {
- "code": "forbidden.access_disabled",
- "message": "Forbidden: Access disabled"
- }
- }
- }
- }
+ "schema": { "$ref": "#/components/schemas/V2DeleteInvitationsResponse_Output" }
}
}
},
- "408": {
- "description": "GenericRequestTimeout",
+ "401": {
+ "description": "Unauthorized",
"content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "request_timeout" },
- "message": { "type": "string", "const": "Request Timeout" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": { "code": "request_timeout", "message": "Request Timeout" }
- }
- }
- }
- }
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
},
- "429": {
- "description": "GenericTooManyRequests",
+ "402": {
+ "description": "This feature requires the Enterprise organization plan.",
"content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "too_many_requests" },
- "message": { "type": "string", "const": "Too Many Requests" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": { "code": "too_many_requests", "message": "Too Many Requests" }
- }
- }
- }
- }
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
}
},
- "500": {
- "description": "GenericInternalServerError",
+ "403": {
+ "description": "Forbidden action",
"content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "internal_server_error" },
- "message": { "type": "string", "const": "Internal Server Error" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ },
+ "429": {
+ "description": "Rate limit exceeded",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ }
+ },
+ "security": [{ "bearer": [] }],
+ "summary": "Deletes organization invitations by email",
+ "tags": ["Organizations Members Invitations"],
+ "x-allowed-plans": ["Enterprise"],
+ "x-badges": [
+ { "name": "OAuth scope: organizations:write", "position": "after" },
+ { "name": "Only available on Enterprise", "position": "before" }
+ ],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["members_write"]],
+ "x-oauth-scope": "organizations:write"
+ }
+ },
+ "/v2/organizations/{slug}/projects": {
+ "get": {
+ "description": "Returns a cursor-paginated list of projects for the specified organization, including their databases.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the number of projects returned per page.",
+ "operationId": "v2-list-organization-projects",
+ "parameters": [
+ {
+ "name": "slug",
+ "required": true,
+ "in": "path",
+ "description": "Organization slug",
+ "schema": {
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba",
+ "type": "string"
+ }
+ },
+ {
+ "name": "page",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "properties": {
+ "size": { "type": "integer", "minimum": 1, "maximum": 100 },
+ "after": { "type": "string", "minLength": 1 },
+ "before": { "type": "string", "minLength": 1 }
+ },
+ "type": "object"
+ },
+ "style": "deepObject"
+ },
+ {
+ "name": "sort",
+ "required": false,
+ "in": "query",
+ "description": "Sort order by creation time: `inserted_at` (oldest first) or `-inserted_at` (newest first). Defaults to `inserted_at`.",
+ "schema": {
+ "example": "-inserted_at",
+ "type": "string",
+ "enum": ["inserted_at", "-inserted_at"]
+ }
+ },
+ {
+ "name": "search",
+ "required": false,
+ "in": "query",
+ "description": "Case-insensitive substring match on the project name.",
+ "schema": { "minLength": 1, "type": "string" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/V2ListProjectsResponse_Output" }
+ }
+ }
+ },
+ "401": {
+ "description": "Unauthorized",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ },
+ "403": {
+ "description": "Forbidden action",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ },
+ "429": {
+ "description": "Rate limit exceeded",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ }
+ },
+ "security": [{ "bearer": [] }],
+ "summary": "List projects of an organization",
+ "tags": ["Organizations"],
+ "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["organization_projects_read"]],
+ "x-oauth-scope": "projects:read"
+ }
+ },
+ "/v2/organizations/{slug}/integrations/github/connections": {
+ "get": {
+ "description": "Returns a cursor-paginated list of the GitHub connections of the organization's projects.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the page size.\nPaging walks the organization projects, so a page holds at most `page[size]` connections and can hold fewer (or none) when some of its projects are not connected.\nFollow `links.next` until it is `null` rather than stopping on a short page.\n\nUse `filter[project_ref]` to narrow the list down to a single project.",
+ "operationId": "v2-list-organization-github-connections",
+ "parameters": [
+ {
+ "name": "slug",
+ "required": true,
+ "in": "path",
+ "description": "Organization slug",
+ "schema": {
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba",
+ "type": "string"
+ }
+ },
+ {
+ "name": "page",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "properties": {
+ "size": { "type": "integer", "minimum": 1, "maximum": 100 },
+ "after": {
+ "type": "string",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "description": "Project ref",
+ "example": "abcdefghijklmnopqrst"
},
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "internal_server_error",
- "message": "Internal Server Error"
- }
- }
- }
+ "before": {
+ "type": "string",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "description": "Project ref",
+ "example": "abcdefghijklmnopqrst"
+ }
+ },
+ "type": "object"
+ },
+ "style": "deepObject"
+ },
+ {
+ "name": "filter",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "properties": {
+ "project_ref": {
+ "type": "string",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "description": "Project ref",
+ "example": "abcdefghijklmnopqrst"
}
+ },
+ "type": "object"
+ },
+ "style": "deepObject"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/V2ListGitHubConnectionsResponse_Output" }
}
}
+ },
+ "401": {
+ "description": "Unauthorized",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ },
+ "403": {
+ "description": "Forbidden action",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
+ },
+ "429": {
+ "description": "Rate limit exceeded",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
+ }
}
},
- "summary": "List endpoints",
- "description": "List all Webhook endpoints based on a project's ref or an organization's slug."
- },
- "post": {
- "operationId": "v2-projects-ref-webhooks-endpoints-post",
+ "security": [{ "bearer": [] }],
+ "summary": "List GitHub connections of an organization",
+ "tags": ["Organizations"],
+ "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }],
+ "x-endpoint-owners": ["control-plane", "dev-workflows"],
+ "x-fga-permissions": [["organization_projects_read"]],
+ "x-oauth-scope": "projects:read"
+ }
+ },
+ "/v2/projects/{ref}/webhooks/endpoints": {
+ "get": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-get",
"parameters": [
{
"in": "path",
@@ -2441,258 +2188,180 @@
},
"required": true,
"description": "Project ref"
+ },
+ {
+ "in": "query",
+ "name": "page[offset]",
+ "schema": { "default": "0", "type": "string", "pattern": "^\\d+$" },
+ "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend."
+ },
+ {
+ "in": "query",
+ "name": "page[limit]",
+ "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" },
+ "description": "Up to how many records to return."
}
],
"tags": ["Project webhooks"],
"responses": {
- "201": {
- "description": "Created endpoint",
+ "200": {
+ "description": "Collection of endpoints",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
},
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [{ "type": "v1.project.paused" }]
- },
- "custom_headers": {
- "anyOf": [
- {
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [
+ { "type": "string", "maxLength": 512 },
+ { "type": "null" }
+ ],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
"type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
},
- "additionalProperties": { "type": "string" }
+ "required": ["type"]
},
- { "type": "null" }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": { "Authorization": "Bearer example_token" }
- },
- "created_by": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the user who created the endpoint."
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [{ "type": "v1.project.paused" }]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
+ },
+ "additionalProperties": { "type": "string" }
+ },
+ { "type": "null" }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": { "Authorization": "Bearer example_token" }
+ },
+ "created_by": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the user who created the endpoint."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of endpoint's creation."
+ }
},
- "created_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of endpoint's creation."
- }
- },
- "required": [
- "id",
- "url",
- "enabled",
- "description",
- "event_types",
- "created_by",
- "created_at"
- ]
+ "required": [
+ "id",
+ "url",
+ "enabled",
+ "description",
+ "event_types",
+ "created_by",
+ "created_at"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "links": {
+ "type": "object",
+ "properties": {
+ "first": {
+ "description": "URL path to the first page if available.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0",
+ "anyOf": [{ "type": "string" }, { "type": "null" }]
+ },
+ "prev": {
+ "anyOf": [{ "type": "string" }, { "type": "null" }],
+ "description": "URL path to the previous page.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0"
+ },
+ "next": {
+ "anyOf": [{ "type": "string" }, { "type": "null" }],
+ "description": "URL path to the next page.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20"
+ },
+ "last": {
+ "description": "URL path to the last page if available.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30",
+ "anyOf": [{ "type": "string" }, { "type": "null" }]
}
},
- "required": ["type", "id", "attributes"]
+ "required": ["prev", "next"]
}
},
- "required": ["data"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
+ "required": ["data", "links"]
}
}
}
@@ -3058,113 +2727,11 @@
}
}
},
- "summary": "Create endpoint",
- "description": "Create new endpoint configuration to subscribe to specific webhook events.",
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "default": true,
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [{ "type": "v1.project.paused" }]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" },
- "additionalProperties": { "type": "string" }
- },
- { "type": "null" }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": { "Authorization": "Bearer example_token" }
- },
- "signing_secret": {
- "type": "string",
- "minLength": 8,
- "maxLength": 64,
- "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
- }
- },
- "required": ["url", "event_types", "signing_secret"]
- }
- },
- "required": ["type", "attributes"]
- }
- },
- "required": ["data"]
- }
- }
- }
- }
+ "summary": "List endpoints",
+ "description": "List all Webhook endpoints based on a project's ref or an organization's slug."
},
- "delete": {
- "operationId": "v2-projects-ref-webhooks-endpoints-delete",
+ "post": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-post",
"parameters": [
{
"in": "path",
@@ -3182,143 +2749,195 @@
],
"tags": ["Project webhooks"],
"responses": {
- "200": {
- "description": "Deleted endpoints",
+ "201": {
+ "description": "Created endpoint",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [
- { "type": "string", "maxLength": 512 },
- { "type": "null" }
- ],
- "description": "Optional description for the endpoint."
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
+ },
+ "required": ["type"]
},
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [{ "type": "v1.project.paused" }]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
"type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
+ "propertyNames": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
},
- "required": ["type"]
+ "additionalProperties": { "type": "string" }
},
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [{ "type": "v1.project.paused" }]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
- },
- "additionalProperties": { "type": "string" }
- },
- { "type": "null" }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": { "Authorization": "Bearer example_token" }
- },
- "created_by": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the user who created the endpoint."
- },
- "created_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of endpoint's creation."
+ { "type": "null" }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": { "Authorization": "Bearer example_token" }
+ },
+ "created_by": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the user who created the endpoint."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of endpoint's creation."
+ }
+ },
+ "required": [
+ "id",
+ "url",
+ "enabled",
+ "description",
+ "event_types",
+ "created_by",
+ "created_at"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "required": ["data"]
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "GenericUnauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "code": { "type": "string", "const": "unauthorized" },
+ "message": { "type": "string", "const": "Unauthorized" },
+ "description": { "type": "string" },
+ "links": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": { "type": "string" },
+ "rel": { "type": "string" },
+ "title": { "type": "string" },
+ "type": { "type": "string" },
+ "describedby": { "type": "string" },
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
}
},
- "required": [
- "id",
- "url",
- "enabled",
- "description",
- "event_types",
- "created_by",
- "created_at"
- ]
+ "required": ["href"]
}
},
- "required": ["type", "id", "attributes"]
- }
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": { "$ref": "#/components/schemas/APIErrorObject" }
+ }
+ },
+ "required": ["code", "message"]
}
},
- "required": ["data"]
+ "required": ["error"],
+ "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
+ },
+ "examples": {
+ "Default example": {
+ "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } }
+ }
}
}
}
},
- "400": {
+ "403": {
"description": "Multiple error responses",
"content": {
"application/json": {
@@ -3331,10 +2950,10 @@
"type": "object",
"properties": {
"id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
+ "code": { "type": "string", "const": "forbidden.permission_denied" },
"message": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "const": "Forbidden: Permission denied"
},
"description": { "type": "string" },
"links": {
@@ -3368,17 +2987,14 @@
}
},
"required": ["code", "message"],
- "title": "InvalidSlug"
+ "title": "PermissionDenied"
},
{
"type": "object",
"properties": {
"id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
+ "code": { "type": "string", "const": "forbidden.access_disabled" },
+ "message": { "type": "string", "const": "Forbidden: Access disabled" },
"description": { "type": "string" },
"links": {
"type": "object",
@@ -3411,184 +3027,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
- }
- },
- "401": {
- "description": "GenericUnauthorized",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "unauthorized" },
- "message": { "type": "string", "const": "Unauthorized" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "Default example": {
- "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } }
- }
- }
- }
- }
- },
- "403": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "forbidden.permission_denied" },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "forbidden.access_disabled" },
- "message": { "type": "string", "const": "Forbidden: Access disabled" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
+ "title": "AccessDisabled"
}
]
}
@@ -3801,289 +3240,262 @@
}
}
},
- "summary": "Delete all endpoints",
- "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op."
- }
- },
- "/v2/projects/{ref}/webhooks/endpoints/{id}": {
- "get": {
- "operationId": "v2-projects-ref-webhooks-endpoints-id-get",
- "parameters": [
- {
- "in": "path",
- "name": "ref",
- "schema": {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "example": "abcdefghijklmnopqrst"
- },
- "required": true,
- "description": "Project ref"
- },
- {
- "in": "path",
- "name": "id",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "required": true,
- "description": "Identifier of an endpoint (UUID v7)."
- }
- ],
- "tags": ["Project webhooks"],
- "responses": {
- "200": {
- "description": "Endpoint details",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
+ "summary": "Create endpoint",
+ "description": "Create new endpoint configuration to subscribe to specific webhook events.",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "default": true,
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
},
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [{ "type": "v1.project.paused" }]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
- },
- "additionalProperties": { "type": "string" }
- },
- { "type": "null" }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": { "Authorization": "Bearer example_token" }
- },
- "created_by": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the user who created the endpoint."
+ "required": ["type"]
},
- "created_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of endpoint's creation."
- }
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [{ "type": "v1.project.paused" }]
},
- "required": [
- "id",
- "url",
- "enabled",
- "description",
- "event_types",
- "created_by",
- "created_at"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "required": ["data"]
- }
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" },
+ "additionalProperties": { "type": "string" }
+ },
+ { "type": "null" }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": { "Authorization": "Bearer example_token" }
+ },
+ "signing_secret": {
+ "type": "string",
+ "minLength": 8,
+ "maxLength": 64,
+ "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
+ }
+ },
+ "required": ["url", "event_types", "signing_secret"]
+ }
+ },
+ "required": ["type", "attributes"]
+ }
+ },
+ "required": ["data"]
}
}
- },
- "400": {
- "description": "Multiple error responses",
+ }
+ }
+ },
+ "delete": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-delete",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "ref",
+ "schema": {
+ "type": "string",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst"
+ },
+ "required": true,
+ "description": "Project ref"
+ }
+ ],
+ "tags": ["Project webhooks"],
+ "responses": {
+ "200": {
+ "description": "Deleted endpoints",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
+ "data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
},
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [
+ { "type": "string", "maxLength": 512 },
+ { "type": "null" }
+ ],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
+ },
+ "required": ["type"]
},
- "required": ["href"]
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [{ "type": "v1.project.paused" }]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
+ },
+ "additionalProperties": { "type": "string" }
+ },
+ { "type": "null" }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": { "Authorization": "Bearer example_token" }
+ },
+ "created_by": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the user who created the endpoint."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of endpoint's creation."
}
},
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "required": [
+ "id",
+ "url",
+ "enabled",
+ "description",
+ "event_types",
+ "created_by",
+ "created_at"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
}
}
},
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
+ "required": ["data"]
}
}
}
@@ -4265,69 +3677,6 @@
}
}
},
- "404": {
- "description": "EndpointNotFound",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "not_found.endpoint" },
- "message": { "type": "string", "const": "Not Found: Endpoint not found" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "not_found.endpoint",
- "message": "Not Found: Endpoint not found"
- }
- }
- }
- }
- }
- }
- },
"408": {
"description": "GenericRequestTimeout",
"content": {
@@ -4512,11 +3861,13 @@
}
}
},
- "summary": "Get endpoint",
- "description": "Get details of a specific endpoint."
- },
- "patch": {
- "operationId": "v2-projects-ref-webhooks-endpoints-id-patch",
+ "summary": "Delete all endpoints",
+ "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op."
+ }
+ },
+ "/v2/projects/{ref}/webhooks/endpoints/{id}": {
+ "get": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-id-get",
"parameters": [
{
"in": "path",
@@ -4546,7 +3897,7 @@
"tags": ["Project webhooks"],
"responses": {
"200": {
- "description": "Updated endpoint details",
+ "description": "Endpoint details",
"content": {
"application/json": {
"schema": {
@@ -4675,143 +4026,21 @@
}
}
},
- "400": {
- "description": "Multiple error responses",
+ "401": {
+ "description": "GenericUnauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
- }
- },
- "401": {
- "description": "GenericUnauthorized",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "unauthorized" },
- "message": { "type": "string", "const": "Unauthorized" },
- "description": { "type": "string" },
- "links": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "code": { "type": "string", "const": "unauthorized" },
+ "message": { "type": "string", "const": "Unauthorized" },
+ "description": { "type": "string" },
+ "links": {
"type": "object",
"propertyNames": { "type": "string" },
"additionalProperties": {
@@ -5221,111 +4450,11 @@
}
}
},
- "summary": "Update endpoint",
- "description": "Update endpoint's configuration.",
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [{ "type": "v1.project.paused" }]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" },
- "additionalProperties": { "type": "string" }
- },
- { "type": "null" }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": { "Authorization": "Bearer example_token" }
- },
- "signing_secret": {
- "type": "string",
- "minLength": 8,
- "maxLength": 64,
- "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
- }
- }
- }
- },
- "required": ["type", "attributes"]
- }
- },
- "required": ["data"]
- }
- }
- }
- }
+ "summary": "Get endpoint",
+ "description": "Get details of a specific endpoint."
},
- "delete": {
- "operationId": "v2-projects-ref-webhooks-endpoints-id-delete",
+ "patch": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-id-patch",
"parameters": [
{
"in": "path",
@@ -5355,7 +4484,7 @@
"tags": ["Project webhooks"],
"responses": {
"200": {
- "description": "Deleted endpoint details",
+ "description": "Updated endpoint details",
"content": {
"application/json": {
"schema": {
@@ -5484,154 +4613,32 @@
}
}
},
- "400": {
- "description": "Multiple error responses",
+ "401": {
+ "description": "GenericUnauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
- "oneOf": [
- {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "code": { "type": "string", "const": "unauthorized" },
+ "message": { "type": "string", "const": "Unauthorized" },
+ "description": { "type": "string" },
+ "links": {
"type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
- }
- },
- "401": {
- "description": "GenericUnauthorized",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "unauthorized" },
- "message": { "type": "string", "const": "Unauthorized" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": { "type": "string" },
+ "rel": { "type": "string" },
+ "title": { "type": "string" },
+ "type": { "type": "string" },
+ "describedby": { "type": "string" },
+ "meta": {
"type": "object",
"propertyNames": { "type": "string" },
"additionalProperties": {}
@@ -6030,13 +5037,111 @@
}
}
},
- "summary": "Delete endpoint",
- "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op."
- }
- },
- "/v2/projects/{ref}/webhooks/endpoints/{id}/deliveries": {
- "get": {
- "operationId": "v2-projects-ref-webhooks-endpoints-id-deliveries-get",
+ "summary": "Update endpoint",
+ "description": "Update endpoint's configuration.",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
+ },
+ "required": ["type"]
+ },
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [{ "type": "v1.project.paused" }]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" },
+ "additionalProperties": { "type": "string" }
+ },
+ { "type": "null" }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": { "Authorization": "Bearer example_token" }
+ },
+ "signing_secret": {
+ "type": "string",
+ "minLength": 8,
+ "maxLength": 64,
+ "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
+ }
+ }
+ }
+ },
+ "required": ["type", "attributes"]
+ }
+ },
+ "required": ["data"]
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-id-delete",
"parameters": [
{
"in": "path",
@@ -6061,316 +5166,166 @@
},
"required": true,
"description": "Identifier of an endpoint (UUID v7)."
- },
- {
- "in": "query",
- "name": "page[before]",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param."
- },
- {
- "in": "query",
- "name": "page[after]",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param."
- },
- {
- "in": "query",
- "name": "page[size]",
- "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" },
- "description": "Up to how many records to return."
}
],
"tags": ["Project webhooks"],
"responses": {
"200": {
- "description": "List of deliveries",
+ "description": "Deleted endpoint details",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "delivery",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
- },
- "event_id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of the event, which triggered the delivery (UUID v7)."
- },
- "status": {
- "type": "string",
- "enum": ["pending", "success", "failure", "skipped"],
- "description": "Status of the delivery attempt."
- },
- "response_code": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "HTTP status code of the response, `0` if unavailable."
- },
- "response_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": { "type": "string" }
- },
- { "type": "null" }
- ],
- "description": "HTTP headers of the response, `{}` if unavailable."
- },
- "response_body": {
- "anyOf": [
- {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": { "type": "string" },
- "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
- },
- {
- "type": "string",
- "description": "String representation of an HTTP body of the response."
- }
- ]
- },
- { "type": "null" }
- ]
- },
- "attempt_timestamp": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of the attempt."
- }
- },
- "required": [
- "id",
- "event_id",
- "status",
- "response_code",
- "response_headers",
- "response_body",
- "attempt_timestamp"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "links": {
"type": "object",
"properties": {
- "first": {
- "description": "URL path to the first page if available.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10",
- "anyOf": [{ "type": "string" }, { "type": "null" }]
- },
- "prev": {
- "anyOf": [{ "type": "string" }, { "type": "null" }],
- "description": "URL path to the previous page.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7"
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
},
- "next": {
- "anyOf": [{ "type": "string" }, { "type": "null" }],
- "description": "URL path to the next page.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4"
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
},
- "last": {
- "description": "URL path to the last page if available.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295",
- "anyOf": [{ "type": "string" }, { "type": "null" }]
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
+ },
+ "required": ["type"]
+ },
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [{ "type": "v1.project.paused" }]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
+ },
+ "additionalProperties": { "type": "string" }
+ },
+ { "type": "null" }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": { "Authorization": "Bearer example_token" }
+ },
+ "created_by": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the user who created the endpoint."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of endpoint's creation."
+ }
+ },
+ "required": [
+ "id",
+ "url",
+ "enabled",
+ "description",
+ "event_types",
+ "created_by",
+ "created_at"
+ ]
}
},
- "required": ["prev", "next"]
+ "required": ["type", "id", "attributes"]
}
},
- "required": ["data", "links"]
+ "required": ["data"]
}
}
}
},
- "400": {
- "description": "Multiple error responses",
+ "401": {
+ "description": "GenericUnauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
- "oneOf": [
- {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "code": { "type": "string", "const": "unauthorized" },
+ "message": { "type": "string", "const": "Unauthorized" },
+ "description": { "type": "string" },
+ "links": {
"type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
- }
- },
- "401": {
- "description": "GenericUnauthorized",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "unauthorized" },
- "message": { "type": "string", "const": "Unauthorized" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": { "type": "string" },
+ "rel": { "type": "string" },
+ "title": { "type": "string" },
+ "type": { "type": "string" },
+ "describedby": { "type": "string" },
+ "meta": {
"type": "object",
"propertyNames": { "type": "string" },
"additionalProperties": {}
@@ -6769,13 +5724,13 @@
}
}
},
- "summary": "List deliveries",
- "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed."
+ "summary": "Delete endpoint",
+ "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op."
}
},
- "/v2/projects/{ref}/webhooks/endpoints/{id}/test": {
- "post": {
- "operationId": "v2-projects-ref-webhooks-endpoints-id-test-post",
+ "/v2/projects/{ref}/webhooks/endpoints/{id}/deliveries": {
+ "get": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-id-deliveries-get",
"parameters": [
{
"in": "path",
@@ -6800,263 +5755,164 @@
},
"required": true,
"description": "Identifier of an endpoint (UUID v7)."
+ },
+ {
+ "in": "query",
+ "name": "page[before]",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param."
+ },
+ {
+ "in": "query",
+ "name": "page[after]",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param."
+ },
+ {
+ "in": "query",
+ "name": "page[size]",
+ "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" },
+ "description": "Up to how many records to return."
}
],
"tags": ["Project webhooks"],
"responses": {
- "201": {
- "description": "Event published",
+ "200": {
+ "description": "List of deliveries",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "delivery",
+ "description": "Resource type."
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
+ },
+ "event_id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of the event, which triggered the delivery (UUID v7)."
+ },
+ "status": {
+ "type": "string",
+ "enum": ["pending", "success", "failure", "skipped"],
+ "description": "Status of the delivery attempt."
+ },
+ "response_code": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "HTTP status code of the response, `0` if unavailable."
+ },
+ "response_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": { "type": "string" }
+ },
+ { "type": "null" }
+ ],
+ "description": "HTTP headers of the response, `{}` if unavailable."
+ },
+ "response_body": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": { "type": "string" },
+ "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
+ },
+ {
+ "type": "string",
+ "description": "String representation of an HTTP body of the response."
+ }
+ ]
+ },
+ { "type": "null" }
+ ]
+ },
+ "attempt_timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of the attempt."
+ }
+ },
+ "required": [
+ "id",
+ "event_id",
+ "status",
+ "response_code",
+ "response_headers",
+ "response_body",
+ "attempt_timestamp"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "links": {
"type": "object",
"properties": {
- "type": {
- "type": "string",
- "const": "ingress",
- "description": "Resource type."
+ "first": {
+ "description": "URL path to the first page if available.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10",
+ "anyOf": [{ "type": "string" }, { "type": "null" }]
},
- "id": { "type": "string" }
- },
- "required": ["type", "id"]
- }
- },
- "required": ["data"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": {
- "type": "string",
- "const": "bad_request.endpoint.test.disabled"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Endpoint is disabled"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "EndpointTestDisabled"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": {
- "type": "string",
- "const": "bad_request.endpoint.test.wrong_event_type"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Provided event type is not subscribed to by the endpoint"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "EndpointTestWrongEventType"
+ "prev": {
+ "anyOf": [{ "type": "string" }, { "type": "null" }],
+ "description": "URL path to the previous page.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7"
},
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
+ "next": {
+ "anyOf": [{ "type": "string" }, { "type": "null" }],
+ "description": "URL path to the next page.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4"
},
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
+ "last": {
+ "description": "URL path to the last page if available.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295",
+ "anyOf": [{ "type": "string" }, { "type": "null" }]
}
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "EndpointTestDisabled": {
- "value": {
- "error": {
- "code": "bad_request.endpoint.test.disabled",
- "message": "Bad Request: Endpoint is disabled",
- "description": "Endpoint is disabled, to send test event endpoint must first be enabled."
- }
- }
- },
- "EndpointTestWrongEventType": {
- "value": {
- "error": {
- "code": "bad_request.endpoint.test.wrong_event_type",
- "message": "Bad Request: Provided event type is not subscribed to by the endpoint",
- "description": "Only event types that the endpoint is subscribed to can be specified."
- }
- }
- },
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
+ },
+ "required": ["prev", "next"]
}
},
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
+ "required": ["data", "links"]
}
}
}
@@ -7485,89 +6341,13 @@
}
}
},
- "summary": "Send test event",
- "description": "Ingests and schedules a test webhook event to be published out this endpoints.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.",
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "event",
- "description": "Resource type."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "type": {
- "description": "Webhook event type.",
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "project.v1.paused",
- "project.v1.created",
- "project.v1.restored",
- "project.v1.transferred",
- "project.v1.removed",
- "project.v1.restarted",
- "project.v1.status.changed",
- "project.v1.backup.started",
- "project.v1.branch.created",
- "project.v1.branch.updated",
- "project.v1.branch.removed",
- "organization.v1.member.invitation.created",
- "organization.v1.member.invitation.canceled",
- "organization.v1.member.added",
- "organization.v1.member.removed",
- "organization.v1.member.role.assigned",
- "organization.v1.member.role.removed",
- "organization.v1.member.role.updated",
- "organization.v1.billing.plan.upgraded",
- "organization.v1.billing.plan.downgraded",
- "project.v1.branch.deleted"
- ]
- }
- },
- "required": ["type"]
- }
- },
- "required": ["type", "attributes"]
- }
- }
- }
- }
- }
- }
+ "summary": "List deliveries",
+ "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed."
}
},
- "/v2/projects/{ref}/webhooks/deliveries/{id}": {
- "get": {
- "operationId": "v2-projects-ref-webhooks-deliveries-id-get",
+ "/v2/projects/{ref}/webhooks/endpoints/{id}/test": {
+ "post": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-id-test-post",
"parameters": [
{
"in": "path",
@@ -7591,13 +6371,13 @@
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"required": true,
- "description": "Identifier of a delivery (UUID v7)."
+ "description": "Identifier of an endpoint (UUID v7)."
}
],
"tags": ["Project webhooks"],
"responses": {
- "200": {
- "description": "Delivery details",
+ "201": {
+ "description": "Event published",
"content": {
"application/json": {
"schema": {
@@ -7608,176 +6388,12 @@
"properties": {
"type": {
"type": "string",
- "const": "delivery",
+ "const": "ingress",
"description": "Resource type."
},
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
- },
- "event_id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of the event, which triggered the delivery (UUID v7)."
- },
- "status": {
- "type": "string",
- "enum": ["pending", "success", "failure", "skipped"],
- "description": "Status of the delivery attempt."
- },
- "response_code": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "HTTP status code of the response, `0` if unavailable."
- },
- "response_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": { "type": "string" }
- },
- { "type": "null" }
- ],
- "description": "HTTP headers of the response, `{}` if unavailable."
- },
- "response_body": {
- "anyOf": [
- {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": { "type": "string" },
- "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
- },
- {
- "type": "string",
- "description": "String representation of an HTTP body of the response."
- }
- ]
- },
- { "type": "null" }
- ]
- },
- "attempt_timestamp": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of the attempt."
- },
- "event": {
- "type": "object",
- "properties": {
- "type": {
- "description": "Webhook event type.",
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "project.v1.paused",
- "project.v1.created",
- "project.v1.restored",
- "project.v1.transferred",
- "project.v1.removed",
- "project.v1.restarted",
- "project.v1.status.changed",
- "project.v1.backup.started",
- "project.v1.branch.created",
- "project.v1.branch.updated",
- "project.v1.branch.removed",
- "organization.v1.member.invitation.created",
- "organization.v1.member.invitation.canceled",
- "organization.v1.member.added",
- "organization.v1.member.removed",
- "organization.v1.member.role.assigned",
- "organization.v1.member.role.removed",
- "organization.v1.member.role.updated",
- "organization.v1.billing.plan.upgraded",
- "organization.v1.billing.plan.downgraded",
- "project.v1.branch.deleted"
- ]
- },
- "payload": {
- "type": "object",
- "properties": {
- "organization_slug": {
- "type": "string",
- "pattern": "^[\\w-]+$",
- "description": "Organization slug",
- "example": "tsrqponmlkjihgfedcba"
- },
- "project_ref": {
- "anyOf": [
- {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "description": "Project ref",
- "example": "abcdefghijklmnopqrst"
- },
- { "type": "null" }
- ]
- }
- },
- "required": ["organization_slug", "project_ref"],
- "description": "Final data sent to the consumer."
- },
- "timestamp": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of event publication."
- }
- },
- "required": ["type", "payload", "timestamp"]
- }
- },
- "required": [
- "id",
- "event_id",
- "status",
- "response_code",
- "response_headers",
- "response_body",
- "attempt_timestamp",
- "event"
- ]
- }
+ "id": { "type": "string" }
},
- "required": ["type", "id", "attributes"]
+ "required": ["type", "id"]
}
},
"required": ["data"]
@@ -7798,10 +6414,13 @@
"type": "object",
"properties": {
"id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
+ "code": {
+ "type": "string",
+ "const": "bad_request.endpoint.test.disabled"
+ },
"message": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "const": "Bad Request: Endpoint is disabled"
},
"description": { "type": "string" },
"links": {
@@ -7835,16 +6454,19 @@
}
},
"required": ["code", "message"],
- "title": "InvalidSlug"
+ "title": "EndpointTestDisabled"
},
{
"type": "object",
"properties": {
"id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
+ "code": {
+ "type": "string",
+ "const": "bad_request.endpoint.test.wrong_event_type"
+ },
"message": {
"type": "string",
- "const": "Bad Request: Invalid project ref"
+ "const": "Bad Request: Provided event type is not subscribed to by the endpoint"
},
"description": { "type": "string" },
"links": {
@@ -7878,7 +6500,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "EndpointTestWrongEventType"
}
]
}
@@ -7887,19 +6509,21 @@
"$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
},
"examples": {
- "InvalidSlug": {
+ "EndpointTestDisabled": {
"value": {
"error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "code": "bad_request.endpoint.test.disabled",
+ "message": "Bad Request: Endpoint is disabled",
+ "description": "Endpoint is disabled, to send test event endpoint must first be enabled."
}
}
},
- "InvalidRef": {
+ "EndpointTestWrongEventType": {
"value": {
"error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
+ "code": "bad_request.endpoint.test.wrong_event_type",
+ "message": "Bad Request: Provided event type is not subscribed to by the endpoint",
+ "description": "Only event types that the endpoint is subscribed to can be specified."
}
}
}
@@ -8085,7 +6709,7 @@
}
},
"404": {
- "description": "DeliveryNotFound",
+ "description": "EndpointNotFound",
"content": {
"application/json": {
"schema": {
@@ -8095,8 +6719,8 @@
"type": "object",
"properties": {
"id": { "type": "string" },
- "code": { "type": "string", "const": "not_found.delivery" },
- "message": { "type": "string", "const": "Not Found: Delivery not found" },
+ "code": { "type": "string", "const": "not_found.endpoint" },
+ "message": { "type": "string", "const": "Not Found: Endpoint not found" },
"description": { "type": "string" },
"links": {
"type": "object",
@@ -8138,8 +6762,8 @@
"Default example": {
"value": {
"error": {
- "code": "not_found.delivery",
- "message": "Not Found: Delivery not found"
+ "code": "not_found.endpoint",
+ "message": "Not Found: Endpoint not found"
}
}
}
@@ -8331,13 +6955,89 @@
}
}
},
- "summary": "Get delivery",
- "description": "Get details of a specific delivery attempt."
+ "summary": "Send test event",
+ "description": "Ingests and schedules a test webhook event to be published out this endpoints.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "event",
+ "description": "Resource type."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "Webhook event type.",
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "project.v1.paused",
+ "project.v1.created",
+ "project.v1.restored",
+ "project.v1.transferred",
+ "project.v1.removed",
+ "project.v1.restarted",
+ "project.v1.status.changed",
+ "project.v1.backup.started",
+ "project.v1.branch.created",
+ "project.v1.branch.updated",
+ "project.v1.branch.removed",
+ "organization.v1.member.invitation.created",
+ "organization.v1.member.invitation.canceled",
+ "organization.v1.member.added",
+ "organization.v1.member.removed",
+ "organization.v1.member.role.assigned",
+ "organization.v1.member.role.removed",
+ "organization.v1.member.role.updated",
+ "organization.v1.billing.plan.upgraded",
+ "organization.v1.billing.plan.downgraded",
+ "project.v1.branch.deleted"
+ ]
+ }
+ },
+ "required": ["type"]
+ }
+ },
+ "required": ["type", "attributes"]
+ }
+ }
+ }
+ }
+ }
+ }
}
},
- "/v2/projects/{ref}/webhooks/deliveries/{id}/retry": {
- "post": {
- "operationId": "v2-projects-ref-webhooks-deliveries-id-retry-post",
+ "/v2/projects/{ref}/webhooks/deliveries/{id}": {
+ "get": {
+ "operationId": "v2-projects-ref-webhooks-deliveries-id-get",
"parameters": [
{
"in": "path",
@@ -8366,7 +7066,7 @@
],
"tags": ["Project webhooks"],
"responses": {
- "201": {
+ "200": {
"description": "Delivery details",
"content": {
"application/json": {
@@ -8378,143 +7078,185 @@
"properties": {
"type": {
"type": "string",
- "const": "ingress",
+ "const": "delivery",
"description": "Resource type."
},
- "id": { "type": "string" }
- },
- "required": ["type", "id"]
- }
- },
- "required": ["data"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
+ },
+ "attributes": {
"type": "object",
"properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
- "message": {
+ "id": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
},
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
+ "event_id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of the event, which triggered the delivery (UUID v7)."
},
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
+ "status": {
"type": "string",
- "const": "Bad Request: Invalid project ref"
+ "enum": ["pending", "success", "failure", "skipped"],
+ "description": "Status of the delivery attempt."
},
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
+ "response_code": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "HTTP status code of the response, `0` if unavailable."
+ },
+ "response_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": { "type": "string" }
},
- "required": ["href"]
- }
+ { "type": "null" }
+ ],
+ "description": "HTTP headers of the response, `{}` if unavailable."
},
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
+ "response_body": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": { "type": "string" },
+ "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
+ },
+ {
+ "type": "string",
+ "description": "String representation of an HTTP body of the response."
+ }
+ ]
+ },
+ { "type": "null" }
+ ]
},
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
- }
- },
- "401": {
- "description": "GenericUnauthorized",
+ "attempt_timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of the attempt."
+ },
+ "event": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "Webhook event type.",
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "project.v1.paused",
+ "project.v1.created",
+ "project.v1.restored",
+ "project.v1.transferred",
+ "project.v1.removed",
+ "project.v1.restarted",
+ "project.v1.status.changed",
+ "project.v1.backup.started",
+ "project.v1.branch.created",
+ "project.v1.branch.updated",
+ "project.v1.branch.removed",
+ "organization.v1.member.invitation.created",
+ "organization.v1.member.invitation.canceled",
+ "organization.v1.member.added",
+ "organization.v1.member.removed",
+ "organization.v1.member.role.assigned",
+ "organization.v1.member.role.removed",
+ "organization.v1.member.role.updated",
+ "organization.v1.billing.plan.upgraded",
+ "organization.v1.billing.plan.downgraded",
+ "project.v1.branch.deleted"
+ ]
+ },
+ "payload": {
+ "type": "object",
+ "properties": {
+ "organization_slug": {
+ "type": "string",
+ "pattern": "^[\\w-]+$",
+ "description": "Organization slug",
+ "example": "tsrqponmlkjihgfedcba"
+ },
+ "project_ref": {
+ "anyOf": [
+ {
+ "type": "string",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "description": "Project ref",
+ "example": "abcdefghijklmnopqrst"
+ },
+ { "type": "null" }
+ ]
+ }
+ },
+ "required": ["organization_slug", "project_ref"],
+ "description": "Final data sent to the consumer."
+ },
+ "timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of event publication."
+ }
+ },
+ "required": ["type", "payload", "timestamp"]
+ }
+ },
+ "required": [
+ "id",
+ "event_id",
+ "status",
+ "response_code",
+ "response_headers",
+ "response_body",
+ "attempt_timestamp",
+ "event"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "required": ["data"]
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "GenericUnauthorized",
"content": {
"application/json": {
"schema": {
@@ -8937,203 +7679,125 @@
}
}
},
- "summary": "Retry delivery",
- "description": "Retry delivering the same event again.\n\nAutomatic retries are not applicable to manual retries - if the delivery fails, there won't be any automatic retries attempted.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds."
+ "summary": "Get delivery",
+ "description": "Get details of a specific delivery attempt."
}
},
- "/v2/organizations/{slug}/webhooks/endpoints": {
- "get": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-get",
+ "/v2/projects/{ref}/webhooks/deliveries/{id}/retry": {
+ "post": {
+ "operationId": "v2-projects-ref-webhooks-deliveries-id-retry-post",
"parameters": [
{
"in": "path",
- "name": "slug",
+ "name": "ref",
"schema": {
"type": "string",
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba"
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst"
},
"required": true,
- "description": "Organization slug"
- },
- {
- "in": "query",
- "name": "page[offset]",
- "schema": { "default": "0", "type": "string", "pattern": "^\\d+$" },
- "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend."
+ "description": "Project ref"
},
{
- "in": "query",
- "name": "page[limit]",
- "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" },
- "description": "Up to how many records to return."
+ "in": "path",
+ "name": "id",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "required": true,
+ "description": "Identifier of a delivery (UUID v7)."
}
],
- "tags": ["Organization webhooks"],
+ "tags": ["Project webhooks"],
"responses": {
- "200": {
- "description": "Collection of endpoints",
+ "201": {
+ "description": "Delivery details",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "attributes": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "ingress",
+ "description": "Resource type."
+ },
+ "id": { "type": "string" }
+ },
+ "required": ["type", "id"]
+ }
+ },
+ "required": ["data"]
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "GenericUnauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "code": { "type": "string", "const": "unauthorized" },
+ "message": { "type": "string", "const": "Unauthorized" },
+ "description": { "type": "string" },
+ "links": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {
"type": "object",
"properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [
- { "type": "string", "maxLength": 512 },
- { "type": "null" }
- ],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [{ "type": "v1.project.paused" }]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
- },
- "additionalProperties": { "type": "string" }
- },
- { "type": "null" }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": { "Authorization": "Bearer example_token" }
- },
- "created_by": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the user who created the endpoint."
- },
- "created_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of endpoint's creation."
+ "href": { "type": "string" },
+ "rel": { "type": "string" },
+ "title": { "type": "string" },
+ "type": { "type": "string" },
+ "describedby": { "type": "string" },
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
}
},
- "required": [
- "id",
- "url",
- "enabled",
- "description",
- "event_types",
- "created_by",
- "created_at"
- ]
+ "required": ["href"]
}
},
- "required": ["type", "id", "attributes"]
- }
- },
- "links": {
- "type": "object",
- "properties": {
- "first": {
- "description": "URL path to the first page if available.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0",
- "anyOf": [{ "type": "string" }, { "type": "null" }]
- },
- "prev": {
- "anyOf": [{ "type": "string" }, { "type": "null" }],
- "description": "URL path to the previous page.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0"
- },
- "next": {
- "anyOf": [{ "type": "string" }, { "type": "null" }],
- "description": "URL path to the next page.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20"
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
},
- "last": {
- "description": "URL path to the last page if available.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30",
- "anyOf": [{ "type": "string" }, { "type": "null" }]
+ "issues": {
+ "type": "array",
+ "items": { "$ref": "#/components/schemas/APIErrorObject" }
}
},
- "required": ["prev", "next"]
+ "required": ["code", "message"]
}
},
- "required": ["data", "links"]
+ "required": ["error"],
+ "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
+ },
+ "examples": {
+ "Default example": {
+ "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } }
+ }
}
}
}
},
- "400": {
+ "403": {
"description": "Multiple error responses",
"content": {
"application/json": {
@@ -9146,10 +7810,10 @@
"type": "object",
"properties": {
"id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
+ "code": { "type": "string", "const": "forbidden.permission_denied" },
"message": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "const": "Forbidden: Permission denied"
},
"description": { "type": "string" },
"links": {
@@ -9183,17 +7847,14 @@
}
},
"required": ["code", "message"],
- "title": "InvalidSlug"
+ "title": "PermissionDenied"
},
{
"type": "object",
"properties": {
"id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
+ "code": { "type": "string", "const": "forbidden.access_disabled" },
+ "message": { "type": "string", "const": "Forbidden: Access disabled" },
"description": { "type": "string" },
"links": {
"type": "object",
@@ -9226,7 +7887,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "AccessDisabled"
}
]
}
@@ -9235,19 +7896,19 @@
"$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
},
"examples": {
- "InvalidSlug": {
+ "PermissionDenied": {
"value": {
"error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "code": "forbidden.permission_denied",
+ "message": "Forbidden: Permission denied"
}
}
},
- "InvalidRef": {
+ "AccessDisabled": {
"value": {
"error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
+ "code": "forbidden.access_disabled",
+ "message": "Forbidden: Access disabled"
}
}
}
@@ -9255,8 +7916,8 @@
}
}
},
- "401": {
- "description": "GenericUnauthorized",
+ "404": {
+ "description": "DeliveryNotFound",
"content": {
"application/json": {
"schema": {
@@ -9266,8 +7927,8 @@
"type": "object",
"properties": {
"id": { "type": "string" },
- "code": { "type": "string", "const": "unauthorized" },
- "message": { "type": "string", "const": "Unauthorized" },
+ "code": { "type": "string", "const": "not_found.delivery" },
+ "message": { "type": "string", "const": "Not Found: Delivery not found" },
"description": { "type": "string" },
"links": {
"type": "object",
@@ -9307,124 +7968,10 @@
},
"examples": {
"Default example": {
- "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } }
- }
- }
- }
- }
- },
- "403": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "forbidden.permission_denied" },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "forbidden.access_disabled" },
- "message": { "type": "string", "const": "Forbidden: Access disabled" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "PermissionDenied": {
- "value": {
- "error": {
- "code": "forbidden.permission_denied",
- "message": "Forbidden: Permission denied"
- }
- }
- },
- "AccessDisabled": {
"value": {
"error": {
- "code": "forbidden.access_disabled",
- "message": "Forbidden: Access disabled"
+ "code": "not_found.delivery",
+ "message": "Not Found: Delivery not found"
}
}
}
@@ -9616,304 +8163,228 @@
}
}
},
- "summary": "List endpoints",
- "description": "List all Webhook endpoints based on a project's ref or an organization's slug."
- },
- "post": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-post",
- "parameters": [
- {
- "in": "path",
- "name": "slug",
- "schema": {
- "type": "string",
+ "summary": "Retry delivery",
+ "description": "Retry delivering the same event again.\n\nAutomatic retries are not applicable to manual retries - if the delivery fails, there won't be any automatic retries attempted.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds."
+ }
+ },
+ "/v2/organizations/{slug}/webhooks/endpoints": {
+ "get": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-get",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "slug",
+ "schema": {
+ "type": "string",
"pattern": "^[\\w-]+$",
"example": "tsrqponmlkjihgfedcba"
},
"required": true,
"description": "Organization slug"
+ },
+ {
+ "in": "query",
+ "name": "page[offset]",
+ "schema": { "default": "0", "type": "string", "pattern": "^\\d+$" },
+ "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend."
+ },
+ {
+ "in": "query",
+ "name": "page[limit]",
+ "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" },
+ "description": "Up to how many records to return."
}
],
"tags": ["Organization webhooks"],
"responses": {
- "201": {
- "description": "Created endpoint",
+ "200": {
+ "description": "Collection of endpoints",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [
+ { "type": "string", "maxLength": 512 },
+ { "type": "null" }
+ ],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
+ },
+ "required": ["type"]
+ },
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [{ "type": "v1.project.paused" }]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
+ },
+ "additionalProperties": { "type": "string" }
+ },
+ { "type": "null" }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": { "Authorization": "Bearer example_token" }
+ },
+ "created_by": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the user who created the endpoint."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of endpoint's creation."
+ }
+ },
+ "required": [
+ "id",
+ "url",
+ "enabled",
+ "description",
+ "event_types",
+ "created_by",
+ "created_at"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "links": {
"type": "object",
"properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
+ "first": {
+ "description": "URL path to the first page if available.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0",
+ "anyOf": [{ "type": "string" }, { "type": "null" }]
},
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
+ "prev": {
+ "anyOf": [{ "type": "string" }, { "type": "null" }],
+ "description": "URL path to the previous page.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0"
},
- "attributes": {
+ "next": {
+ "anyOf": [{ "type": "string" }, { "type": "null" }],
+ "description": "URL path to the next page.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20"
+ },
+ "last": {
+ "description": "URL path to the last page if available.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30",
+ "anyOf": [{ "type": "string" }, { "type": "null" }]
+ }
+ },
+ "required": ["prev", "next"]
+ }
+ },
+ "required": ["data", "links"]
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "GenericUnauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "code": { "type": "string", "const": "unauthorized" },
+ "message": { "type": "string", "const": "Unauthorized" },
+ "description": { "type": "string" },
+ "links": {
"type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [{ "type": "v1.project.paused" }]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
- },
- "additionalProperties": { "type": "string" }
- },
- { "type": "null" }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": { "Authorization": "Bearer example_token" }
- },
- "created_by": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the user who created the endpoint."
- },
- "created_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of endpoint's creation."
- }
- },
- "required": [
- "id",
- "url",
- "enabled",
- "description",
- "event_types",
- "created_by",
- "created_at"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "required": ["data"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
- }
- },
- "401": {
- "description": "GenericUnauthorized",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "unauthorized" },
- "message": { "type": "string", "const": "Unauthorized" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": { "type": "string" },
+ "rel": { "type": "string" },
+ "title": { "type": "string" },
+ "type": { "type": "string" },
+ "describedby": { "type": "string" },
+ "meta": {
"type": "object",
"propertyNames": { "type": "string" },
"additionalProperties": {}
@@ -10249,113 +8720,11 @@
}
}
},
- "summary": "Create endpoint",
- "description": "Create new endpoint configuration to subscribe to specific webhook events.",
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "default": true,
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [{ "type": "v1.project.paused" }]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" },
- "additionalProperties": { "type": "string" }
- },
- { "type": "null" }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": { "Authorization": "Bearer example_token" }
- },
- "signing_secret": {
- "type": "string",
- "minLength": 8,
- "maxLength": 64,
- "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
- }
- },
- "required": ["url", "event_types", "signing_secret"]
- }
- },
- "required": ["type", "attributes"]
- }
- },
- "required": ["data"]
- }
- }
- }
- }
+ "summary": "List endpoints",
+ "description": "List all Webhook endpoints based on a project's ref or an organization's slug."
},
- "delete": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-delete",
+ "post": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-post",
"parameters": [
{
"in": "path",
@@ -10371,260 +8740,132 @@
],
"tags": ["Organization webhooks"],
"responses": {
- "200": {
- "description": "Deleted endpoints",
+ "201": {
+ "description": "Created endpoint",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [
- { "type": "string", "maxLength": 512 },
- { "type": "null" }
- ],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [{ "type": "v1.project.paused" }]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
- },
- "additionalProperties": { "type": "string" }
- },
- { "type": "null" }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": { "Authorization": "Bearer example_token" }
- },
- "created_by": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the user who created the endpoint."
- },
- "created_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of endpoint's creation."
- }
- },
- "required": [
- "id",
- "url",
- "enabled",
- "description",
- "event_types",
- "created_by",
- "created_at"
- ]
- }
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
},
- "required": ["type", "id", "attributes"]
- }
- }
- },
- "required": ["data"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "attributes": {
"type": "object",
"properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
- "message": {
+ "id": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
},
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
},
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
},
- "issues": {
+ "description": {
+ "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
"type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
+ "items": {
"type": "object",
"properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
}
},
- "required": ["href"]
- }
+ "required": ["type"]
+ },
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [{ "type": "v1.project.paused" }]
},
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
+ },
+ "additionalProperties": { "type": "string" }
+ },
+ { "type": "null" }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": { "Authorization": "Bearer example_token" }
},
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
+ "created_by": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the user who created the endpoint."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of endpoint's creation."
}
},
- "required": ["code", "message"],
- "title": "InvalidRef"
+ "required": [
+ "id",
+ "url",
+ "enabled",
+ "description",
+ "event_types",
+ "created_by",
+ "created_at"
+ ]
}
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
+ },
+ "required": ["type", "id", "attributes"]
}
},
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
+ "required": ["data"]
}
}
}
@@ -10990,13 +9231,113 @@
}
}
},
- "summary": "Delete all endpoints",
- "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op."
- }
- },
- "/v2/organizations/{slug}/webhooks/endpoints/{id}": {
- "get": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-id-get",
+ "summary": "Create endpoint",
+ "description": "Create new endpoint configuration to subscribe to specific webhook events.",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "default": true,
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
+ },
+ "required": ["type"]
+ },
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [{ "type": "v1.project.paused" }]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" },
+ "additionalProperties": { "type": "string" }
+ },
+ { "type": "null" }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": { "Authorization": "Bearer example_token" }
+ },
+ "signing_secret": {
+ "type": "string",
+ "minLength": 8,
+ "maxLength": 64,
+ "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
+ }
+ },
+ "required": ["url", "event_types", "signing_secret"]
+ }
+ },
+ "required": ["type", "attributes"]
+ }
+ },
+ "required": ["data"]
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-delete",
"parameters": [
{
"in": "path",
@@ -11008,144 +9349,139 @@
},
"required": true,
"description": "Organization slug"
- },
- {
- "in": "path",
- "name": "id",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "required": true,
- "description": "Identifier of an endpoint (UUID v7)."
}
],
"tags": ["Organization webhooks"],
"responses": {
"200": {
- "description": "Endpoint details",
+ "description": "Deleted endpoints",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
},
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [{ "type": "v1.project.paused" }]
- },
- "custom_headers": {
- "anyOf": [
- {
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [
+ { "type": "string", "maxLength": 512 },
+ { "type": "null" }
+ ],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
"type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
},
- "additionalProperties": { "type": "string" }
+ "required": ["type"]
},
- { "type": "null" }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": { "Authorization": "Bearer example_token" }
- },
- "created_by": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the user who created the endpoint."
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [{ "type": "v1.project.paused" }]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
+ },
+ "additionalProperties": { "type": "string" }
+ },
+ { "type": "null" }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": { "Authorization": "Bearer example_token" }
+ },
+ "created_by": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the user who created the endpoint."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of endpoint's creation."
+ }
},
- "created_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of endpoint's creation."
- }
- },
- "required": [
- "id",
- "url",
- "enabled",
- "description",
- "event_types",
- "created_by",
- "created_at"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
+ "required": [
+ "id",
+ "url",
+ "enabled",
+ "description",
+ "event_types",
+ "created_by",
+ "created_at"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
}
},
"required": ["data"]
@@ -11153,154 +9489,32 @@
}
}
},
- "400": {
- "description": "Multiple error responses",
+ "401": {
+ "description": "GenericUnauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
- "oneOf": [
- {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "code": { "type": "string", "const": "unauthorized" },
+ "message": { "type": "string", "const": "Unauthorized" },
+ "description": { "type": "string" },
+ "links": {
"type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
- }
- },
- "401": {
- "description": "GenericUnauthorized",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "unauthorized" },
- "message": { "type": "string", "const": "Unauthorized" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": { "type": "string" },
+ "rel": { "type": "string" },
+ "title": { "type": "string" },
+ "type": { "type": "string" },
+ "describedby": { "type": "string" },
+ "meta": {
"type": "object",
"propertyNames": { "type": "string" },
"additionalProperties": {}
@@ -11452,69 +9666,6 @@
}
}
},
- "404": {
- "description": "EndpointNotFound",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "not_found.endpoint" },
- "message": { "type": "string", "const": "Not Found: Endpoint not found" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "not_found.endpoint",
- "message": "Not Found: Endpoint not found"
- }
- }
- }
- }
- }
- }
- },
"408": {
"description": "GenericRequestTimeout",
"content": {
@@ -11699,11 +9850,13 @@
}
}
},
- "summary": "Get endpoint",
- "description": "Get details of a specific endpoint."
- },
- "patch": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-id-patch",
+ "summary": "Delete all endpoints",
+ "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op."
+ }
+ },
+ "/v2/organizations/{slug}/webhooks/endpoints/{id}": {
+ "get": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-id-get",
"parameters": [
{
"in": "path",
@@ -11731,7 +9884,7 @@
"tags": ["Organization webhooks"],
"responses": {
"200": {
- "description": "Updated endpoint details",
+ "description": "Endpoint details",
"content": {
"application/json": {
"schema": {
@@ -11860,7 +10013,65 @@
}
}
},
- "400": {
+ "401": {
+ "description": "GenericUnauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "code": { "type": "string", "const": "unauthorized" },
+ "message": { "type": "string", "const": "Unauthorized" },
+ "description": { "type": "string" },
+ "links": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": { "type": "string" },
+ "rel": { "type": "string" },
+ "title": { "type": "string" },
+ "type": { "type": "string" },
+ "describedby": { "type": "string" },
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": { "$ref": "#/components/schemas/APIErrorObject" }
+ }
+ },
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
+ },
+ "examples": {
+ "Default example": {
+ "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } }
+ }
+ }
+ }
+ }
+ },
+ "403": {
"description": "Multiple error responses",
"content": {
"application/json": {
@@ -11873,10 +10084,10 @@
"type": "object",
"properties": {
"id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
+ "code": { "type": "string", "const": "forbidden.permission_denied" },
"message": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "const": "Forbidden: Permission denied"
},
"description": { "type": "string" },
"links": {
@@ -11910,17 +10121,14 @@
}
},
"required": ["code", "message"],
- "title": "InvalidSlug"
+ "title": "PermissionDenied"
},
{
"type": "object",
"properties": {
"id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
+ "code": { "type": "string", "const": "forbidden.access_disabled" },
+ "message": { "type": "string", "const": "Forbidden: Access disabled" },
"description": { "type": "string" },
"links": {
"type": "object",
@@ -11953,7 +10161,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "AccessDisabled"
}
]
}
@@ -11962,192 +10170,15 @@
"$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
},
"examples": {
- "InvalidSlug": {
+ "PermissionDenied": {
"value": {
"error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "code": "forbidden.permission_denied",
+ "message": "Forbidden: Permission denied"
}
}
},
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
- }
- },
- "401": {
- "description": "GenericUnauthorized",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "unauthorized" },
- "message": { "type": "string", "const": "Unauthorized" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "Default example": {
- "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } }
- }
- }
- }
- }
- },
- "403": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "forbidden.permission_denied" },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "forbidden.access_disabled" },
- "message": { "type": "string", "const": "Forbidden: Access disabled" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "PermissionDenied": {
- "value": {
- "error": {
- "code": "forbidden.permission_denied",
- "message": "Forbidden: Permission denied"
- }
- }
- },
- "AccessDisabled": {
+ "AccessDisabled": {
"value": {
"error": {
"code": "forbidden.access_disabled",
@@ -12406,111 +10437,11 @@
}
}
},
- "summary": "Update endpoint",
- "description": "Update endpoint's configuration.",
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [{ "type": "v1.project.paused" }]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" },
- "additionalProperties": { "type": "string" }
- },
- { "type": "null" }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": { "Authorization": "Bearer example_token" }
- },
- "signing_secret": {
- "type": "string",
- "minLength": 8,
- "maxLength": 64,
- "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
- }
- }
- }
- },
- "required": ["type", "attributes"]
- }
- },
- "required": ["data"]
- }
- }
- }
- }
+ "summary": "Get endpoint",
+ "description": "Get details of a specific endpoint."
},
- "delete": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-id-delete",
+ "patch": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-id-patch",
"parameters": [
{
"in": "path",
@@ -12538,7 +10469,7 @@
"tags": ["Organization webhooks"],
"responses": {
"200": {
- "description": "Deleted endpoint details",
+ "description": "Updated endpoint details",
"content": {
"application/json": {
"schema": {
@@ -12667,128 +10598,6 @@
}
}
},
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
- }
- },
"401": {
"description": "GenericUnauthorized",
"content": {
@@ -13213,13 +11022,111 @@
}
}
},
- "summary": "Delete endpoint",
- "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op."
- }
- },
- "/v2/organizations/{slug}/webhooks/endpoints/{id}/deliveries": {
- "get": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-id-deliveries-get",
+ "summary": "Update endpoint",
+ "description": "Update endpoint's configuration.",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
+ },
+ "required": ["type"]
+ },
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [{ "type": "v1.project.paused" }]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" },
+ "additionalProperties": { "type": "string" }
+ },
+ { "type": "null" }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": { "Authorization": "Bearer example_token" }
+ },
+ "signing_secret": {
+ "type": "string",
+ "minLength": 8,
+ "maxLength": 64,
+ "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
+ }
+ }
+ }
+ },
+ "required": ["type", "attributes"]
+ }
+ },
+ "required": ["data"]
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-id-delete",
"parameters": [
{
"in": "path",
@@ -13242,292 +11149,142 @@
},
"required": true,
"description": "Identifier of an endpoint (UUID v7)."
- },
- {
- "in": "query",
- "name": "page[before]",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param."
- },
- {
- "in": "query",
- "name": "page[after]",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param."
- },
- {
- "in": "query",
- "name": "page[size]",
- "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" },
- "description": "Up to how many records to return."
}
],
"tags": ["Organization webhooks"],
"responses": {
"200": {
- "description": "List of deliveries",
+ "description": "Deleted endpoint details",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "delivery",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
- },
- "event_id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of the event, which triggered the delivery (UUID v7)."
- },
- "status": {
- "type": "string",
- "enum": ["pending", "success", "failure", "skipped"],
- "description": "Status of the delivery attempt."
- },
- "response_code": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "HTTP status code of the response, `0` if unavailable."
- },
- "response_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": { "type": "string" }
- },
- { "type": "null" }
- ],
- "description": "HTTP headers of the response, `{}` if unavailable."
- },
- "response_body": {
- "anyOf": [
- {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": { "type": "string" },
- "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
- },
- {
- "type": "string",
- "description": "String representation of an HTTP body of the response."
- }
- ]
- },
- { "type": "null" }
- ]
- },
- "attempt_timestamp": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of the attempt."
- }
- },
- "required": [
- "id",
- "event_id",
- "status",
- "response_code",
- "response_headers",
- "response_body",
- "attempt_timestamp"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "links": {
"type": "object",
"properties": {
- "first": {
- "description": "URL path to the first page if available.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10",
- "anyOf": [{ "type": "string" }, { "type": "null" }]
- },
- "prev": {
- "anyOf": [{ "type": "string" }, { "type": "null" }],
- "description": "URL path to the previous page.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7"
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
},
- "next": {
- "anyOf": [{ "type": "string" }, { "type": "null" }],
- "description": "URL path to the next page.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4"
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
},
- "last": {
- "description": "URL path to the last page if available.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295",
- "anyOf": [{ "type": "string" }, { "type": "null" }]
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
+ },
+ "required": ["type"]
+ },
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [{ "type": "v1.project.paused" }]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
+ },
+ "additionalProperties": { "type": "string" }
+ },
+ { "type": "null" }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": { "Authorization": "Bearer example_token" }
+ },
+ "created_by": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the user who created the endpoint."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of endpoint's creation."
+ }
+ },
+ "required": [
+ "id",
+ "url",
+ "enabled",
+ "description",
+ "event_types",
+ "created_by",
+ "created_at"
+ ]
}
},
- "required": ["prev", "next"]
+ "required": ["type", "id", "attributes"]
}
},
- "required": ["data", "links"]
+ "required": ["data"]
}
}
}
},
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
- }
- },
- "401": {
- "description": "GenericUnauthorized",
+ "401": {
+ "description": "GenericUnauthorized",
"content": {
"application/json": {
"schema": {
@@ -13950,13 +11707,13 @@
}
}
},
- "summary": "List deliveries",
- "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed."
+ "summary": "Delete endpoint",
+ "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op."
}
},
- "/v2/organizations/{slug}/webhooks/endpoints/{id}/test": {
- "post": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-id-test-post",
+ "/v2/organizations/{slug}/webhooks/endpoints/{id}/deliveries": {
+ "get": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-id-deliveries-get",
"parameters": [
{
"in": "path",
@@ -13979,263 +11736,164 @@
},
"required": true,
"description": "Identifier of an endpoint (UUID v7)."
+ },
+ {
+ "in": "query",
+ "name": "page[before]",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param."
+ },
+ {
+ "in": "query",
+ "name": "page[after]",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param."
+ },
+ {
+ "in": "query",
+ "name": "page[size]",
+ "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" },
+ "description": "Up to how many records to return."
}
],
"tags": ["Organization webhooks"],
"responses": {
- "201": {
- "description": "Event published",
+ "200": {
+ "description": "List of deliveries",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "delivery",
+ "description": "Resource type."
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
+ },
+ "event_id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of the event, which triggered the delivery (UUID v7)."
+ },
+ "status": {
+ "type": "string",
+ "enum": ["pending", "success", "failure", "skipped"],
+ "description": "Status of the delivery attempt."
+ },
+ "response_code": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "HTTP status code of the response, `0` if unavailable."
+ },
+ "response_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": { "type": "string" }
+ },
+ { "type": "null" }
+ ],
+ "description": "HTTP headers of the response, `{}` if unavailable."
+ },
+ "response_body": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": { "type": "string" },
+ "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
+ },
+ {
+ "type": "string",
+ "description": "String representation of an HTTP body of the response."
+ }
+ ]
+ },
+ { "type": "null" }
+ ]
+ },
+ "attempt_timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of the attempt."
+ }
+ },
+ "required": [
+ "id",
+ "event_id",
+ "status",
+ "response_code",
+ "response_headers",
+ "response_body",
+ "attempt_timestamp"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "links": {
"type": "object",
"properties": {
- "type": {
- "type": "string",
- "const": "ingress",
- "description": "Resource type."
+ "first": {
+ "description": "URL path to the first page if available.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10",
+ "anyOf": [{ "type": "string" }, { "type": "null" }]
},
- "id": { "type": "string" }
- },
- "required": ["type", "id"]
- }
- },
- "required": ["data"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": {
- "type": "string",
- "const": "bad_request.endpoint.test.disabled"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Endpoint is disabled"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "EndpointTestDisabled"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": {
- "type": "string",
- "const": "bad_request.endpoint.test.wrong_event_type"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Provided event type is not subscribed to by the endpoint"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "EndpointTestWrongEventType"
+ "prev": {
+ "anyOf": [{ "type": "string" }, { "type": "null" }],
+ "description": "URL path to the previous page.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7"
},
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
+ "next": {
+ "anyOf": [{ "type": "string" }, { "type": "null" }],
+ "description": "URL path to the next page.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4"
},
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
+ "last": {
+ "description": "URL path to the last page if available.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295",
+ "anyOf": [{ "type": "string" }, { "type": "null" }]
}
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "EndpointTestDisabled": {
- "value": {
- "error": {
- "code": "bad_request.endpoint.test.disabled",
- "message": "Bad Request: Endpoint is disabled",
- "description": "Endpoint is disabled, to send test event endpoint must first be enabled."
- }
- }
- },
- "EndpointTestWrongEventType": {
- "value": {
- "error": {
- "code": "bad_request.endpoint.test.wrong_event_type",
- "message": "Bad Request: Provided event type is not subscribed to by the endpoint",
- "description": "Only event types that the endpoint is subscribed to can be specified."
- }
- }
- },
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
+ },
+ "required": ["prev", "next"]
}
},
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
+ "required": ["data", "links"]
}
}
}
@@ -14664,89 +12322,13 @@
}
}
},
- "summary": "Send test event",
- "description": "Ingests and schedules a test webhook event to be published out this endpoints.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.",
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "event",
- "description": "Resource type."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "type": {
- "description": "Webhook event type.",
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "project.v1.paused",
- "project.v1.created",
- "project.v1.restored",
- "project.v1.transferred",
- "project.v1.removed",
- "project.v1.restarted",
- "project.v1.status.changed",
- "project.v1.backup.started",
- "project.v1.branch.created",
- "project.v1.branch.updated",
- "project.v1.branch.removed",
- "organization.v1.member.invitation.created",
- "organization.v1.member.invitation.canceled",
- "organization.v1.member.added",
- "organization.v1.member.removed",
- "organization.v1.member.role.assigned",
- "organization.v1.member.role.removed",
- "organization.v1.member.role.updated",
- "organization.v1.billing.plan.upgraded",
- "organization.v1.billing.plan.downgraded",
- "project.v1.branch.deleted"
- ]
- }
- },
- "required": ["type"]
- }
- },
- "required": ["type", "attributes"]
- }
- }
- }
- }
- }
- }
+ "summary": "List deliveries",
+ "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed."
}
},
- "/v2/organizations/{slug}/webhooks/deliveries/{id}": {
- "get": {
- "operationId": "v2-organizations-slug-webhooks-deliveries-id-get",
+ "/v2/organizations/{slug}/webhooks/endpoints/{id}/test": {
+ "post": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-id-test-post",
"parameters": [
{
"in": "path",
@@ -14768,13 +12350,13 @@
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"required": true,
- "description": "Identifier of a delivery (UUID v7)."
+ "description": "Identifier of an endpoint (UUID v7)."
}
],
"tags": ["Organization webhooks"],
"responses": {
- "200": {
- "description": "Delivery details",
+ "201": {
+ "description": "Event published",
"content": {
"application/json": {
"schema": {
@@ -14785,176 +12367,12 @@
"properties": {
"type": {
"type": "string",
- "const": "delivery",
+ "const": "ingress",
"description": "Resource type."
},
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
- },
- "event_id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of the event, which triggered the delivery (UUID v7)."
- },
- "status": {
- "type": "string",
- "enum": ["pending", "success", "failure", "skipped"],
- "description": "Status of the delivery attempt."
- },
- "response_code": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "HTTP status code of the response, `0` if unavailable."
- },
- "response_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": { "type": "string" }
- },
- { "type": "null" }
- ],
- "description": "HTTP headers of the response, `{}` if unavailable."
- },
- "response_body": {
- "anyOf": [
- {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": { "type": "string" },
- "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
- },
- {
- "type": "string",
- "description": "String representation of an HTTP body of the response."
- }
- ]
- },
- { "type": "null" }
- ]
- },
- "attempt_timestamp": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of the attempt."
- },
- "event": {
- "type": "object",
- "properties": {
- "type": {
- "description": "Webhook event type.",
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "project.v1.paused",
- "project.v1.created",
- "project.v1.restored",
- "project.v1.transferred",
- "project.v1.removed",
- "project.v1.restarted",
- "project.v1.status.changed",
- "project.v1.backup.started",
- "project.v1.branch.created",
- "project.v1.branch.updated",
- "project.v1.branch.removed",
- "organization.v1.member.invitation.created",
- "organization.v1.member.invitation.canceled",
- "organization.v1.member.added",
- "organization.v1.member.removed",
- "organization.v1.member.role.assigned",
- "organization.v1.member.role.removed",
- "organization.v1.member.role.updated",
- "organization.v1.billing.plan.upgraded",
- "organization.v1.billing.plan.downgraded",
- "project.v1.branch.deleted"
- ]
- },
- "payload": {
- "type": "object",
- "properties": {
- "organization_slug": {
- "type": "string",
- "pattern": "^[\\w-]+$",
- "description": "Organization slug",
- "example": "tsrqponmlkjihgfedcba"
- },
- "project_ref": {
- "anyOf": [
- {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "description": "Project ref",
- "example": "abcdefghijklmnopqrst"
- },
- { "type": "null" }
- ]
- }
- },
- "required": ["organization_slug", "project_ref"],
- "description": "Final data sent to the consumer."
- },
- "timestamp": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of event publication."
- }
- },
- "required": ["type", "payload", "timestamp"]
- }
- },
- "required": [
- "id",
- "event_id",
- "status",
- "response_code",
- "response_headers",
- "response_body",
- "attempt_timestamp",
- "event"
- ]
- }
+ "id": { "type": "string" }
},
- "required": ["type", "id", "attributes"]
+ "required": ["type", "id"]
}
},
"required": ["data"]
@@ -14975,10 +12393,13 @@
"type": "object",
"properties": {
"id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
+ "code": {
+ "type": "string",
+ "const": "bad_request.endpoint.test.disabled"
+ },
"message": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "const": "Bad Request: Endpoint is disabled"
},
"description": { "type": "string" },
"links": {
@@ -15012,16 +12433,19 @@
}
},
"required": ["code", "message"],
- "title": "InvalidSlug"
+ "title": "EndpointTestDisabled"
},
{
"type": "object",
"properties": {
"id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
+ "code": {
+ "type": "string",
+ "const": "bad_request.endpoint.test.wrong_event_type"
+ },
"message": {
"type": "string",
- "const": "Bad Request: Invalid project ref"
+ "const": "Bad Request: Provided event type is not subscribed to by the endpoint"
},
"description": { "type": "string" },
"links": {
@@ -15055,7 +12479,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "EndpointTestWrongEventType"
}
]
}
@@ -15064,19 +12488,21 @@
"$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
},
"examples": {
- "InvalidSlug": {
+ "EndpointTestDisabled": {
"value": {
"error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "code": "bad_request.endpoint.test.disabled",
+ "message": "Bad Request: Endpoint is disabled",
+ "description": "Endpoint is disabled, to send test event endpoint must first be enabled."
}
}
},
- "InvalidRef": {
+ "EndpointTestWrongEventType": {
"value": {
"error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
+ "code": "bad_request.endpoint.test.wrong_event_type",
+ "message": "Bad Request: Provided event type is not subscribed to by the endpoint",
+ "description": "Only event types that the endpoint is subscribed to can be specified."
}
}
}
@@ -15262,7 +12688,7 @@
}
},
"404": {
- "description": "DeliveryNotFound",
+ "description": "EndpointNotFound",
"content": {
"application/json": {
"schema": {
@@ -15272,8 +12698,8 @@
"type": "object",
"properties": {
"id": { "type": "string" },
- "code": { "type": "string", "const": "not_found.delivery" },
- "message": { "type": "string", "const": "Not Found: Delivery not found" },
+ "code": { "type": "string", "const": "not_found.endpoint" },
+ "message": { "type": "string", "const": "Not Found: Endpoint not found" },
"description": { "type": "string" },
"links": {
"type": "object",
@@ -15315,8 +12741,8 @@
"Default example": {
"value": {
"error": {
- "code": "not_found.delivery",
- "message": "Not Found: Delivery not found"
+ "code": "not_found.endpoint",
+ "message": "Not Found: Endpoint not found"
}
}
}
@@ -15508,13 +12934,89 @@
}
}
},
- "summary": "Get delivery",
- "description": "Get details of a specific delivery attempt."
+ "summary": "Send test event",
+ "description": "Ingests and schedules a test webhook event to be published out this endpoints.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "event",
+ "description": "Resource type."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "Webhook event type.",
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "project.v1.paused",
+ "project.v1.created",
+ "project.v1.restored",
+ "project.v1.transferred",
+ "project.v1.removed",
+ "project.v1.restarted",
+ "project.v1.status.changed",
+ "project.v1.backup.started",
+ "project.v1.branch.created",
+ "project.v1.branch.updated",
+ "project.v1.branch.removed",
+ "organization.v1.member.invitation.created",
+ "organization.v1.member.invitation.canceled",
+ "organization.v1.member.added",
+ "organization.v1.member.removed",
+ "organization.v1.member.role.assigned",
+ "organization.v1.member.role.removed",
+ "organization.v1.member.role.updated",
+ "organization.v1.billing.plan.upgraded",
+ "organization.v1.billing.plan.downgraded",
+ "project.v1.branch.deleted"
+ ]
+ }
+ },
+ "required": ["type"]
+ }
+ },
+ "required": ["type", "attributes"]
+ }
+ }
+ }
+ }
+ }
+ }
}
},
- "/v2/organizations/{slug}/webhooks/deliveries/{id}/retry": {
- "post": {
- "operationId": "v2-organizations-slug-webhooks-deliveries-id-retry-post",
+ "/v2/organizations/{slug}/webhooks/deliveries/{id}": {
+ "get": {
+ "operationId": "v2-organizations-slug-webhooks-deliveries-id-get",
"parameters": [
{
"in": "path",
@@ -15541,7 +13043,7 @@
],
"tags": ["Organization webhooks"],
"responses": {
- "201": {
+ "200": {
"description": "Delivery details",
"content": {
"application/json": {
@@ -15553,141 +13055,183 @@
"properties": {
"type": {
"type": "string",
- "const": "ingress",
+ "const": "delivery",
"description": "Resource type."
},
- "id": { "type": "string" }
- },
- "required": ["type", "id"]
- }
- },
- "required": ["data"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
+ },
+ "attributes": {
"type": "object",
"properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_slug" },
- "message": {
+ "id": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
},
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
+ "event_id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of the event, which triggered the delivery (UUID v7)."
},
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string", "const": "bad_request.invalid_ref" },
- "message": {
+ "status": {
"type": "string",
- "const": "Bad Request: Invalid project ref"
+ "enum": ["pending", "success", "failure", "skipped"],
+ "description": "Status of the delivery attempt."
},
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
- }
+ "response_code": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "HTTP status code of the response, `0` if unavailable."
+ },
+ "response_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": { "type": "string" }
},
- "required": ["href"]
- }
+ { "type": "null" }
+ ],
+ "description": "HTTP headers of the response, `{}` if unavailable."
},
- "meta": {
- "type": "object",
- "propertyNames": { "type": "string" },
- "additionalProperties": {}
+ "response_body": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": { "type": "string" },
+ "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
+ },
+ {
+ "type": "string",
+ "description": "String representation of an HTTP body of the response."
+ }
+ ]
+ },
+ { "type": "null" }
+ ]
},
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/APIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
- }
- },
+ "attempt_timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of the attempt."
+ },
+ "event": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "Webhook event type.",
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "project.v1.paused",
+ "project.v1.created",
+ "project.v1.restored",
+ "project.v1.transferred",
+ "project.v1.removed",
+ "project.v1.restarted",
+ "project.v1.status.changed",
+ "project.v1.backup.started",
+ "project.v1.branch.created",
+ "project.v1.branch.updated",
+ "project.v1.branch.removed",
+ "organization.v1.member.invitation.created",
+ "organization.v1.member.invitation.canceled",
+ "organization.v1.member.added",
+ "organization.v1.member.removed",
+ "organization.v1.member.role.assigned",
+ "organization.v1.member.role.removed",
+ "organization.v1.member.role.updated",
+ "organization.v1.billing.plan.upgraded",
+ "organization.v1.billing.plan.downgraded",
+ "project.v1.branch.deleted"
+ ]
+ },
+ "payload": {
+ "type": "object",
+ "properties": {
+ "organization_slug": {
+ "type": "string",
+ "pattern": "^[\\w-]+$",
+ "description": "Organization slug",
+ "example": "tsrqponmlkjihgfedcba"
+ },
+ "project_ref": {
+ "anyOf": [
+ {
+ "type": "string",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "description": "Project ref",
+ "example": "abcdefghijklmnopqrst"
+ },
+ { "type": "null" }
+ ]
+ }
+ },
+ "required": ["organization_slug", "project_ref"],
+ "description": "Final data sent to the consumer."
+ },
+ "timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of event publication."
+ }
+ },
+ "required": ["type", "payload", "timestamp"]
+ }
+ },
+ "required": [
+ "id",
+ "event_id",
+ "status",
+ "response_code",
+ "response_headers",
+ "response_body",
+ "attempt_timestamp",
+ "event"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "required": ["data"]
+ }
+ }
+ }
+ },
"401": {
"description": "GenericUnauthorized",
"content": {
@@ -16112,530 +13656,717 @@
}
}
},
- "summary": "Retry delivery",
- "description": "Retry delivering the same event again.\n\nAutomatic retries are not applicable to manual retries - if the delivery fails, there won't be any automatic retries attempted.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds."
+ "summary": "Get delivery",
+ "description": "Get details of a specific delivery attempt."
}
- }
- },
- "info": {
- "title": "Supabase API (v2)",
- "description": "Supabase API generated from the OpenAPI specification.<br>Visit [https://supabase.com/docs](https://supabase.com/docs) for a complete documentation.",
- "version": "1.0.0",
- "contact": {}
- },
- "tags": [],
- "servers": [],
- "components": {
- "securitySchemes": { "bearer": { "scheme": "bearer", "bearerFormat": "JWT", "type": "http" } },
- "schemas": {
- "ListLogDrainsResponse_Output": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "description": "Resource type.",
- "enum": ["log_drain"]
- },
- "id": { "type": "string" },
- "attributes": {
+ },
+ "/v2/organizations/{slug}/webhooks/deliveries/{id}/retry": {
+ "post": {
+ "operationId": "v2-organizations-slug-webhooks-deliveries-id-retry-post",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "slug",
+ "schema": {
+ "type": "string",
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba"
+ },
+ "required": true,
+ "description": "Organization slug"
+ },
+ {
+ "in": "path",
+ "name": "id",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "required": true,
+ "description": "Identifier of a delivery (UUID v7)."
+ }
+ ],
+ "tags": ["Organization webhooks"],
+ "responses": {
+ "201": {
+ "description": "Delivery details",
+ "content": {
+ "application/json": {
+ "schema": {
"type": "object",
"properties": {
- "name": { "type": "string" },
- "description": { "type": "string" },
- "config": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "url": { "type": "string" },
- "http": { "type": "string", "enum": ["http1", "http2"] },
- "gzip": { "type": "boolean" },
- "headers": {
- "type": "object",
- "additionalProperties": { "type": "string" }
- }
- },
- "title": "webhook"
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "ingress",
+ "description": "Resource type."
},
- {
+ "id": { "type": "string" }
+ },
+ "required": ["type", "id"]
+ }
+ },
+ "required": ["data"]
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "GenericUnauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "code": { "type": "string", "const": "unauthorized" },
+ "message": { "type": "string", "const": "Unauthorized" },
+ "description": { "type": "string" },
+ "links": {
"type": "object",
- "properties": {
- "api_key": { "type": "string" },
- "region": { "type": "string" }
- },
- "title": "datadog"
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": { "type": "string" },
+ "rel": { "type": "string" },
+ "title": { "type": "string" },
+ "type": { "type": "string" },
+ "describedby": { "type": "string" },
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
},
- {
+ "meta": {
"type": "object",
- "properties": {
- "url": { "type": "string" },
- "username": { "type": "string", "nullable": true },
- "password": { "type": "string", "nullable": true },
- "headers": {
- "type": "object",
- "additionalProperties": { "type": "string" }
- }
- },
- "title": "loki"
- },
- {
- "type": "object",
- "properties": { "dsn": { "type": "string" } },
- "title": "sentry"
- },
- {
- "type": "object",
- "properties": {
- "domain": { "type": "string" },
- "api_token": { "type": "string" },
- "dataset_name": { "type": "string" }
- },
- "title": "axiom"
- },
- {
- "type": "object",
- "properties": {
- "host": { "type": "string" },
- "port": { "type": "integer", "minimum": 0, "maximum": 65535 },
- "tls": { "default": false, "type": "boolean" },
- "structured_data": { "type": "string" },
- "cipher_key": { "type": "string" },
- "ca_cert": { "type": "string" },
- "client_cert": { "type": "string" },
- "client_key": { "type": "string" }
- },
- "title": "syslog"
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
},
+ "issues": {
+ "type": "array",
+ "items": { "$ref": "#/components/schemas/APIErrorObject" }
+ }
+ },
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
+ },
+ "examples": {
+ "Default example": {
+ "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Multiple error responses",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "oneOf": [
{
"type": "object",
"properties": {
- "s3_bucket": { "type": "string" },
- "storage_region": { "type": "string" },
- "access_key_id": { "type": "string" },
- "secret_access_key": { "type": "string" },
- "batch_timeout": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
+ "id": { "type": "string" },
+ "code": { "type": "string", "const": "forbidden.permission_denied" },
+ "message": {
+ "type": "string",
+ "const": "Forbidden: Permission denied"
+ },
+ "description": { "type": "string" },
+ "links": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": { "type": "string" },
+ "rel": { "type": "string" },
+ "title": { "type": "string" },
+ "type": { "type": "string" },
+ "describedby": { "type": "string" },
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": { "$ref": "#/components/schemas/APIErrorObject" }
}
},
- "title": "s3"
- },
- {
- "type": "object",
- "properties": {
- "region": { "type": "string" },
- "username": { "type": "string" },
- "password": { "type": "string" }
- },
- "title": "last9"
+ "required": ["code", "message"],
+ "title": "PermissionDenied"
},
{
"type": "object",
"properties": {
- "endpoint": { "type": "string" },
- "protocol": { "default": "http/protobuf", "type": "string" },
- "gzip": { "default": true, "type": "boolean" },
- "headers": {
- "default": {},
+ "id": { "type": "string" },
+ "code": { "type": "string", "const": "forbidden.access_disabled" },
+ "message": { "type": "string", "const": "Forbidden: Access disabled" },
+ "description": { "type": "string" },
+ "links": {
"type": "object",
- "additionalProperties": { "type": "string" }
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": { "type": "string" },
+ "rel": { "type": "string" },
+ "title": { "type": "string" },
+ "type": { "type": "string" },
+ "describedby": { "type": "string" },
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": { "$ref": "#/components/schemas/APIErrorObject" }
}
},
- "title": "otlp"
+ "required": ["code", "message"],
+ "title": "AccessDisabled"
}
]
- },
- "backend_type": {
- "type": "string",
- "enum": [
- "postgres",
- "bigquery",
- "clickhouse",
- "webhook",
- "datadog",
- "loki",
- "sentry",
- "s3",
- "axiom",
- "last9",
- "otlp",
- "syslog"
- ]
}
},
- "required": ["name", "config", "backend_type"]
+ "required": ["error"],
+ "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
+ },
+ "examples": {
+ "PermissionDenied": {
+ "value": {
+ "error": {
+ "code": "forbidden.permission_denied",
+ "message": "Forbidden: Permission denied"
+ }
+ }
+ },
+ "AccessDisabled": {
+ "value": {
+ "error": {
+ "code": "forbidden.access_disabled",
+ "message": "Forbidden: Access disabled"
+ }
+ }
+ }
}
- },
- "required": ["type", "id", "attributes"]
- }
- }
- },
- "required": ["data"]
- },
- "ErrorResponseBodyAPIErrorObject": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "code": { "type": "string" },
- "message": { "type": "string" },
- "description": { "type": "string" },
- "links": {
- "type": "object",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": { "type": "string" },
- "rel": { "type": "string" },
- "title": { "type": "string" },
- "type": { "type": "string" },
- "describedby": { "type": "string" },
- "meta": { "type": "object", "additionalProperties": {} }
- },
- "required": ["href"]
+ }
}
},
- "meta": { "type": "object", "additionalProperties": {} },
- "issues": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/ErrorResponseBodyAPIErrorObject" }
- }
- },
- "required": ["code", "message"],
- "ref": "APIErrorObject"
- },
- "ErrorResponseBody": {
- "type": "object",
- "properties": {
- "error": { "$ref": "#/components/schemas/ErrorResponseBodyAPIErrorObject" }
- },
- "required": ["error"]
- },
- "CreateLogDrainRequestOpenApi": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": { "type": "string", "description": "Resource type.", "enum": ["log_drain"] },
- "attributes": {
- "type": "object",
- "properties": {
- "name": { "type": "string" },
- "description": { "type": "string" },
- "config": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "url": { "type": "string" },
- "http": { "type": "string", "enum": ["http1", "http2"] },
- "gzip": { "type": "boolean" },
- "headers": {
+ "404": {
+ "description": "DeliveryNotFound",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "code": { "type": "string", "const": "not_found.delivery" },
+ "message": { "type": "string", "const": "Not Found: Delivery not found" },
+ "description": { "type": "string" },
+ "links": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {
"type": "object",
- "additionalProperties": { "type": "string" }
+ "properties": {
+ "href": { "type": "string" },
+ "rel": { "type": "string" },
+ "title": { "type": "string" },
+ "type": { "type": "string" },
+ "describedby": { "type": "string" },
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
}
},
- "additionalProperties": false,
- "title": "webhook"
- },
- {
- "type": "object",
- "properties": {
- "api_key": { "type": "string" },
- "region": { "type": "string" }
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
},
- "additionalProperties": false,
- "title": "datadog"
+ "issues": {
+ "type": "array",
+ "items": { "$ref": "#/components/schemas/APIErrorObject" }
+ }
},
- {
- "type": "object",
- "properties": {
- "url": { "type": "string" },
- "username": { "type": "string", "nullable": true },
- "password": { "type": "string", "nullable": true },
- "headers": {
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
+ },
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "not_found.delivery",
+ "message": "Not Found: Delivery not found"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "408": {
+ "description": "GenericRequestTimeout",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "code": { "type": "string", "const": "request_timeout" },
+ "message": { "type": "string", "const": "Request Timeout" },
+ "description": { "type": "string" },
+ "links": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {
"type": "object",
- "additionalProperties": { "type": "string" }
+ "properties": {
+ "href": { "type": "string" },
+ "rel": { "type": "string" },
+ "title": { "type": "string" },
+ "type": { "type": "string" },
+ "describedby": { "type": "string" },
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
}
},
- "additionalProperties": false,
- "title": "loki"
- },
- {
- "type": "object",
- "properties": { "dsn": { "type": "string" } },
- "additionalProperties": false,
- "title": "sentry"
- },
- {
- "type": "object",
- "properties": {
- "domain": { "type": "string" },
- "api_token": { "type": "string" },
- "dataset_name": { "type": "string" }
- },
- "additionalProperties": false,
- "title": "axiom"
- },
- {
- "type": "object",
- "properties": {
- "host": { "type": "string" },
- "port": { "type": "integer", "minimum": 0, "maximum": 65535 },
- "tls": { "default": false, "type": "boolean" },
- "structured_data": { "type": "string" },
- "cipher_key": { "type": "string" },
- "ca_cert": { "type": "string" },
- "client_cert": { "type": "string" },
- "client_key": { "type": "string" }
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
},
- "additionalProperties": false,
- "title": "syslog"
+ "issues": {
+ "type": "array",
+ "items": { "$ref": "#/components/schemas/APIErrorObject" }
+ }
},
- {
- "type": "object",
- "properties": {
- "s3_bucket": { "type": "string" },
- "storage_region": { "type": "string" },
- "access_key_id": { "type": "string" },
- "secret_access_key": { "type": "string" },
- "batch_timeout": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
+ },
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": { "code": "request_timeout", "message": "Request Timeout" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "GenericTooManyRequests",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "code": { "type": "string", "const": "too_many_requests" },
+ "message": { "type": "string", "const": "Too Many Requests" },
+ "description": { "type": "string" },
+ "links": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": { "type": "string" },
+ "rel": { "type": "string" },
+ "title": { "type": "string" },
+ "type": { "type": "string" },
+ "describedby": { "type": "string" },
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
}
},
- "additionalProperties": false,
- "title": "s3"
- },
- {
- "type": "object",
- "properties": {
- "region": { "type": "string" },
- "username": { "type": "string" },
- "password": { "type": "string" }
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
},
- "additionalProperties": false,
- "title": "last9"
+ "issues": {
+ "type": "array",
+ "items": { "$ref": "#/components/schemas/APIErrorObject" }
+ }
},
- {
- "type": "object",
- "properties": {
- "endpoint": { "type": "string" },
- "protocol": { "default": "http/protobuf", "type": "string" },
- "gzip": { "default": true, "type": "boolean" },
- "headers": {
- "default": {},
- "type": "object",
- "additionalProperties": { "type": "string" }
- }
- },
- "additionalProperties": false,
- "title": "otlp"
- }
- ]
+ "required": ["code", "message"]
+ }
},
- "backend_type": {
- "type": "string",
- "enum": [
- "postgres",
- "bigquery",
- "clickhouse",
- "webhook",
- "datadog",
- "loki",
- "sentry",
- "s3",
- "axiom",
- "last9",
- "otlp",
- "syslog"
- ]
- }
+ "required": ["error"],
+ "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
},
- "required": ["name", "config", "backend_type"],
- "additionalProperties": {}
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": { "code": "too_many_requests", "message": "Too Many Requests" }
+ }
+ }
+ }
}
- },
- "required": ["type", "attributes"]
- }
- },
- "required": ["data"]
- },
- "LogDrainResponse_Output": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": { "type": "string", "description": "Resource type.", "enum": ["log_drain"] },
- "id": { "type": "string" },
- "attributes": {
- "type": "object",
- "properties": {
- "name": { "type": "string" },
- "description": { "type": "string" },
- "config": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "url": { "type": "string" },
- "http": { "type": "string", "enum": ["http1", "http2"] },
- "gzip": { "type": "boolean" },
- "headers": {
- "type": "object",
- "additionalProperties": { "type": "string" }
- }
- },
- "title": "webhook"
- },
- {
- "type": "object",
- "properties": {
- "api_key": { "type": "string" },
- "region": { "type": "string" }
- },
- "title": "datadog"
- },
- {
- "type": "object",
- "properties": {
- "url": { "type": "string" },
- "username": { "type": "string", "nullable": true },
- "password": { "type": "string", "nullable": true },
- "headers": {
+ }
+ },
+ "500": {
+ "description": "GenericInternalServerError",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "code": { "type": "string", "const": "internal_server_error" },
+ "message": { "type": "string", "const": "Internal Server Error" },
+ "description": { "type": "string" },
+ "links": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {
"type": "object",
- "additionalProperties": { "type": "string" }
- }
- },
- "title": "loki"
- },
- {
- "type": "object",
- "properties": { "dsn": { "type": "string" } },
- "title": "sentry"
- },
- {
- "type": "object",
- "properties": {
- "domain": { "type": "string" },
- "api_token": { "type": "string" },
- "dataset_name": { "type": "string" }
- },
- "title": "axiom"
- },
- {
- "type": "object",
- "properties": {
- "host": { "type": "string" },
- "port": { "type": "integer", "minimum": 0, "maximum": 65535 },
- "tls": { "default": false, "type": "boolean" },
- "structured_data": { "type": "string" },
- "cipher_key": { "type": "string" },
- "ca_cert": { "type": "string" },
- "client_cert": { "type": "string" },
- "client_key": { "type": "string" }
- },
- "title": "syslog"
- },
- {
- "type": "object",
- "properties": {
- "s3_bucket": { "type": "string" },
- "storage_region": { "type": "string" },
- "access_key_id": { "type": "string" },
- "secret_access_key": { "type": "string" },
- "batch_timeout": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
+ "properties": {
+ "href": { "type": "string" },
+ "rel": { "type": "string" },
+ "title": { "type": "string" },
+ "type": { "type": "string" },
+ "describedby": { "type": "string" },
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
}
},
- "title": "s3"
- },
- {
- "type": "object",
- "properties": {
- "region": { "type": "string" },
- "username": { "type": "string" },
- "password": { "type": "string" }
+ "meta": {
+ "type": "object",
+ "propertyNames": { "type": "string" },
+ "additionalProperties": {}
},
- "title": "last9"
+ "issues": {
+ "type": "array",
+ "items": { "$ref": "#/components/schemas/APIErrorObject" }
+ }
},
- {
- "type": "object",
- "properties": {
- "endpoint": { "type": "string" },
- "protocol": { "default": "http/protobuf", "type": "string" },
- "gzip": { "default": true, "type": "boolean" },
- "headers": {
- "default": {},
- "type": "object",
- "additionalProperties": { "type": "string" }
- }
- },
- "title": "otlp"
- }
- ]
+ "required": ["code", "message"]
+ }
},
- "backend_type": {
- "type": "string",
- "enum": [
- "postgres",
- "bigquery",
- "clickhouse",
- "webhook",
- "datadog",
- "loki",
- "sentry",
- "s3",
- "axiom",
- "last9",
- "otlp",
- "syslog"
- ]
- }
+ "required": ["error"],
+ "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } }
},
- "required": ["name", "config", "backend_type"]
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "internal_server_error",
+ "message": "Internal Server Error"
+ }
+ }
+ }
+ }
}
- },
- "required": ["type", "id", "attributes"]
+ }
}
},
- "required": ["data"]
- },
- "UpdateLogDrainRequestOpenApi": {
+ "summary": "Retry delivery",
+ "description": "Retry delivering the same event again.\n\nAutomatic retries are not applicable to manual retries - if the delivery fails, there won't be any automatic retries attempted.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds."
+ }
+ }
+ },
+ "info": {
+ "title": "Supabase API (v2)",
+ "description": "Supabase API generated from the OpenAPI specification.<br>Visit [https://supabase.com/docs](https://supabase.com/docs) for a complete documentation.",
+ "version": "1.0.0",
+ "contact": {}
+ },
+ "tags": [],
+ "servers": [],
+ "components": {
+ "securitySchemes": { "bearer": { "scheme": "bearer", "bearerFormat": "JWT", "type": "http" } },
+ "schemas": {
+ "ListLogDrainsResponse_Output": {
"type": "object",
"properties": {
"data": {
- "type": "object",
- "properties": {
- "type": { "type": "string", "description": "Resource type.", "enum": ["log_drain"] },
- "attributes": {
- "type": "object",
- "properties": {
- "name": { "type": "string" },
- "description": { "type": "string" },
- "config": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "url": { "type": "string" },
- "http": { "type": "string", "enum": ["http1", "http2"] },
- "gzip": { "type": "boolean" },
- "headers": {
- "type": "object",
- "additionalProperties": { "type": "string" }
- }
- },
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Resource type.",
+ "enum": ["log_drain"]
+ },
+ "id": { "type": "string" },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": { "type": "string" },
+ "description": { "type": "string" },
+ "config": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "url": { "type": "string" },
+ "http": { "type": "string", "enum": ["http1", "http2"] },
+ "gzip": { "type": "boolean" },
+ "headers": {
+ "type": "object",
+ "additionalProperties": { "type": "string" }
+ }
+ },
+ "title": "webhook"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "api_key": { "type": "string" },
+ "region": { "type": "string" }
+ },
+ "title": "datadog"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "url": { "type": "string" },
+ "username": { "type": "string", "nullable": true },
+ "password": { "type": "string", "nullable": true },
+ "headers": {
+ "type": "object",
+ "additionalProperties": { "type": "string" }
+ }
+ },
+ "title": "loki"
+ },
+ {
+ "type": "object",
+ "properties": { "dsn": { "type": "string" } },
+ "title": "sentry"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "domain": { "type": "string" },
+ "api_token": { "type": "string" },
+ "dataset_name": { "type": "string" }
+ },
+ "title": "axiom"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "host": { "type": "string" },
+ "port": { "type": "integer", "minimum": 0, "maximum": 65535 },
+ "tls": { "default": false, "type": "boolean" },
+ "structured_data": { "type": "string" },
+ "cipher_key": { "type": "string" },
+ "ca_cert": { "type": "string" },
+ "client_cert": { "type": "string" },
+ "client_key": { "type": "string" }
+ },
+ "title": "syslog"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "s3_bucket": { "type": "string" },
+ "storage_region": { "type": "string" },
+ "access_key_id": { "type": "string" },
+ "secret_access_key": { "type": "string" },
+ "batch_timeout": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ }
+ },
+ "title": "s3"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "region": { "type": "string" },
+ "username": { "type": "string" },
+ "password": { "type": "string" }
+ },
+ "title": "last9"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "endpoint": { "type": "string" },
+ "protocol": { "default": "http/protobuf", "type": "string" },
+ "gzip": { "default": true, "type": "boolean" },
+ "headers": {
+ "default": {},
+ "type": "object",
+ "additionalProperties": { "type": "string" }
+ }
+ },
+ "title": "otlp"
+ }
+ ]
+ },
+ "backend_type": {
+ "type": "string",
+ "enum": [
+ "postgres",
+ "bigquery",
+ "clickhouse",
+ "webhook",
+ "datadog",
+ "loki",
+ "sentry",
+ "s3",
+ "axiom",
+ "last9",
+ "otlp",
+ "syslog"
+ ]
+ }
+ },
+ "required": ["name", "config", "backend_type"]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ }
+ },
+ "required": ["data"]
+ },
+ "ErrorResponseBodyAPIErrorObject": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "code": { "type": "string" },
+ "message": { "type": "string" },
+ "description": { "type": "string" },
+ "links": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": { "type": "string" },
+ "rel": { "type": "string" },
+ "title": { "type": "string" },
+ "type": { "type": "string" },
+ "describedby": { "type": "string" },
+ "meta": { "type": "object", "additionalProperties": {} }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": { "type": "object", "additionalProperties": {} },
+ "issues": {
+ "type": "array",
+ "items": { "$ref": "#/components/schemas/ErrorResponseBodyAPIErrorObject" }
+ }
+ },
+ "required": ["code", "message"],
+ "ref": "APIErrorObject"
+ },
+ "ErrorResponseBody": {
+ "type": "object",
+ "properties": {
+ "error": { "$ref": "#/components/schemas/ErrorResponseBodyAPIErrorObject" }
+ },
+ "required": ["error"]
+ },
+ "CreateLogDrainRequestOpenApi": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "description": "Resource type.", "enum": ["log_drain"] },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": { "type": "string" },
+ "description": { "type": "string" },
+ "config": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "url": { "type": "string" },
+ "http": { "type": "string", "enum": ["http1", "http2"] },
+ "gzip": { "type": "boolean" },
+ "headers": {
+ "type": "object",
+ "additionalProperties": { "type": "string" }
+ }
+ },
"additionalProperties": false,
"title": "webhook"
},
@@ -16754,7 +14485,7 @@
]
}
},
- "required": ["backend_type"],
+ "required": ["name", "config", "backend_type"],
"additionalProperties": {}
}
},
@@ -16763,298 +14494,294 @@
},
"required": ["data"]
},
- "V2RunProjectAdvisorsBody": {
+ "LogDrainResponse_Output": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
- "type": {
- "type": "string",
- "description": "Resource type.",
- "enum": ["project_advisors"]
- },
+ "type": { "type": "string", "description": "Resource type.", "enum": ["log_drain"] },
+ "id": { "type": "string" },
"attributes": {
"type": "object",
"properties": {
- "lints": {
- "minItems": 1,
- "maxItems": 10,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "enum": [
- "unindexed_foreign_keys",
- "auth_users_exposed",
- "auth_rls_initplan",
- "no_primary_key",
- "unused_index",
- "multiple_permissive_policies",
- "policy_exists_rls_disabled",
- "rls_enabled_no_policy",
- "duplicate_index",
- "security_definer_view",
- "function_search_path_mutable",
- "rls_disabled_in_public",
- "extension_in_public",
- "rls_references_user_metadata",
- "materialized_view_in_api",
- "foreign_table_in_api",
- "unsupported_reg_types",
- "auth_otp_long_expiry",
- "auth_otp_short_length",
- "ssl_not_enforced",
- "log_connections_not_enabled",
- "network_restrictions_not_set",
- "password_requirements_min_length",
- "pitr_not_enabled",
- "auth_leaked_password_protection",
- "auth_insufficient_mfa_options",
- "auth_password_policy_missing",
- "leaked_service_key",
- "no_backup_admin",
- "vulnerable_postgres_version",
- "db_not_reachable",
- "db_connection_failing",
- "db_connection_limit_reached",
- "instance_telemetry_lost",
- "instance_db_down",
- "instance_alert_firing",
- "log_data_api_error_rate_high",
- "log_auth_error_rate_high",
- "log_storage_error_rate_high",
- "log_edge_function_error_rate_high"
- ]
- }
+ "name": { "type": "string" },
+ "description": { "type": "string" },
+ "config": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "url": { "type": "string" },
+ "http": { "type": "string", "enum": ["http1", "http2"] },
+ "gzip": { "type": "boolean" },
+ "headers": {
+ "type": "object",
+ "additionalProperties": { "type": "string" }
+ }
+ },
+ "title": "webhook"
},
- "required": ["name"],
- "additionalProperties": false
- }
+ {
+ "type": "object",
+ "properties": {
+ "api_key": { "type": "string" },
+ "region": { "type": "string" }
+ },
+ "title": "datadog"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "url": { "type": "string" },
+ "username": { "type": "string", "nullable": true },
+ "password": { "type": "string", "nullable": true },
+ "headers": {
+ "type": "object",
+ "additionalProperties": { "type": "string" }
+ }
+ },
+ "title": "loki"
+ },
+ {
+ "type": "object",
+ "properties": { "dsn": { "type": "string" } },
+ "title": "sentry"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "domain": { "type": "string" },
+ "api_token": { "type": "string" },
+ "dataset_name": { "type": "string" }
+ },
+ "title": "axiom"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "host": { "type": "string" },
+ "port": { "type": "integer", "minimum": 0, "maximum": 65535 },
+ "tls": { "default": false, "type": "boolean" },
+ "structured_data": { "type": "string" },
+ "cipher_key": { "type": "string" },
+ "ca_cert": { "type": "string" },
+ "client_cert": { "type": "string" },
+ "client_key": { "type": "string" }
+ },
+ "title": "syslog"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "s3_bucket": { "type": "string" },
+ "storage_region": { "type": "string" },
+ "access_key_id": { "type": "string" },
+ "secret_access_key": { "type": "string" },
+ "batch_timeout": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ }
+ },
+ "title": "s3"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "region": { "type": "string" },
+ "username": { "type": "string" },
+ "password": { "type": "string" }
+ },
+ "title": "last9"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "endpoint": { "type": "string" },
+ "protocol": { "default": "http/protobuf", "type": "string" },
+ "gzip": { "default": true, "type": "boolean" },
+ "headers": {
+ "default": {},
+ "type": "object",
+ "additionalProperties": { "type": "string" }
+ }
+ },
+ "title": "otlp"
+ }
+ ]
+ },
+ "backend_type": {
+ "type": "string",
+ "enum": [
+ "postgres",
+ "bigquery",
+ "clickhouse",
+ "webhook",
+ "datadog",
+ "loki",
+ "sentry",
+ "s3",
+ "axiom",
+ "last9",
+ "otlp",
+ "syslog"
+ ]
}
},
- "required": ["lints"],
- "additionalProperties": false
+ "required": ["name", "config", "backend_type"]
}
},
- "required": ["type", "attributes"],
- "additionalProperties": {}
+ "required": ["type", "id", "attributes"]
}
},
"required": ["data"]
},
- "V2ProjectAdvisorsResponse_Output": {
+ "UpdateLogDrainRequestOpenApi": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
- "type": {
- "type": "string",
- "description": "Resource type.",
- "enum": ["project_advisors"]
- },
+ "type": { "type": "string", "description": "Resource type.", "enum": ["log_drain"] },
"attributes": {
"type": "object",
"properties": {
- "lints": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "enum": [
- "unindexed_foreign_keys",
- "auth_users_exposed",
- "auth_rls_initplan",
- "no_primary_key",
- "unused_index",
- "multiple_permissive_policies",
- "policy_exists_rls_disabled",
- "rls_enabled_no_policy",
- "duplicate_index",
- "security_definer_view",
- "function_search_path_mutable",
- "rls_disabled_in_public",
- "extension_in_public",
- "rls_references_user_metadata",
- "materialized_view_in_api",
- "foreign_table_in_api",
- "unsupported_reg_types",
- "auth_otp_long_expiry",
- "auth_otp_short_length",
- "ssl_not_enforced",
- "log_connections_not_enabled",
- "network_restrictions_not_set",
- "password_requirements_min_length",
- "pitr_not_enabled",
- "auth_leaked_password_protection",
- "auth_insufficient_mfa_options",
- "auth_password_policy_missing",
- "leaked_service_key",
- "no_backup_admin",
- "vulnerable_postgres_version",
- "db_not_reachable",
- "db_connection_failing",
- "db_connection_limit_reached",
- "instance_telemetry_lost",
- "instance_db_down",
- "instance_alert_firing",
- "log_data_api_error_rate_high",
- "log_auth_error_rate_high",
- "log_storage_error_rate_high",
- "log_edge_function_error_rate_high",
- "project_not_active",
- "advisor_check_unavailable"
- ]
+ "name": { "type": "string" },
+ "description": { "type": "string" },
+ "config": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "url": { "type": "string" },
+ "http": { "type": "string", "enum": ["http1", "http2"] },
+ "gzip": { "type": "boolean" },
+ "headers": {
+ "type": "object",
+ "additionalProperties": { "type": "string" }
+ }
},
- "title": { "type": "string" },
- "level": { "type": "string", "enum": ["ERROR", "WARN", "INFO"] },
- "facing": { "type": "string", "enum": ["EXTERNAL"] },
- "categories": {
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["PERFORMANCE", "SECURITY", "HEALTH"]
- },
- "x-ignore-array-items-must-be-objects": true
+ "additionalProperties": false,
+ "title": "webhook"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "api_key": { "type": "string" },
+ "region": { "type": "string" }
},
- "description": { "type": "string" },
- "detail": { "type": "string" },
- "remediation": { "type": "string" },
- "metadata": {
- "type": "object",
- "properties": {
- "schema": { "type": "string" },
- "name": { "type": "string" },
- "entity": { "type": "string" },
- "type": {
- "type": "string",
- "enum": [
- "table",
- "view",
- "materialized view",
- "foreign table",
- "auth",
- "function",
- "extension",
- "compliance",
- "health"
- ]
- },
- "fkey_name": { "type": "string" },
- "fkey_columns": {
- "x-ignore-array-items-must-be-objects": true,
- "type": "array",
- "items": { "type": "number" }
- }
+ "additionalProperties": false,
+ "title": "datadog"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "url": { "type": "string" },
+ "username": { "type": "string", "nullable": true },
+ "password": { "type": "string", "nullable": true },
+ "headers": {
+ "type": "object",
+ "additionalProperties": { "type": "string" }
}
},
- "cache_key": { "type": "string" },
- "observed_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
- }
+ "additionalProperties": false,
+ "title": "loki"
},
- "required": [
- "name",
- "title",
- "level",
- "facing",
- "categories",
- "description",
- "detail",
- "remediation",
- "cache_key"
- ]
- }
- }
- },
- "required": ["lints"]
- }
- },
- "required": ["type", "attributes"]
- }
- },
- "required": ["data"]
- },
- "V2CreateBranchRequest": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": { "type": "string", "description": "Resource type.", "enum": ["branch"] },
- "attributes": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1,
- "description": "Name of the branch.",
- "example": "preview-login-page"
- },
- "git_branch": {
- "description": "Git branch to track. Must exist on the connected GitHub repository when the project has one.",
- "example": "feature/login-page",
- "type": "string",
- "minLength": 1
- },
- "region": {
- "description": "Region to create the branch in. Omit to inherit the region of the project it branches from.",
- "type": "string"
- },
- "persistent": {
- "description": "Whether the branch is kept when its git branch is deleted or its PR is merged.",
- "type": "boolean"
- },
- "with_data": {
- "description": "Whether to seed the branch from the project's latest physical backup.",
- "type": "boolean"
+ {
+ "type": "object",
+ "properties": { "dsn": { "type": "string" } },
+ "additionalProperties": false,
+ "title": "sentry"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "domain": { "type": "string" },
+ "api_token": { "type": "string" },
+ "dataset_name": { "type": "string" }
+ },
+ "additionalProperties": false,
+ "title": "axiom"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "host": { "type": "string" },
+ "port": { "type": "integer", "minimum": 0, "maximum": 65535 },
+ "tls": { "default": false, "type": "boolean" },
+ "structured_data": { "type": "string" },
+ "cipher_key": { "type": "string" },
+ "ca_cert": { "type": "string" },
+ "client_cert": { "type": "string" },
+ "client_key": { "type": "string" }
+ },
+ "additionalProperties": false,
+ "title": "syslog"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "s3_bucket": { "type": "string" },
+ "storage_region": { "type": "string" },
+ "access_key_id": { "type": "string" },
+ "secret_access_key": { "type": "string" },
+ "batch_timeout": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ }
+ },
+ "additionalProperties": false,
+ "title": "s3"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "region": { "type": "string" },
+ "username": { "type": "string" },
+ "password": { "type": "string" }
+ },
+ "additionalProperties": false,
+ "title": "last9"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "endpoint": { "type": "string" },
+ "protocol": { "default": "http/protobuf", "type": "string" },
+ "gzip": { "default": true, "type": "boolean" },
+ "headers": {
+ "default": {},
+ "type": "object",
+ "additionalProperties": { "type": "string" }
+ }
+ },
+ "additionalProperties": false,
+ "title": "otlp"
+ }
+ ]
},
- "desired_instance_size": {
- "description": "Desired instance size. Omit this field to always default to the smallest possible size.",
+ "backend_type": {
"type": "string",
"enum": [
- "nano",
- "micro",
- "small",
- "medium",
- "large",
- "xlarge",
- "2xlarge",
- "4xlarge",
- "8xlarge",
- "12xlarge",
- "16xlarge",
- "24xlarge",
- "24xlarge_optimized_memory",
- "24xlarge_optimized_cpu",
- "24xlarge_high_memory",
- "48xlarge",
- "48xlarge_optimized_memory",
- "48xlarge_optimized_cpu",
- "48xlarge_high_memory"
+ "postgres",
+ "bigquery",
+ "clickhouse",
+ "webhook",
+ "datadog",
+ "loki",
+ "sentry",
+ "s3",
+ "axiom",
+ "last9",
+ "otlp",
+ "syslog"
]
- },
- "desired_disk_size_gb": {
- "description": "Desired disk size in GB. Omit this field to default to the smallest disk size available on the plan.",
- "type": "integer",
- "minimum": 8,
- "maximum": 61440
- },
- "notify_url": {
- "description": "HTTP endpoint to receive branch status updates.",
- "example": "https://example.com/webhooks/branches",
- "type": "string",
- "format": "uri"
}
},
- "required": ["name"]
+ "required": ["backend_type"],
+ "additionalProperties": {}
}
},
"required": ["type", "attributes"]
@@ -17062,78 +14789,89 @@
},
"required": ["data"]
},
- "V2BranchResponse_Output": {
+ "V2RunProjectAdvisorsBody": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
- "type": { "type": "string", "description": "Resource type.", "enum": ["branch"] },
- "id": {
+ "type": {
"type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the branch."
+ "description": "Resource type.",
+ "enum": ["project_advisors"]
},
"attributes": {
"type": "object",
"properties": {
- "name": { "type": "string", "description": "Name of the branch." },
- "project_ref": {
- "type": "string",
- "description": "Ref of the project backing this branch."
- },
- "parent_project_ref": {
- "type": "string",
- "description": "Ref of the project it branches from."
- },
- "is_default": {
- "type": "boolean",
- "description": "Whether this is the default branch of the project."
- },
- "persistent": {
- "type": "boolean",
- "description": "Whether the branch is kept when its git branch is deleted or its PR is merged."
- },
- "with_data": {
- "type": "boolean",
- "description": "Whether the branch is seeded from the project's data."
- },
- "git_branch": { "description": "Git branch being tracked.", "type": "string" },
- "notify_url": {
- "description": "HTTP endpoint receiving branch status updates.",
- "type": "string",
- "format": "uri"
- },
- "created_at": {
- "type": "string",
- "format": "date-time",
- "description": "Creation timestamp."
- },
- "updated_at": {
- "type": "string",
- "format": "date-time",
- "description": "Last update timestamp."
- }
- },
- "required": [
- "name",
- "project_ref",
- "parent_project_ref",
- "is_default",
- "persistent",
- "with_data",
- "created_at",
- "updated_at"
- ]
+ "lints": {
+ "minItems": 1,
+ "maxItems": 10,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "enum": [
+ "unindexed_foreign_keys",
+ "auth_users_exposed",
+ "auth_rls_initplan",
+ "no_primary_key",
+ "unused_index",
+ "multiple_permissive_policies",
+ "policy_exists_rls_disabled",
+ "rls_enabled_no_policy",
+ "duplicate_index",
+ "security_definer_view",
+ "function_search_path_mutable",
+ "rls_disabled_in_public",
+ "extension_in_public",
+ "rls_references_user_metadata",
+ "materialized_view_in_api",
+ "foreign_table_in_api",
+ "unsupported_reg_types",
+ "auth_otp_long_expiry",
+ "auth_otp_short_length",
+ "ssl_not_enforced",
+ "log_connections_not_enabled",
+ "network_restrictions_not_set",
+ "password_requirements_min_length",
+ "pitr_not_enabled",
+ "auth_leaked_password_protection",
+ "auth_insufficient_mfa_options",
+ "auth_password_policy_missing",
+ "leaked_service_key",
+ "no_backup_admin",
+ "vulnerable_postgres_version",
+ "db_not_reachable",
+ "db_connection_failing",
+ "db_connection_limit_reached",
+ "instance_telemetry_lost",
+ "instance_db_down",
+ "instance_alert_firing",
+ "log_data_api_error_rate_high",
+ "log_auth_error_rate_high",
+ "log_storage_error_rate_high",
+ "log_edge_function_error_rate_high"
+ ]
+ }
+ },
+ "required": ["name"],
+ "additionalProperties": false
+ }
+ }
+ },
+ "required": ["lints"],
+ "additionalProperties": false
}
},
- "required": ["type", "id", "attributes"]
+ "required": ["type", "attributes"],
+ "additionalProperties": {}
}
},
"required": ["data"]
},
- "V2ProjectConfigResponse_Output": {
+ "V2ProjectAdvisorsResponse_Output": {
"type": "object",
"properties": {
"data": {
@@ -17142,100 +14880,388 @@
"type": {
"type": "string",
"description": "Resource type.",
- "enum": ["project_config"]
+ "enum": ["project_advisors"]
},
- "id": { "type": "string", "description": "Project ref." },
"attributes": {
"type": "object",
"properties": {
- "database": {
- "type": "object",
- "properties": {
- "major_version": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "The major Postgres version the database runs. `17` covers both Postgres 17 and Oriole on 17, since Oriole is a storage engine rather than a version."
- },
- "ssl_enforced": {
- "type": "boolean",
- "description": "Whether the database rejects plaintext connections"
- },
- "network_restrictions": {
- "type": "object",
- "properties": {
- "entitlement": { "type": "string", "enum": ["disallowed", "allowed"] },
- "status": {
+ "lints": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "enum": [
+ "unindexed_foreign_keys",
+ "auth_users_exposed",
+ "auth_rls_initplan",
+ "no_primary_key",
+ "unused_index",
+ "multiple_permissive_policies",
+ "policy_exists_rls_disabled",
+ "rls_enabled_no_policy",
+ "duplicate_index",
+ "security_definer_view",
+ "function_search_path_mutable",
+ "rls_disabled_in_public",
+ "extension_in_public",
+ "rls_references_user_metadata",
+ "materialized_view_in_api",
+ "foreign_table_in_api",
+ "unsupported_reg_types",
+ "auth_otp_long_expiry",
+ "auth_otp_short_length",
+ "ssl_not_enforced",
+ "log_connections_not_enabled",
+ "network_restrictions_not_set",
+ "password_requirements_min_length",
+ "pitr_not_enabled",
+ "auth_leaked_password_protection",
+ "auth_insufficient_mfa_options",
+ "auth_password_policy_missing",
+ "leaked_service_key",
+ "no_backup_admin",
+ "vulnerable_postgres_version",
+ "db_not_reachable",
+ "db_connection_failing",
+ "db_connection_limit_reached",
+ "instance_telemetry_lost",
+ "instance_db_down",
+ "instance_alert_firing",
+ "log_data_api_error_rate_high",
+ "log_auth_error_rate_high",
+ "log_storage_error_rate_high",
+ "log_edge_function_error_rate_high",
+ "project_not_active",
+ "advisor_check_unavailable"
+ ]
+ },
+ "title": { "type": "string" },
+ "level": { "type": "string", "enum": ["ERROR", "WARN", "INFO"] },
+ "facing": { "type": "string", "enum": ["EXTERNAL"] },
+ "categories": {
+ "type": "array",
+ "items": {
"type": "string",
- "enum": ["stored", "applied"],
- "description": "Whether the allowlist below is applied to the project or only stored."
+ "enum": ["PERFORMANCE", "SECURITY", "HEALTH"]
},
- "allowed_cidrs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "address": { "type": "string" },
- "type": { "type": "string", "enum": ["v4", "v6"] }
- },
- "required": ["address", "type"]
+ "x-ignore-array-items-must-be-objects": true
+ },
+ "description": { "type": "string" },
+ "detail": { "type": "string" },
+ "remediation": { "type": "string" },
+ "metadata": {
+ "type": "object",
+ "properties": {
+ "schema": { "type": "string" },
+ "name": { "type": "string" },
+ "entity": { "type": "string" },
+ "type": {
+ "type": "string",
+ "enum": [
+ "table",
+ "view",
+ "materialized view",
+ "foreign table",
+ "auth",
+ "function",
+ "extension",
+ "compliance",
+ "health"
+ ]
+ },
+ "fkey_name": { "type": "string" },
+ "fkey_columns": {
+ "x-ignore-array-items-must-be-objects": true,
+ "type": "array",
+ "items": { "type": "number" }
}
- },
- "updated_at": { "type": "string" },
- "applied_at": { "type": "string" }
+ }
},
- "required": ["entitlement", "status", "allowed_cidrs"]
+ "cache_key": { "type": "string" },
+ "observed_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
+ }
},
- "postgres_settings": {
- "type": "object",
- "properties": {
- "effective_cache_size": { "type": "string" },
- "logical_decoding_work_mem": { "type": "string" },
- "log_autovacuum_min_duration": {
- "type": "string",
- "description": "Default unit: ms",
- "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
- },
- "log_checkpoints": { "type": "boolean" },
- "log_connections": { "type": "boolean" },
- "log_disconnections": { "type": "boolean" },
- "log_duration": { "type": "boolean" },
- "log_lock_waits": { "type": "boolean" },
- "log_recovery_conflict_waits": { "type": "boolean" },
- "log_replication_commands": { "type": "boolean" },
- "log_startup_progress_interval": {
- "type": "string",
- "description": "Default unit: ms",
- "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
- },
- "log_temp_files": { "type": "string" },
- "maintenance_work_mem": { "type": "string" },
- "track_activity_query_size": { "type": "string" },
- "max_connections": { "type": "integer", "minimum": 1, "maximum": 262143 },
- "max_locks_per_transaction": {
- "type": "integer",
- "minimum": 10,
- "maximum": 2147483640
- },
- "max_logical_replication_workers": {
- "type": "integer",
- "minimum": 0,
- "maximum": 262143
- },
- "max_parallel_maintenance_workers": {
- "type": "integer",
- "minimum": 0,
- "maximum": 1024
- },
- "max_parallel_workers": {
- "type": "integer",
- "minimum": 0,
- "maximum": 1024
- },
- "max_parallel_workers_per_gather": {
- "type": "integer",
- "minimum": 0,
- "maximum": 1024
+ "required": [
+ "name",
+ "title",
+ "level",
+ "facing",
+ "categories",
+ "description",
+ "detail",
+ "remediation",
+ "cache_key"
+ ]
+ }
+ }
+ },
+ "required": ["lints"]
+ }
+ },
+ "required": ["type", "attributes"]
+ }
+ },
+ "required": ["data"]
+ },
+ "V2CreateBranchRequest": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "description": "Resource type.", "enum": ["branch"] },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "minLength": 1,
+ "description": "Name of the branch.",
+ "example": "preview-login-page"
+ },
+ "git_branch": {
+ "description": "Git branch to track. Must exist on the connected GitHub repository when the project has one.",
+ "example": "feature/login-page",
+ "type": "string",
+ "minLength": 1
+ },
+ "region": {
+ "description": "Region to create the branch in. Omit to inherit the region of the project it branches from.",
+ "type": "string"
+ },
+ "persistent": {
+ "description": "Whether the branch is kept when its git branch is deleted or its PR is merged.",
+ "type": "boolean"
+ },
+ "with_data": {
+ "description": "Whether to seed the branch from the project's latest physical backup.",
+ "type": "boolean"
+ },
+ "desired_instance_size": {
+ "description": "Desired instance size. Omit this field to always default to the smallest possible size.",
+ "type": "string",
+ "enum": [
+ "nano",
+ "micro",
+ "small",
+ "medium",
+ "large",
+ "xlarge",
+ "2xlarge",
+ "4xlarge",
+ "8xlarge",
+ "12xlarge",
+ "16xlarge",
+ "24xlarge",
+ "24xlarge_optimized_memory",
+ "24xlarge_optimized_cpu",
+ "24xlarge_high_memory",
+ "48xlarge",
+ "48xlarge_optimized_memory",
+ "48xlarge_optimized_cpu",
+ "48xlarge_high_memory"
+ ]
+ },
+ "desired_disk_size_gb": {
+ "description": "Desired disk size in GB. Omit this field to default to the smallest disk size available on the plan.",
+ "type": "integer",
+ "minimum": 8,
+ "maximum": 61440
+ },
+ "notify_url": {
+ "description": "HTTP endpoint to receive branch status updates.",
+ "example": "https://example.com/webhooks/branches",
+ "type": "string",
+ "format": "uri"
+ }
+ },
+ "required": ["name"]
+ }
+ },
+ "required": ["type", "attributes"]
+ }
+ },
+ "required": ["data"]
+ },
+ "V2BranchResponse_Output": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "description": "Resource type.", "enum": ["branch"] },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the branch."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": { "type": "string", "description": "Name of the branch." },
+ "project_ref": {
+ "type": "string",
+ "description": "Ref of the project backing this branch."
+ },
+ "parent_project_ref": {
+ "type": "string",
+ "description": "Ref of the project it branches from."
+ },
+ "is_default": {
+ "type": "boolean",
+ "description": "Whether this is the default branch of the project."
+ },
+ "persistent": {
+ "type": "boolean",
+ "description": "Whether the branch is kept when its git branch is deleted or its PR is merged."
+ },
+ "with_data": {
+ "type": "boolean",
+ "description": "Whether the branch is seeded from the project's data."
+ },
+ "git_branch": { "description": "Git branch being tracked.", "type": "string" },
+ "notify_url": {
+ "description": "HTTP endpoint receiving branch status updates.",
+ "type": "string",
+ "format": "uri"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Creation timestamp."
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Last update timestamp."
+ }
+ },
+ "required": [
+ "name",
+ "project_ref",
+ "parent_project_ref",
+ "is_default",
+ "persistent",
+ "with_data",
+ "created_at",
+ "updated_at"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "required": ["data"]
+ },
+ "V2ProjectConfigResponse_Output": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Resource type.",
+ "enum": ["project_config"]
+ },
+ "id": { "type": "string", "description": "Project ref." },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "database": {
+ "type": "object",
+ "properties": {
+ "major_version": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "The major Postgres version the database runs. `17` covers both Postgres 17 and Oriole on 17, since Oriole is a storage engine rather than a version."
+ },
+ "ssl_enforced": {
+ "type": "boolean",
+ "description": "Whether the database rejects plaintext connections"
+ },
+ "network_restrictions": {
+ "type": "object",
+ "properties": {
+ "entitlement": { "type": "string", "enum": ["disallowed", "allowed"] },
+ "status": {
+ "type": "string",
+ "enum": ["stored", "applied"],
+ "description": "Whether the allowlist below is applied to the project or only stored."
+ },
+ "allowed_cidrs": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "address": { "type": "string" },
+ "type": { "type": "string", "enum": ["v4", "v6"] }
+ },
+ "required": ["address", "type"]
+ }
+ },
+ "updated_at": { "type": "string" },
+ "applied_at": { "type": "string" }
+ },
+ "required": ["entitlement", "status", "allowed_cidrs"]
+ },
+ "postgres_settings": {
+ "type": "object",
+ "properties": {
+ "effective_cache_size": { "type": "string" },
+ "logical_decoding_work_mem": { "type": "string" },
+ "log_autovacuum_min_duration": {
+ "type": "string",
+ "description": "Default unit: ms",
+ "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
+ },
+ "log_checkpoints": { "type": "boolean" },
+ "log_connections": { "type": "boolean" },
+ "log_disconnections": { "type": "boolean" },
+ "log_duration": { "type": "boolean" },
+ "log_lock_waits": { "type": "boolean" },
+ "log_recovery_conflict_waits": { "type": "boolean" },
+ "log_replication_commands": { "type": "boolean" },
+ "log_startup_progress_interval": {
+ "type": "string",
+ "description": "Default unit: ms",
+ "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
+ },
+ "log_temp_files": { "type": "string" },
+ "maintenance_work_mem": { "type": "string" },
+ "track_activity_query_size": { "type": "string" },
+ "max_connections": { "type": "integer", "minimum": 1, "maximum": 262143 },
+ "max_locks_per_transaction": {
+ "type": "integer",
+ "minimum": 10,
+ "maximum": 2147483640
+ },
+ "max_logical_replication_workers": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 262143
+ },
+ "max_parallel_maintenance_workers": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 1024
+ },
+ "max_parallel_workers": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 1024
+ },
+ "max_parallel_workers_per_gather": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 1024
},
"max_replication_slots": {
"type": "integer",
@@ -17331,234 +15357,936 @@
"maximum": 9007199254740991,
"description": "Defaults to the pooler's size for the project's compute when not overridden."
},
- "max_client_conn": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "Defaults to the pooler's size for the project's compute when not overridden."
- }
+ "max_client_conn": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "Defaults to the pooler's size for the project's compute when not overridden."
+ }
+ },
+ "required": [
+ "pool_mode",
+ "ignore_startup_parameters",
+ "server_idle_timeout",
+ "server_lifetime",
+ "query_wait_timeout",
+ "reserve_pool_size",
+ "default_pool_size",
+ "max_client_conn"
+ ]
+ },
+ "auth": {
+ "type": "object",
+ "additionalProperties": {},
+ "description": "Effective Auth config, keyed by lowercased GoTrue setting name and resolved through the `gotrue_config` view, so a setting the project has never overridden is reported at its platform default. Secrets are returned as an HMAC of their value, never in plaintext."
+ },
+ "api": {
+ "type": "object",
+ "properties": {
+ "db_schema": {
+ "type": "string",
+ "description": "Schemas exposed through the Data API"
+ },
+ "db_extra_search_path": { "type": "string" },
+ "max_rows": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "db_pool_acquisition_timeout": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "db_pool": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "If `null`, no pool size is written to the project's PostgREST config and PostgREST's own default applies. The platform does not pick a value here.",
+ "nullable": true
+ }
+ },
+ "required": [
+ "db_schema",
+ "db_extra_search_path",
+ "max_rows",
+ "db_pool_acquisition_timeout",
+ "db_pool"
+ ]
+ },
+ "realtime": {
+ "type": "object",
+ "properties": {
+ "private_only": { "type": "boolean" },
+ "max_concurrent_users": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_events_per_second": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_bytes_per_second": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_channels_per_client": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_joins_per_second": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_presence_events_per_second": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_payload_size_in_kb": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "presence_enabled": { "type": "boolean" },
+ "suspend": { "type": "boolean" },
+ "connection_pool": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "Defaults to Realtime's pool size for the project's compute when not overridden."
+ },
+ "postgres_changes_pool": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "If `null`, no override is stored and Realtime applies its own default.",
+ "nullable": true
+ }
+ },
+ "required": [
+ "private_only",
+ "max_concurrent_users",
+ "max_events_per_second",
+ "max_bytes_per_second",
+ "max_channels_per_client",
+ "max_joins_per_second",
+ "max_presence_events_per_second",
+ "max_payload_size_in_kb",
+ "presence_enabled",
+ "suspend",
+ "connection_pool",
+ "postgres_changes_pool"
+ ]
+ },
+ "storage": {
+ "type": "object",
+ "properties": {
+ "file_size_limit": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "format": "int64"
+ },
+ "features": {
+ "type": "object",
+ "properties": {
+ "image_transformation": {
+ "type": "object",
+ "properties": { "enabled": { "type": "boolean" } },
+ "required": ["enabled"]
+ },
+ "s3_protocol": {
+ "type": "object",
+ "properties": { "enabled": { "type": "boolean" } },
+ "required": ["enabled"]
+ },
+ "purge_cache": {
+ "type": "object",
+ "properties": { "enabled": { "type": "boolean" } },
+ "required": ["enabled"]
+ },
+ "iceberg_catalog": {
+ "type": "object",
+ "properties": {
+ "enabled": { "type": "boolean" },
+ "max_namespaces": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_tables": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_catalogs": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ }
+ },
+ "required": ["enabled", "max_namespaces", "max_tables", "max_catalogs"]
+ },
+ "vector_buckets": {
+ "type": "object",
+ "properties": {
+ "enabled": { "type": "boolean" },
+ "max_buckets": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_indexes": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ }
+ },
+ "required": ["enabled", "max_buckets", "max_indexes"]
+ }
+ },
+ "required": [
+ "image_transformation",
+ "s3_protocol",
+ "purge_cache",
+ "iceberg_catalog",
+ "vector_buckets"
+ ]
+ },
+ "capabilities": {
+ "type": "object",
+ "properties": {
+ "list_v2": { "type": "boolean" },
+ "iceberg_catalog": { "type": "boolean" },
+ "object_versioning": { "type": "boolean" }
+ },
+ "required": ["list_v2", "iceberg_catalog", "object_versioning"]
+ },
+ "upstream_target": { "type": "string", "enum": ["main", "canary"] },
+ "migration_version": { "type": "string", "nullable": true }
+ },
+ "required": [
+ "file_size_limit",
+ "features",
+ "capabilities",
+ "upstream_target",
+ "migration_version"
+ ],
+ "description": "Read from the storage service's admin API rather than the middleware DB, so unlike the rest of this resource it reflects the tenant's live config."
+ }
+ },
+ "required": ["database", "pooler", "auth", "api", "realtime", "storage"]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "required": ["data"]
+ },
+ "V2ListNotebooksResponse_Output": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "description": "Resource type.", "enum": ["notebook"] },
+ "id": { "type": "string" },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": { "type": "string" },
+ "description": { "type": "string", "nullable": true },
+ "favorite": { "type": "boolean" },
+ "inserted_at": { "type": "string" },
+ "updated_at": { "type": "string" },
+ "owner": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "number" },
+ "username": { "type": "string" }
+ },
+ "required": ["id", "username"],
+ "description": "User who created the notebook.",
+ "nullable": true
},
- "required": [
- "pool_mode",
- "ignore_startup_parameters",
- "server_idle_timeout",
- "server_lifetime",
- "query_wait_timeout",
- "reserve_pool_size",
- "default_pool_size",
- "max_client_conn"
- ]
+ "updated_by": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "number" },
+ "username": { "type": "string" }
+ },
+ "required": ["id", "username"],
+ "description": "User who last wrote to the notebook.",
+ "nullable": true
+ }
},
- "auth": {
+ "required": [
+ "name",
+ "description",
+ "favorite",
+ "inserted_at",
+ "updated_at",
+ "owner",
+ "updated_by"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "links": {
+ "type": "object",
+ "properties": {
+ "first": {
+ "type": "string",
+ "description": "URL path to the first page if available.",
+ "example": "/v2/projects/{ref}/notebooks?page[size]=10",
+ "nullable": true
+ },
+ "prev": {
+ "type": "string",
+ "description": "URL path to the previous page.",
+ "example": "/v2/projects/{ref}/notebooks?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7",
+ "nullable": true
+ },
+ "next": {
+ "type": "string",
+ "description": "URL path to the next page.",
+ "example": "/v2/projects/{ref}/notebooks?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4",
+ "nullable": true
+ },
+ "last": {
+ "type": "string",
+ "description": "URL path to the last page if available.",
+ "example": "/v2/projects/{ref}/notebooks?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295",
+ "nullable": true
+ }
+ },
+ "required": ["prev", "next"]
+ }
+ },
+ "required": ["data", "links"]
+ },
+ "V2NotebookResponse_Output": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "description": "Resource type.", "enum": ["notebook"] },
+ "id": { "type": "string" },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": { "type": "string" },
+ "description": { "type": "string", "nullable": true },
+ "favorite": { "type": "boolean" },
+ "inserted_at": { "type": "string" },
+ "updated_at": { "type": "string" },
+ "owner": {
"type": "object",
- "additionalProperties": {},
- "description": "Effective Auth config, keyed by lowercased GoTrue setting name and resolved through the `gotrue_config` view, so a setting the project has never overridden is reported at its platform default. Secrets are returned as an HMAC of their value, never in plaintext."
+ "properties": { "id": { "type": "number" }, "username": { "type": "string" } },
+ "required": ["id", "username"],
+ "description": "User who created the notebook.",
+ "nullable": true
},
- "api": {
+ "updated_by": {
"type": "object",
- "properties": {
- "db_schema": {
- "type": "string",
- "description": "Schemas exposed through the Data API"
- },
- "db_extra_search_path": { "type": "string" },
- "max_rows": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "db_pool_acquisition_timeout": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "db_pool": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "If `null`, no pool size is written to the project's PostgREST config and PostgREST's own default applies. The platform does not pick a value here.",
- "nullable": true
- }
- },
- "required": [
- "db_schema",
- "db_extra_search_path",
- "max_rows",
- "db_pool_acquisition_timeout",
- "db_pool"
- ]
+ "properties": { "id": { "type": "number" }, "username": { "type": "string" } },
+ "required": ["id", "username"],
+ "description": "User who last wrote to the notebook.",
+ "nullable": true
},
- "realtime": {
+ "content": {
"type": "object",
"properties": {
- "private_only": { "type": "boolean" },
- "max_concurrent_users": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_events_per_second": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_bytes_per_second": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_channels_per_client": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_joins_per_second": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_presence_events_per_second": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_payload_size_in_kb": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "presence_enabled": { "type": "boolean" },
- "suspend": { "type": "boolean" },
- "connection_pool": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "Defaults to Realtime's pool size for the project's compute when not overridden."
- },
- "postgres_changes_pool": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "If `null`, no override is stored and Realtime applies its own default.",
- "nullable": true
+ "schema_version": { "type": "number" },
+ "cells": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "type": { "type": "string", "enum": ["markdown"] },
+ "text": { "type": "string" }
+ },
+ "required": ["id", "type", "text"]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "type": { "type": "string", "enum": ["database"] },
+ "sql": {
+ "type": "string",
+ "description": "SQL run against the project database."
+ },
+ "row_limit": {
+ "default": 100,
+ "type": "integer",
+ "exclusiveMinimum": true,
+ "maximum": 9007199254740991,
+ "minimum": 0
+ },
+ "database_identifier": {
+ "description": "Read replica to run against. Omit to use the primary database.",
+ "type": "string"
+ },
+ "title": { "type": "string" },
+ "view": { "type": "string", "enum": ["table", "chart"] },
+ "chart": {
+ "description": "Chart configuration, retained even while `view` is `table`.",
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["bar", "line"] },
+ "x_column": {
+ "type": "string",
+ "description": "Result column used for the x axis."
+ },
+ "y_series": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "column": {
+ "type": "string",
+ "description": "Result column plotted as a series."
+ }
+ },
+ "required": ["column"]
+ }
+ },
+ "scale": { "type": "string", "enum": ["linear", "log"] },
+ "cumulative": { "type": "boolean" },
+ "show_labels": { "type": "boolean" }
+ },
+ "required": [
+ "type",
+ "x_column",
+ "y_series",
+ "scale",
+ "cumulative",
+ "show_labels"
+ ]
+ }
+ },
+ "required": ["id", "type", "sql", "row_limit"]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "type": { "type": "string", "enum": ["log"] },
+ "sql": {
+ "type": "string",
+ "description": "SQL run against the project logs."
+ },
+ "time_range": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["absolute"] },
+ "start": {
+ "type": "string",
+ "description": "ISO 8601 start of the range."
+ },
+ "end": {
+ "type": "string",
+ "description": "ISO 8601 end of the range."
+ }
+ },
+ "required": ["type", "start", "end"]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["relative"] },
+ "unit": {
+ "type": "string",
+ "enum": ["minute", "hour", "day", "week", "month", "year"]
+ },
+ "amount": {
+ "type": "integer",
+ "exclusiveMinimum": true,
+ "maximum": 9007199254740991,
+ "minimum": 0
+ }
+ },
+ "required": ["type", "unit", "amount"]
+ }
+ ]
+ },
+ "title": { "type": "string" },
+ "view": { "type": "string", "enum": ["table", "chart"] },
+ "chart": {
+ "description": "Chart configuration, retained even while `view` is `table`.",
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["bar", "line"] },
+ "x_column": {
+ "type": "string",
+ "description": "Result column used for the x axis."
+ },
+ "y_series": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "column": {
+ "type": "string",
+ "description": "Result column plotted as a series."
+ }
+ },
+ "required": ["column"]
+ }
+ },
+ "scale": { "type": "string", "enum": ["linear", "log"] },
+ "cumulative": { "type": "boolean" },
+ "show_labels": { "type": "boolean" }
+ },
+ "required": [
+ "type",
+ "x_column",
+ "y_series",
+ "scale",
+ "cumulative",
+ "show_labels"
+ ]
+ }
+ },
+ "required": ["id", "type", "sql", "time_range"]
+ }
+ ]
+ }
+ }
+ },
+ "required": ["schema_version", "cells"]
+ }
+ },
+ "required": [
+ "name",
+ "description",
+ "favorite",
+ "inserted_at",
+ "updated_at",
+ "owner",
+ "updated_by",
+ "content"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "required": ["data"]
+ },
+ "V2CreateNotebookRequest": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "description": "Resource type.", "enum": ["notebook"] },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": { "type": "string", "minLength": 1, "maxLength": 255 },
+ "description": { "type": "string", "maxLength": 10000 },
+ "favorite": { "type": "boolean" },
+ "content": {
+ "type": "object",
+ "properties": {
+ "cells": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "type": { "type": "string", "enum": ["markdown"] },
+ "text": { "type": "string" }
+ },
+ "required": ["type", "text"],
+ "additionalProperties": {}
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "type": { "type": "string", "enum": ["database"] },
+ "sql": {
+ "type": "string",
+ "description": "SQL run against the project database."
+ },
+ "row_limit": {
+ "default": 100,
+ "type": "integer",
+ "exclusiveMinimum": true,
+ "maximum": 9007199254740991,
+ "minimum": 0
+ },
+ "database_identifier": {
+ "description": "Read replica to run against. Omit to use the primary database.",
+ "type": "string"
+ },
+ "title": { "type": "string" },
+ "view": { "type": "string", "enum": ["table", "chart"] },
+ "chart": {
+ "description": "Chart configuration, retained even while `view` is `table`.",
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["bar", "line"] },
+ "x_column": {
+ "type": "string",
+ "description": "Result column used for the x axis."
+ },
+ "y_series": {
+ "maxItems": 3,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "column": {
+ "type": "string",
+ "description": "Result column plotted as a series."
+ }
+ },
+ "required": ["column"],
+ "additionalProperties": {}
+ }
+ },
+ "scale": { "type": "string", "enum": ["linear", "log"] },
+ "cumulative": { "type": "boolean" },
+ "show_labels": { "type": "boolean" }
+ },
+ "required": [
+ "type",
+ "x_column",
+ "y_series",
+ "scale",
+ "cumulative",
+ "show_labels"
+ ],
+ "additionalProperties": {}
+ }
+ },
+ "required": ["type", "sql"],
+ "additionalProperties": {}
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "type": { "type": "string", "enum": ["log"] },
+ "sql": {
+ "type": "string",
+ "description": "SQL run against the project logs."
+ },
+ "time_range": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["absolute"] },
+ "start": {
+ "type": "string",
+ "description": "ISO 8601 start of the range."
+ },
+ "end": {
+ "type": "string",
+ "description": "ISO 8601 end of the range."
+ }
+ },
+ "required": ["type", "start", "end"],
+ "additionalProperties": {}
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["relative"] },
+ "unit": {
+ "type": "string",
+ "enum": ["minute", "hour", "day", "week", "month", "year"]
+ },
+ "amount": {
+ "type": "integer",
+ "exclusiveMinimum": true,
+ "maximum": 9007199254740991,
+ "minimum": 0
+ }
+ },
+ "required": ["type", "unit", "amount"],
+ "additionalProperties": {}
+ }
+ ]
+ },
+ "title": { "type": "string" },
+ "view": { "type": "string", "enum": ["table", "chart"] },
+ "chart": {
+ "description": "Chart configuration, retained even while `view` is `table`.",
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["bar", "line"] },
+ "x_column": {
+ "type": "string",
+ "description": "Result column used for the x axis."
+ },
+ "y_series": {
+ "maxItems": 3,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "column": {
+ "type": "string",
+ "description": "Result column plotted as a series."
+ }
+ },
+ "required": ["column"],
+ "additionalProperties": {}
+ }
+ },
+ "scale": { "type": "string", "enum": ["linear", "log"] },
+ "cumulative": { "type": "boolean" },
+ "show_labels": { "type": "boolean" }
+ },
+ "required": [
+ "type",
+ "x_column",
+ "y_series",
+ "scale",
+ "cumulative",
+ "show_labels"
+ ],
+ "additionalProperties": {}
+ }
+ },
+ "required": ["type", "sql", "time_range"],
+ "additionalProperties": {}
+ }
+ ]
+ }
}
},
- "required": [
- "private_only",
- "max_concurrent_users",
- "max_events_per_second",
- "max_bytes_per_second",
- "max_channels_per_client",
- "max_joins_per_second",
- "max_presence_events_per_second",
- "max_payload_size_in_kb",
- "presence_enabled",
- "suspend",
- "connection_pool",
- "postgres_changes_pool"
- ]
- },
- "storage": {
+ "required": ["cells"]
+ }
+ },
+ "required": ["name", "content"]
+ }
+ },
+ "required": ["type", "attributes"]
+ }
+ },
+ "required": ["data"]
+ },
+ "V2UpdateNotebookRequest": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "description": "Resource type.", "enum": ["notebook"] },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": { "type": "string", "minLength": 1, "maxLength": 255 },
+ "description": { "type": "string", "maxLength": 10000 },
+ "favorite": { "type": "boolean" },
+ "content": {
+ "description": "Replaces the notebook body. A cell keeps its identity by echoing back its `id`; a cell sent without an `id` is added as a new one.",
"type": "object",
"properties": {
- "file_size_limit": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "format": "int64"
- },
- "features": {
- "type": "object",
- "properties": {
- "image_transformation": {
- "type": "object",
- "properties": { "enabled": { "type": "boolean" } },
- "required": ["enabled"]
- },
- "s3_protocol": {
- "type": "object",
- "properties": { "enabled": { "type": "boolean" } },
- "required": ["enabled"]
- },
- "purge_cache": {
- "type": "object",
- "properties": { "enabled": { "type": "boolean" } },
- "required": ["enabled"]
- },
- "iceberg_catalog": {
- "type": "object",
- "properties": {
- "enabled": { "type": "boolean" },
- "max_namespaces": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_tables": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
+ "cells": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "type": { "type": "string", "enum": ["markdown"] },
+ "text": { "type": "string" }
},
- "max_catalogs": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- }
+ "required": ["type", "text"],
+ "additionalProperties": {}
},
- "required": ["enabled", "max_namespaces", "max_tables", "max_catalogs"]
- },
- "vector_buckets": {
- "type": "object",
- "properties": {
- "enabled": { "type": "boolean" },
- "max_buckets": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
+ {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "type": { "type": "string", "enum": ["database"] },
+ "sql": {
+ "type": "string",
+ "description": "SQL run against the project database."
+ },
+ "row_limit": {
+ "default": 100,
+ "type": "integer",
+ "exclusiveMinimum": true,
+ "maximum": 9007199254740991,
+ "minimum": 0
+ },
+ "database_identifier": {
+ "description": "Read replica to run against. Omit to use the primary database.",
+ "type": "string"
+ },
+ "title": { "type": "string" },
+ "view": { "type": "string", "enum": ["table", "chart"] },
+ "chart": {
+ "description": "Chart configuration, retained even while `view` is `table`.",
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["bar", "line"] },
+ "x_column": {
+ "type": "string",
+ "description": "Result column used for the x axis."
+ },
+ "y_series": {
+ "maxItems": 3,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "column": {
+ "type": "string",
+ "description": "Result column plotted as a series."
+ }
+ },
+ "required": ["column"],
+ "additionalProperties": {}
+ }
+ },
+ "scale": { "type": "string", "enum": ["linear", "log"] },
+ "cumulative": { "type": "boolean" },
+ "show_labels": { "type": "boolean" }
+ },
+ "required": [
+ "type",
+ "x_column",
+ "y_series",
+ "scale",
+ "cumulative",
+ "show_labels"
+ ],
+ "additionalProperties": {}
+ }
},
- "max_indexes": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- }
+ "required": ["type", "sql"],
+ "additionalProperties": {}
},
- "required": ["enabled", "max_buckets", "max_indexes"]
- }
- },
- "required": [
- "image_transformation",
- "s3_protocol",
- "purge_cache",
- "iceberg_catalog",
- "vector_buckets"
- ]
- },
- "capabilities": {
- "type": "object",
- "properties": {
- "list_v2": { "type": "boolean" },
- "iceberg_catalog": { "type": "boolean" },
- "object_versioning": { "type": "boolean" }
- },
- "required": ["list_v2", "iceberg_catalog", "object_versioning"]
- },
- "upstream_target": { "type": "string", "enum": ["main", "canary"] },
- "migration_version": { "type": "string", "nullable": true }
+ {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "type": { "type": "string", "enum": ["log"] },
+ "sql": {
+ "type": "string",
+ "description": "SQL run against the project logs."
+ },
+ "time_range": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["absolute"] },
+ "start": {
+ "type": "string",
+ "description": "ISO 8601 start of the range."
+ },
+ "end": {
+ "type": "string",
+ "description": "ISO 8601 end of the range."
+ }
+ },
+ "required": ["type", "start", "end"],
+ "additionalProperties": {}
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["relative"] },
+ "unit": {
+ "type": "string",
+ "enum": ["minute", "hour", "day", "week", "month", "year"]
+ },
+ "amount": {
+ "type": "integer",
+ "exclusiveMinimum": true,
+ "maximum": 9007199254740991,
+ "minimum": 0
+ }
+ },
+ "required": ["type", "unit", "amount"],
+ "additionalProperties": {}
+ }
+ ]
+ },
+ "title": { "type": "string" },
+ "view": { "type": "string", "enum": ["table", "chart"] },
+ "chart": {
+ "description": "Chart configuration, retained even while `view` is `table`.",
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["bar", "line"] },
+ "x_column": {
+ "type": "string",
+ "description": "Result column used for the x axis."
+ },
+ "y_series": {
+ "maxItems": 3,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "column": {
+ "type": "string",
+ "description": "Result column plotted as a series."
+ }
+ },
+ "required": ["column"],
+ "additionalProperties": {}
+ }
+ },
+ "scale": { "type": "string", "enum": ["linear", "log"] },
+ "cumulative": { "type": "boolean" },
+ "show_labels": { "type": "boolean" }
+ },
+ "required": [
+ "type",
+ "x_column",
+ "y_series",
+ "scale",
+ "cumulative",
+ "show_labels"
+ ],
+ "additionalProperties": {}
+ }
+ },
+ "required": ["type", "sql", "time_range"],
+ "additionalProperties": {}
+ }
+ ]
+ }
+ }
},
- "required": [
- "file_size_limit",
- "features",
- "capabilities",
- "upstream_target",
- "migration_version"
- ],
- "description": "Read from the storage service's admin API rather than the middleware DB, so unlike the rest of this resource it reflects the tenant's live config."
+ "required": ["cells"]
}
- },
- "required": ["database", "pooler", "auth", "api", "realtime", "storage"]
+ }
}
},
- "required": ["type", "id", "attributes"]
+ "required": ["type", "attributes"]
}
},
"required": ["data"]
@@ -17685,7 +16413,7 @@
"shared_at": {
"type": "string",
"format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending.",
"nullable": true
},
@@ -17698,6 +16426,10 @@
"type": "string",
"description": "Identifier of the database this PrivateLink share targets - the project ref for the primary, or the read replica identifier."
},
+ "custom_dns_name": {
+ "type": "string",
+ "description": "The custom DNS name configured on the AWS VPC Lattice resource configuration."
+ },
"resource_access_manager_resource_config_id": {
"description": "ID of the AWS VPC Lattice resource configuration backing this PrivateLink share.",
"type": "string"
@@ -17716,7 +16448,8 @@
"status",
"shared_at",
"database_type",
- "database_identifier"
+ "database_identifier",
+ "custom_dns_name"
]
}
},
@@ -17806,7 +16539,7 @@
"shared_at": {
"type": "string",
"format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending.",
"nullable": true
},
@@ -17819,6 +16552,10 @@
"type": "string",
"description": "Identifier of the database this PrivateLink share targets - the project ref for the primary, or the read replica identifier."
},
+ "custom_dns_name": {
+ "type": "string",
+ "description": "The custom DNS name configured on the AWS VPC Lattice resource configuration."
+ },
"resource_access_manager_resource_config_id": {
"description": "ID of the AWS VPC Lattice resource configuration backing this PrivateLink share.",
"type": "string"
@@ -17837,7 +16574,8 @@
"status",
"shared_at",
"database_type",
- "database_identifier"
+ "database_identifier",
+ "custom_dns_name"
]
}
},
@@ -17846,7 +16584,7 @@
},
"required": ["data"]
},
- "V2ListWorkersResponse_Output": {
+ "V2ListComputeInstancesResponse_Output": {
"type": "object",
"properties": {
"data": {
@@ -17857,9 +16595,13 @@
"type": {
"type": "string",
"description": "Resource type.",
- "enum": ["project_worker"]
+ "enum": ["project_compute_instance"]
+ },
+ "id": {
+ "type": "string",
+ "description": "Compute instance name.",
+ "example": "hello-world"
},
- "id": { "type": "string", "description": "Worker name.", "example": "hello-world" },
"attributes": {
"type": "object",
"properties": {
@@ -17920,7 +16662,7 @@
},
"required": ["data"]
},
- "V2WorkerResponse_Output": {
+ "V2ComputeInstanceResponse_Output": {
"type": "object",
"properties": {
"data": {
@@ -17929,9 +16671,13 @@
"type": {
"type": "string",
"description": "Resource type.",
- "enum": ["project_worker"]
+ "enum": ["project_compute_instance"]
+ },
+ "id": {
+ "type": "string",
+ "description": "Compute instance name.",
+ "example": "hello-world"
},
- "id": { "type": "string", "description": "Worker name.", "example": "hello-world" },
"attributes": {
"type": "object",
"properties": {
@@ -17991,7 +16737,7 @@
},
"required": ["data"]
},
- "V2WorkerUploadResponse_Output": {
+ "V2ComputeInstanceUploadResponse_Output": {
"type": "object",
"properties": {
"data": {
@@ -18000,7 +16746,7 @@
"type": {
"type": "string",
"description": "Resource type.",
- "enum": ["project_worker_upload"]
+ "enum": ["project_compute_instance_upload"]
},
"id": {
"type": "string",
@@ -18028,7 +16774,7 @@
},
"required": ["data"]
},
- "V2DeployWorkerRequest": {
+ "V2DeployComputeInstanceRequest": {
"type": "object",
"properties": {
"data": {
@@ -18037,7 +16783,7 @@
"type": {
"type": "string",
"description": "Resource type.",
- "enum": ["project_worker"]
+ "enum": ["project_compute_instance"]
},
"attributes": {
"type": "object",
@@ -18209,7 +16955,7 @@
"properties": {
"role": {
"type": "string",
- "enum": ["owner", "administrator", "developer", "read-only"],
+ "enum": ["owner", "administrator", "developer", "read-only", "no-access"],
"description": "Role name to assign. Must be one of: owner, administrator, developer, read-only. Must be on a Team or Enterprise plan to use the read-only role.",
"example": "developer"
},
@@ -18338,8 +17084,8 @@
},
"role": {
"type": "string",
- "enum": ["owner", "administrator", "developer", "read-only"],
- "description": "Role name to assign. Must be on a Team or Enterprise plan to use the read-only role.",
+ "enum": ["owner", "administrator", "developer", "read-only", "no-access"],
+ "description": "Role name to assign. Must be on an Enterprise plan to use the read-only or no-access roles. no-access grants no project visibility until project-scoped roles are assigned separately.",
"example": "developer"
},
"projects": {
diff --git a/apps/docs/spec/common-api-sections.json b/apps/docs/spec/common-api-sections.json
index 27e68b5ee4a..27487a7f2d5 100644
--- a/apps/docs/spec/common-api-sections.json
+++ b/apps/docs/spec/common-api-sections.json
@@ -234,6 +234,42 @@
}
]
},
+ {
+ "type": "category",
+ "title": "Compute",
+ "items": [
+ {
+ "id": "v2-create-compute-instance-upload",
+ "title": "Create compute instance upload",
+ "slug": "v2-create-compute-instance-upload",
+ "type": "operation"
+ },
+ {
+ "id": "v2-delete-a-compute-instance",
+ "title": "Delete a compute instance",
+ "slug": "v2-delete-a-compute-instance",
+ "type": "operation"
+ },
+ {
+ "id": "v2-deploy-a-compute-instance",
+ "title": "Deploy a compute instance",
+ "slug": "v2-deploy-a-compute-instance",
+ "type": "operation"
+ },
+ {
+ "id": "v2-get-a-compute-instance",
+ "title": "Get a compute instance",
+ "slug": "v2-get-a-compute-instance",
+ "type": "operation"
+ },
+ {
+ "id": "v2-list-all-compute-instances",
+ "title": "List all compute instances",
+ "slug": "v2-list-all-compute-instances",
+ "type": "operation"
+ }
+ ]
+ },
{
"type": "category",
"title": "Database",
@@ -749,63 +785,63 @@
"title": "Organization webhooks",
"items": [
{
- "id": "v2-organizations-slug-webhooks-deliveries-id-get",
- "title": "Organizations slug webhooks deliveries id get",
- "slug": "v2-organizations-slug-webhooks-deliveries-id-get",
+ "id": "v2-organizations-slug-webhooks-endpoints-post",
+ "title": "Create endpoint",
+ "slug": "v2-organizations-slug-webhooks-endpoints-post",
"type": "operation"
},
{
- "id": "v2-organizations-slug-webhooks-deliveries-id-retry-post",
- "title": "Organizations slug webhooks deliveries id retry post",
- "slug": "v2-organizations-slug-webhooks-deliveries-id-retry-post",
+ "id": "v2-organizations-slug-webhooks-endpoints-delete",
+ "title": "Delete all endpoints",
+ "slug": "v2-organizations-slug-webhooks-endpoints-delete",
"type": "operation"
},
{
- "id": "v2-organizations-slug-webhooks-endpoints-delete",
- "title": "Organizations slug webhooks endpoints delete",
- "slug": "v2-organizations-slug-webhooks-endpoints-delete",
+ "id": "v2-organizations-slug-webhooks-endpoints-id-delete",
+ "title": "Delete endpoint",
+ "slug": "v2-organizations-slug-webhooks-endpoints-id-delete",
"type": "operation"
},
{
- "id": "v2-organizations-slug-webhooks-endpoints-get",
- "title": "Organizations slug webhooks endpoints get",
- "slug": "v2-organizations-slug-webhooks-endpoints-get",
+ "id": "v2-organizations-slug-webhooks-deliveries-id-get",
+ "title": "Get delivery",
+ "slug": "v2-organizations-slug-webhooks-deliveries-id-get",
"type": "operation"
},
{
- "id": "v2-organizations-slug-webhooks-endpoints-id-delete",
- "title": "Organizations slug webhooks endpoints id delete",
- "slug": "v2-organizations-slug-webhooks-endpoints-id-delete",
+ "id": "v2-organizations-slug-webhooks-endpoints-id-get",
+ "title": "Get endpoint",
+ "slug": "v2-organizations-slug-webhooks-endpoints-id-get",
"type": "operation"
},
{
"id": "v2-organizations-slug-webhooks-endpoints-id-deliveries-get",
- "title": "Organizations slug webhooks endpoints id deliveries get",
+ "title": "List deliveries",
"slug": "v2-organizations-slug-webhooks-endpoints-id-deliveries-get",
"type": "operation"
},
{
- "id": "v2-organizations-slug-webhooks-endpoints-id-get",
- "title": "Organizations slug webhooks endpoints id get",
- "slug": "v2-organizations-slug-webhooks-endpoints-id-get",
+ "id": "v2-organizations-slug-webhooks-endpoints-get",
+ "title": "List endpoints",
+ "slug": "v2-organizations-slug-webhooks-endpoints-get",
"type": "operation"
},
{
- "id": "v2-organizations-slug-webhooks-endpoints-id-patch",
- "title": "Organizations slug webhooks endpoints id patch",
- "slug": "v2-organizations-slug-webhooks-endpoints-id-patch",
+ "id": "v2-organizations-slug-webhooks-deliveries-id-retry-post",
+ "title": "Retry delivery",
+ "slug": "v2-organizations-slug-webhooks-deliveries-id-retry-post",
"type": "operation"
},
{
"id": "v2-organizations-slug-webhooks-endpoints-id-test-post",
- "title": "Organizations slug webhooks endpoints id test post",
+ "title": "Send test event",
"slug": "v2-organizations-slug-webhooks-endpoints-id-test-post",
"type": "operation"
},
{
- "id": "v2-organizations-slug-webhooks-endpoints-post",
- "title": "Organizations slug webhooks endpoints post",
- "slug": "v2-organizations-slug-webhooks-endpoints-post",
+ "id": "v2-organizations-slug-webhooks-endpoints-id-patch",
+ "title": "Update endpoint",
+ "slug": "v2-organizations-slug-webhooks-endpoints-id-patch",
"type": "operation"
}
]
@@ -911,63 +947,63 @@
"title": "Project webhooks",
"items": [
{
- "id": "v2-projects-ref-webhooks-deliveries-id-get",
- "title": "Projects ref webhooks deliveries id get",
- "slug": "v2-projects-ref-webhooks-deliveries-id-get",
+ "id": "v2-projects-ref-webhooks-endpoints-post",
+ "title": "Create endpoint",
+ "slug": "v2-projects-ref-webhooks-endpoints-post",
"type": "operation"
},
{
- "id": "v2-projects-ref-webhooks-deliveries-id-retry-post",
- "title": "Projects ref webhooks deliveries id retry post",
- "slug": "v2-projects-ref-webhooks-deliveries-id-retry-post",
+ "id": "v2-projects-ref-webhooks-endpoints-delete",
+ "title": "Delete all endpoints",
+ "slug": "v2-projects-ref-webhooks-endpoints-delete",
"type": "operation"
},
{
- "id": "v2-projects-ref-webhooks-endpoints-delete",
- "title": "Projects ref webhooks endpoints delete",
- "slug": "v2-projects-ref-webhooks-endpoints-delete",
+ "id": "v2-projects-ref-webhooks-endpoints-id-delete",
+ "title": "Delete endpoint",
+ "slug": "v2-projects-ref-webhooks-endpoints-id-delete",
"type": "operation"
},
{
- "id": "v2-projects-ref-webhooks-endpoints-get",
- "title": "Projects ref webhooks endpoints get",
- "slug": "v2-projects-ref-webhooks-endpoints-get",
+ "id": "v2-projects-ref-webhooks-deliveries-id-get",
+ "title": "Get delivery",
+ "slug": "v2-projects-ref-webhooks-deliveries-id-get",
"type": "operation"
},
{
- "id": "v2-projects-ref-webhooks-endpoints-id-delete",
- "title": "Projects ref webhooks endpoints id delete",
- "slug": "v2-projects-ref-webhooks-endpoints-id-delete",
+ "id": "v2-projects-ref-webhooks-endpoints-id-get",
+ "title": "Get endpoint",
+ "slug": "v2-projects-ref-webhooks-endpoints-id-get",
"type": "operation"
},
{
"id": "v2-projects-ref-webhooks-endpoints-id-deliveries-get",
- "title": "Projects ref webhooks endpoints id deliveries get",
+ "title": "List deliveries",
"slug": "v2-projects-ref-webhooks-endpoints-id-deliveries-get",
"type": "operation"
},
{
- "id": "v2-projects-ref-webhooks-endpoints-id-get",
- "title": "Projects ref webhooks endpoints id get",
- "slug": "v2-projects-ref-webhooks-endpoints-id-get",
+ "id": "v2-projects-ref-webhooks-endpoints-get",
+ "title": "List endpoints",
+ "slug": "v2-projects-ref-webhooks-endpoints-get",
"type": "operation"
},
{
- "id": "v2-projects-ref-webhooks-endpoints-id-patch",
- "title": "Projects ref webhooks endpoints id patch",
- "slug": "v2-projects-ref-webhooks-endpoints-id-patch",
+ "id": "v2-projects-ref-webhooks-deliveries-id-retry-post",
+ "title": "Retry delivery",
+ "slug": "v2-projects-ref-webhooks-deliveries-id-retry-post",
"type": "operation"
},
{
"id": "v2-projects-ref-webhooks-endpoints-id-test-post",
- "title": "Projects ref webhooks endpoints id test post",
+ "title": "Send test event",
"slug": "v2-projects-ref-webhooks-endpoints-id-test-post",
"type": "operation"
},
{
- "id": "v2-projects-ref-webhooks-endpoints-post",
- "title": "Projects ref webhooks endpoints post",
- "slug": "v2-projects-ref-webhooks-endpoints-post",
+ "id": "v2-projects-ref-webhooks-endpoints-id-patch",
+ "title": "Update endpoint",
+ "slug": "v2-projects-ref-webhooks-endpoints-id-patch",
"type": "operation"
}
]
@@ -988,6 +1024,12 @@
"slug": "v1-create-a-project",
"type": "operation"
},
+ {
+ "id": "v2-create-notebook",
+ "title": "Create notebook",
+ "slug": "v2-create-notebook",
+ "type": "operation"
+ },
{
"id": "v2-create-private-link-association",
"title": "Create private link association",
@@ -1006,6 +1048,12 @@
"slug": "v1-delete-network-bans",
"type": "operation"
},
+ {
+ "id": "v2-delete-notebook",
+ "title": "Delete notebook",
+ "slug": "v2-delete-notebook",
+ "type": "operation"
+ },
{
"id": "v2-delete-private-link-association",
"title": "Delete private link association",
@@ -1048,6 +1096,12 @@
"slug": "v1-get-network-restrictions",
"type": "operation"
},
+ {
+ "id": "v2-get-notebook",
+ "title": "Get notebook",
+ "slug": "v2-get-notebook",
+ "type": "operation"
+ },
{
"id": "v1-get-postgres-upgrade-eligibility",
"title": "Get postgres upgrade eligibility",
@@ -1108,6 +1162,12 @@
"slug": "v1-list-available-restore-versions",
"type": "operation"
},
+ {
+ "id": "v2-list-notebooks",
+ "title": "List notebooks",
+ "slug": "v2-list-notebooks",
+ "type": "operation"
+ },
{
"id": "v2-list-private-link-associations",
"title": "List private link associations",
@@ -1168,6 +1228,12 @@
"slug": "v1-update-network-restrictions",
"type": "operation"
},
+ {
+ "id": "v2-update-notebook",
+ "title": "Update notebook",
+ "slug": "v2-update-notebook",
+ "type": "operation"
+ },
{
"id": "v1-upgrade-postgres-version",
"title": "Upgrade postgres version",
@@ -1319,41 +1385,5 @@
"type": "operation"
}
]
- },
- {
- "type": "category",
- "title": "Workers",
- "items": [
- {
- "id": "v2-create-worker-upload",
- "title": "Create worker upload",
- "slug": "v2-create-worker-upload",
- "type": "operation"
- },
- {
- "id": "v2-delete-a-worker",
- "title": "Delete a worker",
- "slug": "v2-delete-a-worker",
- "type": "operation"
- },
- {
- "id": "v2-deploy-a-worker",
- "title": "Deploy a worker",
- "slug": "v2-deploy-a-worker",
- "type": "operation"
- },
- {
- "id": "v2-get-a-worker",
- "title": "Get a worker",
- "slug": "v2-get-a-worker",
- "type": "operation"
- },
- {
- "id": "v2-list-all-workers",
- "title": "List all workers",
- "slug": "v2-list-all-workers",
- "type": "operation"
- }
- ]
}
]
diff --git a/apps/docs/spec/mcp_tools_permissions.json b/apps/docs/spec/mcp_tools_permissions.json
index 82b8c4dfef9..09ade5b3bee 100644
--- a/apps/docs/spec/mcp_tools_permissions.json
+++ b/apps/docs/spec/mcp_tools_permissions.json
@@ -26,6 +26,7 @@
"list_edge_functions": [["edge_functions_read"]],
"get_edge_function": [["edge_functions_read"]],
"deploy_edge_function": [["edge_functions_write"]],
+ "create_edge_function_secret": [["edge_functions_secrets_write", "edge_functions_secrets_read"]],
"get_storage_config": [["storage_config_read"]],
"update_storage_config": [["storage_config_write"]],
"list_storage_buckets": [["storage_read"]],
diff --git a/apps/docs/spec/transforms/api_v1_openapi_deparsed.json b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json
index e37476014c4..3b7fab9e590 100644
--- a/apps/docs/spec/transforms/api_v1_openapi_deparsed.json
+++ b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json
@@ -629,7 +629,7 @@
},
"/v1/branches/{branch_id_or_ref}/diff": {
"get": {
- "description": "Diffs the specified database branch",
+ "description": "Diffs the specified database branch\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-diff-a-branch",
"parameters": [
{
@@ -706,17 +706,22 @@
"bearer": []
}
],
- "summary": "[Beta] Diffs a database branch",
+ "summary": "Diffs a database branch",
"tags": ["Environments"],
"x-badges": [
{
"name": "OAuth scope: environment:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["dev-workflows"],
"x-fga-permissions": [["branching_development_write"], ["branching_production_write"]],
- "x-oauth-scope": "environment:write"
+ "x-oauth-scope": "environment:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects": {
@@ -819,6 +824,7 @@
},
"/v1/projects/available-regions": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-available-regions",
"parameters": [
{
@@ -890,16 +896,21 @@
"bearer": []
}
],
- "summary": "[Beta] Gets the list of available regions that can be used for a new project",
+ "summary": "Gets the list of available regions that can be used for a new project",
"tags": ["Projects"],
"x-badges": [
{
"name": "OAuth scope: organizations:read",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["infra"],
- "x-oauth-scope": "organizations:read"
+ "x-oauth-scope": "organizations:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/organizations": {
@@ -1001,6 +1012,7 @@
},
"/v1/oauth/authorize": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-authorize-user",
"parameters": [
{
@@ -1124,14 +1136,21 @@
"description": "Rate limit exceeded"
}
},
- "summary": "[Beta] Authorize user through oauth",
+ "summary": "Authorize user through oauth",
"tags": ["OAuth"],
- "x-endpoint-owners": ["auth", "control-plane"]
+ "x-badges": [
+ {
+ "name": "Beta",
+ "position": "before"
+ }
+ ],
+ "x-endpoint-owners": ["auth", "control-plane"],
+ "x-scalar-stability": "experimental"
}
},
"/v1/oauth/token": {
"post": {
- "description": "Supports `authorization_code`, `refresh_token`, and `urn:ietf:params:oauth:grant-type:jwt-bearer` grant types. The `jwt-bearer` grant type (IDJAG — identity-directed JWT assertion) is in beta and available on Team and Enterprise plans only.",
+ "description": "Supports `authorization_code`, `refresh_token`, and `urn:ietf:params:oauth:grant-type:jwt-bearer` grant types. The `jwt-bearer` grant type (IDJAG — identity-directed JWT assertion) is in beta and available on Team and Enterprise plans only.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-exchange-oauth-token",
"parameters": [],
"requestBody": {
@@ -1165,13 +1184,21 @@
"description": "Rate limit exceeded"
}
},
- "summary": "[Beta] Exchange auth code for user's access and refresh token",
+ "summary": "Exchange auth code for user's access and refresh token",
"tags": ["OAuth"],
- "x-endpoint-owners": ["auth", "control-plane"]
+ "x-badges": [
+ {
+ "name": "Beta",
+ "position": "before"
+ }
+ ],
+ "x-endpoint-owners": ["auth", "control-plane"],
+ "x-scalar-stability": "experimental"
}
},
"/v1/oauth/revoke": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-revoke-token",
"parameters": [],
"requestBody": {
@@ -1198,9 +1225,16 @@
"description": "Rate limit exceeded"
}
},
- "summary": "[Beta] Revoke oauth app authorization and it's corresponding tokens",
+ "summary": "Revoke oauth app authorization and it's corresponding tokens",
"tags": ["OAuth"],
- "x-endpoint-owners": ["auth", "control-plane"]
+ "x-badges": [
+ {
+ "name": "Beta",
+ "position": "before"
+ }
+ ],
+ "x-endpoint-owners": ["auth", "control-plane"],
+ "x-scalar-stability": "experimental"
}
},
"/v1/oauth/authorize/project-claim": {
@@ -2648,6 +2682,7 @@
},
"/v1/projects/{ref}/custom-hostname": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-hostname-config",
"parameters": [
{
@@ -2693,19 +2728,25 @@
"bearer": []
}
],
- "summary": "[Beta] Gets project's custom hostname config",
+ "summary": "Gets project's custom hostname config",
"tags": ["Domains"],
"x-badges": [
{
"name": "OAuth scope: domains:read",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["custom_domain_read"]],
- "x-oauth-scope": "domains:read"
+ "x-oauth-scope": "domains:read",
+ "x-scalar-stability": "experimental"
},
"delete": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-Delete hostname config",
"parameters": [
{
@@ -2753,21 +2794,27 @@
"bearer": []
}
],
- "summary": "[Beta] Deletes a project's custom hostname configuration",
+ "summary": "Deletes a project's custom hostname configuration",
"tags": ["Domains"],
"x-badges": [
{
"name": "OAuth scope: domains:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["custom_domain_write"]],
- "x-oauth-scope": "domains:write"
+ "x-oauth-scope": "domains:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/custom-hostname/initialize": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-update-hostname-config",
"parameters": [
{
@@ -2823,21 +2870,27 @@
"bearer": []
}
],
- "summary": "[Beta] Updates project's custom hostname configuration",
+ "summary": "Updates project's custom hostname configuration",
"tags": ["Domains"],
"x-badges": [
{
"name": "OAuth scope: domains:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["custom_domain_write"]],
- "x-oauth-scope": "domains:write"
+ "x-oauth-scope": "domains:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/custom-hostname/reverify": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-verify-dns-config",
"parameters": [
{
@@ -2883,21 +2936,27 @@
"bearer": []
}
],
- "summary": "[Beta] Attempts to verify the DNS configuration for project's custom hostname configuration",
+ "summary": "Attempts to verify the DNS configuration for project's custom hostname configuration",
"tags": ["Domains"],
"x-badges": [
{
"name": "OAuth scope: domains:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["custom_domain_write"]],
- "x-oauth-scope": "domains:write"
+ "x-oauth-scope": "domains:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/custom-hostname/activate": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-activate-custom-hostname",
"parameters": [
{
@@ -2943,21 +3002,27 @@
"bearer": []
}
],
- "summary": "[Beta] Activates a custom hostname for a project.",
+ "summary": "Activates a custom hostname for a project.",
"tags": ["Domains"],
"x-badges": [
{
"name": "OAuth scope: domains:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["custom_domain_write"]],
- "x-oauth-scope": "domains:write"
+ "x-oauth-scope": "domains:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/jit-access": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-jit-access-config",
"parameters": [
{
@@ -3037,19 +3102,25 @@
"bearer": []
}
],
- "summary": "[Beta] Get project's temporary access configuration.",
+ "summary": "Get project's temporary access configuration.",
"tags": ["Database"],
"x-badges": [
{
"name": "OAuth scope: database:read",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["security", "control-plane"],
"x-fga-permissions": [["project_admin_read"]],
- "x-oauth-scope": "database:read"
+ "x-oauth-scope": "database:read",
+ "x-scalar-stability": "experimental"
},
"put": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-update-jit-access-config",
"parameters": [
{
@@ -3139,21 +3210,27 @@
"bearer": []
}
],
- "summary": "[Beta] Update project's temporary access configuration.",
+ "summary": "Update project's temporary access configuration.",
"tags": ["Database"],
"x-badges": [
{
"name": "OAuth scope: database:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["security", "control-plane"],
"x-fga-permissions": [["project_admin_write"]],
- "x-oauth-scope": "database:write"
+ "x-oauth-scope": "database:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/network-bans/retrieve": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-list-all-network-bans",
"parameters": [
{
@@ -3199,21 +3276,27 @@
"bearer": []
}
],
- "summary": "[Beta] Gets project's network bans",
+ "summary": "Gets project's network bans",
"tags": ["Projects"],
"x-badges": [
{
"name": "OAuth scope: projects:read",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [["database_network_bans_read"]],
- "x-oauth-scope": "projects:read"
+ "x-oauth-scope": "projects:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/network-bans/retrieve/enriched": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-list-all-network-bans-enriched",
"parameters": [
{
@@ -3259,21 +3342,27 @@
"bearer": []
}
],
- "summary": "[Beta] Gets project's network bans with additional information about which databases they affect",
+ "summary": "Gets project's network bans with additional information about which databases they affect",
"tags": ["Projects"],
"x-badges": [
{
"name": "OAuth scope: projects:read",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [["database_network_bans_read"]],
- "x-oauth-scope": "projects:read"
+ "x-oauth-scope": "projects:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/network-bans": {
"delete": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-delete-network-bans",
"parameters": [
{
@@ -3322,21 +3411,27 @@
"bearer": []
}
],
- "summary": "[Beta] Remove network bans.",
+ "summary": "Remove network bans.",
"tags": ["Projects"],
"x-badges": [
{
"name": "OAuth scope: projects:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [["database_network_bans_write"]],
- "x-oauth-scope": "projects:write"
+ "x-oauth-scope": "projects:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/network-restrictions": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-network-restrictions",
"parameters": [
{
@@ -3382,19 +3477,25 @@
"bearer": []
}
],
- "summary": "[Beta] Gets project's network restrictions",
+ "summary": "Gets project's network restrictions",
"tags": ["Projects"],
"x-badges": [
{
"name": "OAuth scope: projects:read",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["database_network_restrictions_read"]],
- "x-oauth-scope": "projects:read"
+ "x-oauth-scope": "projects:read",
+ "x-scalar-stability": "experimental"
},
"patch": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Alpha** stage.",
"operationId": "v1-patch-network-restrictions",
"parameters": [
{
@@ -3450,21 +3551,27 @@
"bearer": []
}
],
- "summary": "[Alpha] Updates project's network restrictions by adding or removing CIDRs",
+ "summary": "Updates project's network restrictions by adding or removing CIDRs",
"tags": ["Projects"],
"x-badges": [
{
"name": "OAuth scope: projects:write",
"position": "after"
+ },
+ {
+ "name": "Alpha",
+ "position": "before"
}
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["database_network_restrictions_write"]],
- "x-oauth-scope": "projects:write"
+ "x-oauth-scope": "projects:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/network-restrictions/apply": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-update-network-restrictions",
"parameters": [
{
@@ -3520,21 +3627,27 @@
"bearer": []
}
],
- "summary": "[Beta] Updates project's network restrictions",
+ "summary": "Updates project's network restrictions",
"tags": ["Projects"],
"x-badges": [
{
"name": "OAuth scope: projects:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["database_network_restrictions_write"]],
- "x-oauth-scope": "projects:write"
+ "x-oauth-scope": "projects:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/pgsodium": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-pgsodium-config",
"parameters": [
{
@@ -3580,19 +3693,25 @@
"bearer": []
}
],
- "summary": "[Beta] Gets project's pgsodium config",
+ "summary": "Gets project's pgsodium config",
"tags": ["Secrets"],
"x-badges": [
{
"name": "OAuth scope: secrets:read",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["infra"],
"x-fga-permissions": [["project_admin_write"]],
- "x-oauth-scope": "secrets:read"
+ "x-oauth-scope": "secrets:read",
+ "x-scalar-stability": "experimental"
},
"put": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-update-pgsodium-config",
"parameters": [
{
@@ -3648,17 +3767,22 @@
"bearer": []
}
],
- "summary": "[Beta] Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.",
+ "summary": "Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.",
"tags": ["Secrets"],
"x-badges": [
{
"name": "OAuth scope: secrets:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["infra"],
"x-fga-permissions": [["project_admin_write"]],
- "x-oauth-scope": "secrets:write"
+ "x-oauth-scope": "secrets:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/postgrest": {
@@ -4165,6 +4289,7 @@
},
"/v1/projects/{ref}/ssl-enforcement": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-ssl-enforcement-config",
"parameters": [
{
@@ -4210,19 +4335,25 @@
"bearer": []
}
],
- "summary": "[Beta] Get project's SSL enforcement configuration.",
+ "summary": "Get project's SSL enforcement configuration.",
"tags": ["Database"],
"x-badges": [
{
"name": "OAuth scope: database:read",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["database_ssl_config_read"]],
- "x-oauth-scope": "database:read"
+ "x-oauth-scope": "database:read",
+ "x-scalar-stability": "experimental"
},
"put": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-update-ssl-enforcement-config",
"parameters": [
{
@@ -4278,17 +4409,22 @@
"bearer": []
}
],
- "summary": "[Beta] Update project's SSL enforcement configuration.",
+ "summary": "Update project's SSL enforcement configuration.",
"tags": ["Database"],
"x-badges": [
{
"name": "OAuth scope: database:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["database_ssl_config_write"]],
- "x-oauth-scope": "database:write"
+ "x-oauth-scope": "database:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/types/typescript": {
@@ -4364,6 +4500,7 @@
},
"/v1/projects/{ref}/vanity-subdomain": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-vanity-subdomain-config",
"parameters": [
{
@@ -4419,7 +4556,7 @@
"bearer": []
}
],
- "summary": "[Beta] Gets current vanity subdomain config",
+ "summary": "Gets current vanity subdomain config",
"tags": ["Domains"],
"x-allowed-plans": ["Pro", "Team", "Enterprise"],
"x-badges": [
@@ -4427,6 +4564,10 @@
"name": "OAuth scope: domains:read",
"position": "after"
},
+ {
+ "name": "Beta",
+ "position": "before"
+ },
{
"name": "Only available on Pro, Team, Enterprise",
"position": "before"
@@ -4434,9 +4575,11 @@
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["vanity_subdomain_read"]],
- "x-oauth-scope": "domains:read"
+ "x-oauth-scope": "domains:read",
+ "x-scalar-stability": "experimental"
},
"delete": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-deactivate-vanity-subdomain-config",
"parameters": [
{
@@ -4475,21 +4618,27 @@
"bearer": []
}
],
- "summary": "[Beta] Deletes a project's vanity subdomain configuration",
+ "summary": "Deletes a project's vanity subdomain configuration",
"tags": ["Domains"],
"x-badges": [
{
"name": "OAuth scope: domains:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["vanity_subdomain_write"]],
- "x-oauth-scope": "domains:write"
+ "x-oauth-scope": "domains:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/vanity-subdomain/check-availability": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-check-vanity-subdomain-availability",
"parameters": [
{
@@ -4555,7 +4704,7 @@
"bearer": []
}
],
- "summary": "[Beta] Checks vanity subdomain availability",
+ "summary": "Checks vanity subdomain availability",
"tags": ["Domains"],
"x-allowed-plans": ["Pro", "Team", "Enterprise"],
"x-badges": [
@@ -4563,6 +4712,10 @@
"name": "OAuth scope: domains:write",
"position": "after"
},
+ {
+ "name": "Beta",
+ "position": "before"
+ },
{
"name": "Only available on Pro, Team, Enterprise",
"position": "before"
@@ -4570,11 +4723,13 @@
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["vanity_subdomain_write"]],
- "x-oauth-scope": "domains:write"
+ "x-oauth-scope": "domains:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/vanity-subdomain/activate": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-activate-vanity-subdomain-config",
"parameters": [
{
@@ -4640,7 +4795,7 @@
"bearer": []
}
],
- "summary": "[Beta] Activates a vanity subdomain for a project.",
+ "summary": "Activates a vanity subdomain for a project.",
"tags": ["Domains"],
"x-allowed-plans": ["Pro", "Team", "Enterprise"],
"x-badges": [
@@ -4648,6 +4803,10 @@
"name": "OAuth scope: domains:write",
"position": "after"
},
+ {
+ "name": "Beta",
+ "position": "before"
+ },
{
"name": "Only available on Pro, Team, Enterprise",
"position": "before"
@@ -4655,11 +4814,13 @@
],
"x-endpoint-owners": ["infra", "control-plane"],
"x-fga-permissions": [["vanity_subdomain_write"]],
- "x-oauth-scope": "domains:write"
+ "x-oauth-scope": "domains:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/upgrade": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-upgrade-postgres-version",
"parameters": [
{
@@ -4715,21 +4876,27 @@
"bearer": []
}
],
- "summary": "[Beta] Upgrades the project's Postgres version",
+ "summary": "Upgrades the project's Postgres version",
"tags": ["Projects"],
"x-badges": [
{
"name": "OAuth scope: projects:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [["project_admin_write", "database_write"]],
- "x-oauth-scope": "projects:write"
+ "x-oauth-scope": "projects:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/upgrade/eligibility": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-postgres-upgrade-eligibility",
"parameters": [
{
@@ -4775,21 +4942,27 @@
"bearer": []
}
],
- "summary": "[Beta] Returns the project's eligibility for upgrades",
+ "summary": "Returns the project's eligibility for upgrades",
"tags": ["Projects"],
"x-badges": [
{
"name": "OAuth scope: projects:read",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [["project_admin_read", "database_read"]],
- "x-oauth-scope": "projects:read"
+ "x-oauth-scope": "projects:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/upgrade/status": {
"get": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-get-postgres-upgrade-status",
"parameters": [
{
@@ -4844,17 +5017,22 @@
"bearer": []
}
],
- "summary": "[Beta] Gets the latest status of the project's upgrade",
+ "summary": "Gets the latest status of the project's upgrade",
"tags": ["Projects"],
"x-badges": [
{
"name": "OAuth scope: projects:read",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [["project_admin_read", "database_read"]],
- "x-oauth-scope": "projects:read"
+ "x-oauth-scope": "projects:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/readonly": {
@@ -4972,6 +5150,7 @@
},
"/v1/projects/{ref}/read-replicas/setup": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-setup-a-read-replica",
"parameters": [
{
@@ -5030,21 +5209,27 @@
"bearer": []
}
],
- "summary": "[Beta] Set up a read replica",
+ "summary": "Set up a read replica",
"tags": ["Database"],
"x-allowed-plans": ["Pro", "Team", "Enterprise"],
"x-badges": [
+ {
+ "name": "Beta",
+ "position": "before"
+ },
{
"name": "Only available on Pro, Team, Enterprise",
"position": "before"
}
],
"x-endpoint-owners": ["control-plane", "infra"],
- "x-fga-permissions": [["infra_read_replicas_write"]]
+ "x-fga-permissions": [["infra_read_replicas_write"]],
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/read-replicas/remove": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-remove-a-read-replica",
"parameters": [
{
@@ -5093,10 +5278,17 @@
"bearer": []
}
],
- "summary": "[Beta] Remove a read replica",
+ "summary": "Remove a read replica",
"tags": ["Database"],
+ "x-badges": [
+ {
+ "name": "Beta",
+ "position": "before"
+ }
+ ],
"x-endpoint-owners": ["control-plane", "infra"],
- "x-fga-permissions": [["infra_read_replicas_write"]]
+ "x-fga-permissions": [["infra_read_replicas_write"]],
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/health": {
@@ -6631,7 +6823,6 @@
},
"/v1/projects/{ref}/advisors/performance": {
"get": {
- "deprecated": true,
"description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.",
"operationId": "v1-get-performance-advisors",
"parameters": [
@@ -6685,12 +6876,12 @@
],
"x-endpoint-owners": ["control-plane"],
"x-fga-permissions": [["advisors_read"]],
- "x-oauth-scope": "database:read"
+ "x-oauth-scope": "database:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/advisors/security": {
"get": {
- "deprecated": true,
"description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.",
"operationId": "v1-get-security-advisors",
"parameters": [
@@ -6754,13 +6945,14 @@
],
"x-endpoint-owners": ["control-plane"],
"x-fga-permissions": [["advisors_read"]],
- "x-oauth-scope": "database:read"
+ "x-oauth-scope": "database:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/analytics/endpoints/logs.all": {
"get": {
"deprecated": true,
- "description": "Executes a SQL query on the project's logs.\n\nEither the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided.\nIf both are not provided, only the last 1 minute of logs will be queried.\nThe timestamp range must be no more than 24 hours and is rounded to the nearest minute. If the range is more than 24 hours, a validation error will be thrown.\n\nNote: Unless the `sql` parameter is provided, only edge_logs will be queried. See the [log query docs](https://supabase.com/docs/guides/monitoring-and-debugging/logs#logs-explorer) for all available sources.\n",
+ "description": "This endpoint has been removed and always responds with `410 Gone`. Use `GET /v1/projects/{ref}/analytics/endpoints/logs` instead. See the [migration guide](https://supabase.com/changelog/48235-migration-of-supabase-management-api-logs-all-analytics-endpoint-to-logs-endpoint).",
"operationId": "v1-get-project-logs-all",
"parameters": [
{
@@ -6775,60 +6967,18 @@
"example": "abcdefghijklmnopqrst",
"type": "string"
}
- },
- {
- "name": "sql",
- "required": false,
- "in": "query",
- "description": "Custom SQL query to execute on the logs. See [querying logs](https://supabase.com/docs/guides/monitoring-and-debugging/logs#querying-with-the-logs-explorer) for more details.",
- "schema": {
- "example": "select event_message from edge_logs limit 10",
- "type": "string"
- }
- },
- {
- "name": "iso_timestamp_start",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "example": "2025-03-01T00:00:00Z",
- "type": "string"
- }
- },
- {
- "name": "iso_timestamp_end",
- "required": false,
- "in": "query",
- "schema": {
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "example": "2025-03-01T23:59:59Z",
- "type": "string"
- }
}
],
"responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/AnalyticsResponse_Output"
- }
- }
- }
- },
"401": {
"description": "Unauthorized"
},
- "402": {
- "description": "Usage exceeded. Enable additional usage to continue querying"
- },
"403": {
"description": "Forbidden action"
},
+ "410": {
+ "description": "This endpoint has been removed"
+ },
"429": {
"description": "Rate limit exceeded"
}
@@ -7204,6 +7354,7 @@
},
"/v1/projects/{ref}/cli/login-role": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-create-login-role",
"parameters": [
{
@@ -7259,19 +7410,25 @@
"bearer": []
}
],
- "summary": "[Beta] Create a login role for CLI with temporary password",
+ "summary": "Create a login role for CLI with temporary password",
"tags": ["Database"],
"x-badges": [
{
"name": "OAuth scope: database:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["dev-workflows"],
"x-fga-permissions": [["database_write"]],
- "x-oauth-scope": "database:write"
+ "x-oauth-scope": "database:write",
+ "x-scalar-stability": "experimental"
},
"delete": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-delete-login-roles",
"parameters": [
{
@@ -7317,17 +7474,22 @@
"bearer": []
}
],
- "summary": "[Beta] Delete existing login roles used by CLI",
+ "summary": "Delete existing login roles used by CLI",
"tags": ["Database"],
"x-badges": [
{
"name": "OAuth scope: database:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["dev-workflows"],
"x-fga-permissions": [["database_write"]],
- "x-oauth-scope": "database:write"
+ "x-oauth-scope": "database:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/database/migrations": {
@@ -7735,6 +7897,7 @@
},
"/v1/projects/{ref}/database/query": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-run-a-query",
"parameters": [
{
@@ -7783,22 +7946,27 @@
"bearer": []
}
],
- "summary": "[Beta] Run sql query",
+ "summary": "Run sql query",
"tags": ["Database"],
"x-badges": [
{
"name": "OAuth scope: database:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["control-plane"],
"x-fga-permissions": [["database_read"], ["database_write"]],
- "x-oauth-scope": "database:write"
+ "x-oauth-scope": "database:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/database/query/read-only": {
"post": {
- "description": "All entity references must be schema qualified.",
+ "description": "All entity references must be schema qualified.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-read-only-query",
"parameters": [
{
@@ -7847,21 +8015,27 @@
"bearer": []
}
],
- "summary": "[Beta] Run a sql query as supabase_read_only_user",
+ "summary": "Run a sql query as supabase_read_only_user",
"tags": ["Database"],
"x-badges": [
{
"name": "OAuth scope: database:read",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["control-plane"],
"x-fga-permissions": [["database_read"]],
- "x-oauth-scope": "database:read"
+ "x-oauth-scope": "database:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/database/webhooks/enable": {
"post": {
+ "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.\n\nThis endpoint is currently in its **Beta** stage.",
"operationId": "v1-enable-database-webhook",
"parameters": [
{
@@ -7900,22 +8074,26 @@
"bearer": []
}
],
- "summary": "[Beta] Enables Database Webhooks on the project",
+ "summary": "Enables Database Webhooks on the project",
"tags": ["Database"],
"x-badges": [
{
"name": "OAuth scope: database:write",
"position": "after"
+ },
+ {
+ "name": "Beta",
+ "position": "before"
}
],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [["database_webhooks_config_write"]],
- "x-oauth-scope": "database:write"
+ "x-oauth-scope": "database:write",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/database/context": {
"get": {
- "deprecated": true,
"description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.",
"operationId": "v1-get-database-metadata",
"parameters": [
@@ -7969,7 +8147,8 @@
],
"x-endpoint-owners": ["control-plane"],
"x-fga-permissions": [["database_read"]],
- "x-oauth-scope": "projects:read"
+ "x-oauth-scope": "projects:read",
+ "x-scalar-stability": "experimental"
}
},
"/v1/projects/{ref}/database/password": {
@@ -12549,7 +12728,7 @@
"type": "string"
}
},
- "required": ["schema_version", "sql"]
+ "required": ["sql"]
}
},
"required": [
@@ -17938,6 +18117,9 @@
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
+ "act": {
+ "type": "string"
+ },
"user_role": {
"type": "object",
"properties": {
@@ -17987,7 +18169,7 @@
"required": ["role"]
}
},
- "required": ["user_id", "user_role"]
+ "required": ["user_role"]
},
"JitListAccessResponse_Output": {
"type": "object",
@@ -19675,7 +19857,7 @@
"max_concurrent_users": {
"type": "integer",
"minimum": 1,
- "maximum": 50000,
+ "maximum": 300000,
"description": "Sets maximum number of concurrent users rate limit",
"nullable": true
},
@@ -19729,6 +19911,13 @@
"presence_enabled": {
"type": "boolean",
"description": "Whether to enable presence"
+ },
+ "admin_suspended_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
+ "description": "If set, the Realtime service has been suspended by an admin.",
+ "nullable": true
}
},
"required": [
@@ -19743,7 +19932,8 @@
"max_presence_events_per_second",
"max_payload_size_in_kb",
"suspend",
- "presence_enabled"
+ "presence_enabled",
+ "admin_suspended_at"
]
},
"UpdateRealtimeConfigBody": {
@@ -19768,7 +19958,7 @@
"max_concurrent_users": {
"type": "integer",
"minimum": 1,
- "maximum": 50000,
+ "maximum": 300000,
"description": "Sets maximum number of concurrent users rate limit"
},
"max_events_per_second": {
diff --git a/apps/docs/spec/transforms/api_v2_openapi_deparsed.json b/apps/docs/spec/transforms/api_v2_openapi_deparsed.json
index dfd94d40453..d22e27c0f8d 100644
--- a/apps/docs/spec/transforms/api_v2_openapi_deparsed.json
+++ b/apps/docs/spec/transforms/api_v2_openapi_deparsed.json
@@ -609,7 +609,7 @@
},
"/v2/projects/{ref}/config": {
"get": {
- "description": "Returns the project's database, pooler, Auth, Data API, Realtime and Storage configuration — the same configuration a branch inherits from its base project. Each is the effective config, so a setting the project has never overridden is reported at its platform default rather than as null. Auth secrets are returned as an HMAC of their value. `storage` is read live from the storage service; the rest come from this platform's own records.",
+ "description": "Returns the project's database, pooler, Auth, Data API, Realtime and Storage configuration — the same configuration a branch inherits from its base project. Each is the effective config, so a setting the project has never overridden is reported at its platform default rather than as null. Auth secrets are returned as an HMAC of their value. `storage` is read live from the storage service; the rest come from this platform's own records.\n\nThis endpoint is currently in its **Alpha** stage.",
"operationId": "v2-get-project-config",
"parameters": [
{
@@ -673,8 +673,14 @@
"bearer": []
}
],
- "summary": "[Alpha] Get a project's service configuration",
+ "summary": "Get a project's service configuration",
"tags": ["Projects"],
+ "x-badges": [
+ {
+ "name": "Alpha",
+ "position": "before"
+ }
+ ],
"x-endpoint-owners": ["control-plane", "infra"],
"x-fga-permissions": [
[
@@ -687,12 +693,14 @@
"realtime_config_read",
"storage_config_read"
]
- ]
+ ],
+ "x-scalar-stability": "experimental"
}
},
- "/v2/projects/{ref}/transfers/previews": {
- "post": {
- "operationId": "v2-preview-a-project-transfer",
+ "/v2/projects/{ref}/notebooks": {
+ "get": {
+ "description": "Returns a cursor-paginated list of the project notebooks. Notebook bodies are omitted — read a single notebook to get its cells.",
+ "operationId": "v2-list-notebooks",
"parameters": [
{
"name": "ref",
@@ -706,25 +714,63 @@
"example": "abcdefghijklmnopqrst",
"type": "string"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/V2TransferProjectBody"
- }
+ },
+ {
+ "name": "page",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "properties": {
+ "size": {
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 100
+ },
+ "after": {
+ "type": "string",
+ "minLength": 1
+ },
+ "before": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "type": "object"
+ },
+ "style": "deepObject"
+ },
+ {
+ "name": "filter",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "properties": {
+ "name": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "type": "object"
+ },
+ "style": "deepObject"
+ },
+ {
+ "name": "sort",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "string",
+ "enum": ["name", "-name", "inserted_at", "-inserted_at"]
}
}
- },
+ ],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/V2PreviewProjectTransferResponse_Output"
+ "$ref": "#/components/schemas/V2ListNotebooksResponse_Output"
}
}
}
@@ -758,6 +804,16 @@
}
}
}
+ },
+ "500": {
+ "description": "Failed to retrieve project's notebooks",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
}
},
"security": [
@@ -765,15 +821,21 @@
"bearer": []
}
],
- "summary": "Previews transferring a project to a different organizations, shows eligibility and impact",
+ "summary": "List notebooks of a project",
"tags": ["Projects"],
+ "x-badges": [
+ {
+ "name": "OAuth scope: database:read",
+ "position": "after"
+ }
+ ],
"x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["project_admin_read"]]
- }
- },
- "/v2/projects/{ref}/transfers": {
+ "x-fga-permissions": [["project_notebooks_read"]],
+ "x-oauth-scope": "database:read"
+ },
"post": {
- "operationId": "v2-transfer-a-project",
+ "description": "Creates a notebook shared with everyone who has access to the project. Cell ids are assigned by the server and returned in the response.",
+ "operationId": "v2-create-notebook",
"parameters": [
{
"name": "ref",
@@ -794,14 +856,31 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/V2TransferProjectBody"
+ "$ref": "#/components/schemas/V2CreateNotebookRequest"
}
}
}
},
"responses": {
- "200": {
- "description": ""
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V2NotebookResponse_Output"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "The request repeats a cell id",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
},
"401": {
"description": "Unauthorized",
@@ -832,6 +911,16 @@
}
}
}
+ },
+ "500": {
+ "description": "Failed to create notebook",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
}
},
"security": [
@@ -839,15 +928,22 @@
"bearer": []
}
],
- "summary": "Transfers a project to a different organization",
+ "summary": "Create a notebook",
"tags": ["Projects"],
+ "x-badges": [
+ {
+ "name": "OAuth scope: database:write",
+ "position": "after"
+ }
+ ],
"x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["organization_admin_write"]]
+ "x-fga-permissions": [["project_notebooks_write"]],
+ "x-oauth-scope": "database:write"
}
},
- "/v2/projects/{ref}/private-link/associations": {
+ "/v2/projects/{ref}/notebooks/{id}": {
"get": {
- "operationId": "v2-list-private-link-associations",
+ "operationId": "v2-get-notebook",
"parameters": [
{
"name": "ref",
@@ -861,6 +957,17 @@
"example": "abcdefghijklmnopqrst",
"type": "string"
}
+ },
+ {
+ "name": "id",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "example": "44444444-4444-4444-8444-444444444444",
+ "type": "string"
+ }
}
],
"responses": {
@@ -869,7 +976,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/V2ListPrivateLinkAssociationsResponse_Output"
+ "$ref": "#/components/schemas/V2NotebookResponse_Output"
}
}
}
@@ -894,6 +1001,16 @@
}
}
},
+ "404": {
+ "description": "Notebook not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
+ },
"429": {
"description": "Rate limit exceeded",
"content": {
@@ -905,7 +1022,7 @@
}
},
"500": {
- "description": "Failed to retrieve AWS accounts for project",
+ "description": "Failed to retrieve notebook",
"content": {
"application/json": {
"schema": {
@@ -920,14 +1037,21 @@
"bearer": []
}
],
- "summary": "List AWS accounts attached to the project PrivateLink share",
+ "summary": "Get a notebook",
"tags": ["Projects"],
- "x-endpoint-owners": ["platform-networking", "control-plane"],
- "x-fga-permissions": [["project_admin_read"]]
+ "x-badges": [
+ {
+ "name": "OAuth scope: database:read",
+ "position": "after"
+ }
+ ],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["project_notebooks_read"]],
+ "x-oauth-scope": "database:read"
},
- "post": {
- "description": "Adds an AWS account to the project's PrivateLink configuration and schedules the AWS resources to be created.",
- "operationId": "v2-create-private-link-association",
+ "patch": {
+ "description": "Updates the attributes provided and leaves the rest untouched. Sending `content` replaces the whole notebook body.",
+ "operationId": "v2-update-notebook",
"parameters": [
{
"name": "ref",
@@ -941,6 +1065,17 @@
"example": "abcdefghijklmnopqrst",
"type": "string"
}
+ },
+ {
+ "name": "id",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "example": "44444444-4444-4444-8444-444444444444",
+ "type": "string"
+ }
}
],
"requestBody": {
@@ -948,24 +1083,24 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/V2CreatePrivateLinkAssociationRequest"
+ "$ref": "#/components/schemas/V2UpdateNotebookRequest"
}
}
}
},
"responses": {
- "201": {
+ "200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/V2PrivateLinkAssociationResponse_Output"
+ "$ref": "#/components/schemas/V2NotebookResponse_Output"
}
}
}
},
- "401": {
- "description": "Unauthorized",
+ "400": {
+ "description": "The request references a cell that does not exist on this notebook, or repeats a cell id",
"content": {
"application/json": {
"schema": {
@@ -974,8 +1109,8 @@
}
}
},
- "402": {
- "description": "This feature requires the Team, or Enterprise organization plan.",
+ "401": {
+ "description": "Unauthorized",
"content": {
"application/json": {
"schema": {
@@ -994,6 +1129,16 @@
}
}
},
+ "404": {
+ "description": "Notebook not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
+ },
"429": {
"description": "Rate limit exceeded",
"content": {
@@ -1005,7 +1150,7 @@
}
},
"500": {
- "description": "Failed to add AWS account to PrivateLink share",
+ "description": "Failed to update notebook",
"content": {
"application/json": {
"schema": {
@@ -1020,23 +1165,20 @@
"bearer": []
}
],
- "summary": "Add an AWS account to the project PrivateLink share",
+ "summary": "Update a notebook",
"tags": ["Projects"],
- "x-allowed-plans": ["Team", "Enterprise"],
"x-badges": [
{
- "name": "Only available on Team, Enterprise",
- "position": "before"
+ "name": "OAuth scope: database:write",
+ "position": "after"
}
],
- "x-endpoint-owners": ["platform-networking", "control-plane"],
- "x-fga-permissions": [["project_admin_write"]]
- }
- },
- "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}": {
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["project_notebooks_write"]],
+ "x-oauth-scope": "database:write"
+ },
"delete": {
- "description": "Removes an AWS account from the project's PrivateLink configuration (targeting the primary database). Cleans up the associated AWS resources.",
- "operationId": "v2-delete-private-link-association",
+ "operationId": "v2-delete-notebook",
"parameters": [
{
"name": "ref",
@@ -1052,11 +1194,13 @@
}
},
{
- "name": "aws_account_id",
+ "name": "id",
"required": true,
"in": "path",
- "description": "AWS account ID used in PrivateLink association",
"schema": {
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "example": "44444444-4444-4444-8444-444444444444",
"type": "string"
}
}
@@ -1085,6 +1229,16 @@
}
}
},
+ "404": {
+ "description": "Notebook not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
+ },
"429": {
"description": "Rate limit exceeded",
"content": {
@@ -1096,7 +1250,7 @@
}
},
"500": {
- "description": "Failed to remove AWS account from PrivateLink share",
+ "description": "Failed to delete notebook",
"content": {
"application/json": {
"schema": {
@@ -1111,16 +1265,22 @@
"bearer": []
}
],
- "summary": "Remove an AWS account from the project PrivateLink share",
+ "summary": "Delete a notebook",
"tags": ["Projects"],
- "x-endpoint-owners": ["platform-networking", "control-plane"],
- "x-fga-permissions": [["project_admin_write"]]
+ "x-badges": [
+ {
+ "name": "OAuth scope: database:write",
+ "position": "after"
+ }
+ ],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["project_notebooks_write"]],
+ "x-oauth-scope": "database:write"
}
},
- "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}/database/{database_identifier}": {
- "delete": {
- "description": "Removes an AWS account from the project's PrivateLink configuration for the given read replica. Cleans up the associated AWS resources.",
- "operationId": "v2-delete-private-link-association-for-database",
+ "/v2/projects/{ref}/transfers/previews": {
+ "post": {
+ "operationId": "v2-preview-a-project-transfer",
"parameters": [
{
"name": "ref",
@@ -1134,42 +1294,31 @@
"example": "abcdefghijklmnopqrst",
"type": "string"
}
- },
- {
- "name": "aws_account_id",
- "required": true,
- "in": "path",
- "description": "AWS account ID used in PrivateLink association",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "database_identifier",
- "required": true,
- "in": "path",
- "description": "Identifier of the read replica this PrivateLink association targets",
- "schema": {
- "type": "string"
- }
}
],
- "responses": {
- "204": {
- "description": ""
- },
- "401": {
- "description": "Unauthorized",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V2TransferProjectBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ErrorResponseBody"
+ "$ref": "#/components/schemas/V2PreviewProjectTransferResponse_Output"
}
}
}
},
- "403": {
- "description": "Forbidden action",
+ "401": {
+ "description": "Unauthorized",
"content": {
"application/json": {
"schema": {
@@ -1178,8 +1327,8 @@
}
}
},
- "429": {
- "description": "Rate limit exceeded",
+ "403": {
+ "description": "Forbidden action",
"content": {
"application/json": {
"schema": {
@@ -1188,8 +1337,8 @@
}
}
},
- "500": {
- "description": "Failed to remove AWS account from PrivateLink share",
+ "429": {
+ "description": "Rate limit exceeded",
"content": {
"application/json": {
"schema": {
@@ -1204,16 +1353,15 @@
"bearer": []
}
],
- "summary": "Remove an AWS account from a specific database PrivateLink share",
+ "summary": "Previews transferring a project to a different organizations, shows eligibility and impact",
"tags": ["Projects"],
- "x-endpoint-owners": ["platform-networking", "control-plane"],
- "x-fga-permissions": [["project_admin_write"]]
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["project_admin_read"]]
}
},
- "/v2/projects/{ref}/workers": {
- "get": {
- "description": "Returns all workers you've previously deployed to the specified project.",
- "operationId": "v2-list-all-workers",
+ "/v2/projects/{ref}/transfers": {
+ "post": {
+ "operationId": "v2-transfer-a-project",
"parameters": [
{
"name": "ref",
@@ -1229,16 +1377,19 @@
}
}
],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/V2ListWorkersResponse_Output"
- }
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V2TransferProjectBody"
}
}
+ }
+ },
+ "responses": {
+ "200": {
+ "description": ""
},
"401": {
"description": "Unauthorized",
@@ -1276,23 +1427,15 @@
"bearer": []
}
],
- "summary": "[Alpha] List all workers",
- "tags": ["Workers"],
- "x-badges": [
- {
- "name": "OAuth scope: edge_functions:read",
- "position": "after"
- }
- ],
- "x-endpoint-owners": ["functions"],
- "x-fga-permissions": [["workers_read"]],
- "x-oauth-scope": "edge_functions:read"
+ "summary": "Transfers a project to a different organization",
+ "tags": ["Projects"],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["organization_admin_write"]]
}
},
- "/v2/projects/{ref}/workers/{name}": {
+ "/v2/projects/{ref}/private-link/associations": {
"get": {
- "description": "Returns a worker along with its instance tally. Poll this after a deploy until `build_state` leaves `building`.",
- "operationId": "v2-get-a-worker",
+ "operationId": "v2-list-private-link-associations",
"parameters": [
{
"name": "ref",
@@ -1306,16 +1449,6 @@
"example": "abcdefghijklmnopqrst",
"type": "string"
}
- },
- {
- "name": "name",
- "required": true,
- "in": "path",
- "schema": {
- "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
- "example": "hello-world",
- "type": "string"
- }
}
],
"responses": {
@@ -1324,7 +1457,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/V2WorkerResponse_Output"
+ "$ref": "#/components/schemas/V2ListPrivateLinkAssociationsResponse_Output"
}
}
}
@@ -1358,6 +1491,16 @@
}
}
}
+ },
+ "500": {
+ "description": "Failed to retrieve AWS accounts for project",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
}
},
"security": [
@@ -1365,21 +1508,14 @@
"bearer": []
}
],
- "summary": "[Alpha] Retrieve a worker",
- "tags": ["Workers"],
- "x-badges": [
- {
- "name": "OAuth scope: edge_functions:read",
- "position": "after"
- }
- ],
- "x-endpoint-owners": ["functions"],
- "x-fga-permissions": [["workers_read"]],
- "x-oauth-scope": "edge_functions:read"
+ "summary": "List AWS accounts attached to the project PrivateLink share",
+ "tags": ["Projects"],
+ "x-endpoint-owners": ["platform-networking", "control-plane"],
+ "x-fga-permissions": [["project_admin_read"]]
},
- "delete": {
- "description": "Tombstones the worker. Its instances and image are torn down asynchronously.",
- "operationId": "v2-delete-a-worker",
+ "post": {
+ "description": "Adds an AWS account to the project's PrivateLink configuration and schedules the AWS resources to be created.",
+ "operationId": "v2-create-private-link-association",
"parameters": [
{
"name": "ref",
@@ -1393,21 +1529,28 @@
"example": "abcdefghijklmnopqrst",
"type": "string"
}
- },
- {
- "name": "name",
- "required": true,
- "in": "path",
- "schema": {
- "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
- "example": "hello-world",
- "type": "string"
- }
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V2CreatePrivateLinkAssociationRequest"
+ }
+ }
+ }
+ },
"responses": {
- "204": {
- "description": ""
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V2PrivateLinkAssociationResponse_Output"
+ }
+ }
+ }
},
"401": {
"description": "Unauthorized",
@@ -1419,6 +1562,16 @@
}
}
},
+ "402": {
+ "description": "This feature requires the Team, or Enterprise organization plan.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
+ },
"403": {
"description": "Forbidden action",
"content": {
@@ -1438,6 +1591,16 @@
}
}
}
+ },
+ "500": {
+ "description": "Failed to add AWS account to PrivateLink share",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
}
},
"security": [
@@ -1445,23 +1608,23 @@
"bearer": []
}
],
- "summary": "[Alpha] Delete a worker",
- "tags": ["Workers"],
+ "summary": "Add an AWS account to the project PrivateLink share",
+ "tags": ["Projects"],
+ "x-allowed-plans": ["Team", "Enterprise"],
"x-badges": [
{
- "name": "OAuth scope: edge_functions:write",
- "position": "after"
+ "name": "Only available on Team, Enterprise",
+ "position": "before"
}
],
- "x-endpoint-owners": ["functions"],
- "x-fga-permissions": [["workers_write"]],
- "x-oauth-scope": "edge_functions:write"
+ "x-endpoint-owners": ["platform-networking", "control-plane"],
+ "x-fga-permissions": [["project_admin_write"]]
}
},
- "/v2/projects/{ref}/workers/{name}/uploads": {
- "post": {
- "description": "PUT the `.tar.gz` build context to the returned `url` before `expires_at`, then deploy with the upload id as `context_upload_id`. The bytes go straight to storage — no management API request carries them.",
- "operationId": "v2-create-worker-upload",
+ "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}": {
+ "delete": {
+ "description": "Removes an AWS account from the project's PrivateLink configuration (targeting the primary database). Cleans up the associated AWS resources.",
+ "operationId": "v2-delete-private-link-association",
"parameters": [
{
"name": "ref",
@@ -1477,26 +1640,18 @@
}
},
{
- "name": "name",
+ "name": "aws_account_id",
"required": true,
"in": "path",
+ "description": "AWS account ID used in PrivateLink association",
"schema": {
- "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
- "example": "hello-world",
"type": "string"
}
}
],
"responses": {
- "201": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/V2WorkerUploadResponse_Output"
- }
- }
- }
+ "204": {
+ "description": ""
},
"401": {
"description": "Unauthorized",
@@ -1527,6 +1682,16 @@
}
}
}
+ },
+ "500": {
+ "description": "Failed to remove AWS account from PrivateLink share",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
}
},
"security": [
@@ -1534,23 +1699,16 @@
"bearer": []
}
],
- "summary": "[Alpha] Mint a presigned slot for a build-context upload",
- "tags": ["Workers"],
- "x-badges": [
- {
- "name": "OAuth scope: edge_functions:write",
- "position": "after"
- }
- ],
- "x-endpoint-owners": ["functions"],
- "x-fga-permissions": [["workers_write"]],
- "x-oauth-scope": "edge_functions:write"
+ "summary": "Remove an AWS account from the project PrivateLink share",
+ "tags": ["Projects"],
+ "x-endpoint-owners": ["platform-networking", "control-plane"],
+ "x-fga-permissions": [["project_admin_write"]]
}
},
- "/v2/projects/{ref}/workers/{name}/deploy": {
- "post": {
- "description": "Creates the worker if it does not exist, building from a context staged through the uploads endpoint. The build runs asynchronously: this answers 202 and the worker reaches `build_state` `active` or `failed` later.",
- "operationId": "v2-deploy-a-worker",
+ "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}/database/{database_identifier}": {
+ "delete": {
+ "description": "Removes an AWS account from the project's PrivateLink configuration for the given read replica. Cleans up the associated AWS resources.",
+ "operationId": "v2-delete-private-link-association-for-database",
"parameters": [
{
"name": "ref",
@@ -1566,36 +1724,27 @@
}
},
{
- "name": "name",
+ "name": "aws_account_id",
"required": true,
"in": "path",
+ "description": "AWS account ID used in PrivateLink association",
"schema": {
- "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
- "example": "hello-world",
"type": "string"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/V2DeployWorkerRequest"
- }
+ },
+ {
+ "name": "database_identifier",
+ "required": true,
+ "in": "path",
+ "description": "Identifier of the read replica this PrivateLink association targets",
+ "schema": {
+ "type": "string"
}
}
- },
+ ],
"responses": {
- "202": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/V2WorkerResponse_Output"
- }
- }
- }
+ "204": {
+ "description": ""
},
"401": {
"description": "Unauthorized",
@@ -1626,86 +1775,46 @@
}
}
}
+ },
+ "500": {
+ "description": "Failed to remove AWS account from PrivateLink share",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
}
- },
- "security": [
- {
- "bearer": []
- }
- ],
- "summary": "[Alpha] Deploy a worker",
- "tags": ["Workers"],
- "x-badges": [
+ },
+ "security": [
{
- "name": "OAuth scope: edge_functions:write",
- "position": "after"
+ "bearer": []
}
],
- "x-endpoint-owners": ["functions"],
- "x-fga-permissions": [["workers_write"]],
- "x-oauth-scope": "edge_functions:write"
+ "summary": "Remove an AWS account from a specific database PrivateLink share",
+ "tags": ["Projects"],
+ "x-endpoint-owners": ["platform-networking", "control-plane"],
+ "x-fga-permissions": [["project_admin_write"]]
}
},
- "/v2/organizations/{slug}/members": {
+ "/v2/projects/{ref}/compute": {
"get": {
- "description": "Returns a cursor-paginated list of organization members including their roles and project-scoped permissions.",
- "operationId": "v2-list-organization-members",
+ "description": "Returns all compute instances you've previously deployed to the specified project.\n\nThis endpoint is currently in its **Alpha** stage.",
+ "operationId": "v2-list-all-compute-instances",
"parameters": [
{
- "name": "slug",
+ "name": "ref",
"required": true,
"in": "path",
- "description": "Organization slug",
+ "description": "Project ref",
"schema": {
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst",
"type": "string"
}
- },
- {
- "name": "page",
- "required": false,
- "in": "query",
- "schema": {
- "properties": {
- "size": {
- "type": "integer",
- "minimum": 1,
- "maximum": 100
- },
- "after": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "before": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- }
- },
- "type": "object"
- },
- "style": "deepObject"
- },
- {
- "name": "filter",
- "required": false,
- "in": "query",
- "schema": {
- "properties": {
- "username": {
- "type": "string"
- },
- "primary_email": {
- "type": "string",
- "format": "email",
- "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
- }
- },
- "type": "object"
- },
- "style": "deepObject"
}
],
"responses": {
@@ -1714,7 +1823,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/V2ListMembersResponse_Output"
+ "$ref": "#/components/schemas/V2ListComputeInstancesResponse_Output"
}
}
}
@@ -1755,63 +1864,60 @@
"bearer": []
}
],
- "summary": "List members of an organization",
- "tags": ["Organizations"],
+ "summary": "List all compute instances",
+ "tags": ["Compute"],
"x-badges": [
{
- "name": "OAuth scope: organizations:read",
+ "name": "OAuth scope: edge_functions:read",
"position": "after"
+ },
+ {
+ "name": "Alpha",
+ "position": "before"
}
],
- "x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["members_read"]],
- "x-oauth-scope": "organizations:read"
+ "x-endpoint-owners": ["functions"],
+ "x-fga-permissions": [["workers_read"]],
+ "x-oauth-scope": "edge_functions:read",
+ "x-scalar-stability": "experimental"
}
},
- "/v2/organizations/{slug}/members/{user_id}/roles": {
- "patch": {
- "description": "Assigns an org-wide role when projects is omitted, or creates a project-scoped assignment when projects is provided. Uses an org-level role template id from GET /v2/organizations/{slug}/roles. Stale role assignments are automatically cleaned up: if a role no longer has any projects, it is deleted; overlapping project assignments in other roles are automatically removed to avoid duplication.",
- "operationId": "v2-assign-organization-member-role",
+ "/v2/projects/{ref}/compute/{name}": {
+ "get": {
+ "description": "Returns a compute instance along with the counts of its running instances. Poll this after a deploy until `build_state` leaves `building`.\n\nThis endpoint is currently in its **Alpha** stage.",
+ "operationId": "v2-get-a-compute-instance",
"parameters": [
{
- "name": "slug",
+ "name": "ref",
"required": true,
"in": "path",
- "description": "Organization slug",
+ "description": "Project ref",
"schema": {
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst",
"type": "string"
}
},
{
- "name": "user_id",
+ "name": "name",
"required": true,
"in": "path",
"schema": {
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
+ "example": "hello-world",
"type": "string"
}
}
],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/V2AssignOrganizationMemberRoleRequest"
- }
- }
- }
- },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OrganizationMemberRoleResponse_Output"
+ "$ref": "#/components/schemas/V2ComputeInstanceResponse_Output"
}
}
}
@@ -1826,16 +1932,6 @@
}
}
},
- "402": {
- "description": "This feature requires the Enterprise organization plan.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ErrorResponseBody"
- }
- }
- }
- },
"403": {
"description": "Forbidden action",
"content": {
@@ -1855,16 +1951,6 @@
}
}
}
- },
- "500": {
- "description": "Failed to assign organization member role",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ErrorResponseBody"
- }
- }
- }
}
},
"security": [
@@ -1872,46 +1958,54 @@
"bearer": []
}
],
- "summary": "Assign or change an organization member role",
- "tags": ["Organizations"],
- "x-allowed-plans": ["Enterprise"],
+ "summary": "Retrieve a compute instance",
+ "tags": ["Compute"],
"x-badges": [
{
- "name": "Only available on Enterprise",
+ "name": "OAuth scope: edge_functions:read",
+ "position": "after"
+ },
+ {
+ "name": "Alpha",
"position": "before"
}
],
- "x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["organization_admin_write"]]
- }
- },
- "/v2/organizations/{slug}/roles": {
- "get": {
- "description": "Returns a list of org-level roles for the organization.",
- "operationId": "v2-list-organization-roles",
+ "x-endpoint-owners": ["functions"],
+ "x-fga-permissions": [["workers_read"]],
+ "x-oauth-scope": "edge_functions:read",
+ "x-scalar-stability": "experimental"
+ },
+ "delete": {
+ "description": "Tombstones the compute instance. Its running instances and image are torn down asynchronously.\n\nThis endpoint is currently in its **Alpha** stage.",
+ "operationId": "v2-delete-a-compute-instance",
"parameters": [
{
- "name": "slug",
+ "name": "ref",
"required": true,
"in": "path",
- "description": "Organization slug",
+ "description": "Project ref",
"schema": {
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst",
+ "type": "string"
+ }
+ },
+ {
+ "name": "name",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
+ "example": "hello-world",
"type": "string"
}
}
],
"responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/V2ListRolesResponse_Output"
- }
- }
- }
+ "204": {
+ "description": ""
},
"401": {
"description": "Unauthorized",
@@ -1949,53 +2043,60 @@
"bearer": []
}
],
- "summary": "List roles of an organization",
- "tags": ["Organizations"],
+ "summary": "Delete a compute instance",
+ "tags": ["Compute"],
"x-badges": [
{
- "name": "OAuth scope: organizations:read",
+ "name": "OAuth scope: edge_functions:write",
"position": "after"
+ },
+ {
+ "name": "Alpha",
+ "position": "before"
}
],
- "x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["members_read"]],
- "x-oauth-scope": "organizations:read"
+ "x-endpoint-owners": ["functions"],
+ "x-fga-permissions": [["workers_write"]],
+ "x-oauth-scope": "edge_functions:write",
+ "x-scalar-stability": "experimental"
}
},
- "/v2/organizations/{slug}/members/invitations": {
+ "/v2/projects/{ref}/compute/{name}/uploads": {
"post": {
- "description": "Creates member invitations for an organization. Each invitation can have different role and project scope settings.",
- "operationId": "v2-create-organization-invitations",
+ "description": "PUT the `.tar.gz` build context to the returned `url` before `expires_at`, then deploy with the upload id as `context_upload_id`. The bytes go straight to storage — no management API request carries them.\n\nThis endpoint is currently in its **Alpha** stage.",
+ "operationId": "v2-create-compute-instance-upload",
"parameters": [
{
- "name": "slug",
+ "name": "ref",
"required": true,
"in": "path",
- "description": "Organization slug",
+ "description": "Project ref",
"schema": {
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst",
"type": "string"
}
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/V2CreateInvitationsRequest"
- }
+ },
+ {
+ "name": "name",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
+ "example": "hello-world",
+ "type": "string"
}
}
- },
+ ],
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/V2CreateInvitationsResponse_Output"
+ "$ref": "#/components/schemas/V2ComputeInstanceUploadResponse_Output"
}
}
}
@@ -2010,16 +2111,6 @@
}
}
},
- "402": {
- "description": "This feature requires the Enterprise organization plan.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ErrorResponseBody"
- }
- }
- }
- },
"403": {
"description": "Forbidden action",
"content": {
@@ -2046,35 +2137,49 @@
"bearer": []
}
],
- "summary": "Creates organization invitations",
- "tags": ["Organizations Members Invitations"],
- "x-allowed-plans": ["Enterprise"],
+ "summary": "Mint a presigned slot for a build-context upload",
+ "tags": ["Compute"],
"x-badges": [
{
- "name": "OAuth scope: organizations:write",
+ "name": "OAuth scope: edge_functions:write",
"position": "after"
},
{
- "name": "Only available on Enterprise",
+ "name": "Alpha",
"position": "before"
}
],
- "x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["members_write"]],
- "x-oauth-scope": "organizations:write"
- },
- "delete": {
- "description": "Bulk delete member invitations for an organization by email address.",
- "operationId": "v2-delete-organization-invitations",
+ "x-endpoint-owners": ["functions"],
+ "x-fga-permissions": [["workers_write"]],
+ "x-oauth-scope": "edge_functions:write",
+ "x-scalar-stability": "experimental"
+ }
+ },
+ "/v2/projects/{ref}/compute/{name}/deploy": {
+ "post": {
+ "description": "Creates the compute instance if it does not exist, building from a context staged through the uploads endpoint. The build runs asynchronously: this answers 202 and the compute instance reaches `build_state` `active` or `failed` later.\n\nThis endpoint is currently in its **Alpha** stage.",
+ "operationId": "v2-deploy-a-compute-instance",
"parameters": [
{
- "name": "slug",
+ "name": "ref",
"required": true,
"in": "path",
- "description": "Organization slug",
+ "description": "Project ref",
"schema": {
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst",
+ "type": "string"
+ }
+ },
+ {
+ "name": "name",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
+ "example": "hello-world",
"type": "string"
}
}
@@ -2084,18 +2189,18 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/V2DeleteInvitationsRequest"
+ "$ref": "#/components/schemas/V2DeployComputeInstanceRequest"
}
}
}
},
"responses": {
- "200": {
+ "202": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/V2DeleteInvitationsResponse_Output"
+ "$ref": "#/components/schemas/V2ComputeInstanceResponse_Output"
}
}
}
@@ -2110,16 +2215,6 @@
}
}
},
- "402": {
- "description": "This feature requires the Enterprise organization plan.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ErrorResponseBody"
- }
- }
- }
- },
"403": {
"description": "Forbidden action",
"content": {
@@ -2146,28 +2241,28 @@
"bearer": []
}
],
- "summary": "Deletes organization invitations by email",
- "tags": ["Organizations Members Invitations"],
- "x-allowed-plans": ["Enterprise"],
+ "summary": "Deploy a compute instance",
+ "tags": ["Compute"],
"x-badges": [
{
- "name": "OAuth scope: organizations:write",
+ "name": "OAuth scope: edge_functions:write",
"position": "after"
},
{
- "name": "Only available on Enterprise",
+ "name": "Alpha",
"position": "before"
}
],
- "x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["members_write"]],
- "x-oauth-scope": "organizations:write"
+ "x-endpoint-owners": ["functions"],
+ "x-fga-permissions": [["workers_write"]],
+ "x-oauth-scope": "edge_functions:write",
+ "x-scalar-stability": "experimental"
}
},
- "/v2/organizations/{slug}/projects": {
+ "/v2/organizations/{slug}/members": {
"get": {
- "description": "Returns a cursor-paginated list of projects for the specified organization, including their databases.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the number of projects returned per page.",
- "operationId": "v2-list-organization-projects",
+ "description": "Returns a cursor-paginated list of organization members including their roles and project-scoped permissions.",
+ "operationId": "v2-list-organization-members",
"parameters": [
{
"name": "slug",
@@ -2193,11 +2288,13 @@
},
"after": {
"type": "string",
- "minLength": 1
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"before": {
"type": "string",
- "minLength": 1
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"type": "object"
@@ -2205,25 +2302,23 @@
"style": "deepObject"
},
{
- "name": "sort",
- "required": false,
- "in": "query",
- "description": "Sort order by creation time: `inserted_at` (oldest first) or `-inserted_at` (newest first). Defaults to `inserted_at`.",
- "schema": {
- "example": "-inserted_at",
- "type": "string",
- "enum": ["inserted_at", "-inserted_at"]
- }
- },
- {
- "name": "search",
+ "name": "filter",
"required": false,
"in": "query",
- "description": "Case-insensitive substring match on the project name.",
"schema": {
- "minLength": 1,
- "type": "string"
- }
+ "properties": {
+ "username": {
+ "type": "string"
+ },
+ "primary_email": {
+ "type": "string",
+ "format": "email",
+ "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
+ }
+ },
+ "type": "object"
+ },
+ "style": "deepObject"
}
],
"responses": {
@@ -2232,7 +2327,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/V2ListProjectsResponse_Output"
+ "$ref": "#/components/schemas/V2ListMembersResponse_Output"
}
}
}
@@ -2273,23 +2368,23 @@
"bearer": []
}
],
- "summary": "List projects of an organization",
+ "summary": "List members of an organization",
"tags": ["Organizations"],
"x-badges": [
{
- "name": "OAuth scope: projects:read",
+ "name": "OAuth scope: organizations:read",
"position": "after"
}
],
"x-endpoint-owners": ["control-plane"],
- "x-fga-permissions": [["organization_projects_read"]],
- "x-oauth-scope": "projects:read"
+ "x-fga-permissions": [["members_read"]],
+ "x-oauth-scope": "organizations:read"
}
},
- "/v2/organizations/{slug}/integrations/github/connections": {
- "get": {
- "description": "Returns a cursor-paginated list of the GitHub connections of the organization's projects.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the page size.\nPaging walks the organization projects, so a page holds at most `page[size]` connections and can hold fewer (or none) when some of its projects are not connected.\nFollow `links.next` until it is `null` rather than stopping on a short page.\n\nUse `filter[project_ref]` to narrow the list down to a single project.",
- "operationId": "v2-list-organization-github-connections",
+ "/v2/organizations/{slug}/members/{user_id}/roles": {
+ "patch": {
+ "description": "Assigns an org-wide role when projects is omitted, or creates a project-scoped assignment when projects is provided. Uses an org-level role template id from GET /v2/organizations/{slug}/roles. Stale role assignments are automatically cleaned up: if a role no longer has any projects, it is deleted; overlapping project assignments in other roles are automatically removed to avoid duplication.",
+ "operationId": "v2-assign-organization-member-role",
"parameters": [
{
"name": "slug",
@@ -2303,64 +2398,33 @@
}
},
{
- "name": "page",
- "required": false,
- "in": "query",
- "schema": {
- "properties": {
- "size": {
- "type": "integer",
- "minimum": 1,
- "maximum": 100
- },
- "after": {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "description": "Project ref",
- "example": "abcdefghijklmnopqrst"
- },
- "before": {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "description": "Project ref",
- "example": "abcdefghijklmnopqrst"
- }
- },
- "type": "object"
- },
- "style": "deepObject"
- },
- {
- "name": "filter",
- "required": false,
- "in": "query",
+ "name": "user_id",
+ "required": true,
+ "in": "path",
"schema": {
- "properties": {
- "project_ref": {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "description": "Project ref",
- "example": "abcdefghijklmnopqrst"
- }
- },
- "type": "object"
- },
- "style": "deepObject"
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "type": "string"
+ }
}
],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V2AssignOrganizationMemberRoleRequest"
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/V2ListGitHubConnectionsResponse_Output"
+ "$ref": "#/components/schemas/OrganizationMemberRoleResponse_Output"
}
}
}
@@ -2375,6 +2439,16 @@
}
}
},
+ "402": {
+ "description": "This feature requires the Enterprise organization plan.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
+ },
"403": {
"description": "Forbidden action",
"content": {
@@ -2394,6 +2468,16 @@
}
}
}
+ },
+ "500": {
+ "description": "Failed to assign organization member role",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
}
},
"security": [
@@ -2401,2028 +2485,551 @@
"bearer": []
}
],
- "summary": "List GitHub connections of an organization",
+ "summary": "Assign or change an organization member role",
"tags": ["Organizations"],
+ "x-allowed-plans": ["Enterprise"],
"x-badges": [
{
- "name": "OAuth scope: projects:read",
- "position": "after"
+ "name": "Only available on Enterprise",
+ "position": "before"
}
],
- "x-endpoint-owners": ["control-plane", "dev-workflows"],
- "x-fga-permissions": [["organization_projects_read"]],
- "x-oauth-scope": "projects:read"
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["organization_admin_write"]]
}
},
- "/v2/projects/{ref}/webhooks/endpoints": {
+ "/v2/organizations/{slug}/roles": {
"get": {
- "operationId": "v2-projects-ref-webhooks-endpoints-get",
+ "description": "Returns a list of org-level roles for the organization.",
+ "operationId": "v2-list-organization-roles",
"parameters": [
{
+ "name": "slug",
+ "required": true,
"in": "path",
- "name": "ref",
+ "description": "Organization slug",
"schema": {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "example": "abcdefghijklmnopqrst"
- },
- "required": true,
- "description": "Project ref"
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V2ListRolesResponse_Output"
+ }
+ }
+ }
},
- {
- "in": "query",
- "name": "page[offset]",
- "schema": {
- "default": "0",
- "type": "string",
- "pattern": "^\\d+$"
- },
- "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend."
+ "401": {
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
},
- {
- "in": "query",
- "name": "page[limit]",
- "schema": {
- "default": "20",
- "type": "string",
- "pattern": "^\\d+$"
- },
- "description": "Up to how many records to return."
- }
- ],
- "tags": ["Project webhooks"],
- "responses": {
- "200": {
- "description": "Collection of endpoints",
+ "403": {
+ "description": "Forbidden action",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 512
- },
- {
- "type": "null"
- }
- ],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [
- {
- "type": "v1.project.paused"
- }
- ]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
- },
- "additionalProperties": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": {
- "Authorization": "Bearer example_token"
- }
- },
- "created_by": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the user who created the endpoint."
- },
- "created_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of endpoint's creation."
- }
- },
- "required": [
- "id",
- "url",
- "enabled",
- "description",
- "event_types",
- "created_by",
- "created_at"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "links": {
- "type": "object",
- "properties": {
- "first": {
- "description": "URL path to the first page if available.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0",
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "prev": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "URL path to the previous page.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0"
- },
- "next": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "URL path to the next page.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20"
- },
- "last": {
- "description": "URL path to the last page if available.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30",
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": ["prev", "next"]
- }
- },
- "required": ["data", "links"]
+ "$ref": "#/components/schemas/ErrorResponseBody"
}
}
}
},
- "400": {
- "description": "Multiple error responses",
+ "429": {
+ "description": "Rate limit exceeded",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_slug"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_ref"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "bearer": []
+ }
+ ],
+ "summary": "List roles of an organization",
+ "tags": ["Organizations"],
+ "x-badges": [
+ {
+ "name": "OAuth scope: organizations:read",
+ "position": "after"
+ }
+ ],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["members_read"]],
+ "x-oauth-scope": "organizations:read"
+ }
+ },
+ "/v2/organizations/{slug}/members/invitations": {
+ "post": {
+ "description": "Creates member invitations for an organization. Each invitation can have different role and project scope settings.",
+ "operationId": "v2-create-organization-invitations",
+ "parameters": [
+ {
+ "name": "slug",
+ "required": true,
+ "in": "path",
+ "description": "Organization slug",
+ "schema": {
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba",
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V2CreateInvitationsRequest"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V2CreateInvitationsResponse_Output"
}
}
}
},
"401": {
- "description": "GenericUnauthorized",
+ "description": "Unauthorized",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "unauthorized"
- },
- "message": {
- "type": "string",
- "const": "Unauthorized"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "unauthorized",
- "message": "Unauthorized"
- }
- }
- }
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
+ },
+ "402": {
+ "description": "This feature requires the Enterprise organization plan.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
}
}
}
},
"403": {
- "description": "Multiple error responses",
+ "description": "Forbidden action",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.permission_denied"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.access_disabled"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Access disabled"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "PermissionDenied": {
- "value": {
- "error": {
- "code": "forbidden.permission_denied",
- "message": "Forbidden: Permission denied"
- }
- }
- },
- "AccessDisabled": {
- "value": {
- "error": {
- "code": "forbidden.access_disabled",
- "message": "Forbidden: Access disabled"
- }
- }
- }
+ "$ref": "#/components/schemas/ErrorResponseBody"
}
}
}
},
- "408": {
- "description": "GenericRequestTimeout",
+ "429": {
+ "description": "Rate limit exceeded",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "request_timeout"
- },
- "message": {
- "type": "string",
- "const": "Request Timeout"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "request_timeout",
- "message": "Request Timeout"
- }
- }
- }
+ "$ref": "#/components/schemas/ErrorResponseBody"
}
}
}
+ }
+ },
+ "security": [
+ {
+ "bearer": []
+ }
+ ],
+ "summary": "Creates organization invitations",
+ "tags": ["Organizations Members Invitations"],
+ "x-allowed-plans": ["Enterprise"],
+ "x-badges": [
+ {
+ "name": "OAuth scope: organizations:write",
+ "position": "after"
},
- "429": {
- "description": "GenericTooManyRequests",
+ {
+ "name": "Only available on Enterprise",
+ "position": "before"
+ }
+ ],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["members_write"]],
+ "x-oauth-scope": "organizations:write"
+ },
+ "delete": {
+ "description": "Bulk delete member invitations for an organization by email address.",
+ "operationId": "v2-delete-organization-invitations",
+ "parameters": [
+ {
+ "name": "slug",
+ "required": true,
+ "in": "path",
+ "description": "Organization slug",
+ "schema": {
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba",
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V2DeleteInvitationsRequest"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "too_many_requests"
- },
- "message": {
- "type": "string",
- "const": "Too Many Requests"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "too_many_requests",
- "message": "Too Many Requests"
- }
- }
- }
+ "$ref": "#/components/schemas/V2DeleteInvitationsResponse_Output"
}
}
}
},
- "500": {
- "description": "GenericInternalServerError",
+ "401": {
+ "description": "Unauthorized",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "internal_server_error"
- },
- "message": {
- "type": "string",
- "const": "Internal Server Error"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "internal_server_error",
- "message": "Internal Server Error"
- }
- }
- }
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
+ },
+ "402": {
+ "description": "This feature requires the Enterprise organization plan.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden action",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limit exceeded",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
}
}
}
}
},
- "summary": "List endpoints",
- "description": "List all Webhook endpoints based on a project's ref or an organization's slug."
- },
- "post": {
- "operationId": "v2-projects-ref-webhooks-endpoints-post",
+ "security": [
+ {
+ "bearer": []
+ }
+ ],
+ "summary": "Deletes organization invitations by email",
+ "tags": ["Organizations Members Invitations"],
+ "x-allowed-plans": ["Enterprise"],
+ "x-badges": [
+ {
+ "name": "OAuth scope: organizations:write",
+ "position": "after"
+ },
+ {
+ "name": "Only available on Enterprise",
+ "position": "before"
+ }
+ ],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["members_write"]],
+ "x-oauth-scope": "organizations:write"
+ }
+ },
+ "/v2/organizations/{slug}/projects": {
+ "get": {
+ "description": "Returns a cursor-paginated list of projects for the specified organization, including their databases.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the number of projects returned per page.",
+ "operationId": "v2-list-organization-projects",
"parameters": [
{
+ "name": "slug",
+ "required": true,
"in": "path",
- "name": "ref",
+ "description": "Organization slug",
"schema": {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "example": "abcdefghijklmnopqrst"
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba",
+ "type": "string"
+ }
+ },
+ {
+ "name": "page",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "properties": {
+ "size": {
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 100
+ },
+ "after": {
+ "type": "string",
+ "minLength": 1
+ },
+ "before": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "type": "object"
},
- "required": true,
- "description": "Project ref"
+ "style": "deepObject"
+ },
+ {
+ "name": "sort",
+ "required": false,
+ "in": "query",
+ "description": "Sort order by creation time: `inserted_at` (oldest first) or `-inserted_at` (newest first). Defaults to `inserted_at`.",
+ "schema": {
+ "example": "-inserted_at",
+ "type": "string",
+ "enum": ["inserted_at", "-inserted_at"]
+ }
+ },
+ {
+ "name": "search",
+ "required": false,
+ "in": "query",
+ "description": "Case-insensitive substring match on the project name.",
+ "schema": {
+ "minLength": 1,
+ "type": "string"
+ }
}
],
- "tags": ["Project webhooks"],
"responses": {
- "201": {
- "description": "Created endpoint",
+ "200": {
+ "description": "",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 512
- },
- {
- "type": "null"
- }
- ],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [
- {
- "type": "v1.project.paused"
- }
- ]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
- },
- "additionalProperties": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": {
- "Authorization": "Bearer example_token"
- }
- },
- "created_by": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the user who created the endpoint."
- },
- "created_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of endpoint's creation."
- }
- },
- "required": [
- "id",
- "url",
- "enabled",
- "description",
- "event_types",
- "created_by",
- "created_at"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "required": ["data"]
+ "$ref": "#/components/schemas/V2ListProjectsResponse_Output"
}
}
}
},
- "400": {
- "description": "Multiple error responses",
+ "401": {
+ "description": "Unauthorized",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_slug"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_ref"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
+ "$ref": "#/components/schemas/ErrorResponseBody"
}
}
}
},
- "401": {
- "description": "GenericUnauthorized",
+ "403": {
+ "description": "Forbidden action",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "unauthorized"
- },
- "message": {
- "type": "string",
- "const": "Unauthorized"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "unauthorized",
- "message": "Unauthorized"
- }
- }
- }
+ "$ref": "#/components/schemas/ErrorResponseBody"
}
}
}
},
- "403": {
- "description": "Multiple error responses",
+ "429": {
+ "description": "Rate limit exceeded",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.permission_denied"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.access_disabled"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Access disabled"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "PermissionDenied": {
- "value": {
- "error": {
- "code": "forbidden.permission_denied",
- "message": "Forbidden: Permission denied"
- }
- }
- },
- "AccessDisabled": {
- "value": {
- "error": {
- "code": "forbidden.access_disabled",
- "message": "Forbidden: Access disabled"
- }
- }
- }
+ "$ref": "#/components/schemas/ErrorResponseBody"
}
}
}
+ }
+ },
+ "security": [
+ {
+ "bearer": []
+ }
+ ],
+ "summary": "List projects of an organization",
+ "tags": ["Organizations"],
+ "x-badges": [
+ {
+ "name": "OAuth scope: projects:read",
+ "position": "after"
+ }
+ ],
+ "x-endpoint-owners": ["control-plane"],
+ "x-fga-permissions": [["organization_projects_read"]],
+ "x-oauth-scope": "projects:read"
+ }
+ },
+ "/v2/organizations/{slug}/integrations/github/connections": {
+ "get": {
+ "description": "Returns a cursor-paginated list of the GitHub connections of the organization's projects.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the page size.\nPaging walks the organization projects, so a page holds at most `page[size]` connections and can hold fewer (or none) when some of its projects are not connected.\nFollow `links.next` until it is `null` rather than stopping on a short page.\n\nUse `filter[project_ref]` to narrow the list down to a single project.",
+ "operationId": "v2-list-organization-github-connections",
+ "parameters": [
+ {
+ "name": "slug",
+ "required": true,
+ "in": "path",
+ "description": "Organization slug",
+ "schema": {
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba",
+ "type": "string"
+ }
},
- "408": {
- "description": "GenericRequestTimeout",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "request_timeout"
- },
- "message": {
- "type": "string",
- "const": "Request Timeout"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
+ {
+ "name": "page",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "properties": {
+ "size": {
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 100
},
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "request_timeout",
- "message": "Request Timeout"
- }
- }
- }
+ "after": {
+ "type": "string",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "description": "Project ref",
+ "example": "abcdefghijklmnopqrst"
+ },
+ "before": {
+ "type": "string",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "description": "Project ref",
+ "example": "abcdefghijklmnopqrst"
+ }
+ },
+ "type": "object"
+ },
+ "style": "deepObject"
+ },
+ {
+ "name": "filter",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "properties": {
+ "project_ref": {
+ "type": "string",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "description": "Project ref",
+ "example": "abcdefghijklmnopqrst"
+ }
+ },
+ "type": "object"
+ },
+ "style": "deepObject"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V2ListGitHubConnectionsResponse_Output"
}
}
}
},
- "429": {
- "description": "GenericTooManyRequests",
+ "401": {
+ "description": "Unauthorized",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "too_many_requests"
- },
- "message": {
- "type": "string",
- "const": "Too Many Requests"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "too_many_requests",
- "message": "Too Many Requests"
- }
- }
- }
+ "$ref": "#/components/schemas/ErrorResponseBody"
}
}
}
},
- "500": {
- "description": "GenericInternalServerError",
+ "403": {
+ "description": "Forbidden action",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "internal_server_error"
- },
- "message": {
- "type": "string",
- "const": "Internal Server Error"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "internal_server_error",
- "message": "Internal Server Error"
- }
- }
- }
+ "$ref": "#/components/schemas/ErrorResponseBody"
}
}
}
- }
- },
- "summary": "Create endpoint",
- "description": "Create new endpoint configuration to subscribe to specific webhook events.",
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "default": true,
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 512
- },
- {
- "type": "null"
- }
- ],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [
- {
- "type": "v1.project.paused"
- }
- ]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
- },
- "additionalProperties": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": {
- "Authorization": "Bearer example_token"
- }
- },
- "signing_secret": {
- "type": "string",
- "minLength": 8,
- "maxLength": 64,
- "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
- }
- },
- "required": ["url", "event_types", "signing_secret"]
- }
- },
- "required": ["type", "attributes"]
- }
- },
- "required": ["data"]
+ },
+ "429": {
+ "description": "Rate limit exceeded",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponseBody"
+ }
}
}
}
- }
- },
- "delete": {
- "operationId": "v2-projects-ref-webhooks-endpoints-delete",
+ },
+ "security": [
+ {
+ "bearer": []
+ }
+ ],
+ "summary": "List GitHub connections of an organization",
+ "tags": ["Organizations"],
+ "x-badges": [
+ {
+ "name": "OAuth scope: projects:read",
+ "position": "after"
+ }
+ ],
+ "x-endpoint-owners": ["control-plane", "dev-workflows"],
+ "x-fga-permissions": [["organization_projects_read"]],
+ "x-oauth-scope": "projects:read"
+ }
+ },
+ "/v2/projects/{ref}/webhooks/endpoints": {
+ "get": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-get",
"parameters": [
{
"in": "path",
@@ -4436,12 +3043,32 @@
},
"required": true,
"description": "Project ref"
+ },
+ {
+ "in": "query",
+ "name": "page[offset]",
+ "schema": {
+ "default": "0",
+ "type": "string",
+ "pattern": "^\\d+$"
+ },
+ "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend."
+ },
+ {
+ "in": "query",
+ "name": "page[limit]",
+ "schema": {
+ "default": "20",
+ "type": "string",
+ "pattern": "^\\d+$"
+ },
+ "description": "Up to how many records to return."
}
],
"tags": ["Project webhooks"],
"responses": {
"200": {
- "description": "Deleted endpoints",
+ "description": "Collection of endpoints",
"content": {
"application/json": {
"schema": {
@@ -4584,185 +3211,63 @@
},
"required": ["type", "id", "attributes"]
}
- }
- },
- "required": ["data"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": {
+ },
+ "links": {
+ "type": "object",
+ "properties": {
+ "first": {
+ "description": "URL path to the first page if available.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0",
+ "anyOf": [
+ {
"type": "string"
},
- "code": {
- "type": "string",
- "const": "bad_request.invalid_slug"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": {
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "prev": {
+ "anyOf": [
+ {
"type": "string"
},
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
+ {
+ "type": "null"
}
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
+ ],
+ "description": "URL path to the previous page.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0"
},
- {
- "type": "object",
- "properties": {
- "id": {
+ "next": {
+ "anyOf": [
+ {
"type": "string"
},
- "code": {
- "type": "string",
- "const": "bad_request.invalid_ref"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": {
+ {
+ "type": "null"
+ }
+ ],
+ "description": "URL path to the next page.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20"
+ },
+ "last": {
+ "description": "URL path to the last page if available.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30",
+ "anyOf": [
+ {
"type": "string"
},
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
+ {
+ "type": "null"
}
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
+ ]
}
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
+ },
+ "required": ["prev", "next"]
}
},
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
+ "required": ["data", "links"]
}
}
}
@@ -5324,13 +3829,11 @@
}
}
},
- "summary": "Delete all endpoints",
- "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op."
- }
- },
- "/v2/projects/{ref}/webhooks/endpoints/{id}": {
- "get": {
- "operationId": "v2-projects-ref-webhooks-endpoints-id-get",
+ "summary": "List endpoints",
+ "description": "List all Webhook endpoints based on a project's ref or an organization's slug."
+ },
+ "post": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-post",
"parameters": [
{
"in": "path",
@@ -5344,23 +3847,12 @@
},
"required": true,
"description": "Project ref"
- },
- {
- "in": "path",
- "name": "id",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "required": true,
- "description": "Identifier of an endpoint (UUID v7)."
}
],
"tags": ["Project webhooks"],
"responses": {
- "200": {
- "description": "Endpoint details",
+ "201": {
+ "description": "Created endpoint",
"content": {
"application/json": {
"schema": {
@@ -5507,230 +3999,54 @@
}
}
},
- "400": {
- "description": "Multiple error responses",
+ "401": {
+ "description": "GenericUnauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
- "oneOf": [
- {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "unauthorized"
+ },
+ "message": {
+ "type": "string",
+ "const": "Unauthorized"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
"type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_slug"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
"type": "string"
},
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_ref"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
- }
- },
- "401": {
- "description": "GenericUnauthorized",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "unauthorized"
- },
- "message": {
- "type": "string",
- "const": "Unauthorized"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
"type": "object",
"propertyNames": {
"type": "string"
@@ -5954,8 +4270,8 @@
}
}
},
- "404": {
- "description": "EndpointNotFound",
+ "408": {
+ "description": "GenericRequestTimeout",
"content": {
"application/json": {
"schema": {
@@ -5969,11 +4285,11 @@
},
"code": {
"type": "string",
- "const": "not_found.endpoint"
+ "const": "request_timeout"
},
"message": {
"type": "string",
- "const": "Not Found: Endpoint not found"
+ "const": "Request Timeout"
},
"description": {
"type": "string"
@@ -6040,8 +4356,8 @@
"Default example": {
"value": {
"error": {
- "code": "not_found.endpoint",
- "message": "Not Found: Endpoint not found"
+ "code": "request_timeout",
+ "message": "Request Timeout"
}
}
}
@@ -6049,8 +4365,8 @@
}
}
},
- "408": {
- "description": "GenericRequestTimeout",
+ "429": {
+ "description": "GenericTooManyRequests",
"content": {
"application/json": {
"schema": {
@@ -6064,11 +4380,11 @@
},
"code": {
"type": "string",
- "const": "request_timeout"
+ "const": "too_many_requests"
},
"message": {
"type": "string",
- "const": "Request Timeout"
+ "const": "Too Many Requests"
},
"description": {
"type": "string"
@@ -6135,8 +4451,8 @@
"Default example": {
"value": {
"error": {
- "code": "request_timeout",
- "message": "Request Timeout"
+ "code": "too_many_requests",
+ "message": "Too Many Requests"
}
}
}
@@ -6144,8 +4460,8 @@
}
}
},
- "429": {
- "description": "GenericTooManyRequests",
+ "500": {
+ "description": "GenericInternalServerError",
"content": {
"application/json": {
"schema": {
@@ -6159,11 +4475,11 @@
},
"code": {
"type": "string",
- "const": "too_many_requests"
+ "const": "internal_server_error"
},
"message": {
"type": "string",
- "const": "Too Many Requests"
+ "const": "Internal Server Error"
},
"description": {
"type": "string"
@@ -6230,116 +4546,144 @@
"Default example": {
"value": {
"error": {
- "code": "too_many_requests",
- "message": "Too Many Requests"
+ "code": "internal_server_error",
+ "message": "Internal Server Error"
}
}
}
}
}
}
- },
- "500": {
- "description": "GenericInternalServerError",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "internal_server_error"
- },
- "message": {
- "type": "string",
- "const": "Internal Server Error"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
+ }
+ },
+ "summary": "Create endpoint",
+ "description": "Create new endpoint configuration to subscribe to specific webhook events.",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "default": true,
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string",
+ "maxLength": 512
},
- "describedby": {
- "type": "string"
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
},
- "meta": {
+ "required": ["type"]
+ },
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [
+ {
+ "type": "v1.project.paused"
+ }
+ ]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
"type": "object",
"propertyNames": {
- "type": "string"
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
},
- "additionalProperties": {}
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
}
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": {
+ "Authorization": "Bearer example_token"
+ }
},
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
+ "signing_secret": {
+ "type": "string",
+ "minLength": 8,
+ "maxLength": 64,
+ "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
}
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "internal_server_error",
- "message": "Internal Server Error"
+ },
+ "required": ["url", "event_types", "signing_secret"]
}
- }
+ },
+ "required": ["type", "attributes"]
}
- }
+ },
+ "required": ["data"]
}
}
}
- },
- "summary": "Get endpoint",
- "description": "Get details of a specific endpoint."
+ }
},
- "patch": {
- "operationId": "v2-projects-ref-webhooks-endpoints-id-patch",
+ "delete": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-delete",
"parameters": [
{
"in": "path",
@@ -6353,162 +4697,154 @@
},
"required": true,
"description": "Project ref"
- },
- {
- "in": "path",
- "name": "id",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "required": true,
- "description": "Identifier of an endpoint (UUID v7)."
}
],
"tags": ["Project webhooks"],
"responses": {
"200": {
- "description": "Updated endpoint details",
+ "description": "Deleted endpoints",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 512
- },
- {
- "type": "null"
- }
- ],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [
- {
- "type": "v1.project.paused"
- }
- ]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [
+ {
"type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
+ "maxLength": 512
},
- "additionalProperties": {
- "type": "string"
+ {
+ "type": "null"
}
+ ],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
+ },
+ "required": ["type"]
},
- {
- "type": "null"
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [
+ {
+ "type": "v1.project.paused"
+ }
+ ]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": {
+ "Authorization": "Bearer example_token"
}
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": {
- "Authorization": "Bearer example_token"
+ },
+ "created_by": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the user who created the endpoint."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of endpoint's creation."
}
},
- "created_by": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the user who created the endpoint."
- },
- "created_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of endpoint's creation."
- }
- },
- "required": [
- "id",
- "url",
- "enabled",
- "description",
- "event_types",
- "created_by",
- "created_at"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
+ "required": [
+ "id",
+ "url",
+ "enabled",
+ "description",
+ "event_types",
+ "created_by",
+ "created_at"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
}
},
"required": ["data"]
@@ -6516,218 +4852,42 @@
}
}
},
- "400": {
- "description": "Multiple error responses",
+ "401": {
+ "description": "GenericUnauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
- "oneOf": [
- {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "unauthorized"
+ },
+ "message": {
+ "type": "string",
+ "const": "Unauthorized"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
"type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_slug"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
"type": "string"
},
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_ref"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
- }
- },
- "401": {
- "description": "GenericUnauthorized",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "unauthorized"
- },
- "message": {
- "type": "string",
- "const": "Unauthorized"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
+ "rel": {
"type": "string"
},
"title": {
@@ -6963,101 +5123,6 @@
}
}
},
- "404": {
- "description": "EndpointNotFound",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "not_found.endpoint"
- },
- "message": {
- "type": "string",
- "const": "Not Found: Endpoint not found"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "not_found.endpoint",
- "message": "Not Found: Endpoint not found"
- }
- }
- }
- }
- }
- }
- },
"408": {
"description": "GenericRequestTimeout",
"content": {
@@ -7344,132 +5409,13 @@
}
}
},
- "summary": "Update endpoint",
- "description": "Update endpoint's configuration.",
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 512
- },
- {
- "type": "null"
- }
- ],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [
- {
- "type": "v1.project.paused"
- }
- ]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
- },
- "additionalProperties": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": {
- "Authorization": "Bearer example_token"
- }
- },
- "signing_secret": {
- "type": "string",
- "minLength": 8,
- "maxLength": 64,
- "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
- }
- }
- }
- },
- "required": ["type", "attributes"]
- }
- },
- "required": ["data"]
- }
- }
- }
- }
- },
- "delete": {
- "operationId": "v2-projects-ref-webhooks-endpoints-id-delete",
+ "summary": "Delete all endpoints",
+ "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op."
+ }
+ },
+ "/v2/projects/{ref}/webhooks/endpoints/{id}": {
+ "get": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-id-get",
"parameters": [
{
"in": "path",
@@ -7499,7 +5445,7 @@
"tags": ["Project webhooks"],
"responses": {
"200": {
- "description": "Deleted endpoint details",
+ "description": "Endpoint details",
"content": {
"application/json": {
"schema": {
@@ -7646,7 +5592,102 @@
}
}
},
- "400": {
+ "401": {
+ "description": "GenericUnauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "unauthorized"
+ },
+ "message": {
+ "type": "string",
+ "const": "Unauthorized"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "unauthorized",
+ "message": "Unauthorized"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
"description": "Multiple error responses",
"content": {
"application/json": {
@@ -7663,11 +5704,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_slug"
+ "const": "forbidden.permission_denied"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "const": "Forbidden: Permission denied"
},
"description": {
"type": "string"
@@ -7721,7 +5762,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidSlug"
+ "title": "PermissionDenied"
},
{
"type": "object",
@@ -7731,11 +5772,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_ref"
+ "const": "forbidden.access_disabled"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid project ref"
+ "const": "Forbidden: Access disabled"
},
"description": {
"type": "string"
@@ -7789,7 +5830,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "AccessDisabled"
}
]
}
@@ -7802,19 +5843,19 @@
}
},
"examples": {
- "InvalidSlug": {
+ "PermissionDenied": {
"value": {
"error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "code": "forbidden.permission_denied",
+ "message": "Forbidden: Permission denied"
}
}
},
- "InvalidRef": {
+ "AccessDisabled": {
"value": {
"error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
+ "code": "forbidden.access_disabled",
+ "message": "Forbidden: Access disabled"
}
}
}
@@ -7822,8 +5863,8 @@
}
}
},
- "401": {
- "description": "GenericUnauthorized",
+ "404": {
+ "description": "EndpointNotFound",
"content": {
"application/json": {
"schema": {
@@ -7837,11 +5878,11 @@
},
"code": {
"type": "string",
- "const": "unauthorized"
+ "const": "not_found.endpoint"
},
"message": {
"type": "string",
- "const": "Unauthorized"
+ "const": "Not Found: Endpoint not found"
},
"description": {
"type": "string"
@@ -7908,8 +5949,8 @@
"Default example": {
"value": {
"error": {
- "code": "unauthorized",
- "message": "Unauthorized"
+ "code": "not_found.endpoint",
+ "message": "Not Found: Endpoint not found"
}
}
}
@@ -7917,207 +5958,31 @@
}
}
},
- "403": {
- "description": "Multiple error responses",
+ "408": {
+ "description": "GenericRequestTimeout",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.permission_denied"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.access_disabled"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Access disabled"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "PermissionDenied": {
- "value": {
- "error": {
- "code": "forbidden.permission_denied",
- "message": "Forbidden: Permission denied"
- }
- }
- },
- "AccessDisabled": {
- "value": {
- "error": {
- "code": "forbidden.access_disabled",
- "message": "Forbidden: Access disabled"
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "EndpointNotFound",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "not_found.endpoint"
- },
- "message": {
- "type": "string",
- "const": "Not Found: Endpoint not found"
- },
- "description": {
- "type": "string"
- },
- "links": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "request_timeout"
+ },
+ "message": {
+ "type": "string",
+ "const": "Request Timeout"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
"type": "object",
"propertyNames": {
"type": "string"
@@ -8179,8 +6044,8 @@
"Default example": {
"value": {
"error": {
- "code": "not_found.endpoint",
- "message": "Not Found: Endpoint not found"
+ "code": "request_timeout",
+ "message": "Request Timeout"
}
}
}
@@ -8188,8 +6053,8 @@
}
}
},
- "408": {
- "description": "GenericRequestTimeout",
+ "429": {
+ "description": "GenericTooManyRequests",
"content": {
"application/json": {
"schema": {
@@ -8203,11 +6068,11 @@
},
"code": {
"type": "string",
- "const": "request_timeout"
+ "const": "too_many_requests"
},
"message": {
"type": "string",
- "const": "Request Timeout"
+ "const": "Too Many Requests"
},
"description": {
"type": "string"
@@ -8274,8 +6139,8 @@
"Default example": {
"value": {
"error": {
- "code": "request_timeout",
- "message": "Request Timeout"
+ "code": "too_many_requests",
+ "message": "Too Many Requests"
}
}
}
@@ -8283,8 +6148,8 @@
}
}
},
- "429": {
- "description": "GenericTooManyRequests",
+ "500": {
+ "description": "GenericInternalServerError",
"content": {
"application/json": {
"schema": {
@@ -8298,11 +6163,11 @@
},
"code": {
"type": "string",
- "const": "too_many_requests"
+ "const": "internal_server_error"
},
"message": {
"type": "string",
- "const": "Too Many Requests"
+ "const": "Internal Server Error"
},
"description": {
"type": "string"
@@ -8369,35 +6234,217 @@
"Default example": {
"value": {
"error": {
- "code": "too_many_requests",
- "message": "Too Many Requests"
+ "code": "internal_server_error",
+ "message": "Internal Server Error"
}
}
}
}
}
}
+ }
+ },
+ "summary": "Get endpoint",
+ "description": "Get details of a specific endpoint."
+ },
+ "patch": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-id-patch",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "ref",
+ "schema": {
+ "type": "string",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst"
+ },
+ "required": true,
+ "description": "Project ref"
},
- "500": {
- "description": "GenericInternalServerError",
+ {
+ "in": "path",
+ "name": "id",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "required": true,
+ "description": "Identifier of an endpoint (UUID v7)."
+ }
+ ],
+ "tags": ["Project webhooks"],
+ "responses": {
+ "200": {
+ "description": "Updated endpoint details",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "error": {
+ "data": {
"type": "object",
"properties": {
- "id": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string",
+ "maxLength": 512
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
+ },
+ "required": ["type"]
+ },
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [
+ {
+ "type": "v1.project.paused"
+ }
+ ]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": {
+ "Authorization": "Bearer example_token"
+ }
+ },
+ "created_by": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the user who created the endpoint."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of endpoint's creation."
+ }
+ },
+ "required": [
+ "id",
+ "url",
+ "enabled",
+ "description",
+ "event_types",
+ "created_by",
+ "created_at"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "required": ["data"]
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "GenericUnauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
"code": {
"type": "string",
- "const": "internal_server_error"
+ "const": "unauthorized"
},
"message": {
"type": "string",
- "const": "Internal Server Error"
+ "const": "Unauthorized"
},
"description": {
"type": "string"
@@ -8464,255 +6511,17 @@
"Default example": {
"value": {
"error": {
- "code": "internal_server_error",
- "message": "Internal Server Error"
+ "code": "unauthorized",
+ "message": "Unauthorized"
}
}
}
}
}
}
- }
- },
- "summary": "Delete endpoint",
- "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op."
- }
- },
- "/v2/projects/{ref}/webhooks/endpoints/{id}/deliveries": {
- "get": {
- "operationId": "v2-projects-ref-webhooks-endpoints-id-deliveries-get",
- "parameters": [
- {
- "in": "path",
- "name": "ref",
- "schema": {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "example": "abcdefghijklmnopqrst"
- },
- "required": true,
- "description": "Project ref"
- },
- {
- "in": "path",
- "name": "id",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "required": true,
- "description": "Identifier of an endpoint (UUID v7)."
- },
- {
- "in": "query",
- "name": "page[before]",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param."
- },
- {
- "in": "query",
- "name": "page[after]",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param."
},
- {
- "in": "query",
- "name": "page[size]",
- "schema": {
- "default": "20",
- "type": "string",
- "pattern": "^\\d+$"
- },
- "description": "Up to how many records to return."
- }
- ],
- "tags": ["Project webhooks"],
- "responses": {
- "200": {
- "description": "List of deliveries",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "delivery",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
- },
- "event_id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of the event, which triggered the delivery (UUID v7)."
- },
- "status": {
- "type": "string",
- "enum": ["pending", "success", "failure", "skipped"],
- "description": "Status of the delivery attempt."
- },
- "response_code": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "HTTP status code of the response, `0` if unavailable."
- },
- "response_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ],
- "description": "HTTP headers of the response, `{}` if unavailable."
- },
- "response_body": {
- "anyOf": [
- {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "string"
- },
- "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
- },
- {
- "type": "string",
- "description": "String representation of an HTTP body of the response."
- }
- ]
- },
- {
- "type": "null"
- }
- ]
- },
- "attempt_timestamp": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of the attempt."
- }
- },
- "required": [
- "id",
- "event_id",
- "status",
- "response_code",
- "response_headers",
- "response_body",
- "attempt_timestamp"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "links": {
- "type": "object",
- "properties": {
- "first": {
- "description": "URL path to the first page if available.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10",
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "prev": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "URL path to the previous page.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7"
- },
- "next": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "URL path to the next page.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4"
- },
- "last": {
- "description": "URL path to the last page if available.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295",
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": ["prev", "next"]
- }
- },
- "required": ["data", "links"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
+ "403": {
+ "description": "Multiple error responses",
"content": {
"application/json": {
"schema": {
@@ -8728,11 +6537,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_slug"
+ "const": "forbidden.permission_denied"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "const": "Forbidden: Permission denied"
},
"description": {
"type": "string"
@@ -8786,7 +6595,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidSlug"
+ "title": "PermissionDenied"
},
{
"type": "object",
@@ -8796,11 +6605,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_ref"
+ "const": "forbidden.access_disabled"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid project ref"
+ "const": "Forbidden: Access disabled"
},
"description": {
"type": "string"
@@ -8854,7 +6663,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "AccessDisabled"
}
]
}
@@ -8867,19 +6676,19 @@
}
},
"examples": {
- "InvalidSlug": {
+ "PermissionDenied": {
"value": {
"error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "code": "forbidden.permission_denied",
+ "message": "Forbidden: Permission denied"
}
}
},
- "InvalidRef": {
+ "AccessDisabled": {
"value": {
"error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
+ "code": "forbidden.access_disabled",
+ "message": "Forbidden: Access disabled"
}
}
}
@@ -8887,8 +6696,8 @@
}
}
},
- "401": {
- "description": "GenericUnauthorized",
+ "404": {
+ "description": "EndpointNotFound",
"content": {
"application/json": {
"schema": {
@@ -8902,11 +6711,11 @@
},
"code": {
"type": "string",
- "const": "unauthorized"
+ "const": "not_found.endpoint"
},
"message": {
"type": "string",
- "const": "Unauthorized"
+ "const": "Not Found: Endpoint not found"
},
"description": {
"type": "string"
@@ -8973,8 +6782,8 @@
"Default example": {
"value": {
"error": {
- "code": "unauthorized",
- "message": "Unauthorized"
+ "code": "not_found.endpoint",
+ "message": "Not Found: Endpoint not found"
}
}
}
@@ -8982,235 +6791,59 @@
}
}
},
- "403": {
- "description": "Multiple error responses",
+ "408": {
+ "description": "GenericRequestTimeout",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
- "oneOf": [
- {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "request_timeout"
+ },
+ "message": {
+ "type": "string",
+ "const": "Request Timeout"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
"type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.permission_denied"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
"type": "string"
},
- "additionalProperties": {
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
"type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
+ "propertyNames": {
+ "type": "string"
},
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.access_disabled"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Access disabled"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "PermissionDenied": {
- "value": {
- "error": {
- "code": "forbidden.permission_denied",
- "message": "Forbidden: Permission denied"
- }
- }
- },
- "AccessDisabled": {
- "value": {
- "error": {
- "code": "forbidden.access_disabled",
- "message": "Forbidden: Access disabled"
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "EndpointNotFound",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "not_found.endpoint"
- },
- "message": {
- "type": "string",
- "const": "Not Found: Endpoint not found"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "additionalProperties": {}
}
},
"required": ["href"]
@@ -9244,8 +6877,8 @@
"Default example": {
"value": {
"error": {
- "code": "not_found.endpoint",
- "message": "Not Found: Endpoint not found"
+ "code": "request_timeout",
+ "message": "Request Timeout"
}
}
}
@@ -9253,8 +6886,8 @@
}
}
},
- "408": {
- "description": "GenericRequestTimeout",
+ "429": {
+ "description": "GenericTooManyRequests",
"content": {
"application/json": {
"schema": {
@@ -9268,11 +6901,11 @@
},
"code": {
"type": "string",
- "const": "request_timeout"
+ "const": "too_many_requests"
},
"message": {
"type": "string",
- "const": "Request Timeout"
+ "const": "Too Many Requests"
},
"description": {
"type": "string"
@@ -9339,8 +6972,8 @@
"Default example": {
"value": {
"error": {
- "code": "request_timeout",
- "message": "Request Timeout"
+ "code": "too_many_requests",
+ "message": "Too Many Requests"
}
}
}
@@ -9348,8 +6981,8 @@
}
}
},
- "429": {
- "description": "GenericTooManyRequests",
+ "500": {
+ "description": "GenericInternalServerError",
"content": {
"application/json": {
"schema": {
@@ -9363,11 +6996,11 @@
},
"code": {
"type": "string",
- "const": "too_many_requests"
+ "const": "internal_server_error"
},
"message": {
"type": "string",
- "const": "Too Many Requests"
+ "const": "Internal Server Error"
},
"description": {
"type": "string"
@@ -9434,118 +7067,142 @@
"Default example": {
"value": {
"error": {
- "code": "too_many_requests",
- "message": "Too Many Requests"
+ "code": "internal_server_error",
+ "message": "Internal Server Error"
}
}
}
}
}
}
- },
- "500": {
- "description": "GenericInternalServerError",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "internal_server_error"
- },
- "message": {
- "type": "string",
- "const": "Internal Server Error"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
+ }
+ },
+ "summary": "Update endpoint",
+ "description": "Update endpoint's configuration.",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
},
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string",
+ "maxLength": 512
},
- "describedby": {
- "type": "string"
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
},
- "meta": {
+ "required": ["type"]
+ },
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [
+ {
+ "type": "v1.project.paused"
+ }
+ ]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
"type": "object",
"propertyNames": {
- "type": "string"
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
},
- "additionalProperties": {}
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
}
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": {
+ "Authorization": "Bearer example_token"
+ }
},
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
+ "signing_secret": {
+ "type": "string",
+ "minLength": 8,
+ "maxLength": 64,
+ "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
}
}
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "internal_server_error",
- "message": "Internal Server Error"
}
- }
+ },
+ "required": ["type", "attributes"]
}
- }
+ },
+ "required": ["data"]
}
}
}
- },
- "summary": "List deliveries",
- "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed."
- }
- },
- "/v2/projects/{ref}/webhooks/endpoints/{id}/test": {
- "post": {
- "operationId": "v2-projects-ref-webhooks-endpoints-id-test-post",
+ }
+ },
+ "delete": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-id-delete",
"parameters": [
{
"in": "path",
@@ -9574,8 +7231,8 @@
],
"tags": ["Project webhooks"],
"responses": {
- "201": {
- "description": "Event published",
+ "200": {
+ "description": "Deleted endpoint details",
"content": {
"application/json": {
"schema": {
@@ -9586,166 +7243,246 @@
"properties": {
"type": {
"type": "string",
- "const": "ingress",
+ "const": "endpoint",
"description": "Resource type."
},
"id": {
- "type": "string"
- }
- },
- "required": ["type", "id"]
- }
- },
- "required": ["data"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "attributes": {
"type": "object",
"properties": {
"id": {
- "type": "string"
- },
- "code": {
"type": "string",
- "const": "bad_request.endpoint.test.disabled"
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
},
- "message": {
+ "url": {
"type": "string",
- "const": "Bad Request: Endpoint is disabled"
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
},
- "description": {
- "type": "string"
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
},
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
+ "description": {
+ "anyOf": [
+ {
+ "type": "string",
+ "maxLength": 512
},
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional description for the endpoint."
},
- "issues": {
+ "event_types": {
+ "minItems": 1,
"type": "array",
"items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "EndpointTestDisabled"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.endpoint.test.wrong_event_type"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Provided event type is not subscribed to by the endpoint"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
"type": "object",
"properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
"type": {
- "type": "string"
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
+ },
+ "required": ["type"]
+ },
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [
+ {
+ "type": "v1.project.paused"
+ }
+ ]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
},
- "describedby": {
+ "additionalProperties": {
"type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
}
},
- "required": ["href"]
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": {
+ "Authorization": "Bearer example_token"
}
},
- "meta": {
- "type": "object",
- "propertyNames": {
+ "created_by": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the user who created the endpoint."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of endpoint's creation."
+ }
+ },
+ "required": [
+ "id",
+ "url",
+ "enabled",
+ "description",
+ "event_types",
+ "created_by",
+ "created_at"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "required": ["data"]
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "GenericUnauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "unauthorized"
+ },
+ "message": {
+ "type": "string",
+ "const": "Unauthorized"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
"type": "string"
},
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
}
- }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
},
- "required": ["code", "message"],
- "title": "EndpointTestWrongEventType"
+ "additionalProperties": {}
},
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "unauthorized",
+ "message": "Unauthorized"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Multiple error responses",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "oneOf": [
{
"type": "object",
"properties": {
@@ -9754,11 +7491,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_slug"
+ "const": "forbidden.permission_denied"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "const": "Forbidden: Permission denied"
},
"description": {
"type": "string"
@@ -9812,7 +7549,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidSlug"
+ "title": "PermissionDenied"
},
{
"type": "object",
@@ -9822,11 +7559,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_ref"
+ "const": "forbidden.access_disabled"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid project ref"
+ "const": "Forbidden: Access disabled"
},
"description": {
"type": "string"
@@ -9880,7 +7617,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "AccessDisabled"
}
]
}
@@ -9893,37 +7630,19 @@
}
},
"examples": {
- "EndpointTestDisabled": {
+ "PermissionDenied": {
"value": {
"error": {
- "code": "bad_request.endpoint.test.disabled",
- "message": "Bad Request: Endpoint is disabled",
- "description": "Endpoint is disabled, to send test event endpoint must first be enabled."
+ "code": "forbidden.permission_denied",
+ "message": "Forbidden: Permission denied"
}
}
},
- "EndpointTestWrongEventType": {
+ "AccessDisabled": {
"value": {
"error": {
- "code": "bad_request.endpoint.test.wrong_event_type",
- "message": "Bad Request: Provided event type is not subscribed to by the endpoint",
- "description": "Only event types that the endpoint is subscribed to can be specified."
- }
- }
- },
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
+ "code": "forbidden.access_disabled",
+ "message": "Forbidden: Access disabled"
}
}
}
@@ -9931,8 +7650,8 @@
}
}
},
- "401": {
- "description": "GenericUnauthorized",
+ "404": {
+ "description": "EndpointNotFound",
"content": {
"application/json": {
"schema": {
@@ -9946,11 +7665,11 @@
},
"code": {
"type": "string",
- "const": "unauthorized"
+ "const": "not_found.endpoint"
},
"message": {
"type": "string",
- "const": "Unauthorized"
+ "const": "Not Found: Endpoint not found"
},
"description": {
"type": "string"
@@ -10017,184 +7736,8 @@
"Default example": {
"value": {
"error": {
- "code": "unauthorized",
- "message": "Unauthorized"
- }
- }
- }
- }
- }
- }
- },
- "403": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.permission_denied"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.access_disabled"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Access disabled"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "PermissionDenied": {
- "value": {
- "error": {
- "code": "forbidden.permission_denied",
- "message": "Forbidden: Permission denied"
- }
- }
- },
- "AccessDisabled": {
- "value": {
- "error": {
- "code": "forbidden.access_disabled",
- "message": "Forbidden: Access disabled"
+ "code": "not_found.endpoint",
+ "message": "Not Found: Endpoint not found"
}
}
}
@@ -10202,8 +7745,8 @@
}
}
},
- "404": {
- "description": "EndpointNotFound",
+ "408": {
+ "description": "GenericRequestTimeout",
"content": {
"application/json": {
"schema": {
@@ -10217,11 +7760,11 @@
},
"code": {
"type": "string",
- "const": "not_found.endpoint"
+ "const": "request_timeout"
},
"message": {
"type": "string",
- "const": "Not Found: Endpoint not found"
+ "const": "Request Timeout"
},
"description": {
"type": "string"
@@ -10288,8 +7831,8 @@
"Default example": {
"value": {
"error": {
- "code": "not_found.endpoint",
- "message": "Not Found: Endpoint not found"
+ "code": "request_timeout",
+ "message": "Request Timeout"
}
}
}
@@ -10297,8 +7840,8 @@
}
}
},
- "408": {
- "description": "GenericRequestTimeout",
+ "429": {
+ "description": "GenericTooManyRequests",
"content": {
"application/json": {
"schema": {
@@ -10312,11 +7855,11 @@
},
"code": {
"type": "string",
- "const": "request_timeout"
+ "const": "too_many_requests"
},
"message": {
"type": "string",
- "const": "Request Timeout"
+ "const": "Too Many Requests"
},
"description": {
"type": "string"
@@ -10383,8 +7926,8 @@
"Default example": {
"value": {
"error": {
- "code": "request_timeout",
- "message": "Request Timeout"
+ "code": "too_many_requests",
+ "message": "Too Many Requests"
}
}
}
@@ -10392,8 +7935,8 @@
}
}
},
- "429": {
- "description": "GenericTooManyRequests",
+ "500": {
+ "description": "GenericInternalServerError",
"content": {
"application/json": {
"schema": {
@@ -10407,11 +7950,11 @@
},
"code": {
"type": "string",
- "const": "too_many_requests"
+ "const": "internal_server_error"
},
"message": {
"type": "string",
- "const": "Too Many Requests"
+ "const": "Internal Server Error"
},
"description": {
"type": "string"
@@ -10478,17 +8021,255 @@
"Default example": {
"value": {
"error": {
- "code": "too_many_requests",
- "message": "Too Many Requests"
+ "code": "internal_server_error",
+ "message": "Internal Server Error"
}
}
}
}
}
}
+ }
+ },
+ "summary": "Delete endpoint",
+ "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op."
+ }
+ },
+ "/v2/projects/{ref}/webhooks/endpoints/{id}/deliveries": {
+ "get": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-id-deliveries-get",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "ref",
+ "schema": {
+ "type": "string",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst"
+ },
+ "required": true,
+ "description": "Project ref"
},
- "500": {
- "description": "GenericInternalServerError",
+ {
+ "in": "path",
+ "name": "id",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "required": true,
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ {
+ "in": "query",
+ "name": "page[before]",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param."
+ },
+ {
+ "in": "query",
+ "name": "page[after]",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param."
+ },
+ {
+ "in": "query",
+ "name": "page[size]",
+ "schema": {
+ "default": "20",
+ "type": "string",
+ "pattern": "^\\d+$"
+ },
+ "description": "Up to how many records to return."
+ }
+ ],
+ "tags": ["Project webhooks"],
+ "responses": {
+ "200": {
+ "description": "List of deliveries",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "delivery",
+ "description": "Resource type."
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
+ },
+ "event_id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of the event, which triggered the delivery (UUID v7)."
+ },
+ "status": {
+ "type": "string",
+ "enum": ["pending", "success", "failure", "skipped"],
+ "description": "Status of the delivery attempt."
+ },
+ "response_code": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "HTTP status code of the response, `0` if unavailable."
+ },
+ "response_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "HTTP headers of the response, `{}` if unavailable."
+ },
+ "response_body": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
+ },
+ {
+ "type": "string",
+ "description": "String representation of an HTTP body of the response."
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "attempt_timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of the attempt."
+ }
+ },
+ "required": [
+ "id",
+ "event_id",
+ "status",
+ "response_code",
+ "response_headers",
+ "response_body",
+ "attempt_timestamp"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "links": {
+ "type": "object",
+ "properties": {
+ "first": {
+ "description": "URL path to the first page if available.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10",
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "prev": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "URL path to the previous page.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7"
+ },
+ "next": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "URL path to the next page.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4"
+ },
+ "last": {
+ "description": "URL path to the last page if available.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295",
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["prev", "next"]
+ }
+ },
+ "required": ["data", "links"]
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "GenericUnauthorized",
"content": {
"application/json": {
"schema": {
@@ -10502,11 +8283,11 @@
},
"code": {
"type": "string",
- "const": "internal_server_error"
+ "const": "unauthorized"
},
"message": {
"type": "string",
- "const": "Internal Server Error"
+ "const": "Unauthorized"
},
"description": {
"type": "string"
@@ -10573,425 +8354,110 @@
"Default example": {
"value": {
"error": {
- "code": "internal_server_error",
- "message": "Internal Server Error"
+ "code": "unauthorized",
+ "message": "Unauthorized"
}
}
}
}
}
}
- }
- },
- "summary": "Send test event",
- "description": "Ingests and schedules a test webhook event to be published out this endpoints.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.",
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "event",
- "description": "Resource type."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "type": {
- "description": "Webhook event type.",
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "project.v1.paused",
- "project.v1.created",
- "project.v1.restored",
- "project.v1.transferred",
- "project.v1.removed",
- "project.v1.restarted",
- "project.v1.status.changed",
- "project.v1.backup.started",
- "project.v1.branch.created",
- "project.v1.branch.updated",
- "project.v1.branch.removed",
- "organization.v1.member.invitation.created",
- "organization.v1.member.invitation.canceled",
- "organization.v1.member.added",
- "organization.v1.member.removed",
- "organization.v1.member.role.assigned",
- "organization.v1.member.role.removed",
- "organization.v1.member.role.updated",
- "organization.v1.billing.plan.upgraded",
- "organization.v1.billing.plan.downgraded",
- "project.v1.branch.deleted"
- ]
- }
- },
- "required": ["type"]
- }
- },
- "required": ["type", "attributes"]
- }
- }
- }
- }
- }
- }
- }
- },
- "/v2/projects/{ref}/webhooks/deliveries/{id}": {
- "get": {
- "operationId": "v2-projects-ref-webhooks-deliveries-id-get",
- "parameters": [
- {
- "in": "path",
- "name": "ref",
- "schema": {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "example": "abcdefghijklmnopqrst"
- },
- "required": true,
- "description": "Project ref"
},
- {
- "in": "path",
- "name": "id",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "required": true,
- "description": "Identifier of a delivery (UUID v7)."
- }
- ],
- "tags": ["Project webhooks"],
- "responses": {
- "200": {
- "description": "Delivery details",
+ "403": {
+ "description": "Multiple error responses",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "delivery",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
- },
- "attributes": {
+ "error": {
+ "oneOf": [
+ {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
+ "type": "string"
},
- "event_id": {
+ "code": {
"type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of the event, which triggered the delivery (UUID v7)."
+ "const": "forbidden.permission_denied"
},
- "status": {
+ "message": {
"type": "string",
- "enum": ["pending", "success", "failure", "skipped"],
- "description": "Status of the delivery attempt."
+ "const": "Forbidden: Permission denied"
},
- "response_code": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "HTTP status code of the response, `0` if unavailable."
+ "description": {
+ "type": "string"
},
- "response_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
"type": "string"
},
- "additionalProperties": {
+ "rel": {
"type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
}
},
- {
- "type": "null"
- }
- ],
- "description": "HTTP headers of the response, `{}` if unavailable."
+ "required": ["href"]
+ }
},
- "response_body": {
- "anyOf": [
- {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "string"
- },
- "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
- },
- {
- "type": "string",
- "description": "String representation of an HTTP body of the response."
- }
- ]
- },
- {
- "type": "null"
- }
- ]
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
},
- "attempt_timestamp": {
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "required": ["code", "message"],
+ "title": "PermissionDenied"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
"type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of the attempt."
+ "const": "forbidden.access_disabled"
},
- "event": {
- "type": "object",
- "properties": {
- "type": {
- "description": "Webhook event type.",
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "project.v1.paused",
- "project.v1.created",
- "project.v1.restored",
- "project.v1.transferred",
- "project.v1.removed",
- "project.v1.restarted",
- "project.v1.status.changed",
- "project.v1.backup.started",
- "project.v1.branch.created",
- "project.v1.branch.updated",
- "project.v1.branch.removed",
- "organization.v1.member.invitation.created",
- "organization.v1.member.invitation.canceled",
- "organization.v1.member.added",
- "organization.v1.member.removed",
- "organization.v1.member.role.assigned",
- "organization.v1.member.role.removed",
- "organization.v1.member.role.updated",
- "organization.v1.billing.plan.upgraded",
- "organization.v1.billing.plan.downgraded",
- "project.v1.branch.deleted"
- ]
- },
- "payload": {
- "type": "object",
- "properties": {
- "organization_slug": {
- "type": "string",
- "pattern": "^[\\w-]+$",
- "description": "Organization slug",
- "example": "tsrqponmlkjihgfedcba"
- },
- "project_ref": {
- "anyOf": [
- {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "description": "Project ref",
- "example": "abcdefghijklmnopqrst"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": ["organization_slug", "project_ref"],
- "description": "Final data sent to the consumer."
- },
- "timestamp": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of event publication."
- }
- },
- "required": ["type", "payload", "timestamp"]
- }
- },
- "required": [
- "id",
- "event_id",
- "status",
- "response_code",
- "response_headers",
- "response_body",
- "attempt_timestamp",
- "event"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "required": ["data"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_slug"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_ref"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": {
- "type": "string"
- },
- "links": {
+ "message": {
+ "type": "string",
+ "const": "Forbidden: Access disabled"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
"type": "object",
"propertyNames": {
"type": "string"
@@ -11040,7 +8506,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "AccessDisabled"
}
]
}
@@ -11053,19 +8519,19 @@
}
},
"examples": {
- "InvalidSlug": {
+ "PermissionDenied": {
"value": {
"error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "code": "forbidden.permission_denied",
+ "message": "Forbidden: Permission denied"
}
}
},
- "InvalidRef": {
+ "AccessDisabled": {
"value": {
"error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
+ "code": "forbidden.access_disabled",
+ "message": "Forbidden: Access disabled"
}
}
}
@@ -11073,8 +8539,8 @@
}
}
},
- "401": {
- "description": "GenericUnauthorized",
+ "404": {
+ "description": "EndpointNotFound",
"content": {
"application/json": {
"schema": {
@@ -11088,11 +8554,11 @@
},
"code": {
"type": "string",
- "const": "unauthorized"
+ "const": "not_found.endpoint"
},
"message": {
"type": "string",
- "const": "Unauthorized"
+ "const": "Not Found: Endpoint not found"
},
"description": {
"type": "string"
@@ -11159,8 +8625,8 @@
"Default example": {
"value": {
"error": {
- "code": "unauthorized",
- "message": "Unauthorized"
+ "code": "not_found.endpoint",
+ "message": "Not Found: Endpoint not found"
}
}
}
@@ -11168,230 +8634,54 @@
}
}
},
- "403": {
- "description": "Multiple error responses",
+ "408": {
+ "description": "GenericRequestTimeout",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
- "oneOf": [
- {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "request_timeout"
+ },
+ "message": {
+ "type": "string",
+ "const": "Request Timeout"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
"type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.permission_denied"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
"type": "string"
},
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.access_disabled"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Access disabled"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "PermissionDenied": {
- "value": {
- "error": {
- "code": "forbidden.permission_denied",
- "message": "Forbidden: Permission denied"
- }
- }
- },
- "AccessDisabled": {
- "value": {
- "error": {
- "code": "forbidden.access_disabled",
- "message": "Forbidden: Access disabled"
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "DeliveryNotFound",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "not_found.delivery"
- },
- "message": {
- "type": "string",
- "const": "Not Found: Delivery not found"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
"type": "object",
"propertyNames": {
"type": "string"
@@ -11430,8 +8720,8 @@
"Default example": {
"value": {
"error": {
- "code": "not_found.delivery",
- "message": "Not Found: Delivery not found"
+ "code": "request_timeout",
+ "message": "Request Timeout"
}
}
}
@@ -11439,8 +8729,8 @@
}
}
},
- "408": {
- "description": "GenericRequestTimeout",
+ "429": {
+ "description": "GenericTooManyRequests",
"content": {
"application/json": {
"schema": {
@@ -11454,11 +8744,11 @@
},
"code": {
"type": "string",
- "const": "request_timeout"
+ "const": "too_many_requests"
},
"message": {
"type": "string",
- "const": "Request Timeout"
+ "const": "Too Many Requests"
},
"description": {
"type": "string"
@@ -11525,8 +8815,8 @@
"Default example": {
"value": {
"error": {
- "code": "request_timeout",
- "message": "Request Timeout"
+ "code": "too_many_requests",
+ "message": "Too Many Requests"
}
}
}
@@ -11534,8 +8824,8 @@
}
}
},
- "429": {
- "description": "GenericTooManyRequests",
+ "500": {
+ "description": "GenericInternalServerError",
"content": {
"application/json": {
"schema": {
@@ -11549,11 +8839,11 @@
},
"code": {
"type": "string",
- "const": "too_many_requests"
+ "const": "internal_server_error"
},
"message": {
"type": "string",
- "const": "Too Many Requests"
+ "const": "Internal Server Error"
},
"description": {
"type": "string"
@@ -11620,154 +8910,59 @@
"Default example": {
"value": {
"error": {
- "code": "too_many_requests",
- "message": "Too Many Requests"
+ "code": "internal_server_error",
+ "message": "Internal Server Error"
}
}
}
}
}
}
+ }
+ },
+ "summary": "List deliveries",
+ "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed."
+ }
+ },
+ "/v2/projects/{ref}/webhooks/endpoints/{id}/test": {
+ "post": {
+ "operationId": "v2-projects-ref-webhooks-endpoints-id-test-post",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "ref",
+ "schema": {
+ "type": "string",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst"
+ },
+ "required": true,
+ "description": "Project ref"
},
- "500": {
- "description": "GenericInternalServerError",
+ {
+ "in": "path",
+ "name": "id",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "required": true,
+ "description": "Identifier of an endpoint (UUID v7)."
+ }
+ ],
+ "tags": ["Project webhooks"],
+ "responses": {
+ "201": {
+ "description": "Event published",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "internal_server_error"
- },
- "message": {
- "type": "string",
- "const": "Internal Server Error"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "internal_server_error",
- "message": "Internal Server Error"
- }
- }
- }
- }
- }
- }
- }
- },
- "summary": "Get delivery",
- "description": "Get details of a specific delivery attempt."
- }
- },
- "/v2/projects/{ref}/webhooks/deliveries/{id}/retry": {
- "post": {
- "operationId": "v2-projects-ref-webhooks-deliveries-id-retry-post",
- "parameters": [
- {
- "in": "path",
- "name": "ref",
- "schema": {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "example": "abcdefghijklmnopqrst"
- },
- "required": true,
- "description": "Project ref"
- },
- {
- "in": "path",
- "name": "id",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "required": true,
- "description": "Identifier of a delivery (UUID v7)."
- }
- ],
- "tags": ["Project webhooks"],
- "responses": {
- "201": {
- "description": "Delivery details",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
+ "data": {
"type": "object",
"properties": {
"type": {
@@ -11804,11 +8999,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_slug"
+ "const": "bad_request.endpoint.test.disabled"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "const": "Bad Request: Endpoint is disabled"
},
"description": {
"type": "string"
@@ -11862,7 +9057,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidSlug"
+ "title": "EndpointTestDisabled"
},
{
"type": "object",
@@ -11872,11 +9067,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_ref"
+ "const": "bad_request.endpoint.test.wrong_event_type"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid project ref"
+ "const": "Bad Request: Provided event type is not subscribed to by the endpoint"
},
"description": {
"type": "string"
@@ -11930,7 +9125,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "EndpointTestWrongEventType"
}
]
}
@@ -11943,19 +9138,21 @@
}
},
"examples": {
- "InvalidSlug": {
+ "EndpointTestDisabled": {
"value": {
"error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "code": "bad_request.endpoint.test.disabled",
+ "message": "Bad Request: Endpoint is disabled",
+ "description": "Endpoint is disabled, to send test event endpoint must first be enabled."
}
}
},
- "InvalidRef": {
+ "EndpointTestWrongEventType": {
"value": {
"error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
+ "code": "bad_request.endpoint.test.wrong_event_type",
+ "message": "Bad Request: Provided event type is not subscribed to by the endpoint",
+ "description": "Only event types that the endpoint is subscribed to can be specified."
}
}
}
@@ -12235,7 +9432,7 @@
}
},
"404": {
- "description": "DeliveryNotFound",
+ "description": "EndpointNotFound",
"content": {
"application/json": {
"schema": {
@@ -12249,11 +9446,11 @@
},
"code": {
"type": "string",
- "const": "not_found.delivery"
+ "const": "not_found.endpoint"
},
"message": {
"type": "string",
- "const": "Not Found: Delivery not found"
+ "const": "Not Found: Endpoint not found"
},
"description": {
"type": "string"
@@ -12320,8 +9517,8 @@
"Default example": {
"value": {
"error": {
- "code": "not_found.delivery",
- "message": "Not Found: Delivery not found"
+ "code": "not_found.endpoint",
+ "message": "Not Found: Endpoint not found"
}
}
}
@@ -12615,425 +9812,316 @@
}
}
},
- "summary": "Retry delivery",
- "description": "Retry delivering the same event again.\n\nAutomatic retries are not applicable to manual retries - if the delivery fails, there won't be any automatic retries attempted.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds."
+ "summary": "Send test event",
+ "description": "Ingests and schedules a test webhook event to be published out this endpoints.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "event",
+ "description": "Resource type."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "Webhook event type.",
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "project.v1.paused",
+ "project.v1.created",
+ "project.v1.restored",
+ "project.v1.transferred",
+ "project.v1.removed",
+ "project.v1.restarted",
+ "project.v1.status.changed",
+ "project.v1.backup.started",
+ "project.v1.branch.created",
+ "project.v1.branch.updated",
+ "project.v1.branch.removed",
+ "organization.v1.member.invitation.created",
+ "organization.v1.member.invitation.canceled",
+ "organization.v1.member.added",
+ "organization.v1.member.removed",
+ "organization.v1.member.role.assigned",
+ "organization.v1.member.role.removed",
+ "organization.v1.member.role.updated",
+ "organization.v1.billing.plan.upgraded",
+ "organization.v1.billing.plan.downgraded",
+ "project.v1.branch.deleted"
+ ]
+ }
+ },
+ "required": ["type"]
+ }
+ },
+ "required": ["type", "attributes"]
+ }
+ }
+ }
+ }
+ }
+ }
}
},
- "/v2/organizations/{slug}/webhooks/endpoints": {
+ "/v2/projects/{ref}/webhooks/deliveries/{id}": {
"get": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-get",
+ "operationId": "v2-projects-ref-webhooks-deliveries-id-get",
"parameters": [
{
"in": "path",
- "name": "slug",
+ "name": "ref",
"schema": {
"type": "string",
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba"
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst"
},
"required": true,
- "description": "Organization slug"
+ "description": "Project ref"
},
{
- "in": "query",
- "name": "page[offset]",
+ "in": "path",
+ "name": "id",
"schema": {
- "default": "0",
"type": "string",
- "pattern": "^\\d+$"
- },
- "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend."
- },
- {
- "in": "query",
- "name": "page[limit]",
- "schema": {
- "default": "20",
- "type": "string",
- "pattern": "^\\d+$"
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
- "description": "Up to how many records to return."
+ "required": true,
+ "description": "Identifier of a delivery (UUID v7)."
}
],
- "tags": ["Organization webhooks"],
+ "tags": ["Project webhooks"],
"responses": {
"200": {
- "description": "Collection of endpoints",
+ "description": "Delivery details",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 512
- },
- {
- "type": "null"
- }
- ],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [
- {
- "type": "v1.project.paused"
- }
- ]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
- },
- "additionalProperties": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": {
- "Authorization": "Bearer example_token"
- }
- },
- "created_by": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the user who created the endpoint."
- },
- "created_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of endpoint's creation."
- }
- },
- "required": [
- "id",
- "url",
- "enabled",
- "description",
- "event_types",
- "created_by",
- "created_at"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "links": {
"type": "object",
"properties": {
- "first": {
- "description": "URL path to the first page if available.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0",
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "prev": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "URL path to the previous page.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0"
+ "type": {
+ "type": "string",
+ "const": "delivery",
+ "description": "Resource type."
},
- "next": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "URL path to the next page.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20"
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
},
- "last": {
- "description": "URL path to the last page if available.",
- "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30",
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": ["prev", "next"]
- }
- },
- "required": ["data", "links"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
+ "attributes": {
"type": "object",
"properties": {
"id": {
- "type": "string"
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
},
- "code": {
+ "event_id": {
"type": "string",
- "const": "bad_request.invalid_slug"
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of the event, which triggered the delivery (UUID v7)."
},
- "message": {
+ "status": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "enum": ["pending", "success", "failure", "skipped"],
+ "description": "Status of the delivery attempt."
},
- "description": {
- "type": "string"
+ "response_code": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "HTTP status code of the response, `0` if unavailable."
},
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
+ "response_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
"type": "string"
},
- "describedby": {
+ "additionalProperties": {
"type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
}
},
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
+ {
+ "type": "null"
+ }
+ ],
+ "description": "HTTP headers of the response, `{}` if unavailable."
},
- "code": {
- "type": "string",
- "const": "bad_request.invalid_ref"
+ "response_body": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
+ },
+ {
+ "type": "string",
+ "description": "String representation of an HTTP body of the response."
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
},
- "message": {
+ "attempt_timestamp": {
"type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": {
- "type": "string"
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of the attempt."
},
- "links": {
+ "event": {
"type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
+ "properties": {
+ "type": {
+ "description": "Webhook event type.",
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "project.v1.paused",
+ "project.v1.created",
+ "project.v1.restored",
+ "project.v1.transferred",
+ "project.v1.removed",
+ "project.v1.restarted",
+ "project.v1.status.changed",
+ "project.v1.backup.started",
+ "project.v1.branch.created",
+ "project.v1.branch.updated",
+ "project.v1.branch.removed",
+ "organization.v1.member.invitation.created",
+ "organization.v1.member.invitation.canceled",
+ "organization.v1.member.added",
+ "organization.v1.member.removed",
+ "organization.v1.member.role.assigned",
+ "organization.v1.member.role.removed",
+ "organization.v1.member.role.updated",
+ "organization.v1.billing.plan.upgraded",
+ "organization.v1.billing.plan.downgraded",
+ "project.v1.branch.deleted"
+ ]
+ },
+ "payload": {
+ "type": "object",
+ "properties": {
+ "organization_slug": {
+ "type": "string",
+ "pattern": "^[\\w-]+$",
+ "description": "Organization slug",
+ "example": "tsrqponmlkjihgfedcba"
},
- "additionalProperties": {}
- }
+ "project_ref": {
+ "anyOf": [
+ {
+ "type": "string",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "description": "Project ref",
+ "example": "abcdefghijklmnopqrst"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["organization_slug", "project_ref"],
+ "description": "Final data sent to the consumer."
},
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
+ "timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of event publication."
+ }
},
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
+ "required": ["type", "payload", "timestamp"]
}
},
- "required": ["code", "message"],
- "title": "InvalidRef"
+ "required": [
+ "id",
+ "event_id",
+ "status",
+ "response_code",
+ "response_headers",
+ "response_body",
+ "attempt_timestamp",
+ "event"
+ ]
}
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
+ },
+ "required": ["type", "id", "attributes"]
}
},
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
+ "required": ["data"]
}
}
}
@@ -13309,8 +10397,8 @@
}
}
},
- "408": {
- "description": "GenericRequestTimeout",
+ "404": {
+ "description": "DeliveryNotFound",
"content": {
"application/json": {
"schema": {
@@ -13324,11 +10412,106 @@
},
"code": {
"type": "string",
- "const": "request_timeout"
+ "const": "not_found.delivery"
},
"message": {
"type": "string",
- "const": "Request Timeout"
+ "const": "Not Found: Delivery not found"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "not_found.delivery",
+ "message": "Not Found: Delivery not found"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "408": {
+ "description": "GenericRequestTimeout",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "request_timeout"
+ },
+ "message": {
+ "type": "string",
+ "const": "Request Timeout"
},
"description": {
"type": "string"
@@ -13595,28 +10778,43 @@
}
}
},
- "summary": "List endpoints",
- "description": "List all Webhook endpoints based on a project's ref or an organization's slug."
- },
+ "summary": "Get delivery",
+ "description": "Get details of a specific delivery attempt."
+ }
+ },
+ "/v2/projects/{ref}/webhooks/deliveries/{id}/retry": {
"post": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-post",
+ "operationId": "v2-projects-ref-webhooks-deliveries-id-retry-post",
"parameters": [
{
"in": "path",
- "name": "slug",
+ "name": "ref",
"schema": {
"type": "string",
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba"
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "example": "abcdefghijklmnopqrst"
},
"required": true,
- "description": "Organization slug"
+ "description": "Project ref"
+ },
+ {
+ "in": "path",
+ "name": "id",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "required": true,
+ "description": "Identifier of a delivery (UUID v7)."
}
],
- "tags": ["Organization webhooks"],
+ "tags": ["Project webhooks"],
"responses": {
"201": {
- "description": "Created endpoint",
+ "description": "Delivery details",
"content": {
"application/json": {
"schema": {
@@ -13627,164 +10825,138 @@
"properties": {
"type": {
"type": "string",
- "const": "endpoint",
+ "const": "ingress",
"description": "Resource type."
},
"id": {
+ "type": "string"
+ }
+ },
+ "required": ["type", "id"]
+ }
+ },
+ "required": ["data"]
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "GenericUnauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
"type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
+ "const": "unauthorized"
},
- "attributes": {
+ "message": {
+ "type": "string",
+ "const": "Unauthorized"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "unauthorized",
+ "message": "Unauthorized"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Multiple error responses",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "oneOf": [
+ {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 512
- },
- {
- "type": "null"
- }
- ],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [
- {
- "type": "v1.project.paused"
- }
- ]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
- },
- "additionalProperties": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": {
- "Authorization": "Bearer example_token"
- }
- },
- "created_by": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the user who created the endpoint."
- },
- "created_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of endpoint's creation."
- }
- },
- "required": [
- "id",
- "url",
- "enabled",
- "description",
- "event_types",
- "created_by",
- "created_at"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "required": ["data"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
+ "type": "string"
},
"code": {
"type": "string",
- "const": "bad_request.invalid_slug"
+ "const": "forbidden.permission_denied"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "const": "Forbidden: Permission denied"
},
"description": {
"type": "string"
@@ -13838,7 +11010,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidSlug"
+ "title": "PermissionDenied"
},
{
"type": "object",
@@ -13848,11 +11020,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_ref"
+ "const": "forbidden.access_disabled"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid project ref"
+ "const": "Forbidden: Access disabled"
},
"description": {
"type": "string"
@@ -13906,7 +11078,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "AccessDisabled"
}
]
}
@@ -13919,19 +11091,19 @@
}
},
"examples": {
- "InvalidSlug": {
+ "PermissionDenied": {
"value": {
"error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "code": "forbidden.permission_denied",
+ "message": "Forbidden: Permission denied"
}
}
},
- "InvalidRef": {
+ "AccessDisabled": {
"value": {
"error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
+ "code": "forbidden.access_disabled",
+ "message": "Forbidden: Access disabled"
}
}
}
@@ -13939,8 +11111,8 @@
}
}
},
- "401": {
- "description": "GenericUnauthorized",
+ "404": {
+ "description": "DeliveryNotFound",
"content": {
"application/json": {
"schema": {
@@ -13954,11 +11126,11 @@
},
"code": {
"type": "string",
- "const": "unauthorized"
+ "const": "not_found.delivery"
},
"message": {
"type": "string",
- "const": "Unauthorized"
+ "const": "Not Found: Delivery not found"
},
"description": {
"type": "string"
@@ -14025,8 +11197,8 @@
"Default example": {
"value": {
"error": {
- "code": "unauthorized",
- "message": "Unauthorized"
+ "code": "not_found.delivery",
+ "message": "Not Found: Delivery not found"
}
}
}
@@ -14034,235 +11206,59 @@
}
}
},
- "403": {
- "description": "Multiple error responses",
+ "408": {
+ "description": "GenericRequestTimeout",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
- "oneOf": [
- {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "request_timeout"
+ },
+ "message": {
+ "type": "string",
+ "const": "Request Timeout"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
"type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.permission_denied"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
"type": "string"
},
- "additionalProperties": {
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
"type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
+ "propertyNames": {
+ "type": "string"
},
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.access_disabled"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Access disabled"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "PermissionDenied": {
- "value": {
- "error": {
- "code": "forbidden.permission_denied",
- "message": "Forbidden: Permission denied"
- }
- }
- },
- "AccessDisabled": {
- "value": {
- "error": {
- "code": "forbidden.access_disabled",
- "message": "Forbidden: Access disabled"
- }
- }
- }
- }
- }
- }
- },
- "408": {
- "description": "GenericRequestTimeout",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "request_timeout"
- },
- "message": {
- "type": "string",
- "const": "Request Timeout"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "additionalProperties": {}
}
},
"required": ["href"]
@@ -14496,176 +11492,75 @@
}
}
},
- "summary": "Create endpoint",
- "description": "Create new endpoint configuration to subscribe to specific webhook events.",
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "attributes": {
+ "summary": "Retry delivery",
+ "description": "Retry delivering the same event again.\n\nAutomatic retries are not applicable to manual retries - if the delivery fails, there won't be any automatic retries attempted.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds."
+ }
+ },
+ "/v2/organizations/{slug}/webhooks/endpoints": {
+ "get": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-get",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "slug",
+ "schema": {
+ "type": "string",
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba"
+ },
+ "required": true,
+ "description": "Organization slug"
+ },
+ {
+ "in": "query",
+ "name": "page[offset]",
+ "schema": {
+ "default": "0",
+ "type": "string",
+ "pattern": "^\\d+$"
+ },
+ "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend."
+ },
+ {
+ "in": "query",
+ "name": "page[limit]",
+ "schema": {
+ "default": "20",
+ "type": "string",
+ "pattern": "^\\d+$"
+ },
+ "description": "Up to how many records to return."
+ }
+ ],
+ "tags": ["Organization webhooks"],
+ "responses": {
+ "200": {
+ "description": "Collection of endpoints",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
"type": "object",
"properties": {
- "url": {
+ "type": {
"type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
+ "const": "endpoint",
+ "description": "Resource type."
},
- "enabled": {
- "default": true,
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
},
- "description": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 512
- },
- {
- "type": "null"
- }
- ],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [
- {
- "type": "v1.project.paused"
- }
- ]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
- },
- "additionalProperties": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": {
- "Authorization": "Bearer example_token"
- }
- },
- "signing_secret": {
- "type": "string",
- "minLength": 8,
- "maxLength": 64,
- "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
- }
- },
- "required": ["url", "event_types", "signing_secret"]
- }
- },
- "required": ["type", "attributes"]
- }
- },
- "required": ["data"]
- }
- }
- }
- }
- },
- "delete": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-delete",
- "parameters": [
- {
- "in": "path",
- "name": "slug",
- "schema": {
- "type": "string",
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba"
- },
- "required": true,
- "description": "Organization slug"
- }
- ],
- "tags": ["Organization webhooks"],
- "responses": {
- "200": {
- "description": "Deleted endpoints",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
@@ -14783,237 +11678,115 @@
},
"required": ["type", "id", "attributes"]
}
+ },
+ "links": {
+ "type": "object",
+ "properties": {
+ "first": {
+ "description": "URL path to the first page if available.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0",
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "prev": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "URL path to the previous page.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0"
+ },
+ "next": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "URL path to the next page.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20"
+ },
+ "last": {
+ "description": "URL path to the last page if available.",
+ "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30",
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["prev", "next"]
}
},
- "required": ["data"]
+ "required": ["data", "links"]
}
}
}
},
- "400": {
- "description": "Multiple error responses",
+ "401": {
+ "description": "GenericUnauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
- "oneOf": [
- {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "unauthorized"
+ },
+ "message": {
+ "type": "string",
+ "const": "Unauthorized"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
"type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_slug"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
"type": "string"
},
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_ref"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
- }
- },
- "401": {
- "description": "GenericUnauthorized",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "unauthorized"
- },
- "message": {
- "type": "string",
- "const": "Unauthorized"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
"type": "object",
"propertyNames": {
"type": "string"
@@ -15523,13 +12296,11 @@
}
}
},
- "summary": "Delete all endpoints",
- "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op."
- }
- },
- "/v2/organizations/{slug}/webhooks/endpoints/{id}": {
- "get": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-id-get",
+ "summary": "List endpoints",
+ "description": "List all Webhook endpoints based on a project's ref or an organization's slug."
+ },
+ "post": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-post",
"parameters": [
{
"in": "path",
@@ -15541,23 +12312,12 @@
},
"required": true,
"description": "Organization slug"
- },
- {
- "in": "path",
- "name": "id",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "required": true,
- "description": "Identifier of an endpoint (UUID v7)."
}
],
"tags": ["Organization webhooks"],
"responses": {
- "200": {
- "description": "Endpoint details",
+ "201": {
+ "description": "Created endpoint",
"content": {
"application/json": {
"schema": {
@@ -15704,215 +12464,39 @@
}
}
},
- "400": {
- "description": "Multiple error responses",
+ "401": {
+ "description": "GenericUnauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
- "oneOf": [
- {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "unauthorized"
+ },
+ "message": {
+ "type": "string",
+ "const": "Unauthorized"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
"type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_slug"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_ref"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidRef"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "InvalidSlug": {
- "value": {
- "error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
- }
- }
- },
- "InvalidRef": {
- "value": {
- "error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
- }
- }
- }
- }
- }
- }
- },
- "401": {
- "description": "GenericUnauthorized",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "unauthorized"
- },
- "message": {
- "type": "string",
- "const": "Unauthorized"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
"type": "string"
},
"rel": {
@@ -16151,8 +12735,8 @@
}
}
},
- "404": {
- "description": "EndpointNotFound",
+ "408": {
+ "description": "GenericRequestTimeout",
"content": {
"application/json": {
"schema": {
@@ -16166,11 +12750,11 @@
},
"code": {
"type": "string",
- "const": "not_found.endpoint"
+ "const": "request_timeout"
},
"message": {
"type": "string",
- "const": "Not Found: Endpoint not found"
+ "const": "Request Timeout"
},
"description": {
"type": "string"
@@ -16237,8 +12821,8 @@
"Default example": {
"value": {
"error": {
- "code": "not_found.endpoint",
- "message": "Not Found: Endpoint not found"
+ "code": "request_timeout",
+ "message": "Request Timeout"
}
}
}
@@ -16246,8 +12830,8 @@
}
}
},
- "408": {
- "description": "GenericRequestTimeout",
+ "429": {
+ "description": "GenericTooManyRequests",
"content": {
"application/json": {
"schema": {
@@ -16261,11 +12845,11 @@
},
"code": {
"type": "string",
- "const": "request_timeout"
+ "const": "too_many_requests"
},
"message": {
"type": "string",
- "const": "Request Timeout"
+ "const": "Too Many Requests"
},
"description": {
"type": "string"
@@ -16332,8 +12916,8 @@
"Default example": {
"value": {
"error": {
- "code": "request_timeout",
- "message": "Request Timeout"
+ "code": "too_many_requests",
+ "message": "Too Many Requests"
}
}
}
@@ -16341,8 +12925,8 @@
}
}
},
- "429": {
- "description": "GenericTooManyRequests",
+ "500": {
+ "description": "GenericInternalServerError",
"content": {
"application/json": {
"schema": {
@@ -16356,11 +12940,11 @@
},
"code": {
"type": "string",
- "const": "too_many_requests"
+ "const": "internal_server_error"
},
"message": {
"type": "string",
- "const": "Too Many Requests"
+ "const": "Internal Server Error"
},
"description": {
"type": "string"
@@ -16427,116 +13011,144 @@
"Default example": {
"value": {
"error": {
- "code": "too_many_requests",
- "message": "Too Many Requests"
+ "code": "internal_server_error",
+ "message": "Internal Server Error"
}
}
}
}
}
}
- },
- "500": {
- "description": "GenericInternalServerError",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "internal_server_error"
- },
- "message": {
- "type": "string",
- "const": "Internal Server Error"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
+ }
+ },
+ "summary": "Create endpoint",
+ "description": "Create new endpoint configuration to subscribe to specific webhook events.",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
},
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
+ "enabled": {
+ "default": true,
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string",
+ "maxLength": 512
},
- "describedby": {
- "type": "string"
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
},
- "meta": {
+ "required": ["type"]
+ },
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [
+ {
+ "type": "v1.project.paused"
+ }
+ ]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
"type": "object",
"propertyNames": {
- "type": "string"
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
},
- "additionalProperties": {}
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
}
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": {
+ "Authorization": "Bearer example_token"
+ }
},
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
+ "signing_secret": {
+ "type": "string",
+ "minLength": 8,
+ "maxLength": 64,
+ "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
}
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "internal_server_error",
- "message": "Internal Server Error"
+ },
+ "required": ["url", "event_types", "signing_secret"]
}
- }
+ },
+ "required": ["type", "attributes"]
}
- }
+ },
+ "required": ["data"]
}
}
}
- },
- "summary": "Get endpoint",
- "description": "Get details of a specific endpoint."
+ }
},
- "patch": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-id-patch",
+ "delete": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-delete",
"parameters": [
{
"in": "path",
@@ -16548,170 +13160,257 @@
},
"required": true,
"description": "Organization slug"
- },
- {
- "in": "path",
- "name": "id",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "required": true,
- "description": "Identifier of an endpoint (UUID v7)."
}
],
"tags": ["Organization webhooks"],
"responses": {
"200": {
- "description": "Updated endpoint details",
+ "description": "Deleted endpoints",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 512
- },
- {
- "type": "null"
- }
- ],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [
+ {
"type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
+ "maxLength": 512
+ },
+ {
+ "type": "null"
}
- },
- "required": ["type"]
+ ],
+ "description": "Optional description for the endpoint."
},
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [
- {
- "type": "v1.project.paused"
- }
- ]
- },
- "custom_headers": {
- "anyOf": [
- {
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
"type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
},
- "additionalProperties": {
- "type": "string"
- }
+ "required": ["type"]
},
- {
- "type": "null"
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [
+ {
+ "type": "v1.project.paused"
+ }
+ ]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": {
+ "Authorization": "Bearer example_token"
}
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": {
- "Authorization": "Bearer example_token"
+ },
+ "created_by": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the user who created the endpoint."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of endpoint's creation."
}
},
- "created_by": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the user who created the endpoint."
+ "required": [
+ "id",
+ "url",
+ "enabled",
+ "description",
+ "event_types",
+ "created_by",
+ "created_at"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ }
+ },
+ "required": ["data"]
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "GenericUnauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "unauthorized"
+ },
+ "message": {
+ "type": "string",
+ "const": "Unauthorized"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
},
- "created_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of endpoint's creation."
- }
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
},
- "required": [
- "id",
- "url",
- "enabled",
- "description",
- "event_types",
- "created_by",
- "created_at"
- ]
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
}
},
- "required": ["type", "id", "attributes"]
+ "required": ["code", "message"]
}
},
- "required": ["data"]
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "unauthorized",
+ "message": "Unauthorized"
+ }
+ }
+ }
}
}
}
},
- "400": {
+ "403": {
"description": "Multiple error responses",
"content": {
"application/json": {
@@ -16728,11 +13427,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_slug"
+ "const": "forbidden.permission_denied"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "const": "Forbidden: Permission denied"
},
"description": {
"type": "string"
@@ -16786,7 +13485,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidSlug"
+ "title": "PermissionDenied"
},
{
"type": "object",
@@ -16796,11 +13495,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_ref"
+ "const": "forbidden.access_disabled"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid project ref"
+ "const": "Forbidden: Access disabled"
},
"description": {
"type": "string"
@@ -16854,7 +13553,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "AccessDisabled"
}
]
}
@@ -16867,19 +13566,19 @@
}
},
"examples": {
- "InvalidSlug": {
+ "PermissionDenied": {
"value": {
"error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "code": "forbidden.permission_denied",
+ "message": "Forbidden: Permission denied"
}
}
},
- "InvalidRef": {
+ "AccessDisabled": {
"value": {
"error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
+ "code": "forbidden.access_disabled",
+ "message": "Forbidden: Access disabled"
}
}
}
@@ -16887,8 +13586,8 @@
}
}
},
- "401": {
- "description": "GenericUnauthorized",
+ "408": {
+ "description": "GenericRequestTimeout",
"content": {
"application/json": {
"schema": {
@@ -16902,11 +13601,11 @@
},
"code": {
"type": "string",
- "const": "unauthorized"
+ "const": "request_timeout"
},
"message": {
"type": "string",
- "const": "Unauthorized"
+ "const": "Request Timeout"
},
"description": {
"type": "string"
@@ -16973,184 +13672,8 @@
"Default example": {
"value": {
"error": {
- "code": "unauthorized",
- "message": "Unauthorized"
- }
- }
- }
- }
- }
- }
- },
- "403": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.permission_denied"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.access_disabled"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Access disabled"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "PermissionDenied": {
- "value": {
- "error": {
- "code": "forbidden.permission_denied",
- "message": "Forbidden: Permission denied"
- }
- }
- },
- "AccessDisabled": {
- "value": {
- "error": {
- "code": "forbidden.access_disabled",
- "message": "Forbidden: Access disabled"
+ "code": "request_timeout",
+ "message": "Request Timeout"
}
}
}
@@ -17158,8 +13681,8 @@
}
}
},
- "404": {
- "description": "EndpointNotFound",
+ "429": {
+ "description": "GenericTooManyRequests",
"content": {
"application/json": {
"schema": {
@@ -17173,11 +13696,11 @@
},
"code": {
"type": "string",
- "const": "not_found.endpoint"
+ "const": "too_many_requests"
},
"message": {
"type": "string",
- "const": "Not Found: Endpoint not found"
+ "const": "Too Many Requests"
},
"description": {
"type": "string"
@@ -17244,8 +13767,8 @@
"Default example": {
"value": {
"error": {
- "code": "not_found.endpoint",
- "message": "Not Found: Endpoint not found"
+ "code": "too_many_requests",
+ "message": "Too Many Requests"
}
}
}
@@ -17253,8 +13776,8 @@
}
}
},
- "408": {
- "description": "GenericRequestTimeout",
+ "500": {
+ "description": "GenericInternalServerError",
"content": {
"application/json": {
"schema": {
@@ -17268,11 +13791,11 @@
},
"code": {
"type": "string",
- "const": "request_timeout"
+ "const": "internal_server_error"
},
"message": {
"type": "string",
- "const": "Request Timeout"
+ "const": "Internal Server Error"
},
"description": {
"type": "string"
@@ -17339,112 +13862,199 @@
"Default example": {
"value": {
"error": {
- "code": "request_timeout",
- "message": "Request Timeout"
+ "code": "internal_server_error",
+ "message": "Internal Server Error"
}
}
}
}
}
}
+ }
+ },
+ "summary": "Delete all endpoints",
+ "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op."
+ }
+ },
+ "/v2/organizations/{slug}/webhooks/endpoints/{id}": {
+ "get": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-id-get",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "slug",
+ "schema": {
+ "type": "string",
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba"
+ },
+ "required": true,
+ "description": "Organization slug"
},
- "429": {
- "description": "GenericTooManyRequests",
+ {
+ "in": "path",
+ "name": "id",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "required": true,
+ "description": "Identifier of an endpoint (UUID v7)."
+ }
+ ],
+ "tags": ["Organization webhooks"],
+ "responses": {
+ "200": {
+ "description": "Endpoint details",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "error": {
+ "data": {
"type": "object",
"properties": {
- "id": {
- "type": "string"
- },
- "code": {
+ "type": {
"type": "string",
- "const": "too_many_requests"
+ "const": "endpoint",
+ "description": "Resource type."
},
- "message": {
+ "id": {
"type": "string",
- "const": "Too Many Requests"
- },
- "description": {
- "type": "string"
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
},
- "links": {
+ "attributes": {
"type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string",
+ "maxLength": 512
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
"type": "object",
- "propertyNames": {
- "type": "string"
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
},
- "additionalProperties": {}
+ "required": ["type"]
+ },
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [
+ {
+ "type": "v1.project.paused"
+ }
+ ]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": {
+ "Authorization": "Bearer example_token"
}
},
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
+ "created_by": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the user who created the endpoint."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of endpoint's creation."
+ }
},
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
+ "required": [
+ "id",
+ "url",
+ "enabled",
+ "description",
+ "event_types",
+ "created_by",
+ "created_at"
+ ]
}
},
- "required": ["code", "message"]
+ "required": ["type", "id", "attributes"]
}
},
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "too_many_requests",
- "message": "Too Many Requests"
- }
- }
- }
+ "required": ["data"]
}
}
}
},
- "500": {
- "description": "GenericInternalServerError",
+ "401": {
+ "description": "GenericUnauthorized",
"content": {
"application/json": {
"schema": {
@@ -17458,11 +14068,11 @@
},
"code": {
"type": "string",
- "const": "internal_server_error"
+ "const": "unauthorized"
},
"message": {
"type": "string",
- "const": "Internal Server Error"
+ "const": "Unauthorized"
},
"description": {
"type": "string"
@@ -17529,317 +14139,16 @@
"Default example": {
"value": {
"error": {
- "code": "internal_server_error",
- "message": "Internal Server Error"
+ "code": "unauthorized",
+ "message": "Unauthorized"
}
}
}
}
}
}
- }
- },
- "summary": "Update endpoint",
- "description": "Update endpoint's configuration.",
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 512
- },
- {
- "type": "null"
- }
- ],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [
- {
- "type": "v1.project.paused"
- }
- ]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
- },
- "additionalProperties": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": {
- "Authorization": "Bearer example_token"
- }
- },
- "signing_secret": {
- "type": "string",
- "minLength": 8,
- "maxLength": 64,
- "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
- }
- }
- }
- },
- "required": ["type", "attributes"]
- }
- },
- "required": ["data"]
- }
- }
- }
- }
- },
- "delete": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-id-delete",
- "parameters": [
- {
- "in": "path",
- "name": "slug",
- "schema": {
- "type": "string",
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba"
- },
- "required": true,
- "description": "Organization slug"
- },
- {
- "in": "path",
- "name": "id",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "required": true,
- "description": "Identifier of an endpoint (UUID v7)."
- }
- ],
- "tags": ["Organization webhooks"],
- "responses": {
- "200": {
- "description": "Deleted endpoint details",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "endpoint",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of an endpoint (UUID v7)."
- },
- "url": {
- "type": "string",
- "format": "uri",
- "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
- "example": "https://mydomain.com/path/to/handler"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
- },
- "description": {
- "anyOf": [
- {
- "type": "string",
- "maxLength": 512
- },
- {
- "type": "null"
- }
- ],
- "description": "Optional description for the endpoint."
- },
- "event_types": {
- "minItems": 1,
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "*"
- ],
- "description": "Webhook event type."
- }
- },
- "required": ["type"]
- },
- "description": "List of subscribed events for which to receive the webhook event.",
- "example": [
- {
- "type": "v1.project.paused"
- }
- ]
- },
- "custom_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string",
- "pattern": "^[a-zA-Z0-9-]+$"
- },
- "additionalProperties": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ],
- "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
- "example": {
- "Authorization": "Bearer example_token"
- }
- },
- "created_by": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the user who created the endpoint."
- },
- "created_at": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of endpoint's creation."
- }
- },
- "required": [
- "id",
- "url",
- "enabled",
- "description",
- "event_types",
- "created_by",
- "created_at"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "required": ["data"]
- }
- }
- }
},
- "400": {
+ "403": {
"description": "Multiple error responses",
"content": {
"application/json": {
@@ -17856,11 +14165,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_slug"
+ "const": "forbidden.permission_denied"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "const": "Forbidden: Permission denied"
},
"description": {
"type": "string"
@@ -17914,7 +14223,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidSlug"
+ "title": "PermissionDenied"
},
{
"type": "object",
@@ -17924,11 +14233,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_ref"
+ "const": "forbidden.access_disabled"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid project ref"
+ "const": "Forbidden: Access disabled"
},
"description": {
"type": "string"
@@ -17982,7 +14291,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "AccessDisabled"
}
]
}
@@ -17995,19 +14304,19 @@
}
},
"examples": {
- "InvalidSlug": {
+ "PermissionDenied": {
"value": {
"error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "code": "forbidden.permission_denied",
+ "message": "Forbidden: Permission denied"
}
}
},
- "InvalidRef": {
+ "AccessDisabled": {
"value": {
"error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
+ "code": "forbidden.access_disabled",
+ "message": "Forbidden: Access disabled"
}
}
}
@@ -18015,9 +14324,9 @@
}
}
},
- "401": {
- "description": "GenericUnauthorized",
- "content": {
+ "404": {
+ "description": "EndpointNotFound",
+ "content": {
"application/json": {
"schema": {
"type": "object",
@@ -18030,11 +14339,11 @@
},
"code": {
"type": "string",
- "const": "unauthorized"
+ "const": "not_found.endpoint"
},
"message": {
"type": "string",
- "const": "Unauthorized"
+ "const": "Not Found: Endpoint not found"
},
"description": {
"type": "string"
@@ -18101,184 +14410,8 @@
"Default example": {
"value": {
"error": {
- "code": "unauthorized",
- "message": "Unauthorized"
- }
- }
- }
- }
- }
- }
- },
- "403": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.permission_denied"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.access_disabled"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Access disabled"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "PermissionDenied": {
- "value": {
- "error": {
- "code": "forbidden.permission_denied",
- "message": "Forbidden: Permission denied"
- }
- }
- },
- "AccessDisabled": {
- "value": {
- "error": {
- "code": "forbidden.access_disabled",
- "message": "Forbidden: Access disabled"
+ "code": "not_found.endpoint",
+ "message": "Not Found: Endpoint not found"
}
}
}
@@ -18286,8 +14419,8 @@
}
}
},
- "404": {
- "description": "EndpointNotFound",
+ "408": {
+ "description": "GenericRequestTimeout",
"content": {
"application/json": {
"schema": {
@@ -18301,11 +14434,11 @@
},
"code": {
"type": "string",
- "const": "not_found.endpoint"
+ "const": "request_timeout"
},
"message": {
"type": "string",
- "const": "Not Found: Endpoint not found"
+ "const": "Request Timeout"
},
"description": {
"type": "string"
@@ -18372,8 +14505,8 @@
"Default example": {
"value": {
"error": {
- "code": "not_found.endpoint",
- "message": "Not Found: Endpoint not found"
+ "code": "request_timeout",
+ "message": "Request Timeout"
}
}
}
@@ -18381,8 +14514,8 @@
}
}
},
- "408": {
- "description": "GenericRequestTimeout",
+ "429": {
+ "description": "GenericTooManyRequests",
"content": {
"application/json": {
"schema": {
@@ -18396,11 +14529,11 @@
},
"code": {
"type": "string",
- "const": "request_timeout"
+ "const": "too_many_requests"
},
"message": {
"type": "string",
- "const": "Request Timeout"
+ "const": "Too Many Requests"
},
"description": {
"type": "string"
@@ -18467,8 +14600,8 @@
"Default example": {
"value": {
"error": {
- "code": "request_timeout",
- "message": "Request Timeout"
+ "code": "too_many_requests",
+ "message": "Too Many Requests"
}
}
}
@@ -18476,8 +14609,8 @@
}
}
},
- "429": {
- "description": "GenericTooManyRequests",
+ "500": {
+ "description": "GenericInternalServerError",
"content": {
"application/json": {
"schema": {
@@ -18491,11 +14624,11 @@
},
"code": {
"type": "string",
- "const": "too_many_requests"
+ "const": "internal_server_error"
},
"message": {
"type": "string",
- "const": "Too Many Requests"
+ "const": "Internal Server Error"
},
"description": {
"type": "string"
@@ -18562,35 +14695,215 @@
"Default example": {
"value": {
"error": {
- "code": "too_many_requests",
- "message": "Too Many Requests"
+ "code": "internal_server_error",
+ "message": "Internal Server Error"
}
}
}
}
}
}
+ }
+ },
+ "summary": "Get endpoint",
+ "description": "Get details of a specific endpoint."
+ },
+ "patch": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-id-patch",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "slug",
+ "schema": {
+ "type": "string",
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba"
+ },
+ "required": true,
+ "description": "Organization slug"
},
- "500": {
- "description": "GenericInternalServerError",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "internal_server_error"
+ {
+ "in": "path",
+ "name": "id",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "required": true,
+ "description": "Identifier of an endpoint (UUID v7)."
+ }
+ ],
+ "tags": ["Organization webhooks"],
+ "responses": {
+ "200": {
+ "description": "Updated endpoint details",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string",
+ "maxLength": 512
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
+ },
+ "required": ["type"]
+ },
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [
+ {
+ "type": "v1.project.paused"
+ }
+ ]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": {
+ "Authorization": "Bearer example_token"
+ }
+ },
+ "created_by": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the user who created the endpoint."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of endpoint's creation."
+ }
+ },
+ "required": [
+ "id",
+ "url",
+ "enabled",
+ "description",
+ "event_types",
+ "created_by",
+ "created_at"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "required": ["data"]
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "GenericUnauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "unauthorized"
},
"message": {
"type": "string",
- "const": "Internal Server Error"
+ "const": "Unauthorized"
},
"description": {
"type": "string"
@@ -18657,253 +14970,17 @@
"Default example": {
"value": {
"error": {
- "code": "internal_server_error",
- "message": "Internal Server Error"
+ "code": "unauthorized",
+ "message": "Unauthorized"
}
}
}
}
}
}
- }
- },
- "summary": "Delete endpoint",
- "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op."
- }
- },
- "/v2/organizations/{slug}/webhooks/endpoints/{id}/deliveries": {
- "get": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-id-deliveries-get",
- "parameters": [
- {
- "in": "path",
- "name": "slug",
- "schema": {
- "type": "string",
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba"
- },
- "required": true,
- "description": "Organization slug"
- },
- {
- "in": "path",
- "name": "id",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "required": true,
- "description": "Identifier of an endpoint (UUID v7)."
- },
- {
- "in": "query",
- "name": "page[before]",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param."
- },
- {
- "in": "query",
- "name": "page[after]",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param."
},
- {
- "in": "query",
- "name": "page[size]",
- "schema": {
- "default": "20",
- "type": "string",
- "pattern": "^\\d+$"
- },
- "description": "Up to how many records to return."
- }
- ],
- "tags": ["Organization webhooks"],
- "responses": {
- "200": {
- "description": "List of deliveries",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "delivery",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
- },
- "event_id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of the event, which triggered the delivery (UUID v7)."
- },
- "status": {
- "type": "string",
- "enum": ["pending", "success", "failure", "skipped"],
- "description": "Status of the delivery attempt."
- },
- "response_code": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "HTTP status code of the response, `0` if unavailable."
- },
- "response_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ],
- "description": "HTTP headers of the response, `{}` if unavailable."
- },
- "response_body": {
- "anyOf": [
- {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "string"
- },
- "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
- },
- {
- "type": "string",
- "description": "String representation of an HTTP body of the response."
- }
- ]
- },
- {
- "type": "null"
- }
- ]
- },
- "attempt_timestamp": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of the attempt."
- }
- },
- "required": [
- "id",
- "event_id",
- "status",
- "response_code",
- "response_headers",
- "response_body",
- "attempt_timestamp"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "links": {
- "type": "object",
- "properties": {
- "first": {
- "description": "URL path to the first page if available.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10",
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "prev": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "URL path to the previous page.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7"
- },
- "next": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "URL path to the next page.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4"
- },
- "last": {
- "description": "URL path to the last page if available.",
- "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295",
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": ["prev", "next"]
- }
- },
- "required": ["data", "links"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
+ "403": {
+ "description": "Multiple error responses",
"content": {
"application/json": {
"schema": {
@@ -18919,11 +14996,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_slug"
+ "const": "forbidden.permission_denied"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "const": "Forbidden: Permission denied"
},
"description": {
"type": "string"
@@ -18977,7 +15054,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidSlug"
+ "title": "PermissionDenied"
},
{
"type": "object",
@@ -18987,11 +15064,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_ref"
+ "const": "forbidden.access_disabled"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid project ref"
+ "const": "Forbidden: Access disabled"
},
"description": {
"type": "string"
@@ -19045,7 +15122,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "AccessDisabled"
}
]
}
@@ -19058,19 +15135,19 @@
}
},
"examples": {
- "InvalidSlug": {
+ "PermissionDenied": {
"value": {
"error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "code": "forbidden.permission_denied",
+ "message": "Forbidden: Permission denied"
}
}
},
- "InvalidRef": {
+ "AccessDisabled": {
"value": {
"error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
+ "code": "forbidden.access_disabled",
+ "message": "Forbidden: Access disabled"
}
}
}
@@ -19078,8 +15155,8 @@
}
}
},
- "401": {
- "description": "GenericUnauthorized",
+ "404": {
+ "description": "EndpointNotFound",
"content": {
"application/json": {
"schema": {
@@ -19093,11 +15170,11 @@
},
"code": {
"type": "string",
- "const": "unauthorized"
+ "const": "not_found.endpoint"
},
"message": {
"type": "string",
- "const": "Unauthorized"
+ "const": "Not Found: Endpoint not found"
},
"description": {
"type": "string"
@@ -19164,8 +15241,8 @@
"Default example": {
"value": {
"error": {
- "code": "unauthorized",
- "message": "Unauthorized"
+ "code": "not_found.endpoint",
+ "message": "Not Found: Endpoint not found"
}
}
}
@@ -19173,230 +15250,54 @@
}
}
},
- "403": {
- "description": "Multiple error responses",
+ "408": {
+ "description": "GenericRequestTimeout",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
- "oneOf": [
- {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "request_timeout"
+ },
+ "message": {
+ "type": "string",
+ "const": "Request Timeout"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
"type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.permission_denied"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
"type": "string"
},
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.access_disabled"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Access disabled"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "PermissionDenied": {
- "value": {
- "error": {
- "code": "forbidden.permission_denied",
- "message": "Forbidden: Permission denied"
- }
- }
- },
- "AccessDisabled": {
- "value": {
- "error": {
- "code": "forbidden.access_disabled",
- "message": "Forbidden: Access disabled"
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "EndpointNotFound",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "not_found.endpoint"
- },
- "message": {
- "type": "string",
- "const": "Not Found: Endpoint not found"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
"type": "object",
"propertyNames": {
"type": "string"
@@ -19435,8 +15336,8 @@
"Default example": {
"value": {
"error": {
- "code": "not_found.endpoint",
- "message": "Not Found: Endpoint not found"
+ "code": "request_timeout",
+ "message": "Request Timeout"
}
}
}
@@ -19444,8 +15345,8 @@
}
}
},
- "408": {
- "description": "GenericRequestTimeout",
+ "429": {
+ "description": "GenericTooManyRequests",
"content": {
"application/json": {
"schema": {
@@ -19459,11 +15360,11 @@
},
"code": {
"type": "string",
- "const": "request_timeout"
+ "const": "too_many_requests"
},
"message": {
"type": "string",
- "const": "Request Timeout"
+ "const": "Too Many Requests"
},
"description": {
"type": "string"
@@ -19530,8 +15431,8 @@
"Default example": {
"value": {
"error": {
- "code": "request_timeout",
- "message": "Request Timeout"
+ "code": "too_many_requests",
+ "message": "Too Many Requests"
}
}
}
@@ -19539,8 +15440,8 @@
}
}
},
- "429": {
- "description": "GenericTooManyRequests",
+ "500": {
+ "description": "GenericInternalServerError",
"content": {
"application/json": {
"schema": {
@@ -19554,11 +15455,11 @@
},
"code": {
"type": "string",
- "const": "too_many_requests"
+ "const": "internal_server_error"
},
"message": {
"type": "string",
- "const": "Too Many Requests"
+ "const": "Internal Server Error"
},
"description": {
"type": "string"
@@ -19625,118 +15526,142 @@
"Default example": {
"value": {
"error": {
- "code": "too_many_requests",
- "message": "Too Many Requests"
+ "code": "internal_server_error",
+ "message": "Internal Server Error"
}
}
}
}
}
}
- },
- "500": {
- "description": "GenericInternalServerError",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "internal_server_error"
- },
- "message": {
- "type": "string",
- "const": "Internal Server Error"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
+ }
+ },
+ "summary": "Update endpoint",
+ "description": "Update endpoint's configuration.",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "endpoint",
+ "description": "Resource type."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string",
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
+ },
+ "description": {
+ "anyOf": [
+ {
+ "type": "string",
+ "maxLength": 512
},
- "describedby": {
- "type": "string"
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional description for the endpoint."
+ },
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
+ }
},
- "meta": {
+ "required": ["type"]
+ },
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [
+ {
+ "type": "v1.project.paused"
+ }
+ ]
+ },
+ "custom_headers": {
+ "anyOf": [
+ {
"type": "object",
"propertyNames": {
- "type": "string"
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
},
- "additionalProperties": {}
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
}
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": {
+ "Authorization": "Bearer example_token"
+ }
},
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
+ "signing_secret": {
+ "type": "string",
+ "minLength": 8,
+ "maxLength": 64,
+ "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification."
}
}
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "internal_server_error",
- "message": "Internal Server Error"
}
- }
+ },
+ "required": ["type", "attributes"]
}
- }
+ },
+ "required": ["data"]
}
}
}
- },
- "summary": "List deliveries",
- "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed."
- }
- },
- "/v2/organizations/{slug}/webhooks/endpoints/{id}/test": {
- "post": {
- "operationId": "v2-organizations-slug-webhooks-endpoints-id-test-post",
+ }
+ },
+ "delete": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-id-delete",
"parameters": [
{
"in": "path",
@@ -19763,8 +15688,8 @@
],
"tags": ["Organization webhooks"],
"responses": {
- "201": {
- "description": "Event published",
+ "200": {
+ "description": "Deleted endpoint details",
"content": {
"application/json": {
"schema": {
@@ -19775,166 +15700,246 @@
"properties": {
"type": {
"type": "string",
- "const": "ingress",
+ "const": "endpoint",
"description": "Resource type."
},
"id": {
- "type": "string"
- }
- },
- "required": ["type", "id"]
- }
- },
- "required": ["data"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ "attributes": {
"type": "object",
"properties": {
"id": {
- "type": "string"
- },
- "code": {
"type": "string",
- "const": "bad_request.endpoint.test.disabled"
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of an endpoint (UUID v7)."
},
- "message": {
+ "url": {
"type": "string",
- "const": "Bad Request: Endpoint is disabled"
+ "format": "uri",
+ "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.",
+ "example": "https://mydomain.com/path/to/handler"
+ },
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events."
},
"description": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string",
+ "maxLength": 512
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Optional description for the endpoint."
},
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
+ "event_types": {
+ "minItems": 1,
+ "type": "array",
+ "items": {
"type": "object",
"properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
"type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "*"
+ ],
+ "description": "Webhook event type."
}
},
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
+ "required": ["type"]
},
- "additionalProperties": {}
+ "description": "List of subscribed events for which to receive the webhook event.",
+ "example": [
+ {
+ "type": "v1.project.paused"
+ }
+ ]
},
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
+ "custom_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string",
+ "pattern": "^[a-zA-Z0-9-]+$"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.",
+ "example": {
+ "Authorization": "Bearer example_token"
}
- }
- },
- "required": ["code", "message"],
- "title": "EndpointTestDisabled"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
},
- "code": {
+ "created_by": {
"type": "string",
- "const": "bad_request.endpoint.test.wrong_event_type"
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the user who created the endpoint."
},
- "message": {
+ "created_at": {
"type": "string",
- "const": "Bad Request: Provided event type is not subscribed to by the endpoint"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of endpoint's creation."
+ }
+ },
+ "required": [
+ "id",
+ "url",
+ "enabled",
+ "description",
+ "event_types",
+ "created_by",
+ "created_at"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "required": ["data"]
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "GenericUnauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "unauthorized"
+ },
+ "message": {
+ "type": "string",
+ "const": "Unauthorized"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
"type": "string"
},
- "additionalProperties": {
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
"type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
+ "propertyNames": {
+ "type": "string"
},
- "required": ["href"]
+ "additionalProperties": {}
}
},
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
},
- "required": ["code", "message"],
- "title": "EndpointTestWrongEventType"
+ "additionalProperties": {}
},
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "unauthorized",
+ "message": "Unauthorized"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Multiple error responses",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "oneOf": [
{
"type": "object",
"properties": {
@@ -19943,11 +15948,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_slug"
+ "const": "forbidden.permission_denied"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "const": "Forbidden: Permission denied"
},
"description": {
"type": "string"
@@ -20001,7 +16006,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidSlug"
+ "title": "PermissionDenied"
},
{
"type": "object",
@@ -20011,11 +16016,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_ref"
+ "const": "forbidden.access_disabled"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid project ref"
+ "const": "Forbidden: Access disabled"
},
"description": {
"type": "string"
@@ -20069,7 +16074,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "AccessDisabled"
}
]
}
@@ -20082,37 +16087,19 @@
}
},
"examples": {
- "EndpointTestDisabled": {
- "value": {
- "error": {
- "code": "bad_request.endpoint.test.disabled",
- "message": "Bad Request: Endpoint is disabled",
- "description": "Endpoint is disabled, to send test event endpoint must first be enabled."
- }
- }
- },
- "EndpointTestWrongEventType": {
- "value": {
- "error": {
- "code": "bad_request.endpoint.test.wrong_event_type",
- "message": "Bad Request: Provided event type is not subscribed to by the endpoint",
- "description": "Only event types that the endpoint is subscribed to can be specified."
- }
- }
- },
- "InvalidSlug": {
+ "PermissionDenied": {
"value": {
"error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "code": "forbidden.permission_denied",
+ "message": "Forbidden: Permission denied"
}
}
},
- "InvalidRef": {
+ "AccessDisabled": {
"value": {
"error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
+ "code": "forbidden.access_disabled",
+ "message": "Forbidden: Access disabled"
}
}
}
@@ -20120,8 +16107,8 @@
}
}
},
- "401": {
- "description": "GenericUnauthorized",
+ "404": {
+ "description": "EndpointNotFound",
"content": {
"application/json": {
"schema": {
@@ -20135,11 +16122,11 @@
},
"code": {
"type": "string",
- "const": "unauthorized"
+ "const": "not_found.endpoint"
},
"message": {
"type": "string",
- "const": "Unauthorized"
+ "const": "Not Found: Endpoint not found"
},
"description": {
"type": "string"
@@ -20206,184 +16193,8 @@
"Default example": {
"value": {
"error": {
- "code": "unauthorized",
- "message": "Unauthorized"
- }
- }
- }
- }
- }
- }
- },
- "403": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.permission_denied"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.access_disabled"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Access disabled"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "PermissionDenied": {
- "value": {
- "error": {
- "code": "forbidden.permission_denied",
- "message": "Forbidden: Permission denied"
- }
- }
- },
- "AccessDisabled": {
- "value": {
- "error": {
- "code": "forbidden.access_disabled",
- "message": "Forbidden: Access disabled"
+ "code": "not_found.endpoint",
+ "message": "Not Found: Endpoint not found"
}
}
}
@@ -20391,8 +16202,8 @@
}
}
},
- "404": {
- "description": "EndpointNotFound",
+ "408": {
+ "description": "GenericRequestTimeout",
"content": {
"application/json": {
"schema": {
@@ -20406,11 +16217,11 @@
},
"code": {
"type": "string",
- "const": "not_found.endpoint"
+ "const": "request_timeout"
},
"message": {
"type": "string",
- "const": "Not Found: Endpoint not found"
+ "const": "Request Timeout"
},
"description": {
"type": "string"
@@ -20477,8 +16288,8 @@
"Default example": {
"value": {
"error": {
- "code": "not_found.endpoint",
- "message": "Not Found: Endpoint not found"
+ "code": "request_timeout",
+ "message": "Request Timeout"
}
}
}
@@ -20486,8 +16297,8 @@
}
}
},
- "408": {
- "description": "GenericRequestTimeout",
+ "429": {
+ "description": "GenericTooManyRequests",
"content": {
"application/json": {
"schema": {
@@ -20501,11 +16312,11 @@
},
"code": {
"type": "string",
- "const": "request_timeout"
+ "const": "too_many_requests"
},
"message": {
"type": "string",
- "const": "Request Timeout"
+ "const": "Too Many Requests"
},
"description": {
"type": "string"
@@ -20572,8 +16383,8 @@
"Default example": {
"value": {
"error": {
- "code": "request_timeout",
- "message": "Request Timeout"
+ "code": "too_many_requests",
+ "message": "Too Many Requests"
}
}
}
@@ -20581,8 +16392,8 @@
}
}
},
- "429": {
- "description": "GenericTooManyRequests",
+ "500": {
+ "description": "GenericInternalServerError",
"content": {
"application/json": {
"schema": {
@@ -20596,11 +16407,11 @@
},
"code": {
"type": "string",
- "const": "too_many_requests"
+ "const": "internal_server_error"
},
"message": {
"type": "string",
- "const": "Too Many Requests"
+ "const": "Internal Server Error"
},
"description": {
"type": "string"
@@ -20667,21 +16478,257 @@
"Default example": {
"value": {
"error": {
- "code": "too_many_requests",
- "message": "Too Many Requests"
+ "code": "internal_server_error",
+ "message": "Internal Server Error"
}
}
}
}
}
}
- },
- "500": {
- "description": "GenericInternalServerError",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
+ }
+ },
+ "summary": "Delete endpoint",
+ "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op."
+ }
+ },
+ "/v2/organizations/{slug}/webhooks/endpoints/{id}/deliveries": {
+ "get": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-id-deliveries-get",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "slug",
+ "schema": {
+ "type": "string",
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba"
+ },
+ "required": true,
+ "description": "Organization slug"
+ },
+ {
+ "in": "path",
+ "name": "id",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "required": true,
+ "description": "Identifier of an endpoint (UUID v7)."
+ },
+ {
+ "in": "query",
+ "name": "page[before]",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param."
+ },
+ {
+ "in": "query",
+ "name": "page[after]",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param."
+ },
+ {
+ "in": "query",
+ "name": "page[size]",
+ "schema": {
+ "default": "20",
+ "type": "string",
+ "pattern": "^\\d+$"
+ },
+ "description": "Up to how many records to return."
+ }
+ ],
+ "tags": ["Organization webhooks"],
+ "responses": {
+ "200": {
+ "description": "List of deliveries",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "delivery",
+ "description": "Resource type."
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
+ },
+ "event_id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of the event, which triggered the delivery (UUID v7)."
+ },
+ "status": {
+ "type": "string",
+ "enum": ["pending", "success", "failure", "skipped"],
+ "description": "Status of the delivery attempt."
+ },
+ "response_code": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "HTTP status code of the response, `0` if unavailable."
+ },
+ "response_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "HTTP headers of the response, `{}` if unavailable."
+ },
+ "response_body": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
+ },
+ {
+ "type": "string",
+ "description": "String representation of an HTTP body of the response."
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "attempt_timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of the attempt."
+ }
+ },
+ "required": [
+ "id",
+ "event_id",
+ "status",
+ "response_code",
+ "response_headers",
+ "response_body",
+ "attempt_timestamp"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "links": {
+ "type": "object",
+ "properties": {
+ "first": {
+ "description": "URL path to the first page if available.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10",
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "prev": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "URL path to the previous page.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7"
+ },
+ "next": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "URL path to the next page.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4"
+ },
+ "last": {
+ "description": "URL path to the last page if available.",
+ "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295",
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["prev", "next"]
+ }
+ },
+ "required": ["data", "links"]
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "GenericUnauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
"properties": {
"error": {
"type": "object",
@@ -20691,11 +16738,11 @@
},
"code": {
"type": "string",
- "const": "internal_server_error"
+ "const": "unauthorized"
},
"message": {
"type": "string",
- "const": "Internal Server Error"
+ "const": "Unauthorized"
},
"description": {
"type": "string"
@@ -20762,423 +16809,110 @@
"Default example": {
"value": {
"error": {
- "code": "internal_server_error",
- "message": "Internal Server Error"
+ "code": "unauthorized",
+ "message": "Unauthorized"
}
}
}
}
}
}
- }
- },
- "summary": "Send test event",
- "description": "Ingests and schedules a test webhook event to be published out this endpoints.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.",
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "event",
- "description": "Resource type."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "type": {
- "description": "Webhook event type.",
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "project.v1.paused",
- "project.v1.created",
- "project.v1.restored",
- "project.v1.transferred",
- "project.v1.removed",
- "project.v1.restarted",
- "project.v1.status.changed",
- "project.v1.backup.started",
- "project.v1.branch.created",
- "project.v1.branch.updated",
- "project.v1.branch.removed",
- "organization.v1.member.invitation.created",
- "organization.v1.member.invitation.canceled",
- "organization.v1.member.added",
- "organization.v1.member.removed",
- "organization.v1.member.role.assigned",
- "organization.v1.member.role.removed",
- "organization.v1.member.role.updated",
- "organization.v1.billing.plan.upgraded",
- "organization.v1.billing.plan.downgraded",
- "project.v1.branch.deleted"
- ]
- }
- },
- "required": ["type"]
- }
- },
- "required": ["type", "attributes"]
- }
- }
- }
- }
- }
- }
- }
- },
- "/v2/organizations/{slug}/webhooks/deliveries/{id}": {
- "get": {
- "operationId": "v2-organizations-slug-webhooks-deliveries-id-get",
- "parameters": [
- {
- "in": "path",
- "name": "slug",
- "schema": {
- "type": "string",
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba"
- },
- "required": true,
- "description": "Organization slug"
},
- {
- "in": "path",
- "name": "id",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "required": true,
- "description": "Identifier of a delivery (UUID v7)."
- }
- ],
- "tags": ["Organization webhooks"],
- "responses": {
- "200": {
- "description": "Delivery details",
+ "403": {
+ "description": "Multiple error responses",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "delivery",
- "description": "Resource type."
- },
- "id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
- },
- "attributes": {
+ "error": {
+ "oneOf": [
+ {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of a delivery (UUID v7)."
+ "type": "string"
},
- "event_id": {
+ "code": {
"type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "Identifier of the event, which triggered the delivery (UUID v7)."
+ "const": "forbidden.permission_denied"
},
- "status": {
+ "message": {
"type": "string",
- "enum": ["pending", "success", "failure", "skipped"],
- "description": "Status of the delivery attempt."
+ "const": "Forbidden: Permission denied"
},
- "response_code": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "HTTP status code of the response, `0` if unavailable."
+ "description": {
+ "type": "string"
},
- "response_headers": {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
"type": "string"
},
- "additionalProperties": {
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
"type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
}
},
- {
- "type": "null"
- }
- ],
- "description": "HTTP headers of the response, `{}` if unavailable."
+ "required": ["href"]
+ }
},
- "response_body": {
- "anyOf": [
- {
- "anyOf": [
- {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "string"
- },
- "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
- },
- {
- "type": "string",
- "description": "String representation of an HTTP body of the response."
- }
- ]
- },
- {
- "type": "null"
- }
- ]
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
},
- "attempt_timestamp": {
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "required": ["code", "message"],
+ "title": "PermissionDenied"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
"type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of the attempt."
+ "const": "forbidden.access_disabled"
},
- "event": {
- "type": "object",
- "properties": {
- "type": {
- "description": "Webhook event type.",
- "type": "string",
- "enum": [
- "v1.project.paused",
- "v1.project.created",
- "v1.project.restored",
- "v1.project.transferred",
- "v1.project.removed",
- "v1.project.restarted",
- "v1.project.status.changed",
- "v1.project.backup.started",
- "v1.project.branch.created",
- "v1.project.branch.updated",
- "v1.project.branch.removed",
- "v1.organization.member.invitation.created",
- "v1.organization.member.invitation.canceled",
- "v1.organization.member.added",
- "v1.organization.member.removed",
- "v1.organization.member.role.assigned",
- "v1.organization.member.role.removed",
- "v1.organization.member.role.updated",
- "v1.organization.billing.plan.upgraded",
- "v1.organization.billing.plan.downgraded",
- "project.v1.paused",
- "project.v1.created",
- "project.v1.restored",
- "project.v1.transferred",
- "project.v1.removed",
- "project.v1.restarted",
- "project.v1.status.changed",
- "project.v1.backup.started",
- "project.v1.branch.created",
- "project.v1.branch.updated",
- "project.v1.branch.removed",
- "organization.v1.member.invitation.created",
- "organization.v1.member.invitation.canceled",
- "organization.v1.member.added",
- "organization.v1.member.removed",
- "organization.v1.member.role.assigned",
- "organization.v1.member.role.removed",
- "organization.v1.member.role.updated",
- "organization.v1.billing.plan.upgraded",
- "organization.v1.billing.plan.downgraded",
- "project.v1.branch.deleted"
- ]
- },
- "payload": {
- "type": "object",
- "properties": {
- "organization_slug": {
- "type": "string",
- "pattern": "^[\\w-]+$",
- "description": "Organization slug",
- "example": "tsrqponmlkjihgfedcba"
- },
- "project_ref": {
- "anyOf": [
- {
- "type": "string",
- "minLength": 20,
- "maxLength": 20,
- "pattern": "^[a-z]+$",
- "description": "Project ref",
- "example": "abcdefghijklmnopqrst"
- },
- {
- "type": "null"
- }
- ]
- }
- },
- "required": ["organization_slug", "project_ref"],
- "description": "Final data sent to the consumer."
- },
- "timestamp": {
- "type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
- "description": "Timestamp of event publication."
- }
- },
- "required": ["type", "payload", "timestamp"]
- }
- },
- "required": [
- "id",
- "event_id",
- "status",
- "response_code",
- "response_headers",
- "response_body",
- "attempt_timestamp",
- "event"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "required": ["data"]
- }
- }
- }
- },
- "400": {
- "description": "Multiple error responses",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_slug"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid organization slug"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "InvalidSlug"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "bad_request.invalid_ref"
- },
- "message": {
- "type": "string",
- "const": "Bad Request: Invalid project ref"
- },
- "description": {
- "type": "string"
- },
- "links": {
+ "message": {
+ "type": "string",
+ "const": "Forbidden: Access disabled"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
"type": "object",
"propertyNames": {
"type": "string"
@@ -21227,7 +16961,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "AccessDisabled"
}
]
}
@@ -21240,19 +16974,19 @@
}
},
"examples": {
- "InvalidSlug": {
+ "PermissionDenied": {
"value": {
"error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "code": "forbidden.permission_denied",
+ "message": "Forbidden: Permission denied"
}
}
},
- "InvalidRef": {
+ "AccessDisabled": {
"value": {
"error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
+ "code": "forbidden.access_disabled",
+ "message": "Forbidden: Access disabled"
}
}
}
@@ -21260,8 +16994,8 @@
}
}
},
- "401": {
- "description": "GenericUnauthorized",
+ "404": {
+ "description": "EndpointNotFound",
"content": {
"application/json": {
"schema": {
@@ -21275,11 +17009,11 @@
},
"code": {
"type": "string",
- "const": "unauthorized"
+ "const": "not_found.endpoint"
},
"message": {
"type": "string",
- "const": "Unauthorized"
+ "const": "Not Found: Endpoint not found"
},
"description": {
"type": "string"
@@ -21346,8 +17080,8 @@
"Default example": {
"value": {
"error": {
- "code": "unauthorized",
- "message": "Unauthorized"
+ "code": "not_found.endpoint",
+ "message": "Not Found: Endpoint not found"
}
}
}
@@ -21355,207 +17089,31 @@
}
}
},
- "403": {
- "description": "Multiple error responses",
+ "408": {
+ "description": "GenericRequestTimeout",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.permission_denied"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Permission denied"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "PermissionDenied"
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "forbidden.access_disabled"
- },
- "message": {
- "type": "string",
- "const": "Forbidden: Access disabled"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "title": "AccessDisabled"
- }
- ]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "PermissionDenied": {
- "value": {
- "error": {
- "code": "forbidden.permission_denied",
- "message": "Forbidden: Permission denied"
- }
- }
- },
- "AccessDisabled": {
- "value": {
- "error": {
- "code": "forbidden.access_disabled",
- "message": "Forbidden: Access disabled"
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "DeliveryNotFound",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "not_found.delivery"
- },
- "message": {
- "type": "string",
- "const": "Not Found: Delivery not found"
- },
- "description": {
- "type": "string"
- },
- "links": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "request_timeout"
+ },
+ "message": {
+ "type": "string",
+ "const": "Request Timeout"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
"type": "object",
"propertyNames": {
"type": "string"
@@ -21617,8 +17175,8 @@
"Default example": {
"value": {
"error": {
- "code": "not_found.delivery",
- "message": "Not Found: Delivery not found"
+ "code": "request_timeout",
+ "message": "Request Timeout"
}
}
}
@@ -21626,8 +17184,8 @@
}
}
},
- "408": {
- "description": "GenericRequestTimeout",
+ "429": {
+ "description": "GenericTooManyRequests",
"content": {
"application/json": {
"schema": {
@@ -21641,11 +17199,11 @@
},
"code": {
"type": "string",
- "const": "request_timeout"
+ "const": "too_many_requests"
},
"message": {
"type": "string",
- "const": "Request Timeout"
+ "const": "Too Many Requests"
},
"description": {
"type": "string"
@@ -21712,8 +17270,8 @@
"Default example": {
"value": {
"error": {
- "code": "request_timeout",
- "message": "Request Timeout"
+ "code": "too_many_requests",
+ "message": "Too Many Requests"
}
}
}
@@ -21721,8 +17279,8 @@
}
}
},
- "429": {
- "description": "GenericTooManyRequests",
+ "500": {
+ "description": "GenericInternalServerError",
"content": {
"application/json": {
"schema": {
@@ -21736,11 +17294,11 @@
},
"code": {
"type": "string",
- "const": "too_many_requests"
+ "const": "internal_server_error"
},
"message": {
"type": "string",
- "const": "Too Many Requests"
+ "const": "Internal Server Error"
},
"description": {
"type": "string"
@@ -21807,160 +17365,65 @@
"Default example": {
"value": {
"error": {
- "code": "too_many_requests",
- "message": "Too Many Requests"
+ "code": "internal_server_error",
+ "message": "Internal Server Error"
}
}
}
}
}
}
+ }
+ },
+ "summary": "List deliveries",
+ "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed."
+ }
+ },
+ "/v2/organizations/{slug}/webhooks/endpoints/{id}/test": {
+ "post": {
+ "operationId": "v2-organizations-slug-webhooks-endpoints-id-test-post",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "slug",
+ "schema": {
+ "type": "string",
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba"
+ },
+ "required": true,
+ "description": "Organization slug"
},
- "500": {
- "description": "GenericInternalServerError",
+ {
+ "in": "path",
+ "name": "id",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "required": true,
+ "description": "Identifier of an endpoint (UUID v7)."
+ }
+ ],
+ "tags": ["Organization webhooks"],
+ "responses": {
+ "201": {
+ "description": "Event published",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "error": {
+ "data": {
"type": "object",
"properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string",
- "const": "internal_server_error"
- },
- "message": {
+ "type": {
"type": "string",
- "const": "Internal Server Error"
+ "const": "ingress",
+ "description": "Resource type."
},
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "required": ["code", "message"]
- }
- },
- "required": ["error"],
- "$defs": {
- "APIErrorObject": {
- "$ref": "#/components/schemas/APIErrorObject"
- }
- }
- },
- "examples": {
- "Default example": {
- "value": {
- "error": {
- "code": "internal_server_error",
- "message": "Internal Server Error"
- }
- }
- }
- }
- }
- }
- }
- },
- "summary": "Get delivery",
- "description": "Get details of a specific delivery attempt."
- }
- },
- "/v2/organizations/{slug}/webhooks/deliveries/{id}/retry": {
- "post": {
- "operationId": "v2-organizations-slug-webhooks-deliveries-id-retry-post",
- "parameters": [
- {
- "in": "path",
- "name": "slug",
- "schema": {
- "type": "string",
- "pattern": "^[\\w-]+$",
- "example": "tsrqponmlkjihgfedcba"
- },
- "required": true,
- "description": "Organization slug"
- },
- {
- "in": "path",
- "name": "id",
- "schema": {
- "type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
- },
- "required": true,
- "description": "Identifier of a delivery (UUID v7)."
- }
- ],
- "tags": ["Organization webhooks"],
- "responses": {
- "201": {
- "description": "Delivery details",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "ingress",
- "description": "Resource type."
- },
- "id": {
+ "id": {
"type": "string"
}
},
@@ -21989,11 +17452,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_slug"
+ "const": "bad_request.endpoint.test.disabled"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid organization slug"
+ "const": "Bad Request: Endpoint is disabled"
},
"description": {
"type": "string"
@@ -22047,7 +17510,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidSlug"
+ "title": "EndpointTestDisabled"
},
{
"type": "object",
@@ -22057,11 +17520,11 @@
},
"code": {
"type": "string",
- "const": "bad_request.invalid_ref"
+ "const": "bad_request.endpoint.test.wrong_event_type"
},
"message": {
"type": "string",
- "const": "Bad Request: Invalid project ref"
+ "const": "Bad Request: Provided event type is not subscribed to by the endpoint"
},
"description": {
"type": "string"
@@ -22115,7 +17578,7 @@
}
},
"required": ["code", "message"],
- "title": "InvalidRef"
+ "title": "EndpointTestWrongEventType"
}
]
}
@@ -22128,19 +17591,21 @@
}
},
"examples": {
- "InvalidSlug": {
+ "EndpointTestDisabled": {
"value": {
"error": {
- "code": "bad_request.invalid_slug",
- "message": "Bad Request: Invalid organization slug"
+ "code": "bad_request.endpoint.test.disabled",
+ "message": "Bad Request: Endpoint is disabled",
+ "description": "Endpoint is disabled, to send test event endpoint must first be enabled."
}
}
},
- "InvalidRef": {
+ "EndpointTestWrongEventType": {
"value": {
"error": {
- "code": "bad_request.invalid_ref",
- "message": "Bad Request: Invalid project ref"
+ "code": "bad_request.endpoint.test.wrong_event_type",
+ "message": "Bad Request: Provided event type is not subscribed to by the endpoint",
+ "description": "Only event types that the endpoint is subscribed to can be specified."
}
}
}
@@ -22420,7 +17885,7 @@
}
},
"404": {
- "description": "DeliveryNotFound",
+ "description": "EndpointNotFound",
"content": {
"application/json": {
"schema": {
@@ -22434,11 +17899,11 @@
},
"code": {
"type": "string",
- "const": "not_found.delivery"
+ "const": "not_found.endpoint"
},
"message": {
"type": "string",
- "const": "Not Found: Delivery not found"
+ "const": "Not Found: Endpoint not found"
},
"description": {
"type": "string"
@@ -22505,8 +17970,8 @@
"Default example": {
"value": {
"error": {
- "code": "not_found.delivery",
- "message": "Not Found: Delivery not found"
+ "code": "not_found.endpoint",
+ "message": "Not Found: Endpoint not found"
}
}
}
@@ -22800,1309 +18265,2985 @@
}
}
},
- "summary": "Retry delivery",
- "description": "Retry delivering the same event again.\n\nAutomatic retries are not applicable to manual retries - if the delivery fails, there won't be any automatic retries attempted.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds."
- }
- }
- },
- "components": {
- "securitySchemes": {
- "bearer": {
- "scheme": "bearer",
- "bearerFormat": "JWT",
- "type": "http"
+ "summary": "Send test event",
+ "description": "Ingests and schedules a test webhook event to be published out this endpoints.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "event",
+ "description": "Resource type."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "description": "Webhook event type.",
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "project.v1.paused",
+ "project.v1.created",
+ "project.v1.restored",
+ "project.v1.transferred",
+ "project.v1.removed",
+ "project.v1.restarted",
+ "project.v1.status.changed",
+ "project.v1.backup.started",
+ "project.v1.branch.created",
+ "project.v1.branch.updated",
+ "project.v1.branch.removed",
+ "organization.v1.member.invitation.created",
+ "organization.v1.member.invitation.canceled",
+ "organization.v1.member.added",
+ "organization.v1.member.removed",
+ "organization.v1.member.role.assigned",
+ "organization.v1.member.role.removed",
+ "organization.v1.member.role.updated",
+ "organization.v1.billing.plan.upgraded",
+ "organization.v1.billing.plan.downgraded",
+ "project.v1.branch.deleted"
+ ]
+ }
+ },
+ "required": ["type"]
+ }
+ },
+ "required": ["type", "attributes"]
+ }
+ }
+ }
+ }
+ }
+ }
}
},
- "schemas": {
- "ListLogDrainsResponse_Output": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "description": "Resource type.",
- "enum": ["log_drain"]
- },
- "id": {
- "type": "string"
- },
- "attributes": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "config": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "url": {
- "type": "string"
- },
- "http": {
- "type": "string",
- "enum": ["http1", "http2"]
- },
- "gzip": {
- "type": "boolean"
- },
- "headers": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- }
- },
- "title": "webhook"
+ "/v2/organizations/{slug}/webhooks/deliveries/{id}": {
+ "get": {
+ "operationId": "v2-organizations-slug-webhooks-deliveries-id-get",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "slug",
+ "schema": {
+ "type": "string",
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba"
+ },
+ "required": true,
+ "description": "Organization slug"
+ },
+ {
+ "in": "path",
+ "name": "id",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "required": true,
+ "description": "Identifier of a delivery (UUID v7)."
+ }
+ ],
+ "tags": ["Organization webhooks"],
+ "responses": {
+ "200": {
+ "description": "Delivery details",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "delivery",
+ "description": "Resource type."
},
- {
- "type": "object",
- "properties": {
- "api_key": {
- "type": "string"
- },
- "region": {
- "type": "string"
- }
- },
- "title": "datadog"
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
},
- {
+ "attributes": {
"type": "object",
"properties": {
- "url": {
- "type": "string"
- },
- "username": {
+ "id": {
"type": "string",
- "nullable": true
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of a delivery (UUID v7)."
},
- "password": {
+ "event_id": {
"type": "string",
- "nullable": true
- },
- "headers": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- }
- },
- "title": "loki"
- },
- {
- "type": "object",
- "properties": {
- "dsn": {
- "type": "string"
- }
- },
- "title": "sentry"
- },
- {
- "type": "object",
- "properties": {
- "domain": {
- "type": "string"
- },
- "api_token": {
- "type": "string"
- },
- "dataset_name": {
- "type": "string"
- }
- },
- "title": "axiom"
- },
- {
- "type": "object",
- "properties": {
- "host": {
- "type": "string"
- },
- "port": {
- "type": "integer",
- "minimum": 0,
- "maximum": 65535
- },
- "tls": {
- "default": false,
- "type": "boolean"
- },
- "structured_data": {
- "type": "string"
- },
- "cipher_key": {
- "type": "string"
- },
- "ca_cert": {
- "type": "string"
- },
- "client_cert": {
- "type": "string"
- },
- "client_key": {
- "type": "string"
- }
- },
- "title": "syslog"
- },
- {
- "type": "object",
- "properties": {
- "s3_bucket": {
- "type": "string"
- },
- "storage_region": {
- "type": "string"
- },
- "access_key_id": {
- "type": "string"
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "Identifier of the event, which triggered the delivery (UUID v7)."
},
- "secret_access_key": {
- "type": "string"
+ "status": {
+ "type": "string",
+ "enum": ["pending", "success", "failure", "skipped"],
+ "description": "Status of the delivery attempt."
},
- "batch_timeout": {
+ "response_code": {
"type": "integer",
"minimum": -9007199254740991,
- "maximum": 9007199254740991
- }
- },
- "title": "s3"
- },
- {
- "type": "object",
- "properties": {
- "region": {
- "type": "string"
- },
- "username": {
- "type": "string"
+ "maximum": 9007199254740991,
+ "description": "HTTP status code of the response, `0` if unavailable."
},
- "password": {
- "type": "string"
- }
- },
- "title": "last9"
- },
- {
- "type": "object",
- "properties": {
- "endpoint": {
- "type": "string"
+ "response_headers": {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "HTTP headers of the response, `{}` if unavailable."
},
- "protocol": {
- "default": "http/protobuf",
- "type": "string"
+ "response_body": {
+ "anyOf": [
+ {
+ "anyOf": [
+ {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable."
+ },
+ {
+ "type": "string",
+ "description": "String representation of an HTTP body of the response."
+ }
+ ]
+ },
+ {
+ "type": "null"
+ }
+ ]
},
- "gzip": {
- "default": true,
- "type": "boolean"
+ "attempt_timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of the attempt."
},
- "headers": {
- "default": {},
+ "event": {
"type": "object",
- "additionalProperties": {
- "type": "string"
- }
+ "properties": {
+ "type": {
+ "description": "Webhook event type.",
+ "type": "string",
+ "enum": [
+ "v1.project.paused",
+ "v1.project.created",
+ "v1.project.restored",
+ "v1.project.transferred",
+ "v1.project.removed",
+ "v1.project.restarted",
+ "v1.project.status.changed",
+ "v1.project.backup.started",
+ "v1.project.branch.created",
+ "v1.project.branch.updated",
+ "v1.project.branch.removed",
+ "v1.organization.member.invitation.created",
+ "v1.organization.member.invitation.canceled",
+ "v1.organization.member.added",
+ "v1.organization.member.removed",
+ "v1.organization.member.role.assigned",
+ "v1.organization.member.role.removed",
+ "v1.organization.member.role.updated",
+ "v1.organization.billing.plan.upgraded",
+ "v1.organization.billing.plan.downgraded",
+ "project.v1.paused",
+ "project.v1.created",
+ "project.v1.restored",
+ "project.v1.transferred",
+ "project.v1.removed",
+ "project.v1.restarted",
+ "project.v1.status.changed",
+ "project.v1.backup.started",
+ "project.v1.branch.created",
+ "project.v1.branch.updated",
+ "project.v1.branch.removed",
+ "organization.v1.member.invitation.created",
+ "organization.v1.member.invitation.canceled",
+ "organization.v1.member.added",
+ "organization.v1.member.removed",
+ "organization.v1.member.role.assigned",
+ "organization.v1.member.role.removed",
+ "organization.v1.member.role.updated",
+ "organization.v1.billing.plan.upgraded",
+ "organization.v1.billing.plan.downgraded",
+ "project.v1.branch.deleted"
+ ]
+ },
+ "payload": {
+ "type": "object",
+ "properties": {
+ "organization_slug": {
+ "type": "string",
+ "pattern": "^[\\w-]+$",
+ "description": "Organization slug",
+ "example": "tsrqponmlkjihgfedcba"
+ },
+ "project_ref": {
+ "anyOf": [
+ {
+ "type": "string",
+ "minLength": 20,
+ "maxLength": 20,
+ "pattern": "^[a-z]+$",
+ "description": "Project ref",
+ "example": "abcdefghijklmnopqrst"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["organization_slug", "project_ref"],
+ "description": "Final data sent to the consumer."
+ },
+ "timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "description": "Timestamp of event publication."
+ }
+ },
+ "required": ["type", "payload", "timestamp"]
}
},
- "title": "otlp"
+ "required": [
+ "id",
+ "event_id",
+ "status",
+ "response_code",
+ "response_headers",
+ "response_body",
+ "attempt_timestamp",
+ "event"
+ ]
}
- ]
- },
- "backend_type": {
- "type": "string",
- "enum": [
- "postgres",
- "bigquery",
- "clickhouse",
- "webhook",
- "datadog",
- "loki",
- "sentry",
- "s3",
- "axiom",
- "last9",
- "otlp",
- "syslog"
- ]
+ },
+ "required": ["type", "id", "attributes"]
}
},
- "required": ["name", "config", "backend_type"]
+ "required": ["data"]
}
- },
- "required": ["type", "id", "attributes"]
+ }
}
- }
- },
- "required": ["data"]
- },
- "ErrorResponseBodyAPIErrorObject": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "code": {
- "type": "string"
},
- "message": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "links": {
- "type": "object",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "href": {
- "type": "string"
- },
- "rel": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "describedby": {
- "type": "string"
- },
- "meta": {
+ "401": {
+ "description": "GenericUnauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
"type": "object",
- "additionalProperties": {}
- }
- },
- "required": ["href"]
- }
- },
- "meta": {
- "type": "object",
- "additionalProperties": {}
- },
- "issues": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ErrorResponseBodyAPIErrorObject"
- }
- }
- },
- "required": ["code", "message"],
- "ref": "APIErrorObject"
- },
- "ErrorResponseBody": {
- "type": "object",
- "properties": {
- "error": {
- "$ref": "#/components/schemas/ErrorResponseBodyAPIErrorObject"
- }
- },
- "required": ["error"]
- },
- "CreateLogDrainRequestOpenApi": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "description": "Resource type.",
- "enum": ["log_drain"]
- },
- "attributes": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "config": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "url": {
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "unauthorized"
+ },
+ "message": {
+ "type": "string",
+ "const": "Unauthorized"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
"type": "string"
},
- "http": {
- "type": "string",
- "enum": ["http1", "http2"]
- },
- "gzip": {
- "type": "boolean"
- },
- "headers": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "title": "webhook"
- },
- {
- "type": "object",
- "properties": {
- "api_key": {
- "type": "string"
- },
- "region": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "title": "datadog"
- },
- {
- "type": "object",
- "properties": {
- "url": {
- "type": "string"
- },
- "username": {
- "type": "string",
- "nullable": true
- },
- "password": {
- "type": "string",
- "nullable": true
- },
- "headers": {
+ "additionalProperties": {
"type": "object",
- "additionalProperties": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "title": "loki"
- },
- {
- "type": "object",
- "properties": {
- "dsn": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "title": "sentry"
- },
- {
- "type": "object",
- "properties": {
- "domain": {
- "type": "string"
- },
- "api_token": {
- "type": "string"
- },
- "dataset_name": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "title": "axiom"
- },
- {
- "type": "object",
- "properties": {
- "host": {
- "type": "string"
- },
- "port": {
- "type": "integer",
- "minimum": 0,
- "maximum": 65535
- },
- "tls": {
- "default": false,
- "type": "boolean"
- },
- "structured_data": {
- "type": "string"
- },
- "cipher_key": {
- "type": "string"
- },
- "ca_cert": {
- "type": "string"
- },
- "client_cert": {
- "type": "string"
- },
- "client_key": {
- "type": "string"
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
}
},
- "additionalProperties": false,
- "title": "syslog"
- },
- {
- "type": "object",
- "properties": {
- "s3_bucket": {
- "type": "string"
- },
- "storage_region": {
- "type": "string"
- },
- "access_key_id": {
- "type": "string"
- },
- "secret_access_key": {
+ "meta": {
+ "type": "object",
+ "propertyNames": {
"type": "string"
},
- "batch_timeout": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- }
+ "additionalProperties": {}
},
- "additionalProperties": false,
- "title": "s3"
- },
- {
- "type": "object",
- "properties": {
- "region": {
- "type": "string"
- },
- "username": {
- "type": "string"
- },
- "password": {
- "type": "string"
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
}
- },
- "additionalProperties": false,
- "title": "last9"
+ }
},
- {
- "type": "object",
- "properties": {
- "endpoint": {
- "type": "string"
- },
- "protocol": {
- "default": "http/protobuf",
- "type": "string"
- },
- "gzip": {
- "default": true,
- "type": "boolean"
- },
- "headers": {
- "default": {},
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "title": "otlp"
- }
- ]
+ "required": ["code", "message"]
+ }
},
- "backend_type": {
- "type": "string",
- "enum": [
- "postgres",
- "bigquery",
- "clickhouse",
- "webhook",
- "datadog",
- "loki",
- "sentry",
- "s3",
- "axiom",
- "last9",
- "otlp",
- "syslog"
- ]
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
}
},
- "required": ["name", "config", "backend_type"],
- "additionalProperties": {}
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "unauthorized",
+ "message": "Unauthorized"
+ }
+ }
+ }
+ }
}
- },
- "required": ["type", "attributes"]
- }
- },
- "required": ["data"]
- },
- "LogDrainResponse_Output": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "description": "Resource type.",
- "enum": ["log_drain"]
- },
- "id": {
- "type": "string"
- },
- "attributes": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "config": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "url": {
- "type": "string"
- },
- "http": {
- "type": "string",
- "enum": ["http1", "http2"]
- },
- "gzip": {
- "type": "boolean"
- },
- "headers": {
- "type": "object",
- "additionalProperties": {
+ }
+ },
+ "403": {
+ "description": "Multiple error responses",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "forbidden.permission_denied"
+ },
+ "message": {
+ "type": "string",
+ "const": "Forbidden: Permission denied"
+ },
+ "description": {
"type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
}
- }
- },
- "title": "webhook"
- },
- {
- "type": "object",
- "properties": {
- "api_key": {
- "type": "string"
},
- "region": {
- "type": "string"
- }
+ "required": ["code", "message"],
+ "title": "PermissionDenied"
},
- "title": "datadog"
- },
- {
- "type": "object",
- "properties": {
- "url": {
- "type": "string"
- },
- "username": {
- "type": "string",
- "nullable": true
- },
- "password": {
- "type": "string",
- "nullable": true
- },
- "headers": {
- "type": "object",
- "additionalProperties": {
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "forbidden.access_disabled"
+ },
+ "message": {
+ "type": "string",
+ "const": "Forbidden: Access disabled"
+ },
+ "description": {
"type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
}
- }
+ },
+ "required": ["code", "message"],
+ "title": "AccessDisabled"
+ }
+ ]
+ }
+ },
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "examples": {
+ "PermissionDenied": {
+ "value": {
+ "error": {
+ "code": "forbidden.permission_denied",
+ "message": "Forbidden: Permission denied"
+ }
+ }
+ },
+ "AccessDisabled": {
+ "value": {
+ "error": {
+ "code": "forbidden.access_disabled",
+ "message": "Forbidden: Access disabled"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "DeliveryNotFound",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "title": "loki"
- },
- {
- "type": "object",
- "properties": {
- "dsn": {
- "type": "string"
- }
+ "code": {
+ "type": "string",
+ "const": "not_found.delivery"
},
- "title": "sentry"
- },
- {
- "type": "object",
- "properties": {
- "domain": {
- "type": "string"
- },
- "api_token": {
- "type": "string"
- },
- "dataset_name": {
- "type": "string"
- }
+ "message": {
+ "type": "string",
+ "const": "Not Found: Delivery not found"
},
- "title": "axiom"
- },
- {
- "type": "object",
- "properties": {
- "host": {
- "type": "string"
- },
- "port": {
- "type": "integer",
- "minimum": 0,
- "maximum": 65535
- },
- "tls": {
- "default": false,
- "type": "boolean"
- },
- "structured_data": {
- "type": "string"
- },
- "cipher_key": {
- "type": "string"
- },
- "ca_cert": {
- "type": "string"
- },
- "client_cert": {
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
"type": "string"
},
- "client_key": {
- "type": "string"
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
}
},
- "title": "syslog"
- },
- {
- "type": "object",
- "properties": {
- "s3_bucket": {
- "type": "string"
- },
- "storage_region": {
- "type": "string"
- },
- "access_key_id": {
- "type": "string"
- },
- "secret_access_key": {
+ "meta": {
+ "type": "object",
+ "propertyNames": {
"type": "string"
},
- "batch_timeout": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- }
+ "additionalProperties": {}
},
- "title": "s3"
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
},
- {
- "type": "object",
- "properties": {
- "region": {
- "type": "string"
- },
- "username": {
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "not_found.delivery",
+ "message": "Not Found: Delivery not found"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "408": {
+ "description": "GenericRequestTimeout",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "request_timeout"
+ },
+ "message": {
+ "type": "string",
+ "const": "Request Timeout"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
"type": "string"
},
- "password": {
- "type": "string"
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
}
},
- "title": "last9"
- },
- {
- "type": "object",
- "properties": {
- "endpoint": {
- "type": "string"
- },
- "protocol": {
- "default": "http/protobuf",
+ "meta": {
+ "type": "object",
+ "propertyNames": {
"type": "string"
},
- "gzip": {
- "default": true,
- "type": "boolean"
- },
- "headers": {
- "default": {},
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- }
+ "additionalProperties": {}
},
- "title": "otlp"
- }
- ]
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "required": ["code", "message"]
+ }
},
- "backend_type": {
- "type": "string",
- "enum": [
- "postgres",
- "bigquery",
- "clickhouse",
- "webhook",
- "datadog",
- "loki",
- "sentry",
- "s3",
- "axiom",
- "last9",
- "otlp",
- "syslog"
- ]
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
}
},
- "required": ["name", "config", "backend_type"]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "required": ["data"]
- },
- "UpdateLogDrainRequestOpenApi": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "description": "Resource type.",
- "enum": ["log_drain"]
- },
- "attributes": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "config": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "url": {
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "request_timeout",
+ "message": "Request Timeout"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "GenericTooManyRequests",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "too_many_requests"
+ },
+ "message": {
+ "type": "string",
+ "const": "Too Many Requests"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
"type": "string"
},
- "http": {
- "type": "string",
- "enum": ["http1", "http2"]
- },
- "gzip": {
- "type": "boolean"
- },
- "headers": {
+ "additionalProperties": {
"type": "object",
- "additionalProperties": {
- "type": "string"
- }
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
}
},
- "additionalProperties": false,
- "title": "webhook"
- },
- {
- "type": "object",
- "properties": {
- "api_key": {
+ "meta": {
+ "type": "object",
+ "propertyNames": {
"type": "string"
},
- "region": {
- "type": "string"
- }
+ "additionalProperties": {}
},
- "additionalProperties": false,
- "title": "datadog"
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
},
- {
- "type": "object",
- "properties": {
- "url": {
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "too_many_requests",
+ "message": "Too Many Requests"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "GenericInternalServerError",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "internal_server_error"
+ },
+ "message": {
+ "type": "string",
+ "const": "Internal Server Error"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
"type": "string"
},
- "username": {
- "type": "string",
- "nullable": true
- },
- "password": {
- "type": "string",
- "nullable": true
- },
- "headers": {
+ "additionalProperties": {
"type": "object",
- "additionalProperties": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "title": "loki"
- },
- {
- "type": "object",
- "properties": {
- "dsn": {
- "type": "string"
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
}
},
- "additionalProperties": false,
- "title": "sentry"
- },
- {
- "type": "object",
- "properties": {
- "domain": {
- "type": "string"
- },
- "api_token": {
+ "meta": {
+ "type": "object",
+ "propertyNames": {
"type": "string"
},
- "dataset_name": {
- "type": "string"
- }
+ "additionalProperties": {}
},
- "additionalProperties": false,
- "title": "axiom"
- },
- {
- "type": "object",
- "properties": {
- "host": {
- "type": "string"
- },
- "port": {
- "type": "integer",
- "minimum": 0,
- "maximum": 65535
- },
- "tls": {
- "default": false,
- "type": "boolean"
- },
- "structured_data": {
- "type": "string"
- },
- "cipher_key": {
- "type": "string"
- },
- "ca_cert": {
- "type": "string"
- },
- "client_cert": {
- "type": "string"
- },
- "client_key": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "title": "syslog"
- },
- {
- "type": "object",
- "properties": {
- "s3_bucket": {
- "type": "string"
- },
- "storage_region": {
- "type": "string"
- },
- "access_key_id": {
- "type": "string"
- },
- "secret_access_key": {
- "type": "string"
- },
- "batch_timeout": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- }
- },
- "additionalProperties": false,
- "title": "s3"
- },
- {
- "type": "object",
- "properties": {
- "region": {
- "type": "string"
- },
- "username": {
- "type": "string"
- },
- "password": {
- "type": "string"
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
}
- },
- "additionalProperties": false,
- "title": "last9"
+ }
},
- {
- "type": "object",
- "properties": {
- "endpoint": {
- "type": "string"
- },
- "protocol": {
- "default": "http/protobuf",
- "type": "string"
- },
- "gzip": {
- "default": true,
- "type": "boolean"
- },
- "headers": {
- "default": {},
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "title": "otlp"
- }
- ]
+ "required": ["code", "message"]
+ }
},
- "backend_type": {
- "type": "string",
- "enum": [
- "postgres",
- "bigquery",
- "clickhouse",
- "webhook",
- "datadog",
- "loki",
- "sentry",
- "s3",
- "axiom",
- "last9",
- "otlp",
- "syslog"
- ]
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
}
},
- "required": ["backend_type"],
- "additionalProperties": {}
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "internal_server_error",
+ "message": "Internal Server Error"
+ }
+ }
+ }
+ }
}
- },
- "required": ["type", "attributes"]
+ }
}
},
- "required": ["data"]
- },
- "V2RunProjectAdvisorsBody": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "description": "Resource type.",
- "enum": ["project_advisors"]
- },
- "attributes": {
- "type": "object",
- "properties": {
- "lints": {
- "minItems": 1,
- "maxItems": 10,
- "type": "array",
- "items": {
+ "summary": "Get delivery",
+ "description": "Get details of a specific delivery attempt."
+ }
+ },
+ "/v2/organizations/{slug}/webhooks/deliveries/{id}/retry": {
+ "post": {
+ "operationId": "v2-organizations-slug-webhooks-deliveries-id-retry-post",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "slug",
+ "schema": {
+ "type": "string",
+ "pattern": "^[\\w-]+$",
+ "example": "tsrqponmlkjihgfedcba"
+ },
+ "required": true,
+ "description": "Organization slug"
+ },
+ {
+ "in": "path",
+ "name": "id",
+ "schema": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
+ },
+ "required": true,
+ "description": "Identifier of a delivery (UUID v7)."
+ }
+ ],
+ "tags": ["Organization webhooks"],
+ "responses": {
+ "201": {
+ "description": "Delivery details",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
"type": "object",
"properties": {
- "name": {
+ "type": {
"type": "string",
- "enum": [
- "unindexed_foreign_keys",
- "auth_users_exposed",
- "auth_rls_initplan",
- "no_primary_key",
- "unused_index",
- "multiple_permissive_policies",
- "policy_exists_rls_disabled",
- "rls_enabled_no_policy",
- "duplicate_index",
- "security_definer_view",
- "function_search_path_mutable",
- "rls_disabled_in_public",
- "extension_in_public",
- "rls_references_user_metadata",
- "materialized_view_in_api",
- "foreign_table_in_api",
- "unsupported_reg_types",
- "auth_otp_long_expiry",
- "auth_otp_short_length",
- "ssl_not_enforced",
- "log_connections_not_enabled",
- "network_restrictions_not_set",
- "password_requirements_min_length",
- "pitr_not_enabled",
- "auth_leaked_password_protection",
- "auth_insufficient_mfa_options",
- "auth_password_policy_missing",
- "leaked_service_key",
- "no_backup_admin",
- "vulnerable_postgres_version",
- "db_not_reachable",
- "db_connection_failing",
- "db_connection_limit_reached",
- "instance_telemetry_lost",
- "instance_db_down",
- "instance_alert_firing",
- "log_data_api_error_rate_high",
- "log_auth_error_rate_high",
- "log_storage_error_rate_high",
- "log_edge_function_error_rate_high"
- ]
+ "const": "ingress",
+ "description": "Resource type."
+ },
+ "id": {
+ "type": "string"
}
},
- "required": ["name"],
- "additionalProperties": false
+ "required": ["type", "id"]
}
- }
- },
- "required": ["lints"],
- "additionalProperties": false
+ },
+ "required": ["data"]
+ }
}
- },
- "required": ["type", "attributes"],
- "additionalProperties": {}
- }
- },
- "required": ["data"]
- },
- "V2ProjectAdvisorsResponse_Output": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "description": "Resource type.",
- "enum": ["project_advisors"]
- },
- "attributes": {
- "type": "object",
- "properties": {
- "lints": {
- "type": "array",
- "items": {
+ }
+ },
+ "401": {
+ "description": "GenericUnauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
"type": "object",
"properties": {
- "name": {
- "type": "string",
- "enum": [
- "unindexed_foreign_keys",
- "auth_users_exposed",
- "auth_rls_initplan",
- "no_primary_key",
- "unused_index",
- "multiple_permissive_policies",
- "policy_exists_rls_disabled",
- "rls_enabled_no_policy",
- "duplicate_index",
- "security_definer_view",
- "function_search_path_mutable",
- "rls_disabled_in_public",
- "extension_in_public",
- "rls_references_user_metadata",
- "materialized_view_in_api",
- "foreign_table_in_api",
- "unsupported_reg_types",
- "auth_otp_long_expiry",
- "auth_otp_short_length",
- "ssl_not_enforced",
- "log_connections_not_enabled",
- "network_restrictions_not_set",
- "password_requirements_min_length",
- "pitr_not_enabled",
- "auth_leaked_password_protection",
- "auth_insufficient_mfa_options",
- "auth_password_policy_missing",
- "leaked_service_key",
- "no_backup_admin",
- "vulnerable_postgres_version",
- "db_not_reachable",
- "db_connection_failing",
- "db_connection_limit_reached",
- "instance_telemetry_lost",
- "instance_db_down",
- "instance_alert_firing",
- "log_data_api_error_rate_high",
- "log_auth_error_rate_high",
- "log_storage_error_rate_high",
- "log_edge_function_error_rate_high",
- "project_not_active",
- "advisor_check_unavailable"
- ]
- },
- "title": {
+ "id": {
"type": "string"
},
- "level": {
+ "code": {
"type": "string",
- "enum": ["ERROR", "WARN", "INFO"]
+ "const": "unauthorized"
},
- "facing": {
+ "message": {
"type": "string",
- "enum": ["EXTERNAL"]
- },
- "categories": {
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["PERFORMANCE", "SECURITY", "HEALTH"]
- },
- "x-ignore-array-items-must-be-objects": true
+ "const": "Unauthorized"
},
"description": {
"type": "string"
},
- "detail": {
- "type": "string"
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
},
- "remediation": {
- "type": "string"
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
},
- "metadata": {
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "unauthorized",
+ "message": "Unauthorized"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Multiple error responses",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "oneOf": [
+ {
"type": "object",
"properties": {
- "schema": {
- "type": "string"
- },
- "name": {
+ "id": {
"type": "string"
},
- "entity": {
- "type": "string"
+ "code": {
+ "type": "string",
+ "const": "forbidden.permission_denied"
},
- "type": {
+ "message": {
"type": "string",
- "enum": [
- "table",
- "view",
- "materialized view",
- "foreign table",
- "auth",
- "function",
- "extension",
- "compliance",
- "health"
- ]
+ "const": "Forbidden: Permission denied"
},
- "fkey_name": {
+ "description": {
"type": "string"
},
- "fkey_columns": {
- "x-ignore-array-items-must-be-objects": true,
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ },
+ "issues": {
"type": "array",
"items": {
- "type": "number"
+ "$ref": "#/components/schemas/APIErrorObject"
}
}
- }
+ },
+ "required": ["code", "message"],
+ "title": "PermissionDenied"
},
- "cache_key": {
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "forbidden.access_disabled"
+ },
+ "message": {
+ "type": "string",
+ "const": "Forbidden: Access disabled"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "required": ["code", "message"],
+ "title": "AccessDisabled"
+ }
+ ]
+ }
+ },
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "examples": {
+ "PermissionDenied": {
+ "value": {
+ "error": {
+ "code": "forbidden.permission_denied",
+ "message": "Forbidden: Permission denied"
+ }
+ }
+ },
+ "AccessDisabled": {
+ "value": {
+ "error": {
+ "code": "forbidden.access_disabled",
+ "message": "Forbidden: Access disabled"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "DeliveryNotFound",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "observed_at": {
+ "code": {
"type": "string",
- "format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
+ "const": "not_found.delivery"
+ },
+ "message": {
+ "type": "string",
+ "const": "Not Found: Delivery not found"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
}
},
- "required": [
- "name",
- "title",
- "level",
- "facing",
- "categories",
- "description",
- "detail",
- "remediation",
- "cache_key"
- ]
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
}
}
},
- "required": ["lints"]
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "not_found.delivery",
+ "message": "Not Found: Delivery not found"
+ }
+ }
+ }
+ }
}
- },
- "required": ["type", "attributes"]
- }
- },
- "required": ["data"]
- },
- "V2CreateBranchRequest": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "description": "Resource type.",
- "enum": ["branch"]
- },
- "attributes": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "minLength": 1,
- "description": "Name of the branch.",
- "example": "preview-login-page"
- },
- "git_branch": {
- "description": "Git branch to track. Must exist on the connected GitHub repository when the project has one.",
- "example": "feature/login-page",
- "type": "string",
- "minLength": 1
- },
- "region": {
- "description": "Region to create the branch in. Omit to inherit the region of the project it branches from.",
- "type": "string"
- },
- "persistent": {
- "description": "Whether the branch is kept when its git branch is deleted or its PR is merged.",
- "type": "boolean"
- },
- "with_data": {
- "description": "Whether to seed the branch from the project's latest physical backup.",
- "type": "boolean"
- },
- "desired_instance_size": {
- "description": "Desired instance size. Omit this field to always default to the smallest possible size.",
- "type": "string",
- "enum": [
- "nano",
- "micro",
- "small",
+ }
+ },
+ "408": {
+ "description": "GenericRequestTimeout",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "request_timeout"
+ },
+ "message": {
+ "type": "string",
+ "const": "Request Timeout"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "request_timeout",
+ "message": "Request Timeout"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "GenericTooManyRequests",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "too_many_requests"
+ },
+ "message": {
+ "type": "string",
+ "const": "Too Many Requests"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "too_many_requests",
+ "message": "Too Many Requests"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "GenericInternalServerError",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string",
+ "const": "internal_server_error"
+ },
+ "message": {
+ "type": "string",
+ "const": "Internal Server Error"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "propertyNames": {
+ "type": "string"
+ },
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "required": ["code", "message"]
+ }
+ },
+ "required": ["error"],
+ "$defs": {
+ "APIErrorObject": {
+ "$ref": "#/components/schemas/APIErrorObject"
+ }
+ }
+ },
+ "examples": {
+ "Default example": {
+ "value": {
+ "error": {
+ "code": "internal_server_error",
+ "message": "Internal Server Error"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "summary": "Retry delivery",
+ "description": "Retry delivering the same event again.\n\nAutomatic retries are not applicable to manual retries - if the delivery fails, there won't be any automatic retries attempted.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds."
+ }
+ }
+ },
+ "components": {
+ "securitySchemes": {
+ "bearer": {
+ "scheme": "bearer",
+ "bearerFormat": "JWT",
+ "type": "http"
+ }
+ },
+ "schemas": {
+ "ListLogDrainsResponse_Output": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Resource type.",
+ "enum": ["log_drain"]
+ },
+ "id": {
+ "type": "string"
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "config": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "http": {
+ "type": "string",
+ "enum": ["http1", "http2"]
+ },
+ "gzip": {
+ "type": "boolean"
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "title": "webhook"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "api_key": {
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ }
+ },
+ "title": "datadog"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string",
+ "nullable": true
+ },
+ "password": {
+ "type": "string",
+ "nullable": true
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "title": "loki"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "dsn": {
+ "type": "string"
+ }
+ },
+ "title": "sentry"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "domain": {
+ "type": "string"
+ },
+ "api_token": {
+ "type": "string"
+ },
+ "dataset_name": {
+ "type": "string"
+ }
+ },
+ "title": "axiom"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": "string"
+ },
+ "port": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 65535
+ },
+ "tls": {
+ "default": false,
+ "type": "boolean"
+ },
+ "structured_data": {
+ "type": "string"
+ },
+ "cipher_key": {
+ "type": "string"
+ },
+ "ca_cert": {
+ "type": "string"
+ },
+ "client_cert": {
+ "type": "string"
+ },
+ "client_key": {
+ "type": "string"
+ }
+ },
+ "title": "syslog"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "s3_bucket": {
+ "type": "string"
+ },
+ "storage_region": {
+ "type": "string"
+ },
+ "access_key_id": {
+ "type": "string"
+ },
+ "secret_access_key": {
+ "type": "string"
+ },
+ "batch_timeout": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ }
+ },
+ "title": "s3"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "region": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ }
+ },
+ "title": "last9"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "endpoint": {
+ "type": "string"
+ },
+ "protocol": {
+ "default": "http/protobuf",
+ "type": "string"
+ },
+ "gzip": {
+ "default": true,
+ "type": "boolean"
+ },
+ "headers": {
+ "default": {},
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "title": "otlp"
+ }
+ ]
+ },
+ "backend_type": {
+ "type": "string",
+ "enum": [
+ "postgres",
+ "bigquery",
+ "clickhouse",
+ "webhook",
+ "datadog",
+ "loki",
+ "sentry",
+ "s3",
+ "axiom",
+ "last9",
+ "otlp",
+ "syslog"
+ ]
+ }
+ },
+ "required": ["name", "config", "backend_type"]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ }
+ },
+ "required": ["data"]
+ },
+ "ErrorResponseBodyAPIErrorObject": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "links": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string"
+ },
+ "rel": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "describedby": {
+ "type": "string"
+ },
+ "meta": {
+ "type": "object",
+ "additionalProperties": {}
+ }
+ },
+ "required": ["href"]
+ }
+ },
+ "meta": {
+ "type": "object",
+ "additionalProperties": {}
+ },
+ "issues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ErrorResponseBodyAPIErrorObject"
+ }
+ }
+ },
+ "required": ["code", "message"],
+ "ref": "APIErrorObject"
+ },
+ "ErrorResponseBody": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "$ref": "#/components/schemas/ErrorResponseBodyAPIErrorObject"
+ }
+ },
+ "required": ["error"]
+ },
+ "CreateLogDrainRequestOpenApi": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Resource type.",
+ "enum": ["log_drain"]
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "config": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "http": {
+ "type": "string",
+ "enum": ["http1", "http2"]
+ },
+ "gzip": {
+ "type": "boolean"
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "title": "webhook"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "api_key": {
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "title": "datadog"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string",
+ "nullable": true
+ },
+ "password": {
+ "type": "string",
+ "nullable": true
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "title": "loki"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "dsn": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "title": "sentry"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "domain": {
+ "type": "string"
+ },
+ "api_token": {
+ "type": "string"
+ },
+ "dataset_name": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "title": "axiom"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": "string"
+ },
+ "port": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 65535
+ },
+ "tls": {
+ "default": false,
+ "type": "boolean"
+ },
+ "structured_data": {
+ "type": "string"
+ },
+ "cipher_key": {
+ "type": "string"
+ },
+ "ca_cert": {
+ "type": "string"
+ },
+ "client_cert": {
+ "type": "string"
+ },
+ "client_key": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "title": "syslog"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "s3_bucket": {
+ "type": "string"
+ },
+ "storage_region": {
+ "type": "string"
+ },
+ "access_key_id": {
+ "type": "string"
+ },
+ "secret_access_key": {
+ "type": "string"
+ },
+ "batch_timeout": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ }
+ },
+ "additionalProperties": false,
+ "title": "s3"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "region": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "title": "last9"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "endpoint": {
+ "type": "string"
+ },
+ "protocol": {
+ "default": "http/protobuf",
+ "type": "string"
+ },
+ "gzip": {
+ "default": true,
+ "type": "boolean"
+ },
+ "headers": {
+ "default": {},
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "title": "otlp"
+ }
+ ]
+ },
+ "backend_type": {
+ "type": "string",
+ "enum": [
+ "postgres",
+ "bigquery",
+ "clickhouse",
+ "webhook",
+ "datadog",
+ "loki",
+ "sentry",
+ "s3",
+ "axiom",
+ "last9",
+ "otlp",
+ "syslog"
+ ]
+ }
+ },
+ "required": ["name", "config", "backend_type"],
+ "additionalProperties": {}
+ }
+ },
+ "required": ["type", "attributes"]
+ }
+ },
+ "required": ["data"]
+ },
+ "LogDrainResponse_Output": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Resource type.",
+ "enum": ["log_drain"]
+ },
+ "id": {
+ "type": "string"
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "config": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "http": {
+ "type": "string",
+ "enum": ["http1", "http2"]
+ },
+ "gzip": {
+ "type": "boolean"
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "title": "webhook"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "api_key": {
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ }
+ },
+ "title": "datadog"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string",
+ "nullable": true
+ },
+ "password": {
+ "type": "string",
+ "nullable": true
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "title": "loki"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "dsn": {
+ "type": "string"
+ }
+ },
+ "title": "sentry"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "domain": {
+ "type": "string"
+ },
+ "api_token": {
+ "type": "string"
+ },
+ "dataset_name": {
+ "type": "string"
+ }
+ },
+ "title": "axiom"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": "string"
+ },
+ "port": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 65535
+ },
+ "tls": {
+ "default": false,
+ "type": "boolean"
+ },
+ "structured_data": {
+ "type": "string"
+ },
+ "cipher_key": {
+ "type": "string"
+ },
+ "ca_cert": {
+ "type": "string"
+ },
+ "client_cert": {
+ "type": "string"
+ },
+ "client_key": {
+ "type": "string"
+ }
+ },
+ "title": "syslog"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "s3_bucket": {
+ "type": "string"
+ },
+ "storage_region": {
+ "type": "string"
+ },
+ "access_key_id": {
+ "type": "string"
+ },
+ "secret_access_key": {
+ "type": "string"
+ },
+ "batch_timeout": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ }
+ },
+ "title": "s3"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "region": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ }
+ },
+ "title": "last9"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "endpoint": {
+ "type": "string"
+ },
+ "protocol": {
+ "default": "http/protobuf",
+ "type": "string"
+ },
+ "gzip": {
+ "default": true,
+ "type": "boolean"
+ },
+ "headers": {
+ "default": {},
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "title": "otlp"
+ }
+ ]
+ },
+ "backend_type": {
+ "type": "string",
+ "enum": [
+ "postgres",
+ "bigquery",
+ "clickhouse",
+ "webhook",
+ "datadog",
+ "loki",
+ "sentry",
+ "s3",
+ "axiom",
+ "last9",
+ "otlp",
+ "syslog"
+ ]
+ }
+ },
+ "required": ["name", "config", "backend_type"]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "required": ["data"]
+ },
+ "UpdateLogDrainRequestOpenApi": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Resource type.",
+ "enum": ["log_drain"]
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "config": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "http": {
+ "type": "string",
+ "enum": ["http1", "http2"]
+ },
+ "gzip": {
+ "type": "boolean"
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "title": "webhook"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "api_key": {
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "title": "datadog"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string",
+ "nullable": true
+ },
+ "password": {
+ "type": "string",
+ "nullable": true
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "title": "loki"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "dsn": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "title": "sentry"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "domain": {
+ "type": "string"
+ },
+ "api_token": {
+ "type": "string"
+ },
+ "dataset_name": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "title": "axiom"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": "string"
+ },
+ "port": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 65535
+ },
+ "tls": {
+ "default": false,
+ "type": "boolean"
+ },
+ "structured_data": {
+ "type": "string"
+ },
+ "cipher_key": {
+ "type": "string"
+ },
+ "ca_cert": {
+ "type": "string"
+ },
+ "client_cert": {
+ "type": "string"
+ },
+ "client_key": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "title": "syslog"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "s3_bucket": {
+ "type": "string"
+ },
+ "storage_region": {
+ "type": "string"
+ },
+ "access_key_id": {
+ "type": "string"
+ },
+ "secret_access_key": {
+ "type": "string"
+ },
+ "batch_timeout": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ }
+ },
+ "additionalProperties": false,
+ "title": "s3"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "region": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "title": "last9"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "endpoint": {
+ "type": "string"
+ },
+ "protocol": {
+ "default": "http/protobuf",
+ "type": "string"
+ },
+ "gzip": {
+ "default": true,
+ "type": "boolean"
+ },
+ "headers": {
+ "default": {},
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "title": "otlp"
+ }
+ ]
+ },
+ "backend_type": {
+ "type": "string",
+ "enum": [
+ "postgres",
+ "bigquery",
+ "clickhouse",
+ "webhook",
+ "datadog",
+ "loki",
+ "sentry",
+ "s3",
+ "axiom",
+ "last9",
+ "otlp",
+ "syslog"
+ ]
+ }
+ },
+ "required": ["backend_type"],
+ "additionalProperties": {}
+ }
+ },
+ "required": ["type", "attributes"]
+ }
+ },
+ "required": ["data"]
+ },
+ "V2RunProjectAdvisorsBody": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Resource type.",
+ "enum": ["project_advisors"]
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "lints": {
+ "minItems": 1,
+ "maxItems": 10,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "enum": [
+ "unindexed_foreign_keys",
+ "auth_users_exposed",
+ "auth_rls_initplan",
+ "no_primary_key",
+ "unused_index",
+ "multiple_permissive_policies",
+ "policy_exists_rls_disabled",
+ "rls_enabled_no_policy",
+ "duplicate_index",
+ "security_definer_view",
+ "function_search_path_mutable",
+ "rls_disabled_in_public",
+ "extension_in_public",
+ "rls_references_user_metadata",
+ "materialized_view_in_api",
+ "foreign_table_in_api",
+ "unsupported_reg_types",
+ "auth_otp_long_expiry",
+ "auth_otp_short_length",
+ "ssl_not_enforced",
+ "log_connections_not_enabled",
+ "network_restrictions_not_set",
+ "password_requirements_min_length",
+ "pitr_not_enabled",
+ "auth_leaked_password_protection",
+ "auth_insufficient_mfa_options",
+ "auth_password_policy_missing",
+ "leaked_service_key",
+ "no_backup_admin",
+ "vulnerable_postgres_version",
+ "db_not_reachable",
+ "db_connection_failing",
+ "db_connection_limit_reached",
+ "instance_telemetry_lost",
+ "instance_db_down",
+ "instance_alert_firing",
+ "log_data_api_error_rate_high",
+ "log_auth_error_rate_high",
+ "log_storage_error_rate_high",
+ "log_edge_function_error_rate_high"
+ ]
+ }
+ },
+ "required": ["name"],
+ "additionalProperties": false
+ }
+ }
+ },
+ "required": ["lints"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["type", "attributes"],
+ "additionalProperties": {}
+ }
+ },
+ "required": ["data"]
+ },
+ "V2ProjectAdvisorsResponse_Output": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Resource type.",
+ "enum": ["project_advisors"]
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "lints": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "enum": [
+ "unindexed_foreign_keys",
+ "auth_users_exposed",
+ "auth_rls_initplan",
+ "no_primary_key",
+ "unused_index",
+ "multiple_permissive_policies",
+ "policy_exists_rls_disabled",
+ "rls_enabled_no_policy",
+ "duplicate_index",
+ "security_definer_view",
+ "function_search_path_mutable",
+ "rls_disabled_in_public",
+ "extension_in_public",
+ "rls_references_user_metadata",
+ "materialized_view_in_api",
+ "foreign_table_in_api",
+ "unsupported_reg_types",
+ "auth_otp_long_expiry",
+ "auth_otp_short_length",
+ "ssl_not_enforced",
+ "log_connections_not_enabled",
+ "network_restrictions_not_set",
+ "password_requirements_min_length",
+ "pitr_not_enabled",
+ "auth_leaked_password_protection",
+ "auth_insufficient_mfa_options",
+ "auth_password_policy_missing",
+ "leaked_service_key",
+ "no_backup_admin",
+ "vulnerable_postgres_version",
+ "db_not_reachable",
+ "db_connection_failing",
+ "db_connection_limit_reached",
+ "instance_telemetry_lost",
+ "instance_db_down",
+ "instance_alert_firing",
+ "log_data_api_error_rate_high",
+ "log_auth_error_rate_high",
+ "log_storage_error_rate_high",
+ "log_edge_function_error_rate_high",
+ "project_not_active",
+ "advisor_check_unavailable"
+ ]
+ },
+ "title": {
+ "type": "string"
+ },
+ "level": {
+ "type": "string",
+ "enum": ["ERROR", "WARN", "INFO"]
+ },
+ "facing": {
+ "type": "string",
+ "enum": ["EXTERNAL"]
+ },
+ "categories": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": ["PERFORMANCE", "SECURITY", "HEALTH"]
+ },
+ "x-ignore-array-items-must-be-objects": true
+ },
+ "description": {
+ "type": "string"
+ },
+ "detail": {
+ "type": "string"
+ },
+ "remediation": {
+ "type": "string"
+ },
+ "metadata": {
+ "type": "object",
+ "properties": {
+ "schema": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "entity": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "table",
+ "view",
+ "materialized view",
+ "foreign table",
+ "auth",
+ "function",
+ "extension",
+ "compliance",
+ "health"
+ ]
+ },
+ "fkey_name": {
+ "type": "string"
+ },
+ "fkey_columns": {
+ "x-ignore-array-items-must-be-objects": true,
+ "type": "array",
+ "items": {
+ "type": "number"
+ }
+ }
+ }
+ },
+ "cache_key": {
+ "type": "string"
+ },
+ "observed_at": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
+ }
+ },
+ "required": [
+ "name",
+ "title",
+ "level",
+ "facing",
+ "categories",
+ "description",
+ "detail",
+ "remediation",
+ "cache_key"
+ ]
+ }
+ }
+ },
+ "required": ["lints"]
+ }
+ },
+ "required": ["type", "attributes"]
+ }
+ },
+ "required": ["data"]
+ },
+ "V2CreateBranchRequest": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Resource type.",
+ "enum": ["branch"]
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "minLength": 1,
+ "description": "Name of the branch.",
+ "example": "preview-login-page"
+ },
+ "git_branch": {
+ "description": "Git branch to track. Must exist on the connected GitHub repository when the project has one.",
+ "example": "feature/login-page",
+ "type": "string",
+ "minLength": 1
+ },
+ "region": {
+ "description": "Region to create the branch in. Omit to inherit the region of the project it branches from.",
+ "type": "string"
+ },
+ "persistent": {
+ "description": "Whether the branch is kept when its git branch is deleted or its PR is merged.",
+ "type": "boolean"
+ },
+ "with_data": {
+ "description": "Whether to seed the branch from the project's latest physical backup.",
+ "type": "boolean"
+ },
+ "desired_instance_size": {
+ "description": "Desired instance size. Omit this field to always default to the smallest possible size.",
+ "type": "string",
+ "enum": [
+ "nano",
+ "micro",
+ "small",
"medium",
"large",
"xlarge",
@@ -24137,12 +21278,93 @@
"required": ["name"]
}
},
- "required": ["type", "attributes"]
+ "required": ["type", "attributes"]
+ }
+ },
+ "required": ["data"]
+ },
+ "V2BranchResponse_Output": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Resource type.",
+ "enum": ["branch"]
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
+ "description": "ID of the branch."
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the branch."
+ },
+ "project_ref": {
+ "type": "string",
+ "description": "Ref of the project backing this branch."
+ },
+ "parent_project_ref": {
+ "type": "string",
+ "description": "Ref of the project it branches from."
+ },
+ "is_default": {
+ "type": "boolean",
+ "description": "Whether this is the default branch of the project."
+ },
+ "persistent": {
+ "type": "boolean",
+ "description": "Whether the branch is kept when its git branch is deleted or its PR is merged."
+ },
+ "with_data": {
+ "type": "boolean",
+ "description": "Whether the branch is seeded from the project's data."
+ },
+ "git_branch": {
+ "description": "Git branch being tracked.",
+ "type": "string"
+ },
+ "notify_url": {
+ "description": "HTTP endpoint receiving branch status updates.",
+ "type": "string",
+ "format": "uri"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Creation timestamp."
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Last update timestamp."
+ }
+ },
+ "required": [
+ "name",
+ "project_ref",
+ "parent_project_ref",
+ "is_default",
+ "persistent",
+ "with_data",
+ "created_at",
+ "updated_at"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
}
},
"required": ["data"]
},
- "V2BranchResponse_Output": {
+ "V2ProjectConfigResponse_Output": {
"type": "object",
"properties": {
"data": {
@@ -24151,605 +21373,1469 @@
"type": {
"type": "string",
"description": "Resource type.",
- "enum": ["branch"]
+ "enum": ["project_config"]
},
"id": {
"type": "string",
- "format": "uuid",
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
- "description": "ID of the branch."
+ "description": "Project ref."
},
"attributes": {
"type": "object",
"properties": {
- "name": {
- "type": "string",
- "description": "Name of the branch."
- },
- "project_ref": {
- "type": "string",
- "description": "Ref of the project backing this branch."
- },
- "parent_project_ref": {
- "type": "string",
- "description": "Ref of the project it branches from."
- },
- "is_default": {
- "type": "boolean",
- "description": "Whether this is the default branch of the project."
- },
- "persistent": {
- "type": "boolean",
- "description": "Whether the branch is kept when its git branch is deleted or its PR is merged."
- },
- "with_data": {
- "type": "boolean",
- "description": "Whether the branch is seeded from the project's data."
+ "database": {
+ "type": "object",
+ "properties": {
+ "major_version": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "The major Postgres version the database runs. `17` covers both Postgres 17 and Oriole on 17, since Oriole is a storage engine rather than a version."
+ },
+ "ssl_enforced": {
+ "type": "boolean",
+ "description": "Whether the database rejects plaintext connections"
+ },
+ "network_restrictions": {
+ "type": "object",
+ "properties": {
+ "entitlement": {
+ "type": "string",
+ "enum": ["disallowed", "allowed"]
+ },
+ "status": {
+ "type": "string",
+ "enum": ["stored", "applied"],
+ "description": "Whether the allowlist below is applied to the project or only stored."
+ },
+ "allowed_cidrs": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["v4", "v6"]
+ }
+ },
+ "required": ["address", "type"]
+ }
+ },
+ "updated_at": {
+ "type": "string"
+ },
+ "applied_at": {
+ "type": "string"
+ }
+ },
+ "required": ["entitlement", "status", "allowed_cidrs"]
+ },
+ "postgres_settings": {
+ "type": "object",
+ "properties": {
+ "effective_cache_size": {
+ "type": "string"
+ },
+ "logical_decoding_work_mem": {
+ "type": "string"
+ },
+ "log_autovacuum_min_duration": {
+ "type": "string",
+ "description": "Default unit: ms",
+ "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
+ },
+ "log_checkpoints": {
+ "type": "boolean"
+ },
+ "log_connections": {
+ "type": "boolean"
+ },
+ "log_disconnections": {
+ "type": "boolean"
+ },
+ "log_duration": {
+ "type": "boolean"
+ },
+ "log_lock_waits": {
+ "type": "boolean"
+ },
+ "log_recovery_conflict_waits": {
+ "type": "boolean"
+ },
+ "log_replication_commands": {
+ "type": "boolean"
+ },
+ "log_startup_progress_interval": {
+ "type": "string",
+ "description": "Default unit: ms",
+ "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
+ },
+ "log_temp_files": {
+ "type": "string"
+ },
+ "maintenance_work_mem": {
+ "type": "string"
+ },
+ "track_activity_query_size": {
+ "type": "string"
+ },
+ "max_connections": {
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 262143
+ },
+ "max_locks_per_transaction": {
+ "type": "integer",
+ "minimum": 10,
+ "maximum": 2147483640
+ },
+ "max_logical_replication_workers": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 262143
+ },
+ "max_parallel_maintenance_workers": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 1024
+ },
+ "max_parallel_workers": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 1024
+ },
+ "max_parallel_workers_per_gather": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 1024
+ },
+ "max_replication_slots": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_slot_wal_keep_size": {
+ "type": "string"
+ },
+ "max_standby_archive_delay": {
+ "type": "string"
+ },
+ "max_standby_streaming_delay": {
+ "type": "string"
+ },
+ "max_sync_workers_per_subscription": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 262143
+ },
+ "max_wal_size": {
+ "type": "string"
+ },
+ "max_wal_senders": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_worker_processes": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 262143
+ },
+ "session_replication_role": {
+ "type": "string",
+ "enum": ["origin", "replica", "local"]
+ },
+ "shared_buffers": {
+ "type": "string"
+ },
+ "statement_timeout": {
+ "type": "string",
+ "description": "Default unit: ms",
+ "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
+ },
+ "track_commit_timestamp": {
+ "type": "boolean"
+ },
+ "wal_keep_size": {
+ "type": "string"
+ },
+ "wal_sender_timeout": {
+ "type": "string",
+ "description": "Default unit: ms",
+ "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
+ },
+ "work_mem": {
+ "type": "string"
+ },
+ "checkpoint_timeout": {
+ "type": "string",
+ "description": "Default unit: s",
+ "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
+ },
+ "hot_standby_feedback": {
+ "type": "boolean"
+ },
+ "cron_log_statement": {
+ "type": "boolean"
+ }
+ },
+ "description": "Postgres parameter overrides. Empty when the project runs entirely on defaults."
+ }
+ },
+ "required": [
+ "major_version",
+ "ssl_enforced",
+ "network_restrictions",
+ "postgres_settings"
+ ]
},
- "git_branch": {
- "description": "Git branch being tracked.",
- "type": "string"
+ "pooler": {
+ "type": "object",
+ "properties": {
+ "pool_mode": {
+ "type": "string",
+ "enum": ["transaction", "session", "statement"]
+ },
+ "ignore_startup_parameters": {
+ "type": "string"
+ },
+ "server_idle_timeout": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "server_lifetime": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "query_wait_timeout": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "reserve_pool_size": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "default_pool_size": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "Defaults to the pooler's size for the project's compute when not overridden."
+ },
+ "max_client_conn": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "Defaults to the pooler's size for the project's compute when not overridden."
+ }
+ },
+ "required": [
+ "pool_mode",
+ "ignore_startup_parameters",
+ "server_idle_timeout",
+ "server_lifetime",
+ "query_wait_timeout",
+ "reserve_pool_size",
+ "default_pool_size",
+ "max_client_conn"
+ ]
},
- "notify_url": {
- "description": "HTTP endpoint receiving branch status updates.",
- "type": "string",
- "format": "uri"
+ "auth": {
+ "type": "object",
+ "additionalProperties": {},
+ "description": "Effective Auth config, keyed by lowercased GoTrue setting name and resolved through the `gotrue_config` view, so a setting the project has never overridden is reported at its platform default. Secrets are returned as an HMAC of their value, never in plaintext."
},
- "created_at": {
- "type": "string",
- "format": "date-time",
- "description": "Creation timestamp."
+ "api": {
+ "type": "object",
+ "properties": {
+ "db_schema": {
+ "type": "string",
+ "description": "Schemas exposed through the Data API"
+ },
+ "db_extra_search_path": {
+ "type": "string"
+ },
+ "max_rows": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "db_pool_acquisition_timeout": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "db_pool": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "If `null`, no pool size is written to the project's PostgREST config and PostgREST's own default applies. The platform does not pick a value here.",
+ "nullable": true
+ }
+ },
+ "required": [
+ "db_schema",
+ "db_extra_search_path",
+ "max_rows",
+ "db_pool_acquisition_timeout",
+ "db_pool"
+ ]
},
- "updated_at": {
- "type": "string",
- "format": "date-time",
- "description": "Last update timestamp."
- }
- },
- "required": [
- "name",
- "project_ref",
- "parent_project_ref",
- "is_default",
- "persistent",
- "with_data",
- "created_at",
- "updated_at"
- ]
- }
- },
- "required": ["type", "id", "attributes"]
- }
- },
- "required": ["data"]
- },
- "V2ProjectConfigResponse_Output": {
- "type": "object",
- "properties": {
- "data": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "description": "Resource type.",
- "enum": ["project_config"]
- },
- "id": {
- "type": "string",
- "description": "Project ref."
- },
- "attributes": {
- "type": "object",
- "properties": {
- "database": {
+ "realtime": {
"type": "object",
"properties": {
- "major_version": {
+ "private_only": {
+ "type": "boolean"
+ },
+ "max_concurrent_users": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_events_per_second": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_bytes_per_second": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_channels_per_client": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_joins_per_second": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_presence_events_per_second": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_payload_size_in_kb": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "presence_enabled": {
+ "type": "boolean"
+ },
+ "suspend": {
+ "type": "boolean"
+ },
+ "connection_pool": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
- "description": "The major Postgres version the database runs. `17` covers both Postgres 17 and Oriole on 17, since Oriole is a storage engine rather than a version."
+ "description": "Defaults to Realtime's pool size for the project's compute when not overridden."
},
- "ssl_enforced": {
- "type": "boolean",
- "description": "Whether the database rejects plaintext connections"
+ "postgres_changes_pool": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "description": "If `null`, no override is stored and Realtime applies its own default.",
+ "nullable": true
+ }
+ },
+ "required": [
+ "private_only",
+ "max_concurrent_users",
+ "max_events_per_second",
+ "max_bytes_per_second",
+ "max_channels_per_client",
+ "max_joins_per_second",
+ "max_presence_events_per_second",
+ "max_payload_size_in_kb",
+ "presence_enabled",
+ "suspend",
+ "connection_pool",
+ "postgres_changes_pool"
+ ]
+ },
+ "storage": {
+ "type": "object",
+ "properties": {
+ "file_size_limit": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991,
+ "format": "int64"
},
- "network_restrictions": {
+ "features": {
"type": "object",
"properties": {
- "entitlement": {
- "type": "string",
- "enum": ["disallowed", "allowed"]
+ "image_transformation": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ }
+ },
+ "required": ["enabled"]
},
- "status": {
- "type": "string",
- "enum": ["stored", "applied"],
- "description": "Whether the allowlist below is applied to the project or only stored."
+ "s3_protocol": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ }
+ },
+ "required": ["enabled"]
},
- "allowed_cidrs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "address": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "enum": ["v4", "v6"]
- }
- },
- "required": ["address", "type"]
- }
+ "purge_cache": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ }
+ },
+ "required": ["enabled"]
},
- "updated_at": {
- "type": "string"
+ "iceberg_catalog": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ },
+ "max_namespaces": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_tables": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_catalogs": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ }
+ },
+ "required": ["enabled", "max_namespaces", "max_tables", "max_catalogs"]
},
- "applied_at": {
- "type": "string"
+ "vector_buckets": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ },
+ "max_buckets": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ },
+ "max_indexes": {
+ "type": "integer",
+ "minimum": -9007199254740991,
+ "maximum": 9007199254740991
+ }
+ },
+ "required": ["enabled", "max_buckets", "max_indexes"]
}
},
- "required": ["entitlement", "status", "allowed_cidrs"]
+ "required": [
+ "image_transformation",
+ "s3_protocol",
+ "purge_cache",
+ "iceberg_catalog",
+ "vector_buckets"
+ ]
},
- "postgres_settings": {
+ "capabilities": {
"type": "object",
"properties": {
- "effective_cache_size": {
- "type": "string"
- },
- "logical_decoding_work_mem": {
- "type": "string"
- },
- "log_autovacuum_min_duration": {
- "type": "string",
- "description": "Default unit: ms",
- "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
- },
- "log_checkpoints": {
- "type": "boolean"
- },
- "log_connections": {
- "type": "boolean"
- },
- "log_disconnections": {
- "type": "boolean"
- },
- "log_duration": {
- "type": "boolean"
- },
- "log_lock_waits": {
- "type": "boolean"
- },
- "log_recovery_conflict_waits": {
- "type": "boolean"
- },
- "log_replication_commands": {
- "type": "boolean"
- },
- "log_startup_progress_interval": {
- "type": "string",
- "description": "Default unit: ms",
- "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
- },
- "log_temp_files": {
- "type": "string"
- },
- "maintenance_work_mem": {
- "type": "string"
- },
- "track_activity_query_size": {
- "type": "string"
- },
- "max_connections": {
- "type": "integer",
- "minimum": 1,
- "maximum": 262143
- },
- "max_locks_per_transaction": {
- "type": "integer",
- "minimum": 10,
- "maximum": 2147483640
- },
- "max_logical_replication_workers": {
- "type": "integer",
- "minimum": 0,
- "maximum": 262143
- },
- "max_parallel_maintenance_workers": {
- "type": "integer",
- "minimum": 0,
- "maximum": 1024
- },
- "max_parallel_workers": {
- "type": "integer",
- "minimum": 0,
- "maximum": 1024
- },
- "max_parallel_workers_per_gather": {
- "type": "integer",
- "minimum": 0,
- "maximum": 1024
- },
- "max_replication_slots": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_slot_wal_keep_size": {
- "type": "string"
- },
- "max_standby_archive_delay": {
- "type": "string"
- },
- "max_standby_streaming_delay": {
- "type": "string"
- },
- "max_sync_workers_per_subscription": {
- "type": "integer",
- "minimum": 0,
- "maximum": 262143
- },
- "max_wal_size": {
- "type": "string"
- },
- "max_wal_senders": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_worker_processes": {
- "type": "integer",
- "minimum": 0,
- "maximum": 262143
- },
- "session_replication_role": {
- "type": "string",
- "enum": ["origin", "replica", "local"]
- },
- "shared_buffers": {
- "type": "string"
- },
- "statement_timeout": {
- "type": "string",
- "description": "Default unit: ms",
- "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
- },
- "track_commit_timestamp": {
+ "list_v2": {
"type": "boolean"
},
- "wal_keep_size": {
- "type": "string"
- },
- "wal_sender_timeout": {
- "type": "string",
- "description": "Default unit: ms",
- "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
- },
- "work_mem": {
- "type": "string"
- },
- "checkpoint_timeout": {
- "type": "string",
- "description": "Default unit: s",
- "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
- },
- "hot_standby_feedback": {
+ "iceberg_catalog": {
"type": "boolean"
},
- "cron_log_statement": {
+ "object_versioning": {
"type": "boolean"
}
},
- "description": "Postgres parameter overrides. Empty when the project runs entirely on defaults."
- }
+ "required": ["list_v2", "iceberg_catalog", "object_versioning"]
+ },
+ "upstream_target": {
+ "type": "string",
+ "enum": ["main", "canary"]
+ },
+ "migration_version": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "required": [
+ "file_size_limit",
+ "features",
+ "capabilities",
+ "upstream_target",
+ "migration_version"
+ ],
+ "description": "Read from the storage service's admin API rather than the middleware DB, so unlike the rest of this resource it reflects the tenant's live config."
+ }
+ },
+ "required": ["database", "pooler", "auth", "api", "realtime", "storage"]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "required": ["data"]
+ },
+ "V2ListNotebooksResponse_Output": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Resource type.",
+ "enum": ["notebook"]
+ },
+ "id": {
+ "type": "string"
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string",
+ "nullable": true
+ },
+ "favorite": {
+ "type": "boolean"
+ },
+ "inserted_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ },
+ "owner": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number"
+ },
+ "username": {
+ "type": "string"
+ }
+ },
+ "required": ["id", "username"],
+ "description": "User who created the notebook.",
+ "nullable": true
},
- "required": [
- "major_version",
- "ssl_enforced",
- "network_restrictions",
- "postgres_settings"
- ]
+ "updated_by": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number"
+ },
+ "username": {
+ "type": "string"
+ }
+ },
+ "required": ["id", "username"],
+ "description": "User who last wrote to the notebook.",
+ "nullable": true
+ }
},
- "pooler": {
+ "required": [
+ "name",
+ "description",
+ "favorite",
+ "inserted_at",
+ "updated_at",
+ "owner",
+ "updated_by"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "links": {
+ "type": "object",
+ "properties": {
+ "first": {
+ "type": "string",
+ "description": "URL path to the first page if available.",
+ "example": "/v2/projects/{ref}/notebooks?page[size]=10",
+ "nullable": true
+ },
+ "prev": {
+ "type": "string",
+ "description": "URL path to the previous page.",
+ "example": "/v2/projects/{ref}/notebooks?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7",
+ "nullable": true
+ },
+ "next": {
+ "type": "string",
+ "description": "URL path to the next page.",
+ "example": "/v2/projects/{ref}/notebooks?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4",
+ "nullable": true
+ },
+ "last": {
+ "type": "string",
+ "description": "URL path to the last page if available.",
+ "example": "/v2/projects/{ref}/notebooks?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295",
+ "nullable": true
+ }
+ },
+ "required": ["prev", "next"]
+ }
+ },
+ "required": ["data", "links"]
+ },
+ "V2NotebookResponse_Output": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Resource type.",
+ "enum": ["notebook"]
+ },
+ "id": {
+ "type": "string"
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string",
+ "nullable": true
+ },
+ "favorite": {
+ "type": "boolean"
+ },
+ "inserted_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ },
+ "owner": {
"type": "object",
"properties": {
- "pool_mode": {
- "type": "string",
- "enum": ["transaction", "session", "statement"]
+ "id": {
+ "type": "number"
},
- "ignore_startup_parameters": {
+ "username": {
"type": "string"
- },
- "server_idle_timeout": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "server_lifetime": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "query_wait_timeout": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "reserve_pool_size": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "default_pool_size": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "Defaults to the pooler's size for the project's compute when not overridden."
- },
- "max_client_conn": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "Defaults to the pooler's size for the project's compute when not overridden."
}
},
- "required": [
- "pool_mode",
- "ignore_startup_parameters",
- "server_idle_timeout",
- "server_lifetime",
- "query_wait_timeout",
- "reserve_pool_size",
- "default_pool_size",
- "max_client_conn"
- ]
- },
- "auth": {
- "type": "object",
- "additionalProperties": {},
- "description": "Effective Auth config, keyed by lowercased GoTrue setting name and resolved through the `gotrue_config` view, so a setting the project has never overridden is reported at its platform default. Secrets are returned as an HMAC of their value, never in plaintext."
+ "required": ["id", "username"],
+ "description": "User who created the notebook.",
+ "nullable": true
},
- "api": {
+ "updated_by": {
"type": "object",
"properties": {
- "db_schema": {
- "type": "string",
- "description": "Schemas exposed through the Data API"
+ "id": {
+ "type": "number"
},
- "db_extra_search_path": {
+ "username": {
"type": "string"
+ }
+ },
+ "required": ["id", "username"],
+ "description": "User who last wrote to the notebook.",
+ "nullable": true
+ },
+ "content": {
+ "type": "object",
+ "properties": {
+ "schema_version": {
+ "type": "number"
},
- "max_rows": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "db_pool_acquisition_timeout": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "db_pool": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "If `null`, no pool size is written to the project's PostgREST config and PostgREST's own default applies. The platform does not pick a value here.",
- "nullable": true
+ "cells": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["markdown"]
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "required": ["id", "type", "text"]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["database"]
+ },
+ "sql": {
+ "type": "string",
+ "description": "SQL run against the project database."
+ },
+ "row_limit": {
+ "default": 100,
+ "type": "integer",
+ "exclusiveMinimum": true,
+ "maximum": 9007199254740991,
+ "minimum": 0
+ },
+ "database_identifier": {
+ "description": "Read replica to run against. Omit to use the primary database.",
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "view": {
+ "type": "string",
+ "enum": ["table", "chart"]
+ },
+ "chart": {
+ "description": "Chart configuration, retained even while `view` is `table`.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["bar", "line"]
+ },
+ "x_column": {
+ "type": "string",
+ "description": "Result column used for the x axis."
+ },
+ "y_series": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "column": {
+ "type": "string",
+ "description": "Result column plotted as a series."
+ }
+ },
+ "required": ["column"]
+ }
+ },
+ "scale": {
+ "type": "string",
+ "enum": ["linear", "log"]
+ },
+ "cumulative": {
+ "type": "boolean"
+ },
+ "show_labels": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "type",
+ "x_column",
+ "y_series",
+ "scale",
+ "cumulative",
+ "show_labels"
+ ]
+ }
+ },
+ "required": ["id", "type", "sql", "row_limit"]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["log"]
+ },
+ "sql": {
+ "type": "string",
+ "description": "SQL run against the project logs."
+ },
+ "time_range": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["absolute"]
+ },
+ "start": {
+ "type": "string",
+ "description": "ISO 8601 start of the range."
+ },
+ "end": {
+ "type": "string",
+ "description": "ISO 8601 end of the range."
+ }
+ },
+ "required": ["type", "start", "end"]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["relative"]
+ },
+ "unit": {
+ "type": "string",
+ "enum": ["minute", "hour", "day", "week", "month", "year"]
+ },
+ "amount": {
+ "type": "integer",
+ "exclusiveMinimum": true,
+ "maximum": 9007199254740991,
+ "minimum": 0
+ }
+ },
+ "required": ["type", "unit", "amount"]
+ }
+ ]
+ },
+ "title": {
+ "type": "string"
+ },
+ "view": {
+ "type": "string",
+ "enum": ["table", "chart"]
+ },
+ "chart": {
+ "description": "Chart configuration, retained even while `view` is `table`.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["bar", "line"]
+ },
+ "x_column": {
+ "type": "string",
+ "description": "Result column used for the x axis."
+ },
+ "y_series": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "column": {
+ "type": "string",
+ "description": "Result column plotted as a series."
+ }
+ },
+ "required": ["column"]
+ }
+ },
+ "scale": {
+ "type": "string",
+ "enum": ["linear", "log"]
+ },
+ "cumulative": {
+ "type": "boolean"
+ },
+ "show_labels": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "type",
+ "x_column",
+ "y_series",
+ "scale",
+ "cumulative",
+ "show_labels"
+ ]
+ }
+ },
+ "required": ["id", "type", "sql", "time_range"]
+ }
+ ]
+ }
}
},
- "required": [
- "db_schema",
- "db_extra_search_path",
- "max_rows",
- "db_pool_acquisition_timeout",
- "db_pool"
- ]
+ "required": ["schema_version", "cells"]
+ }
+ },
+ "required": [
+ "name",
+ "description",
+ "favorite",
+ "inserted_at",
+ "updated_at",
+ "owner",
+ "updated_by",
+ "content"
+ ]
+ }
+ },
+ "required": ["type", "id", "attributes"]
+ }
+ },
+ "required": ["data"]
+ },
+ "V2CreateNotebookRequest": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Resource type.",
+ "enum": ["notebook"]
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 255
},
- "realtime": {
+ "description": {
+ "type": "string",
+ "maxLength": 10000
+ },
+ "favorite": {
+ "type": "boolean"
+ },
+ "content": {
"type": "object",
"properties": {
- "private_only": {
- "type": "boolean"
- },
- "max_concurrent_users": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_events_per_second": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_bytes_per_second": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_channels_per_client": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_joins_per_second": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_presence_events_per_second": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_payload_size_in_kb": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "presence_enabled": {
- "type": "boolean"
- },
- "suspend": {
- "type": "boolean"
- },
- "connection_pool": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "Defaults to Realtime's pool size for the project's compute when not overridden."
- },
- "postgres_changes_pool": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "description": "If `null`, no override is stored and Realtime applies its own default.",
- "nullable": true
+ "cells": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["markdown"]
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "required": ["type", "text"],
+ "additionalProperties": {}
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["database"]
+ },
+ "sql": {
+ "type": "string",
+ "description": "SQL run against the project database."
+ },
+ "row_limit": {
+ "default": 100,
+ "type": "integer",
+ "exclusiveMinimum": true,
+ "maximum": 9007199254740991,
+ "minimum": 0
+ },
+ "database_identifier": {
+ "description": "Read replica to run against. Omit to use the primary database.",
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "view": {
+ "type": "string",
+ "enum": ["table", "chart"]
+ },
+ "chart": {
+ "description": "Chart configuration, retained even while `view` is `table`.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["bar", "line"]
+ },
+ "x_column": {
+ "type": "string",
+ "description": "Result column used for the x axis."
+ },
+ "y_series": {
+ "maxItems": 3,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "column": {
+ "type": "string",
+ "description": "Result column plotted as a series."
+ }
+ },
+ "required": ["column"],
+ "additionalProperties": {}
+ }
+ },
+ "scale": {
+ "type": "string",
+ "enum": ["linear", "log"]
+ },
+ "cumulative": {
+ "type": "boolean"
+ },
+ "show_labels": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "type",
+ "x_column",
+ "y_series",
+ "scale",
+ "cumulative",
+ "show_labels"
+ ],
+ "additionalProperties": {}
+ }
+ },
+ "required": ["type", "sql"],
+ "additionalProperties": {}
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["log"]
+ },
+ "sql": {
+ "type": "string",
+ "description": "SQL run against the project logs."
+ },
+ "time_range": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["absolute"]
+ },
+ "start": {
+ "type": "string",
+ "description": "ISO 8601 start of the range."
+ },
+ "end": {
+ "type": "string",
+ "description": "ISO 8601 end of the range."
+ }
+ },
+ "required": ["type", "start", "end"],
+ "additionalProperties": {}
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["relative"]
+ },
+ "unit": {
+ "type": "string",
+ "enum": ["minute", "hour", "day", "week", "month", "year"]
+ },
+ "amount": {
+ "type": "integer",
+ "exclusiveMinimum": true,
+ "maximum": 9007199254740991,
+ "minimum": 0
+ }
+ },
+ "required": ["type", "unit", "amount"],
+ "additionalProperties": {}
+ }
+ ]
+ },
+ "title": {
+ "type": "string"
+ },
+ "view": {
+ "type": "string",
+ "enum": ["table", "chart"]
+ },
+ "chart": {
+ "description": "Chart configuration, retained even while `view` is `table`.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["bar", "line"]
+ },
+ "x_column": {
+ "type": "string",
+ "description": "Result column used for the x axis."
+ },
+ "y_series": {
+ "maxItems": 3,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "column": {
+ "type": "string",
+ "description": "Result column plotted as a series."
+ }
+ },
+ "required": ["column"],
+ "additionalProperties": {}
+ }
+ },
+ "scale": {
+ "type": "string",
+ "enum": ["linear", "log"]
+ },
+ "cumulative": {
+ "type": "boolean"
+ },
+ "show_labels": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "type",
+ "x_column",
+ "y_series",
+ "scale",
+ "cumulative",
+ "show_labels"
+ ],
+ "additionalProperties": {}
+ }
+ },
+ "required": ["type", "sql", "time_range"],
+ "additionalProperties": {}
+ }
+ ]
+ }
}
},
- "required": [
- "private_only",
- "max_concurrent_users",
- "max_events_per_second",
- "max_bytes_per_second",
- "max_channels_per_client",
- "max_joins_per_second",
- "max_presence_events_per_second",
- "max_payload_size_in_kb",
- "presence_enabled",
- "suspend",
- "connection_pool",
- "postgres_changes_pool"
- ]
+ "required": ["cells"]
+ }
+ },
+ "required": ["name", "content"]
+ }
+ },
+ "required": ["type", "attributes"]
+ }
+ },
+ "required": ["data"]
+ },
+ "V2UpdateNotebookRequest": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Resource type.",
+ "enum": ["notebook"]
+ },
+ "attributes": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 255
},
- "storage": {
+ "description": {
+ "type": "string",
+ "maxLength": 10000
+ },
+ "favorite": {
+ "type": "boolean"
+ },
+ "content": {
+ "description": "Replaces the notebook body. A cell keeps its identity by echoing back its `id`; a cell sent without an `id` is added as a new one.",
"type": "object",
"properties": {
- "file_size_limit": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991,
- "format": "int64"
- },
- "features": {
- "type": "object",
- "properties": {
- "image_transformation": {
- "type": "object",
- "properties": {
- "enabled": {
- "type": "boolean"
- }
- },
- "required": ["enabled"]
- },
- "s3_protocol": {
- "type": "object",
- "properties": {
- "enabled": {
- "type": "boolean"
- }
- },
- "required": ["enabled"]
- },
- "purge_cache": {
- "type": "object",
- "properties": {
- "enabled": {
- "type": "boolean"
- }
- },
- "required": ["enabled"]
- },
- "iceberg_catalog": {
- "type": "object",
- "properties": {
- "enabled": {
- "type": "boolean"
- },
- "max_namespaces": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- },
- "max_tables": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
+ "cells": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["markdown"]
+ },
+ "text": {
+ "type": "string"
+ }
},
- "max_catalogs": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- }
+ "required": ["type", "text"],
+ "additionalProperties": {}
},
- "required": ["enabled", "max_namespaces", "max_tables", "max_catalogs"]
- },
- "vector_buckets": {
- "type": "object",
- "properties": {
- "enabled": {
- "type": "boolean"
- },
- "max_buckets": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["database"]
+ },
+ "sql": {
+ "type": "string",
+ "description": "SQL run against the project database."
+ },
+ "row_limit": {
+ "default": 100,
+ "type": "integer",
+ "exclusiveMinimum": true,
+ "maximum": 9007199254740991,
+ "minimum": 0
+ },
+ "database_identifier": {
+ "description": "Read replica to run against. Omit to use the primary database.",
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "view": {
+ "type": "string",
+ "enum": ["table", "chart"]
+ },
+ "chart": {
+ "description": "Chart configuration, retained even while `view` is `table`.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["bar", "line"]
+ },
+ "x_column": {
+ "type": "string",
+ "description": "Result column used for the x axis."
+ },
+ "y_series": {
+ "maxItems": 3,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "column": {
+ "type": "string",
+ "description": "Result column plotted as a series."
+ }
+ },
+ "required": ["column"],
+ "additionalProperties": {}
+ }
+ },
+ "scale": {
+ "type": "string",
+ "enum": ["linear", "log"]
+ },
+ "cumulative": {
+ "type": "boolean"
+ },
+ "show_labels": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "type",
+ "x_column",
+ "y_series",
+ "scale",
+ "cumulative",
+ "show_labels"
+ ],
+ "additionalProperties": {}
+ }
},
- "max_indexes": {
- "type": "integer",
- "minimum": -9007199254740991,
- "maximum": 9007199254740991
- }
+ "required": ["type", "sql"],
+ "additionalProperties": {}
},
- "required": ["enabled", "max_buckets", "max_indexes"]
- }
- },
- "required": [
- "image_transformation",
- "s3_protocol",
- "purge_cache",
- "iceberg_catalog",
- "vector_buckets"
- ]
- },
- "capabilities": {
- "type": "object",
- "properties": {
- "list_v2": {
- "type": "boolean"
- },
- "iceberg_catalog": {
- "type": "boolean"
- },
- "object_versioning": {
- "type": "boolean"
- }
- },
- "required": ["list_v2", "iceberg_catalog", "object_versioning"]
- },
- "upstream_target": {
- "type": "string",
- "enum": ["main", "canary"]
- },
- "migration_version": {
- "type": "string",
- "nullable": true
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["log"]
+ },
+ "sql": {
+ "type": "string",
+ "description": "SQL run against the project logs."
+ },
+ "time_range": {
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["absolute"]
+ },
+ "start": {
+ "type": "string",
+ "description": "ISO 8601 start of the range."
+ },
+ "end": {
+ "type": "string",
+ "description": "ISO 8601 end of the range."
+ }
+ },
+ "required": ["type", "start", "end"],
+ "additionalProperties": {}
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["relative"]
+ },
+ "unit": {
+ "type": "string",
+ "enum": ["minute", "hour", "day", "week", "month", "year"]
+ },
+ "amount": {
+ "type": "integer",
+ "exclusiveMinimum": true,
+ "maximum": 9007199254740991,
+ "minimum": 0
+ }
+ },
+ "required": ["type", "unit", "amount"],
+ "additionalProperties": {}
+ }
+ ]
+ },
+ "title": {
+ "type": "string"
+ },
+ "view": {
+ "type": "string",
+ "enum": ["table", "chart"]
+ },
+ "chart": {
+ "description": "Chart configuration, retained even while `view` is `table`.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["bar", "line"]
+ },
+ "x_column": {
+ "type": "string",
+ "description": "Result column used for the x axis."
+ },
+ "y_series": {
+ "maxItems": 3,
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "column": {
+ "type": "string",
+ "description": "Result column plotted as a series."
+ }
+ },
+ "required": ["column"],
+ "additionalProperties": {}
+ }
+ },
+ "scale": {
+ "type": "string",
+ "enum": ["linear", "log"]
+ },
+ "cumulative": {
+ "type": "boolean"
+ },
+ "show_labels": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "type",
+ "x_column",
+ "y_series",
+ "scale",
+ "cumulative",
+ "show_labels"
+ ],
+ "additionalProperties": {}
+ }
+ },
+ "required": ["type", "sql", "time_range"],
+ "additionalProperties": {}
+ }
+ ]
+ }
}
},
- "required": [
- "file_size_limit",
- "features",
- "capabilities",
- "upstream_target",
- "migration_version"
- ],
- "description": "Read from the storage service's admin API rather than the middleware DB, so unlike the rest of this resource it reflects the tenant's live config."
+ "required": ["cells"]
}
- },
- "required": ["database", "pooler", "auth", "api", "realtime", "storage"]
+ }
}
},
- "required": ["type", "id", "attributes"]
+ "required": ["type", "attributes"]
}
},
"required": ["data"]
@@ -24896,7 +22982,7 @@
"shared_at": {
"type": "string",
"format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending.",
"nullable": true
},
@@ -24909,6 +22995,10 @@
"type": "string",
"description": "Identifier of the database this PrivateLink share targets - the project ref for the primary, or the read replica identifier."
},
+ "custom_dns_name": {
+ "type": "string",
+ "description": "The custom DNS name configured on the AWS VPC Lattice resource configuration."
+ },
"resource_access_manager_resource_config_id": {
"description": "ID of the AWS VPC Lattice resource configuration backing this PrivateLink share.",
"type": "string"
@@ -24927,7 +23017,8 @@
"status",
"shared_at",
"database_type",
- "database_identifier"
+ "database_identifier",
+ "custom_dns_name"
]
}
},
@@ -25019,7 +23110,7 @@
"shared_at": {
"type": "string",
"format": "date-time",
- "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending.",
"nullable": true
},
@@ -25032,6 +23123,10 @@
"type": "string",
"description": "Identifier of the database this PrivateLink share targets - the project ref for the primary, or the read replica identifier."
},
+ "custom_dns_name": {
+ "type": "string",
+ "description": "The custom DNS name configured on the AWS VPC Lattice resource configuration."
+ },
"resource_access_manager_resource_config_id": {
"description": "ID of the AWS VPC Lattice resource configuration backing this PrivateLink share.",
"type": "string"
@@ -25050,7 +23145,8 @@
"status",
"shared_at",
"database_type",
- "database_identifier"
+ "database_identifier",
+ "custom_dns_name"
]
}
},
@@ -25059,7 +23155,7 @@
},
"required": ["data"]
},
- "V2ListWorkersResponse_Output": {
+ "V2ListComputeInstancesResponse_Output": {
"type": "object",
"properties": {
"data": {
@@ -25070,11 +23166,11 @@
"type": {
"type": "string",
"description": "Resource type.",
- "enum": ["project_worker"]
+ "enum": ["project_compute_instance"]
},
"id": {
"type": "string",
- "description": "Worker name.",
+ "description": "Compute instance name.",
"example": "hello-world"
},
"attributes": {
@@ -25159,7 +23255,7 @@
},
"required": ["data"]
},
- "V2WorkerResponse_Output": {
+ "V2ComputeInstanceResponse_Output": {
"type": "object",
"properties": {
"data": {
@@ -25168,11 +23264,11 @@
"type": {
"type": "string",
"description": "Resource type.",
- "enum": ["project_worker"]
+ "enum": ["project_compute_instance"]
},
"id": {
"type": "string",
- "description": "Worker name.",
+ "description": "Compute instance name.",
"example": "hello-world"
},
"attributes": {
@@ -25256,7 +23352,7 @@
},
"required": ["data"]
},
- "V2WorkerUploadResponse_Output": {
+ "V2ComputeInstanceUploadResponse_Output": {
"type": "object",
"properties": {
"data": {
@@ -25265,7 +23361,7 @@
"type": {
"type": "string",
"description": "Resource type.",
- "enum": ["project_worker_upload"]
+ "enum": ["project_compute_instance_upload"]
},
"id": {
"type": "string",
@@ -25296,7 +23392,7 @@
},
"required": ["data"]
},
- "V2DeployWorkerRequest": {
+ "V2DeployComputeInstanceRequest": {
"type": "object",
"properties": {
"data": {
@@ -25305,7 +23401,7 @@
"type": {
"type": "string",
"description": "Resource type.",
- "enum": ["project_worker"]
+ "enum": ["project_compute_instance"]
},
"attributes": {
"type": "object",
@@ -25490,7 +23586,7 @@
"properties": {
"role": {
"type": "string",
- "enum": ["owner", "administrator", "developer", "read-only"],
+ "enum": ["owner", "administrator", "developer", "read-only", "no-access"],
"description": "Role name to assign. Must be one of: owner, administrator, developer, read-only. Must be on a Team or Enterprise plan to use the read-only role.",
"example": "developer"
},
@@ -25626,8 +23722,8 @@
},
"role": {
"type": "string",
- "enum": ["owner", "administrator", "developer", "read-only"],
- "description": "Role name to assign. Must be on a Team or Enterprise plan to use the read-only role.",
+ "enum": ["owner", "administrator", "developer", "read-only", "no-access"],
+ "description": "Role name to assign. Must be on an Enterprise plan to use the read-only or no-access roles. no-access grants no project visibility until project-scoped roles are assigned separately.",
"example": "developer"
},
"projects": {