mirror of
https://github.com/supabase/supabase.git
synced 2026-09-08 10:59:38 +08:00
This PR updates mgmt api docs automatically. Co-authored-by: samirketema <6003000+samirketema@users.noreply.github.com>
18291 lines
804 KiB
JSON
18291 lines
804 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"paths": {
|
|
"/v2/projects/{ref}/analytics/log-drains": {
|
|
"get": {
|
|
"operationId": "v2-list-log-drains",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"example": "abcdefghijklmnopqrst",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/ListLogDrainsResponse" }
|
|
}
|
|
}
|
|
},
|
|
"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" } }
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Failed to fetch log drains",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearer": [] }],
|
|
"summary": "List project log drains",
|
|
"tags": ["Analytics"],
|
|
"x-badges": [{ "name": "OAuth scope: analytics_config:read", "position": "after" }],
|
|
"x-endpoint-owners": ["analytics"],
|
|
"x-fga-permissions": [["analytics_config_read"]],
|
|
"x-oauth-scope": "analytics_config:read"
|
|
},
|
|
"post": {
|
|
"operationId": "v2-create-log-drain",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"example": "abcdefghijklmnopqrst",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/CreateLogDrainRequestOpenApi" }
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/LogDrainResponse" } }
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
|
|
}
|
|
},
|
|
"402": {
|
|
"description": "This feature requires the Pro, Team, or 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" } }
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Failed to create a log drain",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearer": [] }],
|
|
"summary": "Create a log drain for a project",
|
|
"tags": ["Analytics"],
|
|
"x-allowed-plans": ["Pro", "Team", "Enterprise"],
|
|
"x-badges": [
|
|
{ "name": "Only available on Pro, Team, Enterprise", "position": "before" },
|
|
{ "name": "OAuth scope: analytics_config:write", "position": "after" }
|
|
],
|
|
"x-endpoint-owners": ["analytics"],
|
|
"x-fga-permissions": [["analytics_config_write"]],
|
|
"x-oauth-scope": "analytics_config:write"
|
|
}
|
|
},
|
|
"/v2/projects/{ref}/analytics/log-drains/{id}": {
|
|
"put": {
|
|
"operationId": "v2-update-log-drain",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"example": "abcdefghijklmnopqrst",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Log drains identifier",
|
|
"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)$",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/UpdateLogDrainRequestOpenApi" }
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/LogDrainResponse" } }
|
|
}
|
|
},
|
|
"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" } }
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Failed to update log drain",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearer": [] }],
|
|
"summary": "Update a project log drain",
|
|
"tags": ["Analytics"],
|
|
"x-badges": [{ "name": "OAuth scope: analytics_config:write", "position": "after" }],
|
|
"x-endpoint-owners": ["analytics"],
|
|
"x-fga-permissions": [["analytics_config_write"]],
|
|
"x-oauth-scope": "analytics_config:write"
|
|
},
|
|
"delete": {
|
|
"operationId": "v2-delete-log-drain",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"example": "abcdefghijklmnopqrst",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Log drains identifier",
|
|
"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)$",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": { "description": "" },
|
|
"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" } }
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Failed to delete a log drain",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
|
|
}
|
|
}
|
|
},
|
|
"security": [{ "bearer": [] }],
|
|
"summary": "Delete a project log drain",
|
|
"tags": ["Analytics"],
|
|
"x-badges": [{ "name": "OAuth scope: analytics_config:write", "position": "after" }],
|
|
"x-endpoint-owners": ["analytics"],
|
|
"x-fga-permissions": [["analytics_config_write"]],
|
|
"x-oauth-scope": "analytics_config:write"
|
|
}
|
|
},
|
|
"/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.",
|
|
"operationId": "v2-get-project-config",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"example": "abcdefghijklmnopqrst",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/V2ProjectConfigResponse" }
|
|
}
|
|
}
|
|
},
|
|
"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": "[Alpha] Get a project's service configuration",
|
|
"tags": ["Projects"],
|
|
"x-endpoint-owners": ["control-plane", "infra"],
|
|
"x-fga-permissions": [
|
|
[
|
|
"database_config_read",
|
|
"database_read",
|
|
"database_ssl_config_read",
|
|
"database_network_restrictions_read",
|
|
"auth_config_read",
|
|
"data_api_config_read",
|
|
"realtime_config_read",
|
|
"storage_config_read"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"/v2/projects/{ref}/transfers/previews": {
|
|
"post": {
|
|
"operationId": "v2-preview-a-project-transfer",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"example": "abcdefghijklmnopqrst",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/V2TransferProjectBody" }
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/V2PreviewProjectTransferResponse" }
|
|
}
|
|
}
|
|
},
|
|
"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": "Previews transferring a project to a different organizations, shows eligibility and impact",
|
|
"tags": ["Projects"],
|
|
"x-endpoint-owners": ["control-plane"],
|
|
"x-fga-permissions": [["project_admin_read"]]
|
|
}
|
|
},
|
|
"/v2/projects/{ref}/transfers": {
|
|
"post": {
|
|
"operationId": "v2-transfer-a-project",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"example": "abcdefghijklmnopqrst",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/V2TransferProjectBody" }
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": { "description": "" },
|
|
"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": "Transfers a project to a different organization",
|
|
"tags": ["Projects"],
|
|
"x-endpoint-owners": ["control-plane"],
|
|
"x-fga-permissions": [["organization_admin_write"]]
|
|
}
|
|
},
|
|
"/v2/projects/{ref}/private-link/associations": {
|
|
"get": {
|
|
"operationId": "v2-list-private-link-associations",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"example": "abcdefghijklmnopqrst",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/V2ListPrivateLinkAssociationsResponse" }
|
|
}
|
|
}
|
|
},
|
|
"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" } }
|
|
}
|
|
},
|
|
"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"]]
|
|
},
|
|
"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",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"example": "abcdefghijklmnopqrst",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/V2CreatePrivateLinkAssociationRequest" }
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/V2PrivateLinkAssociationResponse" }
|
|
}
|
|
}
|
|
},
|
|
"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": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"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": "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}/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",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"example": "abcdefghijklmnopqrst",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "aws_account_id",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "AWS account ID used in PrivateLink association",
|
|
"schema": { "type": "string" }
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": { "description": "" },
|
|
"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" } }
|
|
}
|
|
},
|
|
"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 the project PrivateLink share",
|
|
"tags": ["Projects"],
|
|
"x-endpoint-owners": ["platform-networking", "control-plane"],
|
|
"x-fga-permissions": [["project_admin_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",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"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",
|
|
"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" } }
|
|
}
|
|
},
|
|
"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",
|
|
"tags": ["Projects"],
|
|
"x-endpoint-owners": ["platform-networking", "control-plane"],
|
|
"x-fga-permissions": [["project_admin_write"]]
|
|
}
|
|
},
|
|
"/v2/projects/{ref}/workers": {
|
|
"get": {
|
|
"description": "Returns all workers you've previously deployed to the specified project.",
|
|
"operationId": "v2-list-all-workers",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"example": "abcdefghijklmnopqrst",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/V2ListWorkersResponse" }
|
|
}
|
|
}
|
|
},
|
|
"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": "[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"
|
|
}
|
|
},
|
|
"/v2/projects/{ref}/workers/{name}": {
|
|
"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",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"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/V2WorkerResponse" } }
|
|
}
|
|
},
|
|
"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": "[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"
|
|
},
|
|
"delete": {
|
|
"description": "Tombstones the worker. Its instances and image are torn down asynchronously.",
|
|
"operationId": "v2-delete-a-worker",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"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": {
|
|
"204": { "description": "" },
|
|
"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": "[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"
|
|
}
|
|
},
|
|
"/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",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"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": {
|
|
"201": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/V2WorkerUploadResponse" }
|
|
}
|
|
}
|
|
},
|
|
"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": "[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"
|
|
}
|
|
},
|
|
"/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",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"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"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/V2DeployWorkerRequest" }
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"202": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/V2WorkerResponse" } }
|
|
}
|
|
},
|
|
"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": "[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"
|
|
}
|
|
},
|
|
"/v2/organizations/{slug}/members": {
|
|
"get": {
|
|
"description": "Returns a cursor-paginated list of organization members including their roles and project-scoped permissions.",
|
|
"operationId": "v2-list-organization-members",
|
|
"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",
|
|
"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": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/V2ListMembersResponse" }
|
|
}
|
|
}
|
|
},
|
|
"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 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"
|
|
}
|
|
},
|
|
"/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",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Organization slug",
|
|
"schema": {
|
|
"pattern": "^[\\w-]+$",
|
|
"example": "tsrqponmlkjihgfedcba",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "user_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)$",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/V2AssignOrganizationMemberRoleRequest" }
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/OrganizationMemberRoleResponse" }
|
|
}
|
|
}
|
|
},
|
|
"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": "Forbidden action",
|
|
"content": {
|
|
"application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseBody" } }
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"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",
|
|
"parameters": [
|
|
{
|
|
"name": "slug",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Organization slug",
|
|
"schema": {
|
|
"pattern": "^[\\w-]+$",
|
|
"example": "tsrqponmlkjihgfedcba",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/V2ListRolesResponse" }
|
|
}
|
|
}
|
|
},
|
|
"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 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" }
|
|
}
|
|
}
|
|
},
|
|
"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": "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": { "$ref": "#/components/schemas/V2DeleteInvitationsResponse" }
|
|
}
|
|
}
|
|
},
|
|
"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": "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": "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" }
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
},
|
|
"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" }
|
|
}
|
|
}
|
|
},
|
|
"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 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",
|
|
"name": "ref",
|
|
"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."
|
|
}
|
|
],
|
|
"tags": ["Project webhooks"],
|
|
"responses": {
|
|
"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": {
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": "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",
|
|
"name": "ref",
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"example": "abcdefghijklmnopqrst"
|
|
},
|
|
"required": true,
|
|
"description": "Project ref"
|
|
}
|
|
],
|
|
"tags": ["Project webhooks"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created endpoint",
|
|
"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": {
|
|
"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": {
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": "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-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": {
|
|
"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"]
|
|
}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": "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"]
|
|
},
|
|
"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": {
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": "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"
|
|
},
|
|
{
|
|
"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": {
|
|
"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": {
|
|
"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": {
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": "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",
|
|
"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": "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": {
|
|
"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": {
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": "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",
|
|
"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": {
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": "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"
|
|
},
|
|
{
|
|
"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": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"const": "ingress",
|
|
"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": "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"
|
|
},
|
|
{
|
|
"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": {
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": "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",
|
|
"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": {
|
|
"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"],
|
|
"additionalProperties": {},
|
|
"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": {
|
|
"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": {
|
|
"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": {
|
|
"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": {
|
|
"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" },
|
|
"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": "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": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"const": "ingress",
|
|
"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": "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": {
|
|
"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": {
|
|
"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": {
|
|
"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" },
|
|
"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."
|
|
}
|
|
},
|
|
"/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": {
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": "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",
|
|
"pattern": "^[\\w-]+$",
|
|
"example": "tsrqponmlkjihgfedcba"
|
|
},
|
|
"required": true,
|
|
"description": "Organization slug"
|
|
}
|
|
],
|
|
"tags": ["Organization webhooks"],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created endpoint",
|
|
"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": {
|
|
"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": {
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": "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",
|
|
"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": {
|
|
"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": {
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": "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"
|
|
},
|
|
{
|
|
"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": {
|
|
"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": {
|
|
"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": {
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": "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"
|
|
},
|
|
{
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": "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": {
|
|
"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": {
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": "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",
|
|
"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": {
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": "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"
|
|
},
|
|
{
|
|
"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": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"const": "ingress",
|
|
"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": "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"
|
|
},
|
|
{
|
|
"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": {
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": {}
|
|
}
|
|
},
|
|
"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": {
|
|
"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": "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",
|
|
"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": {
|
|
"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"],
|
|
"additionalProperties": {},
|
|
"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": {
|
|
"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": {
|
|
"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": {
|
|
"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": {
|
|
"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" },
|
|
"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": "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": { "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.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": {
|
|
"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": {
|
|
"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": {
|
|
"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" },
|
|
"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."
|
|
}
|
|
}
|
|
},
|
|
"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": {
|
|
"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", "nullable": true },
|
|
"schema": { "type": "string" },
|
|
"username": { "type": "string", "nullable": true },
|
|
"password": { "type": "string", "nullable": true },
|
|
"port": { "type": "number", "nullable": true },
|
|
"hostname": { "type": "string" }
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "postgres"
|
|
},
|
|
{
|
|
"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": {
|
|
"project_id": { "type": "string" },
|
|
"dataset_id": { "type": "string" }
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "bigquery"
|
|
},
|
|
{
|
|
"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"
|
|
}
|
|
]
|
|
},
|
|
"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", "nullable": true },
|
|
"schema": { "type": "string" },
|
|
"username": { "type": "string", "nullable": true },
|
|
"password": { "type": "string", "nullable": true },
|
|
"port": { "type": "number", "nullable": true },
|
|
"hostname": { "type": "string" }
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "postgres"
|
|
},
|
|
{
|
|
"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": {
|
|
"project_id": { "type": "string" },
|
|
"dataset_id": { "type": "string" }
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "bigquery"
|
|
},
|
|
{
|
|
"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"
|
|
}
|
|
]
|
|
},
|
|
"backend_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"postgres",
|
|
"bigquery",
|
|
"clickhouse",
|
|
"webhook",
|
|
"datadog",
|
|
"loki",
|
|
"sentry",
|
|
"s3",
|
|
"axiom",
|
|
"last9",
|
|
"otlp",
|
|
"syslog"
|
|
]
|
|
}
|
|
},
|
|
"required": ["name", "config", "backend_type"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"LogDrainResponse": {
|
|
"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", "nullable": true },
|
|
"schema": { "type": "string" },
|
|
"username": { "type": "string", "nullable": true },
|
|
"password": { "type": "string", "nullable": true },
|
|
"port": { "type": "number", "nullable": true },
|
|
"hostname": { "type": "string" }
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "postgres"
|
|
},
|
|
{
|
|
"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": {
|
|
"project_id": { "type": "string" },
|
|
"dataset_id": { "type": "string" }
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "bigquery"
|
|
},
|
|
{
|
|
"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"
|
|
}
|
|
]
|
|
},
|
|
"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", "nullable": true },
|
|
"schema": { "type": "string" },
|
|
"username": { "type": "string", "nullable": true },
|
|
"password": { "type": "string", "nullable": true },
|
|
"port": { "type": "number", "nullable": true },
|
|
"hostname": { "type": "string" }
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "postgres"
|
|
},
|
|
{
|
|
"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": {
|
|
"project_id": { "type": "string" },
|
|
"dataset_id": { "type": "string" }
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "bigquery"
|
|
},
|
|
{
|
|
"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"
|
|
}
|
|
]
|
|
},
|
|
"backend_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"postgres",
|
|
"bigquery",
|
|
"clickhouse",
|
|
"webhook",
|
|
"datadog",
|
|
"loki",
|
|
"sentry",
|
|
"s3",
|
|
"axiom",
|
|
"last9",
|
|
"otlp",
|
|
"syslog"
|
|
]
|
|
}
|
|
},
|
|
"required": ["backend_type"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2ProjectConfigResponse": {
|
|
"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",
|
|
"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"
|
|
]
|
|
},
|
|
"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"
|
|
]
|
|
},
|
|
"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" }
|
|
},
|
|
"required": ["list_v2", "iceberg_catalog"]
|
|
},
|
|
"upstream_target": { "type": "string", "enum": ["main", "canary"] },
|
|
"migration_version": { "type": "string" },
|
|
"database_pool_mode": { "type": "string" }
|
|
},
|
|
"required": [
|
|
"file_size_limit",
|
|
"features",
|
|
"capabilities",
|
|
"upstream_target",
|
|
"migration_version",
|
|
"database_pool_mode"
|
|
],
|
|
"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"]
|
|
},
|
|
"V2TransferProjectBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["project_transfer_input"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": { "target_organization_slug": { "type": "string" } },
|
|
"required": ["target_organization_slug"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2PreviewProjectTransferResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["project_transfer_result"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"valid": { "type": "boolean" },
|
|
"warnings": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": { "type": "string" },
|
|
"message": { "type": "string" }
|
|
},
|
|
"required": ["key", "message"]
|
|
}
|
|
},
|
|
"errors": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": { "type": "string" },
|
|
"message": { "type": "string" }
|
|
},
|
|
"required": ["key", "message"]
|
|
}
|
|
},
|
|
"info": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": { "type": "string" },
|
|
"message": { "type": "string" }
|
|
},
|
|
"required": ["key", "message"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["valid", "warnings", "errors", "info"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2ListPrivateLinkAssociationsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["private_link_association"]
|
|
},
|
|
"id": { "type": "string" },
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"aws_account_id": {
|
|
"type": "string",
|
|
"minLength": 12,
|
|
"maxLength": 12,
|
|
"pattern": "^\\d{12}$",
|
|
"description": "The AWS account ID this PrivateLink share is associated with."
|
|
},
|
|
"account_name": {
|
|
"description": "Human-readable name for the AWS account.",
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"CREATING",
|
|
"READY",
|
|
"ASSOCIATION_REQUEST_EXPIRED",
|
|
"ASSOCIATION_ACCEPTED",
|
|
"CREATION_FAILED",
|
|
"DELETING"
|
|
],
|
|
"description": "\n - `CREATING`: The PrivateLink resources and the Association are in the process of being created. The PrivateLink Share cannot be accepted yet.\n - `READY`: The PrivateLink resources have been created and the PrivateLink Share can be accepted for the duration of 12h after sharing. See `shared_at`.\n - `ASSOCIATION_REQUEST_EXPIRED`: The PrivateLink Share has not been accepted within the 12h time limit. This association can now be deleted.\n - `ASSOCIATION_ACCEPTED`: The PrivateLink Share was successfully accepted.\n - `CREATION_FAILED`: The PrivateLink resources failed to create. This likely means something went wrong on Supabase's and and support should be contacted.\n - `DELETING`: The PrivateLink resources and the Association are in the process of being deleted. The PrivateLink Share cannot be accepted yet.\n"
|
|
},
|
|
"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))$",
|
|
"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
|
|
},
|
|
"database_type": {
|
|
"type": "string",
|
|
"enum": ["PRIMARY", "READ_REPLICA"],
|
|
"description": "Whether this PrivateLink share targets the primary database or a read replica."
|
|
},
|
|
"database_identifier": {
|
|
"type": "string",
|
|
"description": "Identifier of the database this PrivateLink share targets - the project ref for the primary, or the read replica identifier."
|
|
},
|
|
"resource_access_manager_resource_config_id": {
|
|
"description": "ID of the AWS VPC Lattice resource configuration backing this PrivateLink share.",
|
|
"type": "string"
|
|
},
|
|
"resource_access_manager_resource_config_arn": {
|
|
"description": "ARN of the AWS VPC Lattice resource configuration backing this PrivateLink share.",
|
|
"type": "string"
|
|
},
|
|
"resource_access_manager_share_arn": {
|
|
"description": "ARN of the AWS Resource Access Manager resource share for this association.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"aws_account_id",
|
|
"status",
|
|
"shared_at",
|
|
"database_type",
|
|
"database_identifier"
|
|
]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2CreatePrivateLinkAssociationRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["private_link_association"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"aws_account_id": {
|
|
"type": "string",
|
|
"minLength": 12,
|
|
"maxLength": 12,
|
|
"pattern": "^\\d{12}$",
|
|
"description": "The AWS account ID to add to the project PrivateLink share."
|
|
},
|
|
"account_name": {
|
|
"description": "Optional human-readable name for the AWS account.",
|
|
"type": "string",
|
|
"maxLength": 128
|
|
},
|
|
"database_identifier": {
|
|
"description": "Identifier of the read replica this PrivateLink share should target. Omit to target the primary database.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["aws_account_id"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2PrivateLinkAssociationResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["private_link_association"]
|
|
},
|
|
"id": { "type": "string" },
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"aws_account_id": {
|
|
"type": "string",
|
|
"minLength": 12,
|
|
"maxLength": 12,
|
|
"pattern": "^\\d{12}$",
|
|
"description": "The AWS account ID this PrivateLink share is associated with."
|
|
},
|
|
"account_name": {
|
|
"description": "Human-readable name for the AWS account.",
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"CREATING",
|
|
"READY",
|
|
"ASSOCIATION_REQUEST_EXPIRED",
|
|
"ASSOCIATION_ACCEPTED",
|
|
"CREATION_FAILED",
|
|
"DELETING"
|
|
],
|
|
"description": "\n - `CREATING`: The PrivateLink resources and the Association are in the process of being created. The PrivateLink Share cannot be accepted yet.\n - `READY`: The PrivateLink resources have been created and the PrivateLink Share can be accepted for the duration of 12h after sharing. See `shared_at`.\n - `ASSOCIATION_REQUEST_EXPIRED`: The PrivateLink Share has not been accepted within the 12h time limit. This association can now be deleted.\n - `ASSOCIATION_ACCEPTED`: The PrivateLink Share was successfully accepted.\n - `CREATION_FAILED`: The PrivateLink resources failed to create. This likely means something went wrong on Supabase's and and support should be contacted.\n - `DELETING`: The PrivateLink resources and the Association are in the process of being deleted. The PrivateLink Share cannot be accepted yet.\n"
|
|
},
|
|
"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))$",
|
|
"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
|
|
},
|
|
"database_type": {
|
|
"type": "string",
|
|
"enum": ["PRIMARY", "READ_REPLICA"],
|
|
"description": "Whether this PrivateLink share targets the primary database or a read replica."
|
|
},
|
|
"database_identifier": {
|
|
"type": "string",
|
|
"description": "Identifier of the database this PrivateLink share targets - the project ref for the primary, or the read replica identifier."
|
|
},
|
|
"resource_access_manager_resource_config_id": {
|
|
"description": "ID of the AWS VPC Lattice resource configuration backing this PrivateLink share.",
|
|
"type": "string"
|
|
},
|
|
"resource_access_manager_resource_config_arn": {
|
|
"description": "ARN of the AWS VPC Lattice resource configuration backing this PrivateLink share.",
|
|
"type": "string"
|
|
},
|
|
"resource_access_manager_share_arn": {
|
|
"description": "ARN of the AWS Resource Access Manager resource share for this association.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"aws_account_id",
|
|
"status",
|
|
"shared_at",
|
|
"database_type",
|
|
"database_identifier"
|
|
]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2ListWorkersResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["project_worker"]
|
|
},
|
|
"id": { "type": "string", "description": "Worker name.", "example": "hello-world" },
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"spec": {
|
|
"type": "object",
|
|
"properties": {
|
|
"runtime": { "example": "node", "type": "string" },
|
|
"size": { "type": "string", "example": "2gb-1vcpu" },
|
|
"exposure": { "type": "string", "example": "public" },
|
|
"instances": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991,
|
|
"example": 1
|
|
}
|
|
},
|
|
"required": ["size", "exposure", "instances"]
|
|
},
|
|
"build_state": { "type": "string", "enum": ["building", "active", "failed"] },
|
|
"secret_generation": { "type": "string" },
|
|
"state_reason": { "type": "string" },
|
|
"image_version": { "type": "string" },
|
|
"deleting": { "type": "boolean" },
|
|
"instances": {
|
|
"type": "object",
|
|
"properties": {
|
|
"declared": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"live": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"ready": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"stale": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["declared", "live", "ready", "stale"]
|
|
},
|
|
"instances_error": { "type": "string" }
|
|
},
|
|
"required": ["spec", "build_state", "secret_generation"]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2WorkerResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["project_worker"]
|
|
},
|
|
"id": { "type": "string", "description": "Worker name.", "example": "hello-world" },
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"spec": {
|
|
"type": "object",
|
|
"properties": {
|
|
"runtime": { "example": "node", "type": "string" },
|
|
"size": { "type": "string", "example": "2gb-1vcpu" },
|
|
"exposure": { "type": "string", "example": "public" },
|
|
"instances": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991,
|
|
"example": 1
|
|
}
|
|
},
|
|
"required": ["size", "exposure", "instances"]
|
|
},
|
|
"build_state": { "type": "string", "enum": ["building", "active", "failed"] },
|
|
"secret_generation": { "type": "string" },
|
|
"state_reason": { "type": "string" },
|
|
"image_version": { "type": "string" },
|
|
"deleting": { "type": "boolean" },
|
|
"instances": {
|
|
"type": "object",
|
|
"properties": {
|
|
"declared": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"live": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"ready": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991
|
|
},
|
|
"stale": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["declared", "live", "ready", "stale"]
|
|
},
|
|
"instances_error": { "type": "string" }
|
|
},
|
|
"required": ["spec", "build_state", "secret_generation"]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2WorkerUploadResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["project_worker_upload"]
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"description": "Upload id to pass to the deploy endpoint as `context_upload_id`.",
|
|
"example": "cafe0000000000000000000000000000"
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"description": "Presigned destination for the `.tar.gz` build context."
|
|
},
|
|
"method": { "type": "string", "example": "PUT" },
|
|
"expires_at": {
|
|
"type": "string",
|
|
"description": "When the slot stops accepting the upload."
|
|
}
|
|
},
|
|
"required": ["url", "method", "expires_at"]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2DeployWorkerRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["project_worker"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"spec": {
|
|
"type": "object",
|
|
"properties": {
|
|
"runtime": { "example": "node", "type": "string" },
|
|
"size": { "type": "string", "example": "2gb-1vcpu" },
|
|
"exposure": { "type": "string", "example": "public" },
|
|
"instances": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991,
|
|
"example": 1
|
|
}
|
|
},
|
|
"required": ["size", "exposure", "instances"]
|
|
},
|
|
"context_upload_id": {
|
|
"description": "Id of a build context staged through the uploads endpoint. Required unless `runtime` is set.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["spec"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2ListMembersResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["organization_member"]
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"format": "uuid",
|
|
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"username": {
|
|
"type": "string",
|
|
"description": "Member's username",
|
|
"nullable": true
|
|
},
|
|
"primary_email": {
|
|
"type": "string",
|
|
"description": "Member's primary email",
|
|
"nullable": true
|
|
},
|
|
"mfa_enabled": {
|
|
"type": "boolean",
|
|
"description": "Whether Multi-Factor Authentication is enabled for this member"
|
|
},
|
|
"is_sso_user": {
|
|
"type": "boolean",
|
|
"description": "Whether this member is a Single Sign-On user"
|
|
},
|
|
"avatar_url": {
|
|
"type": "string",
|
|
"description": "Member's avatar URL",
|
|
"nullable": true
|
|
},
|
|
"roles": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Role name. For project-scoped roles this is the base role name.",
|
|
"example": "developer"
|
|
},
|
|
"scope": {
|
|
"type": "string",
|
|
"enum": ["organization", "project"],
|
|
"description": "Whether this role applies org-wide or is scoped to specific projects for the user."
|
|
},
|
|
"projects": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"ref": { "type": "string" },
|
|
"name": { "type": "string" }
|
|
},
|
|
"required": ["ref", "name"]
|
|
},
|
|
"description": "Project refs this role is scoped to. Empty array for org-level roles."
|
|
}
|
|
},
|
|
"required": ["name", "scope", "projects"]
|
|
},
|
|
"description": "Roles assigned to this member. Includes both org-level and project-scoped roles."
|
|
}
|
|
},
|
|
"required": [
|
|
"username",
|
|
"primary_email",
|
|
"mfa_enabled",
|
|
"is_sso_user",
|
|
"avatar_url",
|
|
"roles"
|
|
]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
},
|
|
"links": {
|
|
"type": "object",
|
|
"properties": {
|
|
"first": {
|
|
"type": "string",
|
|
"description": "URL path to the first page if available.",
|
|
"example": "/v2/organizations/my-org/members?page[size]=10",
|
|
"nullable": true
|
|
},
|
|
"prev": {
|
|
"type": "string",
|
|
"description": "URL path to the previous page.",
|
|
"example": "/v2/organizations/my-org/members?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7",
|
|
"nullable": true
|
|
},
|
|
"next": {
|
|
"type": "string",
|
|
"description": "URL path to the next page.",
|
|
"example": "/v2/organizations/my-org/members?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/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295",
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["prev", "next"]
|
|
}
|
|
},
|
|
"required": ["data", "links"]
|
|
},
|
|
"V2AssignOrganizationMemberRoleRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["organization_member_role"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"role": {
|
|
"type": "string",
|
|
"enum": ["owner", "administrator", "developer", "read-only"],
|
|
"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"
|
|
},
|
|
"projects": {
|
|
"description": "The projects to assign a project-scoped role for. If omitted, assigns an org-wide role.",
|
|
"minItems": 1,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"ref": {
|
|
"type": "string",
|
|
"description": "Project ref",
|
|
"example": "abcjuqabhgwjjutfvtpa"
|
|
}
|
|
},
|
|
"required": ["ref"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["role"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"OrganizationMemberRoleResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["organization_member_role"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Role name. For project-scoped assignments this is the base role name.",
|
|
"example": "developer"
|
|
},
|
|
"scope": {
|
|
"type": "string",
|
|
"enum": ["organization", "project"],
|
|
"description": "Whether this role applies org-wide or is scoped to specific projects for the user."
|
|
},
|
|
"projects": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": { "ref": { "type": "string" }, "name": { "type": "string" } },
|
|
"required": ["ref", "name"]
|
|
},
|
|
"description": "Project refs this role is scoped to. Empty array for org-level roles."
|
|
}
|
|
},
|
|
"required": ["name", "scope", "projects"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2ListRolesResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["organization_role"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Role name.",
|
|
"example": "developer"
|
|
}
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2CreateInvitationsRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"minItems": 1,
|
|
"maxItems": 50,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["organization_invitation"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"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,}$",
|
|
"description": "Email address of the invitation receipient.",
|
|
"example": "hello@example.com"
|
|
},
|
|
"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.",
|
|
"example": "developer"
|
|
},
|
|
"projects": {
|
|
"description": "The projects to limit a user to. If omitted, user will have org-wide access with the provided role.",
|
|
"examples": [{ "ref": "abcjuqabhgwjjutfvtpa" }],
|
|
"minItems": 1,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"ref": {
|
|
"type": "string",
|
|
"description": "Project ref",
|
|
"example": "abcjuqabhgwjjutfvtpa"
|
|
}
|
|
},
|
|
"required": ["ref"]
|
|
}
|
|
},
|
|
"require_sso": { "type": "boolean" }
|
|
},
|
|
"required": ["email", "role"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2CreateInvitationsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"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": {
|
|
"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",
|
|
"properties": {
|
|
"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,}$",
|
|
"description": "Email address of the invitation receipient.",
|
|
"example": "hello@example.com"
|
|
}
|
|
},
|
|
"required": ["email"]
|
|
}
|
|
},
|
|
"required": ["code", "message", "meta"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["code", "message"]
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["organization_invitation"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"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,}$",
|
|
"description": "Email address of the invitation receipient.",
|
|
"example": "hello@example.com"
|
|
}
|
|
},
|
|
"required": ["email"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2DeleteInvitationsRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"minItems": 1,
|
|
"maxItems": 100,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["organization_invitation"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"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,}$",
|
|
"description": "Email address of the invitation receipient.",
|
|
"example": "hello@example.com"
|
|
}
|
|
},
|
|
"required": ["email"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2DeleteInvitationsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["organization_invitation"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"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,}$",
|
|
"description": "Email address of the invitation receipient.",
|
|
"example": "hello@example.com"
|
|
}
|
|
},
|
|
"required": ["email"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2ListProjectsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": { "type": "string", "description": "Resource type.", "enum": ["project"] },
|
|
"id": {
|
|
"type": "string",
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"description": "Project ref",
|
|
"example": "abcdefghijklmnopqrst"
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Project name" },
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"INACTIVE",
|
|
"ACTIVE_HEALTHY",
|
|
"ACTIVE_UNHEALTHY",
|
|
"COMING_UP",
|
|
"UNKNOWN",
|
|
"GOING_DOWN",
|
|
"INIT_FAILED",
|
|
"REMOVED",
|
|
"RESTORING",
|
|
"UPGRADING",
|
|
"PAUSING",
|
|
"RESTORE_FAILED",
|
|
"RESTARTING",
|
|
"PAUSE_FAILED",
|
|
"RESIZING"
|
|
],
|
|
"description": "Project status"
|
|
},
|
|
"cloud_provider": {
|
|
"type": "string",
|
|
"description": "Cloud provider hosting the project"
|
|
},
|
|
"region": {
|
|
"type": "string",
|
|
"description": "Region the project is hosted in"
|
|
},
|
|
"inserted_at": {
|
|
"type": "string",
|
|
"description": "When the project was created"
|
|
},
|
|
"databases": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cloud_provider": { "type": "string" },
|
|
"identifier": { "type": "string" },
|
|
"region": { "type": "string", "nullable": true },
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"ACTIVE_HEALTHY",
|
|
"ACTIVE_UNHEALTHY",
|
|
"COMING_UP",
|
|
"GOING_DOWN",
|
|
"INIT_FAILED",
|
|
"REMOVED",
|
|
"RESTORING",
|
|
"UNKNOWN",
|
|
"INIT_READ_REPLICA",
|
|
"INIT_READ_REPLICA_FAILED",
|
|
"RESTARTING",
|
|
"RESIZING"
|
|
]
|
|
},
|
|
"type": { "type": "string", "enum": ["PRIMARY", "READ_REPLICA"] },
|
|
"infra_compute_size": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pico",
|
|
"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"
|
|
]
|
|
},
|
|
"disk_volume_size_gb": { "type": "number" },
|
|
"disk_type": { "type": "string", "enum": ["gp3", "io2"] },
|
|
"disk_throughput_mbps": { "type": "number" },
|
|
"disk_last_modified_at": { "type": "string" }
|
|
},
|
|
"required": ["cloud_provider", "identifier", "region", "status", "type"]
|
|
},
|
|
"description": "The project's databases including compute and disk attributes."
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"status",
|
|
"cloud_provider",
|
|
"region",
|
|
"inserted_at",
|
|
"databases"
|
|
]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
},
|
|
"links": {
|
|
"type": "object",
|
|
"properties": {
|
|
"first": {
|
|
"type": "string",
|
|
"description": "URL path to the first page if available.",
|
|
"example": "/v2/organizations/my-org/projects?page[size]=10",
|
|
"nullable": true
|
|
},
|
|
"prev": {
|
|
"type": "string",
|
|
"description": "URL path to the previous page.",
|
|
"example": "/v2/organizations/my-org/projects?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7",
|
|
"nullable": true
|
|
},
|
|
"next": {
|
|
"type": "string",
|
|
"description": "URL path to the next page.",
|
|
"example": "/v2/organizations/my-org/projects?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/organizations/my-org/projects?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295",
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["prev", "next"]
|
|
}
|
|
},
|
|
"required": ["data", "links"]
|
|
},
|
|
"V2ListGitHubConnectionsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["github_connection"]
|
|
},
|
|
"id": { "type": "string", "description": "Connection id.", "example": "7" },
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"inserted_at": {
|
|
"type": "string",
|
|
"description": "When the connection was created"
|
|
},
|
|
"updated_at": {
|
|
"type": "string",
|
|
"description": "When the connection was last updated"
|
|
},
|
|
"installation_id": {
|
|
"type": "number",
|
|
"description": "GitHub App installation id"
|
|
},
|
|
"workdir": {
|
|
"type": "string",
|
|
"description": "Directory within the repository the project lives in"
|
|
},
|
|
"supabase_changes_only": {
|
|
"type": "boolean",
|
|
"description": "Whether branches are only created for changes under `supabase/`"
|
|
},
|
|
"branch_limit": {
|
|
"type": "number",
|
|
"description": "Maximum number of preview branches"
|
|
},
|
|
"new_branch_per_pr": {
|
|
"type": "boolean",
|
|
"description": "Whether a preview branch is created for every pull request"
|
|
},
|
|
"project": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "number" },
|
|
"ref": {
|
|
"type": "string",
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"description": "Project ref",
|
|
"example": "abcdefghijklmnopqrst"
|
|
},
|
|
"name": { "type": "string" }
|
|
},
|
|
"required": ["id", "ref", "name"],
|
|
"description": "The connected Supabase project"
|
|
},
|
|
"repository": {
|
|
"type": "object",
|
|
"properties": { "id": { "type": "number" }, "name": { "type": "string" } },
|
|
"required": ["id", "name"],
|
|
"description": "The connected GitHub repository"
|
|
},
|
|
"user": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "number" },
|
|
"username": { "type": "string" },
|
|
"primary_email": { "type": "string", "nullable": true }
|
|
},
|
|
"required": ["id", "username", "primary_email"],
|
|
"description": "The user who created the connection, if still known",
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": [
|
|
"inserted_at",
|
|
"updated_at",
|
|
"installation_id",
|
|
"workdir",
|
|
"supabase_changes_only",
|
|
"branch_limit",
|
|
"new_branch_per_pr",
|
|
"project",
|
|
"repository",
|
|
"user"
|
|
]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
},
|
|
"links": {
|
|
"type": "object",
|
|
"properties": {
|
|
"first": {
|
|
"type": "string",
|
|
"description": "URL path to the first page if available.",
|
|
"example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10",
|
|
"nullable": true
|
|
},
|
|
"prev": {
|
|
"type": "string",
|
|
"description": "URL path to the previous page.",
|
|
"example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7",
|
|
"nullable": true
|
|
},
|
|
"next": {
|
|
"type": "string",
|
|
"description": "URL path to the next page.",
|
|
"example": "/v2/organizations/my-org/integrations/github/connections?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/organizations/my-org/integrations/github/connections?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295",
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["prev", "next"]
|
|
}
|
|
},
|
|
"required": ["data", "links"]
|
|
},
|
|
"APIErrorObject": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"code": { "type": "string" },
|
|
"message": { "type": "string" },
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
}
|