mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
This PR updates Management API docs automatically. This regenerates: - Management API specs and sections - Personal Access Tokens permission-to-endpoint table - Personal Access Tokens MCP tool permissions table Sources include the live Management API specs, MCP permission map, and Studio's shared permission catalog. Co-authored-by: zamotany <17573635+zamotany@users.noreply.github.com>
24383 lines
943 KiB
JSON
24383 lines
943 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"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": {}
|
|
},
|
|
"servers": [],
|
|
"tags": [],
|
|
"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_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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": ["observability"],
|
|
"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_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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": ["observability"],
|
|
"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_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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": ["observability"],
|
|
"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": ["observability"],
|
|
"x-fga-permissions": [["analytics_config_write"]],
|
|
"x-oauth-scope": "analytics_config:write"
|
|
}
|
|
},
|
|
"/v2/projects/{ref}/advisors/run": {
|
|
"post": {
|
|
"operationId": "v2-run-project-advisors",
|
|
"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/V2RunProjectAdvisorsBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/V2ProjectAdvisorsResponse_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "Runs the project advisors with the given names",
|
|
"tags": ["Advisors"],
|
|
"x-endpoint-owners": ["control-plane"],
|
|
"x-fga-permissions": [["advisors_read"]]
|
|
}
|
|
},
|
|
"/v2/projects/{ref}/branches": {
|
|
"post": {
|
|
"description": "Creates a database branch from the specified project. Compute and disk size can be set here so the branch is provisioned at the requested size, instead of being resized after creation.",
|
|
"operationId": "v2-create-a-branch",
|
|
"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/V2CreateBranchRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/V2BranchResponse_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid branch configuration for this project",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"402": {
|
|
"description": "Organization plan does not cover the requested branch",
|
|
"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 database branch",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "Create a database branch",
|
|
"tags": ["Environments"],
|
|
"x-badges": [
|
|
{
|
|
"name": "OAuth scope: environment:write",
|
|
"position": "after"
|
|
}
|
|
],
|
|
"x-endpoint-owners": ["dev-workflows"],
|
|
"x-fga-permissions": [["branching_development_create"], ["branching_production_create"]],
|
|
"x-oauth-scope": "environment: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.\n\nThis endpoint is currently in its **Alpha** stage.",
|
|
"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_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "Get a project's service configuration",
|
|
"tags": ["Projects"],
|
|
"x-badges": [
|
|
{
|
|
"name": "Alpha",
|
|
"position": "before"
|
|
}
|
|
],
|
|
"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"
|
|
]
|
|
],
|
|
"x-scalar-stability": "experimental"
|
|
}
|
|
},
|
|
"/v2/projects/{ref}/notebooks": {
|
|
"get": {
|
|
"description": "Returns a cursor-paginated list of the project notebooks. Notebook bodies are omitted — read a single notebook to get its cells.",
|
|
"operationId": "v2-list-notebooks",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Project ref",
|
|
"schema": {
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"example": "abcdefghijklmnopqrst",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "page",
|
|
"required": false,
|
|
"in": "query",
|
|
"schema": {
|
|
"properties": {
|
|
"size": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 100
|
|
},
|
|
"after": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"before": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"style": "deepObject"
|
|
},
|
|
{
|
|
"name": "filter",
|
|
"required": false,
|
|
"in": "query",
|
|
"schema": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"style": "deepObject"
|
|
},
|
|
{
|
|
"name": "sort",
|
|
"required": false,
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": ["name", "-name", "inserted_at", "-inserted_at"]
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/V2ListNotebooksResponse_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Failed to retrieve project's notebooks",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "List notebooks of a project",
|
|
"tags": ["Projects"],
|
|
"x-badges": [
|
|
{
|
|
"name": "OAuth scope: database:read",
|
|
"position": "after"
|
|
}
|
|
],
|
|
"x-endpoint-owners": ["control-plane"],
|
|
"x-fga-permissions": [["project_notebooks_read"]],
|
|
"x-oauth-scope": "database:read"
|
|
},
|
|
"post": {
|
|
"description": "Creates a notebook shared with everyone who has access to the project. Cell ids are assigned by the server and returned in the response.",
|
|
"operationId": "v2-create-notebook",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"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/V2CreateNotebookRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/V2NotebookResponse_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "The request repeats a cell id",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"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 notebook",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "Create a notebook",
|
|
"tags": ["Projects"],
|
|
"x-badges": [
|
|
{
|
|
"name": "OAuth scope: database:write",
|
|
"position": "after"
|
|
}
|
|
],
|
|
"x-endpoint-owners": ["control-plane"],
|
|
"x-fga-permissions": [["project_notebooks_write"]],
|
|
"x-oauth-scope": "database:write"
|
|
}
|
|
},
|
|
"/v2/projects/{ref}/notebooks/{id}": {
|
|
"get": {
|
|
"operationId": "v2-get-notebook",
|
|
"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",
|
|
"schema": {
|
|
"format": "uuid",
|
|
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
"example": "44444444-4444-4444-8444-444444444444",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/V2NotebookResponse_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Notebook not found",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Failed to retrieve notebook",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "Get a notebook",
|
|
"tags": ["Projects"],
|
|
"x-badges": [
|
|
{
|
|
"name": "OAuth scope: database:read",
|
|
"position": "after"
|
|
}
|
|
],
|
|
"x-endpoint-owners": ["control-plane"],
|
|
"x-fga-permissions": [["project_notebooks_read"]],
|
|
"x-oauth-scope": "database:read"
|
|
},
|
|
"patch": {
|
|
"description": "Updates the attributes provided and leaves the rest untouched. Sending `content` replaces the whole notebook body.",
|
|
"operationId": "v2-update-notebook",
|
|
"parameters": [
|
|
{
|
|
"name": "ref",
|
|
"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",
|
|
"schema": {
|
|
"format": "uuid",
|
|
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
"example": "44444444-4444-4444-8444-444444444444",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/V2UpdateNotebookRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/V2NotebookResponse_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "The request references a cell that does not exist on this notebook, or repeats a cell id",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Notebook not found",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Failed to update notebook",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "Update a notebook",
|
|
"tags": ["Projects"],
|
|
"x-badges": [
|
|
{
|
|
"name": "OAuth scope: database:write",
|
|
"position": "after"
|
|
}
|
|
],
|
|
"x-endpoint-owners": ["control-plane"],
|
|
"x-fga-permissions": [["project_notebooks_write"]],
|
|
"x-oauth-scope": "database:write"
|
|
},
|
|
"delete": {
|
|
"operationId": "v2-delete-notebook",
|
|
"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",
|
|
"schema": {
|
|
"format": "uuid",
|
|
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
"example": "44444444-4444-4444-8444-444444444444",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Notebook not found",
|
|
"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 notebook",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "Delete a notebook",
|
|
"tags": ["Projects"],
|
|
"x-badges": [
|
|
{
|
|
"name": "OAuth scope: database:write",
|
|
"position": "after"
|
|
}
|
|
],
|
|
"x-endpoint-owners": ["control-plane"],
|
|
"x-fga-permissions": [["project_notebooks_write"]],
|
|
"x-oauth-scope": "database:write"
|
|
}
|
|
},
|
|
"/v2/projects/{ref}/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_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "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_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"402": {
|
|
"description": "This feature requires the Team, or Enterprise organization plan.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"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}/compute": {
|
|
"get": {
|
|
"description": "Returns all compute instances you've previously deployed to the specified project.\n\nThis endpoint is currently in its **Alpha** stage.",
|
|
"operationId": "v2-list-all-compute-instances",
|
|
"parameters": [
|
|
{
|
|
"name": "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/V2ListComputeInstancesResponse_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "List all compute instances",
|
|
"tags": ["Compute"],
|
|
"x-badges": [
|
|
{
|
|
"name": "OAuth scope: edge_functions:read",
|
|
"position": "after"
|
|
},
|
|
{
|
|
"name": "Alpha",
|
|
"position": "before"
|
|
}
|
|
],
|
|
"x-endpoint-owners": ["functions"],
|
|
"x-fga-permissions": [["workers_read"]],
|
|
"x-oauth-scope": "edge_functions:read",
|
|
"x-scalar-stability": "experimental"
|
|
}
|
|
},
|
|
"/v2/projects/{ref}/compute/{name}": {
|
|
"get": {
|
|
"description": "Returns a compute instance along with the counts of its running instances. Poll this after a deploy until `build_state` leaves `building`.\n\nThis endpoint is currently in its **Alpha** stage.",
|
|
"operationId": "v2-get-a-compute-instance",
|
|
"parameters": [
|
|
{
|
|
"name": "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/V2ComputeInstanceResponse_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "Retrieve a compute instance",
|
|
"tags": ["Compute"],
|
|
"x-badges": [
|
|
{
|
|
"name": "OAuth scope: edge_functions:read",
|
|
"position": "after"
|
|
},
|
|
{
|
|
"name": "Alpha",
|
|
"position": "before"
|
|
}
|
|
],
|
|
"x-endpoint-owners": ["functions"],
|
|
"x-fga-permissions": [["workers_read"]],
|
|
"x-oauth-scope": "edge_functions:read",
|
|
"x-scalar-stability": "experimental"
|
|
},
|
|
"delete": {
|
|
"description": "Tombstones the compute instance. Its running instances and image are torn down asynchronously.\n\nThis endpoint is currently in its **Alpha** stage.",
|
|
"operationId": "v2-delete-a-compute-instance",
|
|
"parameters": [
|
|
{
|
|
"name": "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": "Delete a compute instance",
|
|
"tags": ["Compute"],
|
|
"x-badges": [
|
|
{
|
|
"name": "OAuth scope: edge_functions:write",
|
|
"position": "after"
|
|
},
|
|
{
|
|
"name": "Alpha",
|
|
"position": "before"
|
|
}
|
|
],
|
|
"x-endpoint-owners": ["functions"],
|
|
"x-fga-permissions": [["workers_write"]],
|
|
"x-oauth-scope": "edge_functions:write",
|
|
"x-scalar-stability": "experimental"
|
|
}
|
|
},
|
|
"/v2/projects/{ref}/compute/{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.\n\nThis endpoint is currently in its **Alpha** stage.",
|
|
"operationId": "v2-create-compute-instance-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/V2ComputeInstanceUploadResponse_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "Mint a presigned slot for a build-context upload",
|
|
"tags": ["Compute"],
|
|
"x-badges": [
|
|
{
|
|
"name": "OAuth scope: edge_functions:write",
|
|
"position": "after"
|
|
},
|
|
{
|
|
"name": "Alpha",
|
|
"position": "before"
|
|
}
|
|
],
|
|
"x-endpoint-owners": ["functions"],
|
|
"x-fga-permissions": [["workers_write"]],
|
|
"x-oauth-scope": "edge_functions:write",
|
|
"x-scalar-stability": "experimental"
|
|
}
|
|
},
|
|
"/v2/projects/{ref}/compute/{name}/deploy": {
|
|
"post": {
|
|
"description": "Creates the compute instance if it does not exist, building from a context staged through the uploads endpoint. The build runs asynchronously: this answers 202 and the compute instance reaches `build_state` `active` or `failed` later.\n\nThis endpoint is currently in its **Alpha** stage.",
|
|
"operationId": "v2-deploy-a-compute-instance",
|
|
"parameters": [
|
|
{
|
|
"name": "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/V2DeployComputeInstanceRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"202": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/V2ComputeInstanceResponse_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "Deploy a compute instance",
|
|
"tags": ["Compute"],
|
|
"x-badges": [
|
|
{
|
|
"name": "OAuth scope: edge_functions:write",
|
|
"position": "after"
|
|
},
|
|
{
|
|
"name": "Alpha",
|
|
"position": "before"
|
|
}
|
|
],
|
|
"x-endpoint-owners": ["functions"],
|
|
"x-fga-permissions": [["workers_write"]],
|
|
"x-oauth-scope": "edge_functions:write",
|
|
"x-scalar-stability": "experimental"
|
|
}
|
|
},
|
|
"/v2/organizations/{slug}/members": {
|
|
"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_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "List 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_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"402": {
|
|
"description": "This feature requires the Enterprise organization plan.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "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_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "List roles of an organization",
|
|
"tags": ["Organizations"],
|
|
"x-badges": [
|
|
{
|
|
"name": "OAuth scope: organizations:read",
|
|
"position": "after"
|
|
}
|
|
],
|
|
"x-endpoint-owners": ["control-plane"],
|
|
"x-fga-permissions": [["members_read"]],
|
|
"x-oauth-scope": "organizations:read"
|
|
}
|
|
},
|
|
"/v2/organizations/{slug}/members/invitations": {
|
|
"post": {
|
|
"description": "Creates member invitations for an organization. Each invitation can have different role and project scope settings.",
|
|
"operationId": "v2-create-organization-invitations",
|
|
"parameters": [
|
|
{
|
|
"name": "slug",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Organization slug",
|
|
"schema": {
|
|
"pattern": "^[\\w-]+$",
|
|
"example": "tsrqponmlkjihgfedcba",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/V2CreateInvitationsRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/V2CreateInvitationsResponse_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "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_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"402": {
|
|
"description": "This feature requires the Enterprise organization plan.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "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_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearer": []
|
|
}
|
|
],
|
|
"summary": "List projects of an organization",
|
|
"tags": ["Organizations"],
|
|
"x-badges": [
|
|
{
|
|
"name": "OAuth scope: projects:read",
|
|
"position": "after"
|
|
}
|
|
],
|
|
"x-endpoint-owners": ["control-plane"],
|
|
"x-fga-permissions": [["organization_projects_read"]],
|
|
"x-oauth-scope": "projects:read"
|
|
}
|
|
},
|
|
"/v2/organizations/{slug}/integrations/github/connections": {
|
|
"get": {
|
|
"description": "Returns a cursor-paginated list of the GitHub connections of the organization's projects.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the page size.\nPaging walks the organization projects, so a page holds at most `page[size]` connections and can hold fewer (or none) when some of its projects are not connected.\nFollow `links.next` until it is `null` rather than stopping on a short page.\n\nUse `filter[project_ref]` to narrow the list down to a single project.",
|
|
"operationId": "v2-list-organization-github-connections",
|
|
"parameters": [
|
|
{
|
|
"name": "slug",
|
|
"required": true,
|
|
"in": "path",
|
|
"description": "Organization slug",
|
|
"schema": {
|
|
"pattern": "^[\\w-]+$",
|
|
"example": "tsrqponmlkjihgfedcba",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "page",
|
|
"required": false,
|
|
"in": "query",
|
|
"schema": {
|
|
"properties": {
|
|
"size": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 100
|
|
},
|
|
"after": {
|
|
"type": "string",
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"description": "Project ref",
|
|
"example": "abcdefghijklmnopqrst"
|
|
},
|
|
"before": {
|
|
"type": "string",
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"description": "Project ref",
|
|
"example": "abcdefghijklmnopqrst"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"style": "deepObject"
|
|
},
|
|
{
|
|
"name": "filter",
|
|
"required": false,
|
|
"in": "query",
|
|
"schema": {
|
|
"properties": {
|
|
"project_ref": {
|
|
"type": "string",
|
|
"minLength": 20,
|
|
"maxLength": 20,
|
|
"pattern": "^[a-z]+$",
|
|
"description": "Project ref",
|
|
"example": "abcdefghijklmnopqrst"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"style": "deepObject"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/V2ListGitHubConnectionsResponse_Output"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden action",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponseBody"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"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."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"],
|
|
"description": "Final data sent to the consumer."
|
|
},
|
|
"timestamp": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
"description": "Timestamp of event publication."
|
|
}
|
|
},
|
|
"required": ["type", "payload", "timestamp"]
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"event_id",
|
|
"status",
|
|
"response_code",
|
|
"response_headers",
|
|
"response_body",
|
|
"attempt_timestamp",
|
|
"event"
|
|
]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "GenericUnauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"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."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"],
|
|
"description": "Final data sent to the consumer."
|
|
},
|
|
"timestamp": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
"description": "Timestamp of event publication."
|
|
}
|
|
},
|
|
"required": ["type", "payload", "timestamp"]
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"event_id",
|
|
"status",
|
|
"response_code",
|
|
"response_headers",
|
|
"response_body",
|
|
"attempt_timestamp",
|
|
"event"
|
|
]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "GenericUnauthorized",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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."
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"securitySchemes": {
|
|
"bearer": {
|
|
"scheme": "bearer",
|
|
"bearerFormat": "JWT",
|
|
"type": "http"
|
|
}
|
|
},
|
|
"schemas": {
|
|
"ListLogDrainsResponse_Output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["log_drain"]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"config": {
|
|
"anyOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"http": {
|
|
"type": "string",
|
|
"enum": ["http1", "http2"]
|
|
},
|
|
"gzip": {
|
|
"type": "boolean"
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"title": "webhook"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"api_key": {
|
|
"type": "string"
|
|
},
|
|
"region": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "datadog"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"title": "loki"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"dsn": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "sentry"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"api_token": {
|
|
"type": "string"
|
|
},
|
|
"dataset_name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "axiom"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"host": {
|
|
"type": "string"
|
|
},
|
|
"port": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 65535
|
|
},
|
|
"tls": {
|
|
"default": false,
|
|
"type": "boolean"
|
|
},
|
|
"structured_data": {
|
|
"type": "string"
|
|
},
|
|
"cipher_key": {
|
|
"type": "string"
|
|
},
|
|
"ca_cert": {
|
|
"type": "string"
|
|
},
|
|
"client_cert": {
|
|
"type": "string"
|
|
},
|
|
"client_key": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "syslog"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"s3_bucket": {
|
|
"type": "string"
|
|
},
|
|
"storage_region": {
|
|
"type": "string"
|
|
},
|
|
"access_key_id": {
|
|
"type": "string"
|
|
},
|
|
"secret_access_key": {
|
|
"type": "string"
|
|
},
|
|
"batch_timeout": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"title": "s3"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"region": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "last9"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"endpoint": {
|
|
"type": "string"
|
|
},
|
|
"protocol": {
|
|
"default": "http/protobuf",
|
|
"type": "string"
|
|
},
|
|
"gzip": {
|
|
"default": true,
|
|
"type": "boolean"
|
|
},
|
|
"headers": {
|
|
"default": {},
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"title": "otlp"
|
|
}
|
|
]
|
|
},
|
|
"backend_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"postgres",
|
|
"bigquery",
|
|
"clickhouse",
|
|
"webhook",
|
|
"datadog",
|
|
"loki",
|
|
"sentry",
|
|
"s3",
|
|
"axiom",
|
|
"last9",
|
|
"otlp",
|
|
"syslog"
|
|
]
|
|
}
|
|
},
|
|
"required": ["name", "config", "backend_type"]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"ErrorResponseBodyAPIErrorObject": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"links": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"properties": {
|
|
"href": {
|
|
"type": "string"
|
|
},
|
|
"rel": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"describedby": {
|
|
"type": "string"
|
|
},
|
|
"meta": {
|
|
"type": "object",
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["href"]
|
|
}
|
|
},
|
|
"meta": {
|
|
"type": "object",
|
|
"additionalProperties": {}
|
|
},
|
|
"issues": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ErrorResponseBodyAPIErrorObject"
|
|
}
|
|
}
|
|
},
|
|
"required": ["code", "message"],
|
|
"ref": "APIErrorObject"
|
|
},
|
|
"ErrorResponseBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"$ref": "#/components/schemas/ErrorResponseBodyAPIErrorObject"
|
|
}
|
|
},
|
|
"required": ["error"]
|
|
},
|
|
"CreateLogDrainRequestOpenApi": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["log_drain"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"config": {
|
|
"anyOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"http": {
|
|
"type": "string",
|
|
"enum": ["http1", "http2"]
|
|
},
|
|
"gzip": {
|
|
"type": "boolean"
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "webhook"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"api_key": {
|
|
"type": "string"
|
|
},
|
|
"region": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "datadog"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "loki"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"dsn": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "sentry"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"api_token": {
|
|
"type": "string"
|
|
},
|
|
"dataset_name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "axiom"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"host": {
|
|
"type": "string"
|
|
},
|
|
"port": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 65535
|
|
},
|
|
"tls": {
|
|
"default": false,
|
|
"type": "boolean"
|
|
},
|
|
"structured_data": {
|
|
"type": "string"
|
|
},
|
|
"cipher_key": {
|
|
"type": "string"
|
|
},
|
|
"ca_cert": {
|
|
"type": "string"
|
|
},
|
|
"client_cert": {
|
|
"type": "string"
|
|
},
|
|
"client_key": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "syslog"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"s3_bucket": {
|
|
"type": "string"
|
|
},
|
|
"storage_region": {
|
|
"type": "string"
|
|
},
|
|
"access_key_id": {
|
|
"type": "string"
|
|
},
|
|
"secret_access_key": {
|
|
"type": "string"
|
|
},
|
|
"batch_timeout": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "s3"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"region": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "last9"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"endpoint": {
|
|
"type": "string"
|
|
},
|
|
"protocol": {
|
|
"default": "http/protobuf",
|
|
"type": "string"
|
|
},
|
|
"gzip": {
|
|
"default": true,
|
|
"type": "boolean"
|
|
},
|
|
"headers": {
|
|
"default": {},
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "otlp"
|
|
}
|
|
]
|
|
},
|
|
"backend_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"postgres",
|
|
"bigquery",
|
|
"clickhouse",
|
|
"webhook",
|
|
"datadog",
|
|
"loki",
|
|
"sentry",
|
|
"s3",
|
|
"axiom",
|
|
"last9",
|
|
"otlp",
|
|
"syslog"
|
|
]
|
|
}
|
|
},
|
|
"required": ["name", "config", "backend_type"],
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"LogDrainResponse_Output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["log_drain"]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"config": {
|
|
"anyOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"http": {
|
|
"type": "string",
|
|
"enum": ["http1", "http2"]
|
|
},
|
|
"gzip": {
|
|
"type": "boolean"
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"title": "webhook"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"api_key": {
|
|
"type": "string"
|
|
},
|
|
"region": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "datadog"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"title": "loki"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"dsn": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "sentry"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"api_token": {
|
|
"type": "string"
|
|
},
|
|
"dataset_name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "axiom"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"host": {
|
|
"type": "string"
|
|
},
|
|
"port": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 65535
|
|
},
|
|
"tls": {
|
|
"default": false,
|
|
"type": "boolean"
|
|
},
|
|
"structured_data": {
|
|
"type": "string"
|
|
},
|
|
"cipher_key": {
|
|
"type": "string"
|
|
},
|
|
"ca_cert": {
|
|
"type": "string"
|
|
},
|
|
"client_cert": {
|
|
"type": "string"
|
|
},
|
|
"client_key": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "syslog"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"s3_bucket": {
|
|
"type": "string"
|
|
},
|
|
"storage_region": {
|
|
"type": "string"
|
|
},
|
|
"access_key_id": {
|
|
"type": "string"
|
|
},
|
|
"secret_access_key": {
|
|
"type": "string"
|
|
},
|
|
"batch_timeout": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"title": "s3"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"region": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "last9"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"endpoint": {
|
|
"type": "string"
|
|
},
|
|
"protocol": {
|
|
"default": "http/protobuf",
|
|
"type": "string"
|
|
},
|
|
"gzip": {
|
|
"default": true,
|
|
"type": "boolean"
|
|
},
|
|
"headers": {
|
|
"default": {},
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"title": "otlp"
|
|
}
|
|
]
|
|
},
|
|
"backend_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"postgres",
|
|
"bigquery",
|
|
"clickhouse",
|
|
"webhook",
|
|
"datadog",
|
|
"loki",
|
|
"sentry",
|
|
"s3",
|
|
"axiom",
|
|
"last9",
|
|
"otlp",
|
|
"syslog"
|
|
]
|
|
}
|
|
},
|
|
"required": ["name", "config", "backend_type"]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"UpdateLogDrainRequestOpenApi": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["log_drain"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"config": {
|
|
"anyOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"http": {
|
|
"type": "string",
|
|
"enum": ["http1", "http2"]
|
|
},
|
|
"gzip": {
|
|
"type": "boolean"
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "webhook"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"api_key": {
|
|
"type": "string"
|
|
},
|
|
"region": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "datadog"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "loki"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"dsn": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "sentry"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"api_token": {
|
|
"type": "string"
|
|
},
|
|
"dataset_name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "axiom"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"host": {
|
|
"type": "string"
|
|
},
|
|
"port": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 65535
|
|
},
|
|
"tls": {
|
|
"default": false,
|
|
"type": "boolean"
|
|
},
|
|
"structured_data": {
|
|
"type": "string"
|
|
},
|
|
"cipher_key": {
|
|
"type": "string"
|
|
},
|
|
"ca_cert": {
|
|
"type": "string"
|
|
},
|
|
"client_cert": {
|
|
"type": "string"
|
|
},
|
|
"client_key": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "syslog"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"s3_bucket": {
|
|
"type": "string"
|
|
},
|
|
"storage_region": {
|
|
"type": "string"
|
|
},
|
|
"access_key_id": {
|
|
"type": "string"
|
|
},
|
|
"secret_access_key": {
|
|
"type": "string"
|
|
},
|
|
"batch_timeout": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "s3"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"region": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "last9"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"endpoint": {
|
|
"type": "string"
|
|
},
|
|
"protocol": {
|
|
"default": "http/protobuf",
|
|
"type": "string"
|
|
},
|
|
"gzip": {
|
|
"default": true,
|
|
"type": "boolean"
|
|
},
|
|
"headers": {
|
|
"default": {},
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"title": "otlp"
|
|
}
|
|
]
|
|
},
|
|
"backend_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"postgres",
|
|
"bigquery",
|
|
"clickhouse",
|
|
"webhook",
|
|
"datadog",
|
|
"loki",
|
|
"sentry",
|
|
"s3",
|
|
"axiom",
|
|
"last9",
|
|
"otlp",
|
|
"syslog"
|
|
]
|
|
}
|
|
},
|
|
"required": ["backend_type"],
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2RunProjectAdvisorsBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["project_advisors"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"lints": {
|
|
"minItems": 1,
|
|
"maxItems": 10,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"enum": [
|
|
"unindexed_foreign_keys",
|
|
"auth_users_exposed",
|
|
"auth_rls_initplan",
|
|
"no_primary_key",
|
|
"unused_index",
|
|
"multiple_permissive_policies",
|
|
"policy_exists_rls_disabled",
|
|
"rls_enabled_no_policy",
|
|
"duplicate_index",
|
|
"security_definer_view",
|
|
"function_search_path_mutable",
|
|
"rls_disabled_in_public",
|
|
"extension_in_public",
|
|
"rls_references_user_metadata",
|
|
"materialized_view_in_api",
|
|
"foreign_table_in_api",
|
|
"unsupported_reg_types",
|
|
"auth_otp_long_expiry",
|
|
"auth_otp_short_length",
|
|
"ssl_not_enforced",
|
|
"log_connections_not_enabled",
|
|
"network_restrictions_not_set",
|
|
"password_requirements_min_length",
|
|
"pitr_not_enabled",
|
|
"auth_leaked_password_protection",
|
|
"auth_insufficient_mfa_options",
|
|
"auth_password_policy_missing",
|
|
"leaked_service_key",
|
|
"no_backup_admin",
|
|
"vulnerable_postgres_version",
|
|
"db_not_reachable",
|
|
"db_connection_failing",
|
|
"db_connection_limit_reached",
|
|
"instance_telemetry_lost",
|
|
"instance_db_down",
|
|
"instance_alert_firing",
|
|
"log_data_api_error_rate_high",
|
|
"log_auth_error_rate_high",
|
|
"log_storage_error_rate_high",
|
|
"log_edge_function_error_rate_high"
|
|
]
|
|
}
|
|
},
|
|
"required": ["name"],
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
},
|
|
"required": ["lints"],
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"required": ["type", "attributes"],
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2ProjectAdvisorsResponse_Output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["project_advisors"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"lints": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"enum": [
|
|
"unindexed_foreign_keys",
|
|
"auth_users_exposed",
|
|
"auth_rls_initplan",
|
|
"no_primary_key",
|
|
"unused_index",
|
|
"multiple_permissive_policies",
|
|
"policy_exists_rls_disabled",
|
|
"rls_enabled_no_policy",
|
|
"duplicate_index",
|
|
"security_definer_view",
|
|
"function_search_path_mutable",
|
|
"rls_disabled_in_public",
|
|
"extension_in_public",
|
|
"rls_references_user_metadata",
|
|
"materialized_view_in_api",
|
|
"foreign_table_in_api",
|
|
"unsupported_reg_types",
|
|
"auth_otp_long_expiry",
|
|
"auth_otp_short_length",
|
|
"ssl_not_enforced",
|
|
"log_connections_not_enabled",
|
|
"network_restrictions_not_set",
|
|
"password_requirements_min_length",
|
|
"pitr_not_enabled",
|
|
"auth_leaked_password_protection",
|
|
"auth_insufficient_mfa_options",
|
|
"auth_password_policy_missing",
|
|
"leaked_service_key",
|
|
"no_backup_admin",
|
|
"vulnerable_postgres_version",
|
|
"db_not_reachable",
|
|
"db_connection_failing",
|
|
"db_connection_limit_reached",
|
|
"instance_telemetry_lost",
|
|
"instance_db_down",
|
|
"instance_alert_firing",
|
|
"log_data_api_error_rate_high",
|
|
"log_auth_error_rate_high",
|
|
"log_storage_error_rate_high",
|
|
"log_edge_function_error_rate_high",
|
|
"project_not_active",
|
|
"advisor_check_unavailable"
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"level": {
|
|
"type": "string",
|
|
"enum": ["ERROR", "WARN", "INFO"]
|
|
},
|
|
"facing": {
|
|
"type": "string",
|
|
"enum": ["EXTERNAL"]
|
|
},
|
|
"categories": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": ["PERFORMANCE", "SECURITY", "HEALTH"]
|
|
},
|
|
"x-ignore-array-items-must-be-objects": true
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"detail": {
|
|
"type": "string"
|
|
},
|
|
"remediation": {
|
|
"type": "string"
|
|
},
|
|
"metadata": {
|
|
"type": "object",
|
|
"properties": {
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"entity": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"table",
|
|
"view",
|
|
"materialized view",
|
|
"foreign table",
|
|
"auth",
|
|
"function",
|
|
"extension",
|
|
"compliance",
|
|
"health"
|
|
]
|
|
},
|
|
"fkey_name": {
|
|
"type": "string"
|
|
},
|
|
"fkey_columns": {
|
|
"x-ignore-array-items-must-be-objects": true,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"cache_key": {
|
|
"type": "string"
|
|
},
|
|
"observed_at": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"title",
|
|
"level",
|
|
"facing",
|
|
"categories",
|
|
"description",
|
|
"detail",
|
|
"remediation",
|
|
"cache_key"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": ["lints"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2CreateBranchRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["branch"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"description": "Name of the branch.",
|
|
"example": "preview-login-page"
|
|
},
|
|
"git_branch": {
|
|
"description": "Git branch to track. Must exist on the connected GitHub repository when the project has one.",
|
|
"example": "feature/login-page",
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"region": {
|
|
"description": "Region to create the branch in. Omit to inherit the region of the project it branches from.",
|
|
"type": "string"
|
|
},
|
|
"persistent": {
|
|
"description": "Whether the branch is kept when its git branch is deleted or its PR is merged.",
|
|
"type": "boolean"
|
|
},
|
|
"with_data": {
|
|
"description": "Whether to seed the branch from the project's latest physical backup.",
|
|
"type": "boolean"
|
|
},
|
|
"desired_instance_size": {
|
|
"description": "Desired instance size. Omit this field to always default to the smallest possible size.",
|
|
"type": "string",
|
|
"enum": [
|
|
"nano",
|
|
"micro",
|
|
"small",
|
|
"medium",
|
|
"large",
|
|
"xlarge",
|
|
"2xlarge",
|
|
"4xlarge",
|
|
"8xlarge",
|
|
"12xlarge",
|
|
"16xlarge",
|
|
"24xlarge",
|
|
"24xlarge_optimized_memory",
|
|
"24xlarge_optimized_cpu",
|
|
"24xlarge_high_memory",
|
|
"48xlarge",
|
|
"48xlarge_optimized_memory",
|
|
"48xlarge_optimized_cpu",
|
|
"48xlarge_high_memory"
|
|
]
|
|
},
|
|
"desired_disk_size_gb": {
|
|
"description": "Desired disk size in GB. Omit this field to default to the smallest disk size available on the plan.",
|
|
"type": "integer",
|
|
"minimum": 8,
|
|
"maximum": 61440
|
|
},
|
|
"notify_url": {
|
|
"description": "HTTP endpoint to receive branch status updates.",
|
|
"example": "https://example.com/webhooks/branches",
|
|
"type": "string",
|
|
"format": "uri"
|
|
}
|
|
},
|
|
"required": ["name"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2BranchResponse_Output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["branch"]
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"format": "uuid",
|
|
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
"description": "ID of the branch."
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Name of the branch."
|
|
},
|
|
"project_ref": {
|
|
"type": "string",
|
|
"description": "Ref of the project backing this branch."
|
|
},
|
|
"parent_project_ref": {
|
|
"type": "string",
|
|
"description": "Ref of the project it branches from."
|
|
},
|
|
"is_default": {
|
|
"type": "boolean",
|
|
"description": "Whether this is the default branch of the project."
|
|
},
|
|
"persistent": {
|
|
"type": "boolean",
|
|
"description": "Whether the branch is kept when its git branch is deleted or its PR is merged."
|
|
},
|
|
"with_data": {
|
|
"type": "boolean",
|
|
"description": "Whether the branch is seeded from the project's data."
|
|
},
|
|
"git_branch": {
|
|
"description": "Git branch being tracked.",
|
|
"type": "string"
|
|
},
|
|
"notify_url": {
|
|
"description": "HTTP endpoint receiving branch status updates.",
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"created_at": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "Creation timestamp."
|
|
},
|
|
"updated_at": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "Last update timestamp."
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"project_ref",
|
|
"parent_project_ref",
|
|
"is_default",
|
|
"persistent",
|
|
"with_data",
|
|
"created_at",
|
|
"updated_at"
|
|
]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2ProjectConfigResponse_Output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["project_config"]
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"description": "Project ref."
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"database": {
|
|
"type": "object",
|
|
"properties": {
|
|
"major_version": {
|
|
"type": "integer",
|
|
"minimum": -9007199254740991,
|
|
"maximum": 9007199254740991,
|
|
"description": "The major Postgres version the database runs. `17` covers both Postgres 17 and Oriole on 17, since Oriole is a storage engine rather than a version."
|
|
},
|
|
"ssl_enforced": {
|
|
"type": "boolean",
|
|
"description": "Whether the database rejects plaintext connections"
|
|
},
|
|
"network_restrictions": {
|
|
"type": "object",
|
|
"properties": {
|
|
"entitlement": {
|
|
"type": "string",
|
|
"enum": ["disallowed", "allowed"]
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": ["stored", "applied"],
|
|
"description": "Whether the allowlist below is applied to the project or only stored."
|
|
},
|
|
"allowed_cidrs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["v4", "v6"]
|
|
}
|
|
},
|
|
"required": ["address", "type"]
|
|
}
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"applied_at": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["entitlement", "status", "allowed_cidrs"]
|
|
},
|
|
"postgres_settings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"effective_cache_size": {
|
|
"type": "string"
|
|
},
|
|
"logical_decoding_work_mem": {
|
|
"type": "string"
|
|
},
|
|
"log_autovacuum_min_duration": {
|
|
"type": "string",
|
|
"description": "Default unit: ms",
|
|
"pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
|
|
},
|
|
"log_checkpoints": {
|
|
"type": "boolean"
|
|
},
|
|
"log_connections": {
|
|
"type": "boolean"
|
|
},
|
|
"log_disconnections": {
|
|
"type": "boolean"
|
|
},
|
|
"log_duration": {
|
|
"type": "boolean"
|
|
},
|
|
"log_lock_waits": {
|
|
"type": "boolean"
|
|
},
|
|
"log_recovery_conflict_waits": {
|
|
"type": "boolean"
|
|
},
|
|
"log_replication_commands": {
|
|
"type": "boolean"
|
|
},
|
|
"log_startup_progress_interval": {
|
|
"type": "string",
|
|
"description": "Default unit: ms",
|
|
"pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$"
|
|
},
|
|
"log_temp_files": {
|
|
"type": "string"
|
|
},
|
|
"maintenance_work_mem": {
|
|
"type": "string"
|
|
},
|
|
"track_activity_query_size": {
|
|
"type": "string"
|
|
},
|
|
"max_connections": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 262143
|
|
},
|
|
"max_locks_per_transaction": {
|
|
"type": "integer",
|
|
"minimum": 10,
|
|
"maximum": 2147483640
|
|
},
|
|
"max_logical_replication_workers": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 262143
|
|
},
|
|
"max_parallel_maintenance_workers": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 1024
|
|
},
|
|
"max_parallel_workers": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 1024
|
|
},
|
|
"max_parallel_workers_per_gather": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 1024
|
|
},
|
|
"max_replication_slots": {
|
|
"type": "integer",
|
|
"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"
|
|
},
|
|
"object_versioning": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": ["list_v2", "iceberg_catalog", "object_versioning"]
|
|
},
|
|
"upstream_target": {
|
|
"type": "string",
|
|
"enum": ["main", "canary"]
|
|
},
|
|
"migration_version": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": [
|
|
"file_size_limit",
|
|
"features",
|
|
"capabilities",
|
|
"upstream_target",
|
|
"migration_version"
|
|
],
|
|
"description": "Read from the storage service's admin API rather than the middleware DB, so unlike the rest of this resource it reflects the tenant's live config."
|
|
}
|
|
},
|
|
"required": ["database", "pooler", "auth", "api", "realtime", "storage"]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2ListNotebooksResponse_Output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["notebook"]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"favorite": {
|
|
"type": "boolean"
|
|
},
|
|
"inserted_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"owner": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "number"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["id", "username"],
|
|
"description": "User who created the notebook.",
|
|
"nullable": true
|
|
},
|
|
"updated_by": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "number"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["id", "username"],
|
|
"description": "User who last wrote to the notebook.",
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"description",
|
|
"favorite",
|
|
"inserted_at",
|
|
"updated_at",
|
|
"owner",
|
|
"updated_by"
|
|
]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
},
|
|
"links": {
|
|
"type": "object",
|
|
"properties": {
|
|
"first": {
|
|
"type": "string",
|
|
"description": "URL path to the first page if available.",
|
|
"example": "/v2/projects/{ref}/notebooks?page[size]=10",
|
|
"nullable": true
|
|
},
|
|
"prev": {
|
|
"type": "string",
|
|
"description": "URL path to the previous page.",
|
|
"example": "/v2/projects/{ref}/notebooks?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7",
|
|
"nullable": true
|
|
},
|
|
"next": {
|
|
"type": "string",
|
|
"description": "URL path to the next page.",
|
|
"example": "/v2/projects/{ref}/notebooks?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4",
|
|
"nullable": true
|
|
},
|
|
"last": {
|
|
"type": "string",
|
|
"description": "URL path to the last page if available.",
|
|
"example": "/v2/projects/{ref}/notebooks?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295",
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": ["prev", "next"]
|
|
}
|
|
},
|
|
"required": ["data", "links"]
|
|
},
|
|
"V2NotebookResponse_Output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["notebook"]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"favorite": {
|
|
"type": "boolean"
|
|
},
|
|
"inserted_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"owner": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "number"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["id", "username"],
|
|
"description": "User who created the notebook.",
|
|
"nullable": true
|
|
},
|
|
"updated_by": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "number"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["id", "username"],
|
|
"description": "User who last wrote to the notebook.",
|
|
"nullable": true
|
|
},
|
|
"content": {
|
|
"type": "object",
|
|
"properties": {
|
|
"schema_version": {
|
|
"type": "number"
|
|
},
|
|
"cells": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["markdown"]
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["id", "type", "text"]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["database"]
|
|
},
|
|
"sql": {
|
|
"type": "string",
|
|
"description": "SQL run against the project database."
|
|
},
|
|
"row_limit": {
|
|
"default": 100,
|
|
"type": "integer",
|
|
"exclusiveMinimum": true,
|
|
"maximum": 9007199254740991,
|
|
"minimum": 0
|
|
},
|
|
"database_identifier": {
|
|
"description": "Read replica to run against. Omit to use the primary database.",
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"view": {
|
|
"type": "string",
|
|
"enum": ["table", "chart"]
|
|
},
|
|
"chart": {
|
|
"description": "Chart configuration, retained even while `view` is `table`.",
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["bar", "line"]
|
|
},
|
|
"x_column": {
|
|
"type": "string",
|
|
"description": "Result column used for the x axis."
|
|
},
|
|
"y_series": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"column": {
|
|
"type": "string",
|
|
"description": "Result column plotted as a series."
|
|
}
|
|
},
|
|
"required": ["column"]
|
|
}
|
|
},
|
|
"scale": {
|
|
"type": "string",
|
|
"enum": ["linear", "log"]
|
|
},
|
|
"cumulative": {
|
|
"type": "boolean"
|
|
},
|
|
"show_labels": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"x_column",
|
|
"y_series",
|
|
"scale",
|
|
"cumulative",
|
|
"show_labels"
|
|
]
|
|
}
|
|
},
|
|
"required": ["id", "type", "sql", "row_limit"]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["log"]
|
|
},
|
|
"sql": {
|
|
"type": "string",
|
|
"description": "SQL run against the project logs."
|
|
},
|
|
"time_range": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["absolute"]
|
|
},
|
|
"start": {
|
|
"type": "string",
|
|
"description": "ISO 8601 start of the range."
|
|
},
|
|
"end": {
|
|
"type": "string",
|
|
"description": "ISO 8601 end of the range."
|
|
}
|
|
},
|
|
"required": ["type", "start", "end"]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["relative"]
|
|
},
|
|
"unit": {
|
|
"type": "string",
|
|
"enum": ["minute", "hour", "day", "week", "month", "year"]
|
|
},
|
|
"amount": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": true,
|
|
"maximum": 9007199254740991,
|
|
"minimum": 0
|
|
}
|
|
},
|
|
"required": ["type", "unit", "amount"]
|
|
}
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"view": {
|
|
"type": "string",
|
|
"enum": ["table", "chart"]
|
|
},
|
|
"chart": {
|
|
"description": "Chart configuration, retained even while `view` is `table`.",
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["bar", "line"]
|
|
},
|
|
"x_column": {
|
|
"type": "string",
|
|
"description": "Result column used for the x axis."
|
|
},
|
|
"y_series": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"column": {
|
|
"type": "string",
|
|
"description": "Result column plotted as a series."
|
|
}
|
|
},
|
|
"required": ["column"]
|
|
}
|
|
},
|
|
"scale": {
|
|
"type": "string",
|
|
"enum": ["linear", "log"]
|
|
},
|
|
"cumulative": {
|
|
"type": "boolean"
|
|
},
|
|
"show_labels": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"x_column",
|
|
"y_series",
|
|
"scale",
|
|
"cumulative",
|
|
"show_labels"
|
|
]
|
|
}
|
|
},
|
|
"required": ["id", "type", "sql", "time_range"]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": ["schema_version", "cells"]
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"description",
|
|
"favorite",
|
|
"inserted_at",
|
|
"updated_at",
|
|
"owner",
|
|
"updated_by",
|
|
"content"
|
|
]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2CreateNotebookRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["notebook"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 255
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"maxLength": 10000
|
|
},
|
|
"favorite": {
|
|
"type": "boolean"
|
|
},
|
|
"content": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cells": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["markdown"]
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["type", "text"],
|
|
"additionalProperties": {}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["database"]
|
|
},
|
|
"sql": {
|
|
"type": "string",
|
|
"description": "SQL run against the project database."
|
|
},
|
|
"row_limit": {
|
|
"default": 100,
|
|
"type": "integer",
|
|
"exclusiveMinimum": true,
|
|
"maximum": 9007199254740991,
|
|
"minimum": 0
|
|
},
|
|
"database_identifier": {
|
|
"description": "Read replica to run against. Omit to use the primary database.",
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"view": {
|
|
"type": "string",
|
|
"enum": ["table", "chart"]
|
|
},
|
|
"chart": {
|
|
"description": "Chart configuration, retained even while `view` is `table`.",
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["bar", "line"]
|
|
},
|
|
"x_column": {
|
|
"type": "string",
|
|
"description": "Result column used for the x axis."
|
|
},
|
|
"y_series": {
|
|
"maxItems": 3,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"column": {
|
|
"type": "string",
|
|
"description": "Result column plotted as a series."
|
|
}
|
|
},
|
|
"required": ["column"],
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"scale": {
|
|
"type": "string",
|
|
"enum": ["linear", "log"]
|
|
},
|
|
"cumulative": {
|
|
"type": "boolean"
|
|
},
|
|
"show_labels": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"x_column",
|
|
"y_series",
|
|
"scale",
|
|
"cumulative",
|
|
"show_labels"
|
|
],
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["type", "sql"],
|
|
"additionalProperties": {}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["log"]
|
|
},
|
|
"sql": {
|
|
"type": "string",
|
|
"description": "SQL run against the project logs."
|
|
},
|
|
"time_range": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["absolute"]
|
|
},
|
|
"start": {
|
|
"type": "string",
|
|
"description": "ISO 8601 start of the range."
|
|
},
|
|
"end": {
|
|
"type": "string",
|
|
"description": "ISO 8601 end of the range."
|
|
}
|
|
},
|
|
"required": ["type", "start", "end"],
|
|
"additionalProperties": {}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["relative"]
|
|
},
|
|
"unit": {
|
|
"type": "string",
|
|
"enum": ["minute", "hour", "day", "week", "month", "year"]
|
|
},
|
|
"amount": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": true,
|
|
"maximum": 9007199254740991,
|
|
"minimum": 0
|
|
}
|
|
},
|
|
"required": ["type", "unit", "amount"],
|
|
"additionalProperties": {}
|
|
}
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"view": {
|
|
"type": "string",
|
|
"enum": ["table", "chart"]
|
|
},
|
|
"chart": {
|
|
"description": "Chart configuration, retained even while `view` is `table`.",
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["bar", "line"]
|
|
},
|
|
"x_column": {
|
|
"type": "string",
|
|
"description": "Result column used for the x axis."
|
|
},
|
|
"y_series": {
|
|
"maxItems": 3,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"column": {
|
|
"type": "string",
|
|
"description": "Result column plotted as a series."
|
|
}
|
|
},
|
|
"required": ["column"],
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"scale": {
|
|
"type": "string",
|
|
"enum": ["linear", "log"]
|
|
},
|
|
"cumulative": {
|
|
"type": "boolean"
|
|
},
|
|
"show_labels": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"x_column",
|
|
"y_series",
|
|
"scale",
|
|
"cumulative",
|
|
"show_labels"
|
|
],
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["type", "sql", "time_range"],
|
|
"additionalProperties": {}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": ["cells"]
|
|
}
|
|
},
|
|
"required": ["name", "content"]
|
|
}
|
|
},
|
|
"required": ["type", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2UpdateNotebookRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["notebook"]
|
|
},
|
|
"attributes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 255
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"maxLength": 10000
|
|
},
|
|
"favorite": {
|
|
"type": "boolean"
|
|
},
|
|
"content": {
|
|
"description": "Replaces the notebook body. A cell keeps its identity by echoing back its `id`; a cell sent without an `id` is added as a new one.",
|
|
"type": "object",
|
|
"properties": {
|
|
"cells": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["markdown"]
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["type", "text"],
|
|
"additionalProperties": {}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["database"]
|
|
},
|
|
"sql": {
|
|
"type": "string",
|
|
"description": "SQL run against the project database."
|
|
},
|
|
"row_limit": {
|
|
"default": 100,
|
|
"type": "integer",
|
|
"exclusiveMinimum": true,
|
|
"maximum": 9007199254740991,
|
|
"minimum": 0
|
|
},
|
|
"database_identifier": {
|
|
"description": "Read replica to run against. Omit to use the primary database.",
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"view": {
|
|
"type": "string",
|
|
"enum": ["table", "chart"]
|
|
},
|
|
"chart": {
|
|
"description": "Chart configuration, retained even while `view` is `table`.",
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["bar", "line"]
|
|
},
|
|
"x_column": {
|
|
"type": "string",
|
|
"description": "Result column used for the x axis."
|
|
},
|
|
"y_series": {
|
|
"maxItems": 3,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"column": {
|
|
"type": "string",
|
|
"description": "Result column plotted as a series."
|
|
}
|
|
},
|
|
"required": ["column"],
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"scale": {
|
|
"type": "string",
|
|
"enum": ["linear", "log"]
|
|
},
|
|
"cumulative": {
|
|
"type": "boolean"
|
|
},
|
|
"show_labels": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"x_column",
|
|
"y_series",
|
|
"scale",
|
|
"cumulative",
|
|
"show_labels"
|
|
],
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["type", "sql"],
|
|
"additionalProperties": {}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["log"]
|
|
},
|
|
"sql": {
|
|
"type": "string",
|
|
"description": "SQL run against the project logs."
|
|
},
|
|
"time_range": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["absolute"]
|
|
},
|
|
"start": {
|
|
"type": "string",
|
|
"description": "ISO 8601 start of the range."
|
|
},
|
|
"end": {
|
|
"type": "string",
|
|
"description": "ISO 8601 end of the range."
|
|
}
|
|
},
|
|
"required": ["type", "start", "end"],
|
|
"additionalProperties": {}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["relative"]
|
|
},
|
|
"unit": {
|
|
"type": "string",
|
|
"enum": ["minute", "hour", "day", "week", "month", "year"]
|
|
},
|
|
"amount": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": true,
|
|
"maximum": 9007199254740991,
|
|
"minimum": 0
|
|
}
|
|
},
|
|
"required": ["type", "unit", "amount"],
|
|
"additionalProperties": {}
|
|
}
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"view": {
|
|
"type": "string",
|
|
"enum": ["table", "chart"]
|
|
},
|
|
"chart": {
|
|
"description": "Chart configuration, retained even while `view` is `table`.",
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["bar", "line"]
|
|
},
|
|
"x_column": {
|
|
"type": "string",
|
|
"description": "Result column used for the x axis."
|
|
},
|
|
"y_series": {
|
|
"maxItems": 3,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"column": {
|
|
"type": "string",
|
|
"description": "Result column plotted as a series."
|
|
}
|
|
},
|
|
"required": ["column"],
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"scale": {
|
|
"type": "string",
|
|
"enum": ["linear", "log"]
|
|
},
|
|
"cumulative": {
|
|
"type": "boolean"
|
|
},
|
|
"show_labels": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"x_column",
|
|
"y_series",
|
|
"scale",
|
|
"cumulative",
|
|
"show_labels"
|
|
],
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["type", "sql", "time_range"],
|
|
"additionalProperties": {}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": ["cells"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": ["type", "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_Output": {
|
|
"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_Output": {
|
|
"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
|
|
"description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending.",
|
|
"nullable": true
|
|
},
|
|
"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."
|
|
},
|
|
"custom_dns_name": {
|
|
"type": "string",
|
|
"description": "The custom DNS name configured on the AWS VPC Lattice resource configuration."
|
|
},
|
|
"resource_access_manager_resource_config_id": {
|
|
"description": "ID of the AWS VPC Lattice resource configuration backing this PrivateLink share.",
|
|
"type": "string"
|
|
},
|
|
"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",
|
|
"custom_dns_name"
|
|
]
|
|
}
|
|
},
|
|
"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_Output": {
|
|
"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
|
|
"description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending.",
|
|
"nullable": true
|
|
},
|
|
"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."
|
|
},
|
|
"custom_dns_name": {
|
|
"type": "string",
|
|
"description": "The custom DNS name configured on the AWS VPC Lattice resource configuration."
|
|
},
|
|
"resource_access_manager_resource_config_id": {
|
|
"description": "ID of the AWS VPC Lattice resource configuration backing this PrivateLink share.",
|
|
"type": "string"
|
|
},
|
|
"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",
|
|
"custom_dns_name"
|
|
]
|
|
}
|
|
},
|
|
"required": ["type", "id", "attributes"]
|
|
}
|
|
},
|
|
"required": ["data"]
|
|
},
|
|
"V2ListComputeInstancesResponse_Output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["project_compute_instance"]
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"description": "Compute instance 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"]
|
|
},
|
|
"V2ComputeInstanceResponse_Output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["project_compute_instance"]
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"description": "Compute instance 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"]
|
|
},
|
|
"V2ComputeInstanceUploadResponse_Output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["project_compute_instance_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"]
|
|
},
|
|
"V2DeployComputeInstanceRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Resource type.",
|
|
"enum": ["project_compute_instance"]
|
|
},
|
|
"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_Output": {
|
|
"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", "no-access"],
|
|
"description": "Role name to assign. Must be one of: owner, administrator, developer, read-only. Must be on a Team or Enterprise plan to use the read-only role.",
|
|
"example": "developer"
|
|
},
|
|
"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_Output": {
|
|
"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_Output": {
|
|
"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", "no-access"],
|
|
"description": "Role name to assign. Must be on an Enterprise plan to use the read-only or no-access roles. no-access grants no project visibility until project-scoped roles are assigned separately.",
|
|
"example": "developer"
|
|
},
|
|
"projects": {
|
|
"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_Output": {
|
|
"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_Output": {
|
|
"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_Output": {
|
|
"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_Output": {
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
}
|