Skip to content

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

feat: automate mgmt api spec update (#26655)

Hieud855bfb3f8cd
diff --git a/.github/workflows/docs-mgmt-api-update.yml b/.github/workflows/docs-mgmt-api-update.yml
new file mode 100644
index 00000000000..e89799644ee
--- /dev/null
+++ b/.github/workflows/docs-mgmt-api-update.yml
@@ -0,0 +1,40 @@
+name: Update Mgmt Api Docs
+
+on:
+ schedule:
+ # Run at 00:00 UTC every Monday
+ - cron: '0 0 * * 1'
+ workflow_dispatch:
+
+jobs:
+ update-docs:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ ref: master
+
+ - name: Use Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version-file: '.nvmrc'
+ cache: 'npm'
+
+ - name: Install dependencies in apps/docs/spec/parser directory
+ working-directory: apps/docs/spec/parser
+ run: npm install
+
+ - name: Change to apps/docs/spec directory and run make command
+ working-directory: apps/docs/spec
+ run: make download.api.v1 dereference.api.v1 generate.sections.api.v1 format
+
+ - name: Create pull request
+ uses: peter-evans/create-pull-request@v6
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ commit-message: 'feat: update mgmt api docs'
+ title: 'feat: update mgmt api docs'
+ body: 'This PR updates mgmt api docs automatically.'
+ branch: 'gha/auto-update-mgmt-api-docs'
+ base: 'master'
diff --git a/apps/docs/components/reference/MgmtApiOperationSection.tsx b/apps/docs/components/reference/MgmtApiOperationSection.tsx
index bb813e7ebd7..7fd16a21fbc 100644
--- a/apps/docs/components/reference/MgmtApiOperationSection.tsx
+++ b/apps/docs/components/reference/MgmtApiOperationSection.tsx
@@ -8,7 +8,7 @@ import ApiSchema from '~/components/ApiSchema'
const MgmtApiOperationSection = (props) => {
const operation = props.spec.operations.find((x: any) => x.operationId === props.funcData.id)
- const bodyContentTypes = Object.keys(operation.requestBody?.content ?? {})
+ const bodyContentTypes = Object.keys(operation?.requestBody?.content ?? {})
const [selectedContentType, setSelectedContentType] = useState(bodyContentTypes[0] || undefined)
const hasBodyArray =
diff --git a/apps/docs/lib/refGenerator/helpers.ts b/apps/docs/lib/refGenerator/helpers.ts
index d7c6ec52147..6a30f0ad918 100644
--- a/apps/docs/lib/refGenerator/helpers.ts
+++ b/apps/docs/lib/refGenerator/helpers.ts
@@ -227,7 +227,11 @@ export type enrichedOperation = OpenAPIV3.OperationObject & {
tags?: []
}
-export function gen_v3(spec: OpenAPIV3.Document, dest: string, { apiUrl }: { apiUrl: string }) {
+export function gen_v3(
+ spec: OpenAPIV3.Document,
+ dest: string,
+ { apiUrl, type }: { apiUrl: string; type?: 'client-lib' | 'cli' | 'api' | 'mgmt-api' }
+) {
const specLayout = spec.tags || []
const operations: enrichedOperation[] = []
@@ -236,12 +240,15 @@ export function gen_v3(spec: OpenAPIV3.Document, dest: string, { apiUrl }: { api
toArrayWithKey(val!, 'operation').forEach((o) => {
const operation = o as v3OperationWithPath
+ const operationId =
+ type === 'mgmt-api' && isValidSlug(operation.operationId)
+ ? operation.operationId
+ : slugify(operation.summary!)
const enriched = {
...operation,
path: key,
fullPath,
- operationId: slugify(operation.summary!),
-
+ operationId,
responseList: toArrayWithKey(operation.responses!, 'responseCode') || [],
}
// @ts-expect-error // missing 'responses', see OpenAPIV3.OperationObject.responses
@@ -279,6 +286,11 @@ const slugify = (text: string) => {
.replace(/-+$/, '') // Trim - from end of text
}
+function isValidSlug(slug: string): boolean {
+ const slugRegex = /^[a-z0-9]+(?:-[a-z0-9]+)*$/
+ return slugRegex.test(slug)
+}
+
// Uppercase the first letter of a string
const toTitle = (text: string) => {
return text.charAt(0).toUpperCase() + text.slice(1)
diff --git a/apps/docs/pages/reference/api/[...slug].tsx b/apps/docs/pages/reference/api/[...slug].tsx
index 88f5ed3c51d..5bf710a5713 100644
--- a/apps/docs/pages/reference/api/[...slug].tsx
+++ b/apps/docs/pages/reference/api/[...slug].tsx
@@ -6,10 +6,10 @@ import handleRefStaticProps from '~/lib/mdx/handleRefStaticProps'
import { gen_v3 } from '~/lib/refGenerator/helpers'
import apiCommonSections from '~/spec/common-api-sections.json' assert { type: 'json' }
-import specFile from '~/spec/transforms/api_v0_openapi_deparsed.json' assert { type: 'json' }
+import specFile from '~/spec/transforms/api_v1_openapi_deparsed.json' assert { type: 'json' }
// @ts-ignore
-const generatedSpec = gen_v3(specFile, 'wat', { apiUrl: 'apiv0' })
+const generatedSpec = gen_v3(specFile, 'wat', { apiUrl: 'apiv0', type: 'mgmt-api' })
const sections = flattenSections(apiCommonSections)
const libraryPath = '/api'
diff --git a/apps/docs/scripts/search/sources/index.ts b/apps/docs/scripts/search/sources/index.ts
index 2c93c69ba6a..99bf19a3fd3 100644
--- a/apps/docs/scripts/search/sources/index.ts
+++ b/apps/docs/scripts/search/sources/index.ts
@@ -33,7 +33,7 @@ export async function fetchSources() {
'api',
'/reference/api',
{ title: 'Management API Reference' },
- 'spec/transforms/api_v0_openapi_deparsed.json',
+ 'spec/transforms/api_v1_openapi_deparsed.json',
'spec/common-api-sections.json'
).load()
diff --git a/apps/docs/spec/Makefile b/apps/docs/spec/Makefile
index e8ed5644ae6..f86c12e289f 100644
--- a/apps/docs/spec/Makefile
+++ b/apps/docs/spec/Makefile
@@ -1,6 +1,6 @@
REPO_DIR=$(shell pwd)
-run: download transform format
+run: download transform generate format
###############################################################################
@@ -19,7 +19,7 @@ init:
download: download.api.v1 download.storage.v1 download.tsdoc.v2
download.api.v1:
- curl -sS https://api.supabase.com/api/v1-json > $(REPO_DIR)/api_v0_openapi.json
+ curl -sS https://api.supabase.com/api/v1-json > $(REPO_DIR)/api_v1_openapi.json
# This flow needs to be updated, so we'l comment out for the moment
@@ -57,10 +57,10 @@ download.analytics.v0:
###############################################################################
# Transform docs into working files
###############################################################################
-transform: dereference.api.v0 dereference.auth.v1 dereference.storage.v0 dereference.tsdoc.v2 combine.tsdoc.v2
+transform: dereference.api.v1 dereference.auth.v1 dereference.storage.v0 dereference.tsdoc.v2 combine.tsdoc.v2
-dereference.api.v0:
- npx @redocly/cli bundle --dereferenced -o $(REPO_DIR)/transforms/api_v0_openapi_deparsed.json $(REPO_DIR)/api_v0_openapi.json
+dereference.api.v1:
+ npx @redocly/cli bundle --dereferenced -o $(REPO_DIR)/transforms/api_v1_openapi_deparsed.json $(REPO_DIR)/api_v1_openapi.json
dereference.auth.v1:
npx @redocly/cli bundle --dereferenced -o $(REPO_DIR)/transforms/auth_v1_openapi_deparsed.json $(REPO_DIR)/auth_v1_openapi.json
@@ -119,6 +119,14 @@ combine-raw.tsdoc.v2:
$(REPO_DIR)/enrichments/tsdoc_v2/functions.json \
> $(REPO_DIR)/enrichments/tsdoc_v2/combined_raw.json
+###############################################################################
+# Generate sections from OpenAPI 3.0
+###############################################################################
+generate: generate.sections.api.v1
+
+generate.sections.api.v1:
+ node $(REPO_DIR)/sections/generateMgmtApiSections.ts $(REPO_DIR)/transforms/api_v1_openapi_deparsed.json $(REPO_DIR)/common-api-sections.json
+
###############################################################################
# Validate OpenAPI 3.0
###############################################################################
diff --git a/apps/docs/spec/api_v0_openapi.json b/apps/docs/spec/api_v0_openapi.json
deleted file mode 100644
index 8b1c818a140..00000000000
--- a/apps/docs/spec/api_v0_openapi.json
+++ /dev/null
@@ -1 +0,0 @@
-{"openapi":"3.0.0","paths":{"/v1/branches/{branch_id}":{"get":{"operationId":"getBranchDetails","summary":"Get database branch config","description":"Fetches configurations of the specified database branch","parameters":[{"name":"branch_id","required":true,"in":"path","description":"Branch ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchDetailResponse"}}}},"500":{"description":"Failed to retrieve database branch"}},"tags":["database branches (beta)"],"security":[{"bearer":[]}]},"patch":{"operationId":"updateBranch","summary":"Update database branch config","description":"Updates the configuration of the specified database branch","parameters":[{"name":"branch_id","required":true,"in":"path","description":"Branch ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBranchBody"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchResponse"}}}},"500":{"description":"Failed to update database branch"}},"tags":["database branches (beta)"],"security":[{"bearer":[]}]},"delete":{"operationId":"deleteBranch","summary":"Delete a database branch","description":"Deletes the specified database branch","parameters":[{"name":"branch_id","required":true,"in":"path","description":"Branch ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchDeleteResponse"}}}},"500":{"description":"Failed to delete database branch"}},"tags":["database branches (beta)"],"security":[{"bearer":[]}]}},"/v1/branches/{branch_id}/reset":{"post":{"operationId":"resetBranch","summary":"Resets a database branch","description":"Resets the specified database branch","parameters":[{"name":"branch_id","required":true,"in":"path","description":"Branch ID","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchResetResponse"}}}},"500":{"description":"Failed to reset database branch"}},"tags":["database branches (beta)"],"security":[{"bearer":[]}]}},"/v1/projects":{"get":{"operationId":"getProjects","summary":"List all projects","description":"Returns a list of all projects you've previously created.","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/V1ProjectResponse"}}}}}},"tags":["projects"],"security":[{"bearer":[]}]},"post":{"operationId":"createProject","summary":"Create a project","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CreateProjectBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ProjectResponse"}}}}},"tags":["projects"],"security":[{"bearer":[]}]}},"/v1/organizations":{"get":{"operationId":"getOrganizations","summary":"List all organizations","description":"Returns a list of organizations that you currently belong to.","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationResponseV1"}}}}},"500":{"description":"Unexpected error listing organizations"}},"tags":["organizations"],"security":[{"bearer":[]}]},"post":{"operationId":"createOrganization","summary":"Create an organization","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationBodyV1"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseV1"}}}},"500":{"description":"Unexpected error creating an organization"}},"tags":["organizations"],"security":[{"bearer":[]}]}},"/v1/oauth/authorize":{"get":{"operationId":"authorize","summary":"Authorize user through oauth","parameters":[{"name":"client_id","required":true,"in":"query","schema":{"type":"string"}},{"name":"response_type","required":true,"in":"query","schema":{"enum":["code","token","id_token token"],"type":"string"}},{"name":"redirect_uri","required":true,"in":"query","schema":{"type":"string"}},{"name":"scope","required":false,"in":"query","schema":{"type":"string"}},{"name":"state","required":false,"in":"query","schema":{"type":"string"}},{"name":"response_mode","required":false,"in":"query","schema":{"type":"string"}},{"name":"code_challenge","required":false,"in":"query","schema":{"type":"string"}},{"name":"code_challenge_method","required":false,"in":"query","schema":{"enum":["plain","sha256","S256"],"type":"string"}}],"responses":{"303":{"description":""}},"tags":["oauth (beta)"],"security":[{"oauth2":["read"]}]}},"/v1/oauth/token":{"post":{"operationId":"token","summary":"Exchange auth code for user's access and refresh token","parameters":[],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/OAuthTokenBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokenResponse"}}}}},"tags":["oauth (beta)"],"security":[{"oauth2":["write"]}]}},"/v1/snippets":{"get":{"operationId":"listSnippets","summary":"Lists SQL snippets for the logged in user","parameters":[{"name":"project_ref","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnippetList"}}}},"500":{"description":"Failed to list user's SQL snippets"}},"tags":["snippets"],"security":[{"bearer":[]}]}},"/v1/snippets/{id}":{"get":{"operationId":"getSnippet","summary":"Gets a specific SQL snippet","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnippetResponse"}}}},"500":{"description":"Failed to retrieve SQL snippet"}},"tags":["snippets"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/api-keys":{"get":{"operationId":"getProjectApiKeys","summary":"Get project api keys","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyResponse"}}}}},"403":{"description":""}},"tags":["projects"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/branches":{"get":{"operationId":"getBranches","summary":"List all database branches","description":"Returns all database branches of the specified project.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BranchResponse"}}}}},"500":{"description":"Failed to retrieve database branches"}},"tags":["database branches (beta)"],"security":[{"bearer":[]}]},"post":{"operationId":"createBranch","summary":"Create a database branch","description":"Creates a database branch from the specified project.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBranchBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchResponse"}}}},"500":{"description":"Failed to create database branch"}},"tags":["database branches (beta)"],"security":[{"bearer":[]}]},"delete":{"operationId":"disableBranch","summary":"Disables preview branching","description":"Disables preview branching for the specified project","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":""},"500":{"description":"Failed to disable preview branching"}},"tags":["database branches (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/custom-hostname":{"get":{"operationId":"getCustomHostnameConfig","summary":"Gets project's custom hostname config","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomHostnameResponse"}}}},"403":{"description":""},"500":{"description":"Failed to retrieve project's custom hostname config"}},"tags":["custom hostname (beta)"],"security":[{"bearer":[]}]},"delete":{"operationId":"removeCustomHostnameConfig","summary":"Deletes a project's custom hostname configuration","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":""},"500":{"description":"Failed to delete project custom hostname configuration"}},"tags":["custom hostname (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/custom-hostname/initialize":{"post":{"operationId":"createCustomHostnameConfig","summary":"Updates project's custom hostname configuration","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomHostnameBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomHostnameResponse"}}}},"403":{"description":""},"500":{"description":"Failed to update project custom hostname configuration"}},"tags":["custom hostname (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/custom-hostname/reverify":{"post":{"operationId":"reverify","summary":"Attempts to verify the DNS configuration for project's custom hostname configuration","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomHostnameResponse"}}}},"403":{"description":""},"500":{"description":"Failed to verify project custom hostname configuration"}},"tags":["custom hostname (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/custom-hostname/activate":{"post":{"operationId":"activate","summary":"Activates a custom hostname for a project.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomHostnameResponse"}}}},"403":{"description":""},"500":{"description":"Failed to activate project custom hostname configuration"}},"tags":["custom hostname (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/network-bans/retrieve":{"post":{"operationId":"getNetworkBans","summary":"Gets project's network bans","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkBanResponse"}}}},"403":{"description":""},"500":{"description":"Failed to retrieve project's network bans"}},"tags":["network bans (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/network-bans":{"delete":{"operationId":"removeNetworkBan","summary":"Remove network bans.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveNetworkBanRequest"}}}},"responses":{"200":{"description":""},"403":{"description":""},"500":{"description":"Failed to remove network bans."}},"tags":["network bans (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/network-restrictions":{"get":{"operationId":"getNetworkRestrictions","summary":"Gets project's network restrictions","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkRestrictionsResponse"}}}},"403":{"description":""},"500":{"description":"Failed to retrieve project's network restrictions"}},"tags":["network restrictions (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/network-restrictions/apply":{"post":{"operationId":"applyNetworkRestrictions","summary":"Updates project's network restrictions","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkRestrictionsRequest"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkRestrictionsResponse"}}}},"403":{"description":""},"500":{"description":"Failed to update project network restrictions"}},"tags":["network restrictions (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/pgsodium":{"get":{"operationId":"getPgsodiumConfig","summary":"Gets project's pgsodium config","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PgsodiumConfigResponse"}}}},"403":{"description":""},"500":{"description":"Failed to retrieve project's pgsodium config"}},"tags":["pgsodium (beta)"],"security":[{"bearer":[]}]},"put":{"operationId":"updatePgsodiumConfig","summary":"Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePgsodiumConfigBody"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PgsodiumConfigResponse"}}}},"403":{"description":""},"500":{"description":"Failed to update project's pgsodium config"}},"tags":["pgsodium (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/postgrest":{"get":{"operationId":"getPostgRESTConfig","summary":"Gets project's postgrest config","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostgrestConfigWithJWTSecretResponse"}}}},"403":{"description":""},"500":{"description":"Failed to retrieve project's postgrest config"}},"tags":["services"],"security":[{"bearer":[]}]},"patch":{"operationId":"updatePostgRESTConfig","summary":"Updates project's postgrest config","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePostgrestConfigBody"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PostgrestConfigResponse"}}}},"403":{"description":""},"500":{"description":"Failed to update project's postgrest config"}},"tags":["services"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}":{"delete":{"operationId":"deleteProject","summary":"Deletes the given project","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ProjectRefResponse"}}}},"403":{"description":""}},"tags":["projects"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/secrets":{"get":{"operationId":"getSecrets","summary":"List all secrets","description":"Returns all secrets you've previously added to the specified project.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SecretResponse"}}}}},"403":{"description":""},"500":{"description":"Failed to retrieve project's secrets"}},"tags":["secrets"],"security":[{"bearer":[]}]},"post":{"operationId":"createSecrets","summary":"Bulk create secrets","description":"Creates multiple secrets and adds them to the specified project.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreateSecretBody"}}}}},"responses":{"201":{"description":""},"403":{"description":""},"500":{"description":"Failed to create project's secrets"}},"tags":["secrets"],"security":[{"bearer":[]}]},"delete":{"operationId":"deleteSecrets","summary":"Bulk delete secrets","description":"Deletes all secrets with the given names from the specified project","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":""},"500":{"description":"Failed to delete secrets with given names"}},"tags":["secrets"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/ssl-enforcement":{"get":{"operationId":"getSslEnforcementConfig","summary":"Get project's SSL enforcement configuration.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SslEnforcementResponse"}}}},"403":{"description":""},"500":{"description":"Failed to retrieve project's SSL enforcement config"}},"tags":["ssl enforcement (beta)"],"security":[{"bearer":[]}]},"put":{"operationId":"updateSslEnforcementConfig","summary":"Update project's SSL enforcement configuration.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SslEnforcementRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SslEnforcementResponse"}}}},"403":{"description":""},"500":{"description":"Failed to update project's SSL enforcement configuration."}},"tags":["ssl enforcement (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/types/typescript":{"get":{"operationId":"getTypescriptTypes","summary":"Generate TypeScript types","description":"Returns the TypeScript types of your schema for use with supabase-js.","parameters":[{"name":"included_schemas","required":false,"in":"query","schema":{"default":"public","type":"string"}},{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypescriptResponse"}}}},"403":{"description":""},"500":{"description":"Failed to generate TypeScript types"}},"tags":["projects"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/vanity-subdomain":{"get":{"operationId":"getVanitySubdomainConfig","summary":"Gets current vanity subdomain config","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VanitySubdomainConfigResponse"}}}},"403":{"description":""},"500":{"description":"Failed to get project vanity subdomain configuration"}},"tags":["vanity subdomain (beta)"],"security":[{"bearer":[]}]},"delete":{"operationId":"removeVanitySubdomainConfig","summary":"Deletes a project's vanity subdomain configuration","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":""},"500":{"description":"Failed to delete project vanity subdomain configuration"}},"tags":["vanity subdomain (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/vanity-subdomain/check-availability":{"post":{"operationId":"checkVanitySubdomainAvailability","summary":"Checks vanity subdomain availability","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VanitySubdomainBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubdomainAvailabilityResponse"}}}},"403":{"description":""},"500":{"description":"Failed to check project vanity subdomain configuration"}},"tags":["vanity subdomain (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/vanity-subdomain/activate":{"post":{"operationId":"activateVanitySubdomainPlease","summary":"Activates a vanity subdomain for a project.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VanitySubdomainBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateVanitySubdomainResponse"}}}},"403":{"description":""},"500":{"description":"Failed to activate project vanity subdomain configuration"}},"tags":["vanity subdomain (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/upgrade":{"post":{"operationId":"upgradeProject","summary":"Upgrades the project's Postgres version","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeDatabaseBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpgradeInitiateResponse"}}}},"403":{"description":""},"500":{"description":"Failed to initiate project upgrade"}},"tags":["database version upgrade (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/upgrade/eligibility":{"get":{"operationId":"upgradeEligibilityInformation","summary":"Returns the project's eligibility for upgrades","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpgradeEligibilityResponse"}}}},"403":{"description":""},"500":{"description":"Failed to determine project upgrade eligibility"}},"tags":["database version upgrade (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/upgrade/status":{"get":{"operationId":"getUpgradeStatus","summary":"Gets the latest status of the project's upgrade","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseUpgradeStatusResponse"}}}},"403":{"description":""},"500":{"description":"Failed to retrieve project upgrade status"}},"tags":["database version upgrade (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/readonly":{"get":{"operationId":"getReadOnlyModeStatus","summary":"Returns project's readonly mode status","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadOnlyStatusResponse"}}}},"500":{"description":"Failed to get project readonly mode status"}},"tags":["database readonly mode"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/readonly/temporary-disable":{"post":{"operationId":"temporarilyDisableReadonlyMode","summary":"Disables project's readonly mode for the next 15 minutes","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"201":{"description":""},"500":{"description":"Failed to disable project's readonly mode"}},"tags":["database readonly mode"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/read-replicas/setup":{"post":{"operationId":"setUpReadReplica","summary":"Set up a read replica","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetUpReadReplicaBody"}}}},"responses":{"201":{"description":""},"500":{"description":"Failed to set up read replica"}},"tags":["read replicas (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/read-replicas/remove":{"post":{"operationId":"removeReadReplica","summary":"Remove a read replica","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveReadReplicaBody"}}}},"responses":{"201":{"description":""},"500":{"description":"Failed to remove read replica"}},"tags":["read replicas (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/health":{"get":{"operationId":"checkServiceHealth","summary":"Gets project's service health status","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}},{"name":"timeout_ms","required":false,"in":"query","schema":{"minimum":0,"maximum":10000,"type":"integer"}},{"name":"services","required":true,"in":"query","schema":{"type":"array","items":{"type":"string","enum":["auth","db","pooler","realtime","rest","storage"]}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/V1ServiceHealthResponse"}}}}},"500":{"description":"Failed to retrieve project's service health status"}},"tags":["services"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/config/database/postgres":{"get":{"operationId":"getConfig","summary":"Gets project's Postgres config","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostgresConfigResponse"}}}},"500":{"description":"Failed to retrieve project's Postgres config"}},"tags":["projects config"],"security":[{"bearer":[]}]},"put":{"operationId":"updateConfig","summary":"Updates project's Postgres config","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePostgresConfigBody"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostgresConfigResponse"}}}},"500":{"description":"Failed to update project's Postgres config"}},"tags":["projects config"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/config/database/pgbouncer":{"get":{"operationId":"v1GetPgbouncerConfig","summary":"Get project's pgbouncer config","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PgbouncerConfigResponse"}}}},"500":{"description":"Failed to retrieve project's pgbouncer config"}},"tags":["projects config"]}},"/v1/projects/{ref}/config/auth":{"get":{"operationId":"getV1AuthConfig","summary":"Gets project's auth config","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthConfigResponse"}}}},"403":{"description":""},"500":{"description":"Failed to retrieve project's auth config"}},"tags":["projects config"],"security":[{"bearer":[]}]},"patch":{"operationId":"updateV1AuthConfig","summary":"Updates a project's auth config","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAuthConfigBody"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthConfigResponse"}}}},"403":{"description":""},"500":{"description":"Failed to update project's auth config"}},"tags":["projects config"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/config/auth/third-party-auth":{"post":{"operationId":"createTPAForProject","summary":"Creates a new third-party auth integration","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateThirdPartyAuthBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThirdPartyAuth"}}}},"403":{"description":""}},"tags":["third-party-auth (alpha)"],"security":[{"bearer":[]}]},"get":{"operationId":"listTPAForProject","summary":"Lists all third-party auth integrations","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ThirdPartyAuth"}}}}},"403":{"description":""}},"tags":["third-party-auth (alpha)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}":{"delete":{"operationId":"deleteTPAForProject","summary":"Removes a third-party auth integration","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}},{"name":"tpa_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThirdPartyAuth"}}}},"403":{"description":""}},"tags":["third-party-auth (alpha)"],"security":[{"bearer":[]}]},"get":{"operationId":"getTPAForProject","summary":"Get a third-party integration","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}},{"name":"tpa_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThirdPartyAuth"}}}},"403":{"description":""}},"tags":["third-party-auth (alpha)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/database/query":{"post":{"operationId":"v1RunQuery","summary":"Run sql query","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1RunQueryBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":""},"500":{"description":"Failed to run sql query"}},"tags":["projects (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/database/webhooks/enable":{"post":{"operationId":"v1EnableDatabaseWebhooks","summary":"Enables Database Webhooks on the project","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"201":{"description":""},"403":{"description":""},"500":{"description":"Failed to enable Database Webhooks on the project"}},"tags":["projects (beta)"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/functions":{"post":{"operationId":"createFunction","summary":"Create a function","description":"Creates a function and adds it to the specified project.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}},{"name":"slug","required":false,"in":"query","schema":{"pattern":"/^[A-Za-z0-9_-]+$/","type":"string"}},{"name":"name","required":false,"in":"query","schema":{"type":"string"}},{"name":"verify_jwt","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"import_map","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"entrypoint_path","required":false,"in":"query","schema":{"type":"string"}},{"name":"import_map_path","required":false,"in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CreateFunctionBody"}},"application/vnd.denoland.eszip":{"schema":{"$ref":"#/components/schemas/V1CreateFunctionBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionResponse"}}}},"403":{"description":""},"500":{"description":"Failed to create project's function"}},"tags":["functions"],"security":[{"bearer":[]}]},"get":{"operationId":"getFunctions","summary":"List all functions","description":"Returns all functions you've previously added to the specified project.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FunctionResponse"}}}}},"403":{"description":""},"500":{"description":"Failed to retrieve project's functions"}},"tags":["functions"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/functions/{function_slug}":{"get":{"operationId":"getFunction","summary":"Retrieve a function","description":"Retrieves a function with the specified slug and project.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}},{"name":"function_slug","required":true,"in":"path","description":"Function slug","schema":{"pattern":"/^[A-Za-z0-9_-]+$/","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionSlugResponse"}}}},"403":{"description":""},"500":{"description":"Failed to retrieve function with given slug"}},"tags":["functions"],"security":[{"bearer":[]}]},"patch":{"operationId":"updateFunction","summary":"Update a function","description":"Updates a function with the specified slug and project.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}},{"name":"function_slug","required":true,"in":"path","description":"Function slug","schema":{"pattern":"/^[A-Za-z0-9_-]+$/","type":"string"}},{"name":"slug","required":false,"in":"query","schema":{"pattern":"/^[A-Za-z0-9_-]+$/","type":"string"}},{"name":"name","required":false,"in":"query","schema":{"type":"string"}},{"name":"verify_jwt","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"import_map","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"entrypoint_path","required":false,"in":"query","schema":{"type":"string"}},{"name":"import_map_path","required":false,"in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1UpdateFunctionBody"}},"application/vnd.denoland.eszip":{"schema":{"$ref":"#/components/schemas/V1UpdateFunctionBody"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionResponse"}}}},"403":{"description":""},"500":{"description":"Failed to update function with given slug"}},"tags":["functions"],"security":[{"bearer":[]}]},"delete":{"operationId":"deleteFunction","summary":"Delete a function","description":"Deletes a function with the specified slug from the specified project.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}},{"name":"function_slug","required":true,"in":"path","description":"Function slug","schema":{"pattern":"/^[A-Za-z0-9_-]+$/","type":"string"}}],"responses":{"200":{"description":""},"403":{"description":""},"500":{"description":"Failed to delete function with given slug"}},"tags":["functions"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/functions/{function_slug}/body":{"get":{"operationId":"getFunctionBody","summary":"Retrieve a function body","description":"Retrieves a function body for the specified slug and project.","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}},{"name":"function_slug","required":true,"in":"path","description":"Function slug","schema":{"pattern":"/^[A-Za-z0-9_-]+$/","type":"string"}}],"responses":{"200":{"description":""},"403":{"description":""},"500":{"description":"Failed to retrieve function body with given slug"}},"tags":["functions"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/storage/buckets":{"get":{"operationId":"getBuckets","summary":"Lists all buckets","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/V1StorageBucketResponse"}}}}},"403":{"description":""},"500":{"description":"Failed to get list of buckets"}},"tags":["storage"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/config/auth/sso/providers":{"post":{"operationId":"createProviderForProject","summary":"Creates a new SSO provider","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProviderBody"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProviderResponse"}}}},"403":{"description":""},"404":{"description":"SAML 2.0 support is not enabled for this project"}},"tags":["sso"],"security":[{"bearer":[]}]},"get":{"operationId":"listAllProviders","summary":"Lists all SSO providers","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProvidersResponse"}}}},"403":{"description":""},"404":{"description":"SAML 2.0 support is not enabled for this project"}},"tags":["sso"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/config/auth/sso/providers/{provider_id}":{"get":{"operationId":"getProviderById","summary":"Gets a SSO provider by its UUID","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}},{"name":"provider_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProviderResponse"}}}},"403":{"description":""},"404":{"description":"Either SAML 2.0 was not enabled for this project, or the provider does not exist"}},"tags":["sso"],"security":[{"bearer":[]}]},"put":{"operationId":"updateProviderById","summary":"Updates a SSO provider by its UUID","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}},{"name":"provider_id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProviderBody"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProviderResponse"}}}},"403":{"description":""},"404":{"description":"Either SAML 2.0 was not enabled for this project, or the provider does not exist"}},"tags":["sso"],"security":[{"bearer":[]}]},"delete":{"operationId":"removeProviderById","summary":"Removes a SSO provider by its UUID","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}},{"name":"provider_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteProviderResponse"}}}},"403":{"description":""},"404":{"description":"Either SAML 2.0 was not enabled for this project, or the provider does not exist"}},"tags":["sso"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/database/backups":{"get":{"operationId":"getBackups","summary":"Lists all backups","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1BackupsResponse"}}}},"500":{"description":"Failed to get backups"}},"tags":["backups"],"security":[{"bearer":[]}]}},"/v1/projects/{ref}/database/backups/restore-pitr":{"post":{"operationId":"v1RestorePitr","summary":"Restores a PITR backup for a database","parameters":[{"name":"ref","required":true,"in":"path","description":"Project ref","schema":{"minLength":20,"maxLength":20,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1RestorePitrBody"}}}},"responses":{"201":{"description":""}},"tags":["backups"],"security":[{"bearer":[]}]}},"/v1/organizations/{slug}/members":{"get":{"operationId":"v1ListOrganizationMembers","summary":"List members of an organization","parameters":[{"name":"slug","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/V1OrganizationMemberResponse"}}}}}},"tags":["organizations"],"security":[{"bearer":[]}]}},"/v1/organizations/{slug}":{"get":{"operationId":"getOrganization","summary":"Gets information about the organization","parameters":[{"name":"slug","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1OrganizationSlugResponse"}}}}},"tags":["organizations"],"security":[{"bearer":[]}]}}},"info":{"title":"Supabase API (v1)","description":"","version":"1.0.0","contact":{}},"tags":[{"name":"organizations","description":"Organization endpoints"},{"name":"projects","description":"Project endpoints"}],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"BranchDetailResponse":{"type":"object","properties":{"db_port":{"type":"integer"},"ref":{"type":"string"},"postgres_version":{"type":"string"},"status":{"enum":["ACTIVE_HEALTHY","ACTIVE_UNHEALTHY","COMING_UP","GOING_DOWN","INACTIVE","INIT_FAILED","REMOVED","RESTORING","UNKNOWN","UPGRADING","PAUSING"],"type":"string"},"db_host":{"type":"string"},"db_user":{"type":"string"},"db_pass":{"type":"string"},"jwt_secret":{"type":"string"}},"required":["db_port","ref","postgres_version","status","db_host"]},"UpdateBranchBody":{"type":"object","properties":{"branch_name":{"type":"string"},"git_branch":{"type":"string"},"reset_on_push":{"type":"boolean"},"persistent":{"type":"boolean"}}},"BranchResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"project_ref":{"type":"string"},"parent_project_ref":{"type":"string"},"is_default":{"type":"boolean"},"git_branch":{"type":"string"},"pr_number":{"type":"number"},"reset_on_push":{"type":"boolean"},"persistent":{"type":"boolean"},"status":{"enum":["CREATING_PROJECT","RUNNING_MIGRATIONS","MIGRATIONS_PASSED","MIGRATIONS_FAILED","FUNCTIONS_DEPLOYED","FUNCTIONS_FAILED"],"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","project_ref","parent_project_ref","is_default","reset_on_push","persistent","status","created_at","updated_at"]},"BranchDeleteResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"BranchResetResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"V1DatabaseResponse":{"type":"object","properties":{"host":{"type":"string","description":"Database host"},"version":{"type":"string","description":"Database version"}},"required":["host","version"]},"V1ProjectResponse":{"type":"object","properties":{"id":{"type":"string","description":"Id of your project"},"organization_id":{"type":"string","description":"Slug of your organization"},"name":{"type":"string","description":"Name of your project"},"region":{"type":"string","description":"Region of your project","example":"us-east-1"},"created_at":{"type":"string","description":"Creation timestamp","example":"2023-03-29T16:32:59Z"},"database":{"$ref":"#/components/schemas/V1DatabaseResponse"},"status":{"enum":["ACTIVE_HEALTHY","ACTIVE_UNHEALTHY","COMING_UP","GOING_DOWN","INACTIVE","INIT_FAILED","REMOVED","RESTORING","UNKNOWN","UPGRADING","PAUSING"],"type":"string"}},"required":["id","organization_id","name","region","created_at","status"]},"DesiredInstanceSize":{"type":"string","enum":["micro","small","medium","large","xlarge","2xlarge","4xlarge","8xlarge","12xlarge","16xlarge"]},"V1CreateProjectBody":{"type":"object","properties":{"db_pass":{"type":"string","description":"Database password"},"name":{"type":"string","description":"Name of your project, should not contain dots"},"organization_id":{"type":"string","description":"Slug of your organization"},"plan":{"type":"string","enum":["free","pro"],"description":"Subscription plan is now set on organization level and is ignored in this request","example":"free","deprecated":true},"region":{"type":"string","enum":["us-east-1","us-west-1","us-west-2","ap-east-1","ap-southeast-1","ap-northeast-1","ap-northeast-2","ap-southeast-2","eu-west-1","eu-west-2","eu-west-3","eu-central-1","ca-central-1","ap-south-1","sa-east-1"],"description":"Region you want your server to reside in","example":"us-east-1"},"kps_enabled":{"type":"boolean","deprecated":true},"desired_instance_size":{"$ref":"#/components/schemas/DesiredInstanceSize"},"template_url":{"type":"string","description":"Template URL used to create the project from the CLI.","example":"https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone"}},"required":["db_pass","name","organization_id","region"]},"OrganizationResponseV1":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"CreateOrganizationBodyV1":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"OAuthTokenBody":{"type":"object","properties":{"grant_type":{"enum":["authorization_code","refresh_token"],"type":"string"},"client_id":{"type":"string"},"client_secret":{"type":"string"},"code":{"type":"string"},"code_verifier":{"type":"string"},"redirect_uri":{"type":"string"},"refresh_token":{"type":"string"}},"required":["grant_type","client_id","client_secret"]},"OAuthTokenResponse":{"type":"object","properties":{"token_type":{"type":"string","enum":["Bearer"]},"access_token":{"type":"string"},"refresh_token":{"type":"string"},"expires_in":{"type":"number"}},"required":["token_type","access_token","refresh_token","expires_in"]},"SnippetProject":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"]},"SnippetUser":{"type":"object","properties":{"id":{"type":"number"},"username":{"type":"string"}},"required":["id","username"]},"SnippetMeta":{"type":"object","properties":{"id":{"type":"string"},"inserted_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string","enum":["sql"]},"visibility":{"type":"string","enum":["user","project","org","public"]},"name":{"type":"string"},"description":{"type":"string"},"project":{"$ref":"#/components/schemas/SnippetProject"},"owner":{"$ref":"#/components/schemas/SnippetUser"},"updated_by":{"$ref":"#/components/schemas/SnippetUser"}},"required":["id","inserted_at","updated_at","type","visibility","name","project","owner","updated_by"]},"SnippetList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SnippetMeta"}}},"required":["data"]},"SnippetContent":{"type":"object","properties":{"favorite":{"type":"boolean"},"schema_version":{"type":"string"},"sql":{"type":"string"}},"required":["favorite","schema_version","sql"]},"SnippetResponse":{"type":"object","properties":{"id":{"type":"string"},"inserted_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string","enum":["sql"]},"visibility":{"enum":["user","project","org","public"],"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"project":{"$ref":"#/components/schemas/SnippetProject"},"owner":{"$ref":"#/components/schemas/SnippetUser"},"updated_by":{"$ref":"#/components/schemas/SnippetUser"},"content":{"$ref":"#/components/schemas/SnippetContent"}},"required":["id","inserted_at","updated_at","type","visibility","name","project","owner","updated_by","content"]},"ApiKeyResponse":{"type":"object","properties":{"name":{"type":"string"},"api_key":{"type":"string"}},"required":["name","api_key"]},"CreateBranchBody":{"type":"object","properties":{"branch_name":{"type":"string"},"git_branch":{"type":"string"},"region":{"type":"string"}},"required":["branch_name"]},"UpdateCustomHostnameResponse":{"type":"object","properties":{"status":{"enum":["1_not_started","2_initiated","3_challenge_verified","4_origin_setup_completed","5_services_reconfigured"],"type":"string"},"custom_hostname":{"type":"string"},"data":{"type":"object"}},"required":["status","custom_hostname","data"]},"UpdateCustomHostnameBody":{"type":"object","properties":{"custom_hostname":{"type":"string"}},"required":["custom_hostname"]},"NetworkBanResponse":{"type":"object","properties":{"banned_ipv4_addresses":{"type":"array","items":{"type":"string"}}},"required":["banned_ipv4_addresses"]},"RemoveNetworkBanRequest":{"type":"object","properties":{"ipv4_addresses":{"type":"array","items":{"type":"string"}}},"required":["ipv4_addresses"]},"NetworkRestrictionsRequest":{"type":"object","properties":{"dbAllowedCidrs":{"type":"array","items":{"type":"string"}},"dbAllowedCidrsV6":{"type":"array","items":{"type":"string"}}}},"NetworkRestrictionsResponse":{"type":"object","properties":{"entitlement":{"enum":["disallowed","allowed"],"type":"string"},"config":{"$ref":"#/components/schemas/NetworkRestrictionsRequest"},"old_config":{"$ref":"#/components/schemas/NetworkRestrictionsRequest"},"status":{"enum":["stored","applied"],"type":"string"}},"required":["entitlement","config","status"]},"PgsodiumConfigResponse":{"type":"object","properties":{"root_key":{"type":"string"}},"required":["root_key"]},"UpdatePgsodiumConfigBody":{"type":"object","properties":{"root_key":{"type":"string"}},"required":["root_key"]},"PostgrestConfigWithJWTSecretResponse":{"type":"object","properties":{"max_rows":{"type":"integer"},"db_pool":{"type":"integer","nullable":true,"description":"If `null`, the value is automatically configured based on compute size."},"db_schema":{"type":"string"},"db_extra_search_path":{"type":"string"},"jwt_secret":{"type":"string"}},"required":["max_rows","db_pool","db_schema","db_extra_search_path"]},"UpdatePostgrestConfigBody":{"type":"object","properties":{"max_rows":{"type":"integer","minimum":0,"maximum":1000000},"db_pool":{"type":"integer","minimum":0,"maximum":1000},"db_extra_search_path":{"type":"string"},"db_schema":{"type":"string"}}},"V1PostgrestConfigResponse":{"type":"object","properties":{"max_rows":{"type":"integer"},"db_pool":{"type":"integer","nullable":true,"description":"If `null`, the value is automatically configured based on compute size."},"db_schema":{"type":"string"},"db_extra_search_path":{"type":"string"}},"required":["max_rows","db_pool","db_schema","db_extra_search_path"]},"V1ProjectRefResponse":{"type":"object","properties":{"id":{"type":"number"},"ref":{"type":"string"},"name":{"type":"string"}},"required":["id","ref","name"]},"SecretResponse":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]},"CreateSecretBody":{"type":"object","properties":{"name":{"type":"string","maxLength":256,"pattern":"/^(?!SUPABASE_).*/","description":"Secret name must not start with the SUPABASE_ prefix.","example":"string"},"value":{"type":"string","maxLength":24576}},"required":["name","value"]},"SslEnforcements":{"type":"object","properties":{"database":{"type":"boolean"}},"required":["database"]},"SslEnforcementResponse":{"type":"object","properties":{"currentConfig":{"$ref":"#/components/schemas/SslEnforcements"},"appliedSuccessfully":{"type":"boolean"}},"required":["currentConfig","appliedSuccessfully"]},"SslEnforcementRequest":{"type":"object","properties":{"requestedConfig":{"$ref":"#/components/schemas/SslEnforcements"}},"required":["requestedConfig"]},"TypescriptResponse":{"type":"object","properties":{"types":{"type":"string"}},"required":["types"]},"VanitySubdomainConfigResponse":{"type":"object","properties":{"status":{"enum":["not-used","custom-domain-used","active"],"type":"string"},"custom_domain":{"type":"string"}},"required":["status"]},"VanitySubdomainBody":{"type":"object","properties":{"vanity_subdomain":{"type":"string"}},"required":["vanity_subdomain"]},"SubdomainAvailabilityResponse":{"type":"object","properties":{"available":{"type":"boolean"}},"required":["available"]},"ActivateVanitySubdomainResponse":{"type":"object","properties":{"custom_domain":{"type":"string"}},"required":["custom_domain"]},"UpgradeDatabaseBody":{"type":"object","properties":{"target_version":{"type":"number"}},"required":["target_version"]},"ProjectUpgradeInitiateResponse":{"type":"object","properties":{"tracking_id":{"type":"string"}},"required":["tracking_id"]},"ProjectVersion":{"type":"object","properties":{"postgres_version":{"type":"number"},"app_version":{"type":"string"}},"required":["postgres_version","app_version"]},"ProjectUpgradeEligibilityResponse":{"type":"object","properties":{"eligible":{"type":"boolean"},"current_app_version":{"type":"string"},"latest_app_version":{"type":"string"},"target_upgrade_versions":{"type":"array","items":{"$ref":"#/components/schemas/ProjectVersion"}},"potential_breaking_changes":{"type":"array","items":{"type":"string"}},"duration_estimate_hours":{"type":"number"},"legacy_auth_custom_roles":{"type":"array","items":{"type":"string"}},"extension_dependent_objects":{"type":"array","items":{"type":"string"}}},"required":["eligible","current_app_version","latest_app_version","target_upgrade_versions","potential_breaking_changes","duration_estimate_hours","legacy_auth_custom_roles","extension_dependent_objects"]},"DatabaseUpgradeStatus":{"type":"object","properties":{"initiated_at":{"type":"string"},"target_version":{"type":"number"},"error":{"type":"string","enum":["1_upgraded_instance_launch_failed","2_volume_detachchment_from_upgraded_instance_failed","3_volume_attachment_to_original_instance_failed","4_data_upgrade_initiation_failed","5_data_upgrade_completion_failed","6_volume_detachchment_from_original_instance_failed","7_volume_attachment_to_upgraded_instance_failed","8_upgrade_completion_failed"]},"progress":{"type":"string","enum":["0_requested","1_started","2_launched_upgraded_instance","3_detached_volume_from_upgraded_instance","4_attached_volume_to_original_instance","5_initiated_data_upgrade","6_completed_data_upgrade","7_detached_volume_from_original_instance","8_attached_volume_to_upgraded_instance","9_completed_upgrade"]},"status":{"type":"number","enum":[0,1,2]}},"required":["initiated_at","target_version","status"]},"DatabaseUpgradeStatusResponse":{"type":"object","properties":{"databaseUpgradeStatus":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/DatabaseUpgradeStatus"}]}},"required":["databaseUpgradeStatus"]},"ReadOnlyStatusResponse":{"type":"object","properties":{"enabled":{"type":"boolean"},"override_enabled":{"type":"boolean"},"override_active_until":{"type":"string"}},"required":["enabled","override_enabled","override_active_until"]},"SetUpReadReplicaBody":{"type":"object","properties":{"read_replica_region":{"type":"string","enum":["us-east-1","us-west-1","us-west-2","ap-east-1","ap-southeast-1","ap-northeast-1","ap-northeast-2","ap-southeast-2","eu-west-1","eu-west-2","eu-west-3","eu-central-1","ca-central-1","ap-south-1","sa-east-1"],"description":"Region you want your read replica to reside in","example":"us-east-1"}},"required":["read_replica_region"]},"RemoveReadReplicaBody":{"type":"object","properties":{"database_identifier":{"type":"string"}},"required":["database_identifier"]},"AuthHealthResponse":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"description":{"type":"string"}},"required":["name","version","description"]},"RealtimeHealthResponse":{"type":"object","properties":{"healthy":{"type":"boolean"},"db_connected":{"type":"boolean"},"connected_cluster":{"type":"number"}},"required":["healthy","db_connected","connected_cluster"]},"V1ServiceHealthResponse":{"type":"object","properties":{"info":{"oneOf":[{"$ref":"#/components/schemas/AuthHealthResponse"},{"$ref":"#/components/schemas/RealtimeHealthResponse"}]},"name":{"enum":["auth","db","pooler","realtime","rest","storage"],"type":"string"},"healthy":{"type":"boolean"},"status":{"enum":["COMING_UP","ACTIVE_HEALTHY","UNHEALTHY"],"type":"string"},"error":{"type":"string"}},"required":["name","healthy","status"]},"PostgresConfigResponse":{"type":"object","properties":{"statement_timeout":{"type":"string"},"effective_cache_size":{"type":"string"},"maintenance_work_mem":{"type":"string"},"max_connections":{"type":"integer","minimum":1,"maximum":262143},"max_locks_per_transaction":{"type":"integer","minimum":10,"maximum":2147483640},"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_standby_archive_delay":{"type":"string"},"max_standby_streaming_delay":{"type":"string"},"max_worker_processes":{"type":"integer","minimum":0,"maximum":262143},"shared_buffers":{"type":"string"},"work_mem":{"type":"string"},"session_replication_role":{"enum":["origin","replica","local"],"type":"string"}}},"UpdatePostgresConfigBody":{"type":"object","properties":{"statement_timeout":{"type":"string"},"effective_cache_size":{"type":"string"},"maintenance_work_mem":{"type":"string"},"max_connections":{"type":"integer","minimum":1,"maximum":262143},"max_locks_per_transaction":{"type":"integer","minimum":10,"maximum":2147483640},"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_standby_archive_delay":{"type":"string"},"max_standby_streaming_delay":{"type":"string"},"max_worker_processes":{"type":"integer","minimum":0,"maximum":262143},"shared_buffers":{"type":"string"},"work_mem":{"type":"string"},"session_replication_role":{"enum":["origin","replica","local"],"type":"string"}}},"V1PgbouncerConfigResponse":{"type":"object","properties":{"pool_mode":{"type":"string","enum":["transaction","session","statement"]},"default_pool_size":{"type":"number"},"ignore_startup_parameters":{"type":"string"},"max_client_conn":{"type":"number"},"connection_string":{"type":"string"}}},"AuthConfigResponse":{"type":"object","properties":{"api_max_request_duration":{"type":"number","nullable":true},"db_max_pool_size":{"type":"number","nullable":true},"disable_signup":{"type":"boolean","nullable":true},"external_anonymous_users_enabled":{"type":"boolean","nullable":true},"external_apple_additional_client_ids":{"type":"string","nullable":true},"external_apple_client_id":{"type":"string","nullable":true},"external_apple_enabled":{"type":"boolean","nullable":true},"external_apple_secret":{"type":"string","nullable":true},"external_azure_client_id":{"type":"string","nullable":true},"external_azure_enabled":{"type":"boolean","nullable":true},"external_azure_secret":{"type":"string","nullable":true},"external_azure_url":{"type":"string","nullable":true},"external_bitbucket_client_id":{"type":"string","nullable":true},"external_bitbucket_enabled":{"type":"boolean","nullable":true},"external_bitbucket_secret":{"type":"string","nullable":true},"external_discord_client_id":{"type":"string","nullable":true},"external_discord_enabled":{"type":"boolean","nullable":true},"external_discord_secret":{"type":"string","nullable":true},"external_email_enabled":{"type":"boolean","nullable":true},"external_facebook_client_id":{"type":"string","nullable":true},"external_facebook_enabled":{"type":"boolean","nullable":true},"external_facebook_secret":{"type":"string","nullable":true},"external_figma_client_id":{"type":"string","nullable":true},"external_figma_enabled":{"type":"boolean","nullable":true},"external_figma_secret":{"type":"string","nullable":true},"external_github_client_id":{"type":"string","nullable":true},"external_github_enabled":{"type":"boolean","nullable":true},"external_github_secret":{"type":"string","nullable":true},"external_gitlab_client_id":{"type":"string","nullable":true},"external_gitlab_enabled":{"type":"boolean","nullable":true},"external_gitlab_secret":{"type":"string","nullable":true},"external_gitlab_url":{"type":"string","nullable":true},"external_google_additional_client_ids":{"type":"string","nullable":true},"external_google_client_id":{"type":"string","nullable":true},"external_google_enabled":{"type":"boolean","nullable":true},"external_google_secret":{"type":"string","nullable":true},"external_google_skip_nonce_check":{"type":"boolean","nullable":true},"external_kakao_client_id":{"type":"string","nullable":true},"external_kakao_enabled":{"type":"boolean","nullable":true},"external_kakao_secret":{"type":"string","nullable":true},"external_keycloak_client_id":{"type":"string","nullable":true},"external_keycloak_enabled":{"type":"boolean","nullable":true},"external_keycloak_secret":{"type":"string","nullable":true},"external_keycloak_url":{"type":"string","nullable":true},"external_linkedin_oidc_client_id":{"type":"string","nullable":true},"external_linkedin_oidc_enabled":{"type":"boolean","nullable":true},"external_linkedin_oidc_secret":{"type":"string","nullable":true},"external_notion_client_id":{"type":"string","nullable":true},"external_notion_enabled":{"type":"boolean","nullable":true},"external_notion_secret":{"type":"string","nullable":true},"external_phone_enabled":{"type":"boolean","nullable":true},"external_slack_client_id":{"type":"string","nullable":true},"external_slack_enabled":{"type":"boolean","nullable":true},"external_slack_secret":{"type":"string","nullable":true},"external_spotify_client_id":{"type":"string","nullable":true},"external_spotify_enabled":{"type":"boolean","nullable":true},"external_spotify_secret":{"type":"string","nullable":true},"external_twitch_client_id":{"type":"string","nullable":true},"external_twitch_enabled":{"type":"boolean","nullable":true},"external_twitch_secret":{"type":"string","nullable":true},"external_twitter_client_id":{"type":"string","nullable":true},"external_twitter_enabled":{"type":"boolean","nullable":true},"external_twitter_secret":{"type":"string","nullable":true},"external_workos_client_id":{"type":"string","nullable":true},"external_workos_enabled":{"type":"boolean","nullable":true},"external_workos_secret":{"type":"string","nullable":true},"external_workos_url":{"type":"string","nullable":true},"external_zoom_client_id":{"type":"string","nullable":true},"external_zoom_enabled":{"type":"boolean","nullable":true},"external_zoom_secret":{"type":"string","nullable":true},"hook_custom_access_token_enabled":{"type":"boolean","nullable":true},"hook_custom_access_token_uri":{"type":"string","nullable":true},"hook_custom_access_token_secrets":{"type":"string","nullable":true},"hook_mfa_verification_attempt_enabled":{"type":"boolean","nullable":true},"hook_mfa_verification_attempt_uri":{"type":"string","nullable":true},"hook_mfa_verification_attempt_secrets":{"type":"string","nullable":true},"hook_password_verification_attempt_enabled":{"type":"boolean","nullable":true},"hook_password_verification_attempt_uri":{"type":"string","nullable":true},"hook_password_verification_attempt_secrets":{"type":"string","nullable":true},"hook_send_sms_enabled":{"type":"boolean","nullable":true},"hook_send_sms_uri":{"type":"string","nullable":true},"hook_send_sms_secrets":{"type":"string","nullable":true},"hook_send_email_enabled":{"type":"boolean","nullable":true},"hook_send_email_uri":{"type":"string","nullable":true},"hook_send_email_secrets":{"type":"string","nullable":true},"jwt_exp":{"type":"number","nullable":true},"mailer_allow_unverified_email_sign_ins":{"type":"boolean","nullable":true},"mailer_autoconfirm":{"type":"boolean","nullable":true},"mailer_otp_exp":{"type":"number","nullable":true},"mailer_otp_length":{"type":"number","nullable":true},"mailer_secure_email_change_enabled":{"type":"boolean","nullable":true},"mailer_subjects_confirmation":{"type":"string","nullable":true},"mailer_subjects_email_change":{"type":"string","nullable":true},"mailer_subjects_invite":{"type":"string","nullable":true},"mailer_subjects_magic_link":{"type":"string","nullable":true},"mailer_subjects_reauthentication":{"type":"string","nullable":true},"mailer_subjects_recovery":{"type":"string","nullable":true},"mailer_templates_confirmation_content":{"type":"string","nullable":true},"mailer_templates_email_change_content":{"type":"string","nullable":true},"mailer_templates_invite_content":{"type":"string","nullable":true},"mailer_templates_magic_link_content":{"type":"string","nullable":true},"mailer_templates_reauthentication_content":{"type":"string","nullable":true},"mailer_templates_recovery_content":{"type":"string","nullable":true},"mfa_max_enrolled_factors":{"type":"number","nullable":true},"password_hibp_enabled":{"type":"boolean","nullable":true},"password_min_length":{"type":"number","nullable":true},"password_required_characters":{"type":"string","nullable":true},"rate_limit_anonymous_users":{"type":"number","nullable":true},"rate_limit_email_sent":{"type":"number","nullable":true},"rate_limit_sms_sent":{"type":"number","nullable":true},"rate_limit_token_refresh":{"type":"number","nullable":true},"rate_limit_verify":{"type":"number","nullable":true},"refresh_token_rotation_enabled":{"type":"boolean","nullable":true},"saml_enabled":{"type":"boolean","nullable":true},"security_captcha_enabled":{"type":"boolean","nullable":true},"security_captcha_provider":{"type":"string","nullable":true},"security_captcha_secret":{"type":"string","nullable":true},"security_manual_linking_enabled":{"type":"boolean","nullable":true},"security_refresh_token_reuse_interval":{"type":"number","nullable":true},"security_update_password_require_reauthentication":{"type":"boolean","nullable":true},"sessions_inactivity_timeout":{"type":"number","nullable":true},"sessions_single_per_user":{"type":"boolean","nullable":true},"sessions_tags":{"type":"string","nullable":true},"sessions_timebox":{"type":"number","nullable":true},"site_url":{"type":"string","nullable":true},"sms_autoconfirm":{"type":"boolean","nullable":true},"sms_max_frequency":{"type":"number","nullable":true},"sms_messagebird_access_key":{"type":"string","nullable":true},"sms_messagebird_originator":{"type":"string","nullable":true},"sms_otp_exp":{"type":"number","nullable":true},"sms_otp_length":{"type":"number","nullable":true},"sms_provider":{"type":"string","nullable":true},"sms_template":{"type":"string","nullable":true},"sms_test_otp":{"type":"string","nullable":true},"sms_test_otp_valid_until":{"type":"string","nullable":true},"sms_textlocal_api_key":{"type":"string","nullable":true},"sms_textlocal_sender":{"type":"string","nullable":true},"sms_twilio_account_sid":{"type":"string","nullable":true},"sms_twilio_auth_token":{"type":"string","nullable":true},"sms_twilio_content_sid":{"type":"string","nullable":true},"sms_twilio_message_service_sid":{"type":"string","nullable":true},"sms_twilio_verify_account_sid":{"type":"string","nullable":true},"sms_twilio_verify_auth_token":{"type":"string","nullable":true},"sms_twilio_verify_message_service_sid":{"type":"string","nullable":true},"sms_vonage_api_key":{"type":"string","nullable":true},"sms_vonage_api_secret":{"type":"string","nullable":true},"sms_vonage_from":{"type":"string","nullable":true},"smtp_admin_email":{"type":"string","nullable":true},"smtp_host":{"type":"string","nullable":true},"smtp_max_frequency":{"type":"number","nullable":true},"smtp_pass":{"type":"string","nullable":true},"smtp_port":{"type":"string","nullable":true},"smtp_sender_name":{"type":"string","nullable":true},"smtp_user":{"type":"string","nullable":true},"uri_allow_list":{"type":"string","nullable":true}},"required":["api_max_request_duration","db_max_pool_size","disable_signup","external_anonymous_users_enabled","external_apple_additional_client_ids","external_apple_client_id","external_apple_enabled","external_apple_secret","external_azure_client_id","external_azure_enabled","external_azure_secret","external_azure_url","external_bitbucket_client_id","external_bitbucket_enabled","external_bitbucket_secret","external_discord_client_id","external_discord_enabled","external_discord_secret","external_email_enabled","external_facebook_client_id","external_facebook_enabled","external_facebook_secret","external_figma_client_id","external_figma_enabled","external_figma_secret","external_github_client_id","external_github_enabled","external_github_secret","external_gitlab_client_id","external_gitlab_enabled","external_gitlab_secret","external_gitlab_url","external_google_additional_client_ids","external_google_client_id","external_google_enabled","external_google_secret","external_google_skip_nonce_check","external_kakao_client_id","external_kakao_enabled","external_kakao_secret","external_keycloak_client_id","external_keycloak_enabled","external_keycloak_secret","external_keycloak_url","external_linkedin_oidc_client_id","external_linkedin_oidc_enabled","external_linkedin_oidc_secret","external_notion_client_id","external_notion_enabled","external_notion_secret","external_phone_enabled","external_slack_client_id","external_slack_enabled","external_slack_secret","external_spotify_client_id","external_spotify_enabled","external_spotify_secret","external_twitch_client_id","external_twitch_enabled","external_twitch_secret","external_twitter_client_id","external_twitter_enabled","external_twitter_secret","external_workos_client_id","external_workos_enabled","external_workos_secret","external_workos_url","external_zoom_client_id","external_zoom_enabled","external_zoom_secret","hook_custom_access_token_enabled","hook_custom_access_token_uri","hook_custom_access_token_secrets","hook_mfa_verification_attempt_enabled","hook_mfa_verification_attempt_uri","hook_mfa_verification_attempt_secrets","hook_password_verification_attempt_enabled","hook_password_verification_attempt_uri","hook_password_verification_attempt_secrets","hook_send_sms_enabled","hook_send_sms_uri","hook_send_sms_secrets","hook_send_email_enabled","hook_send_email_uri","hook_send_email_secrets","jwt_exp","mailer_allow_unverified_email_sign_ins","mailer_autoconfirm","mailer_otp_exp","mailer_otp_length","mailer_secure_email_change_enabled","mailer_subjects_confirmation","mailer_subjects_email_change","mailer_subjects_invite","mailer_subjects_magic_link","mailer_subjects_reauthentication","mailer_subjects_recovery","mailer_templates_confirmation_content","mailer_templates_email_change_content","mailer_templates_invite_content","mailer_templates_magic_link_content","mailer_templates_reauthentication_content","mailer_templates_recovery_content","mfa_max_enrolled_factors","password_hibp_enabled","password_min_length","password_required_characters","rate_limit_anonymous_users","rate_limit_email_sent","rate_limit_sms_sent","rate_limit_token_refresh","rate_limit_verify","refresh_token_rotation_enabled","saml_enabled","security_captcha_enabled","security_captcha_provider","security_captcha_secret","security_manual_linking_enabled","security_refresh_token_reuse_interval","security_update_password_require_reauthentication","sessions_inactivity_timeout","sessions_single_per_user","sessions_tags","sessions_timebox","site_url","sms_autoconfirm","sms_max_frequency","sms_messagebird_access_key","sms_messagebird_originator","sms_otp_exp","sms_otp_length","sms_provider","sms_template","sms_test_otp","sms_test_otp_valid_until","sms_textlocal_api_key","sms_textlocal_sender","sms_twilio_account_sid","sms_twilio_auth_token","sms_twilio_content_sid","sms_twilio_message_service_sid","sms_twilio_verify_account_sid","sms_twilio_verify_auth_token","sms_twilio_verify_message_service_sid","sms_vonage_api_key","sms_vonage_api_secret","sms_vonage_from","smtp_admin_email","smtp_host","smtp_max_frequency","smtp_pass","smtp_port","smtp_sender_name","smtp_user","uri_allow_list"]},"UpdateAuthConfigBody":{"type":"object","properties":{"site_url":{"type":"string","pattern":"/^[^,]+$/"},"disable_signup":{"type":"boolean"},"jwt_exp":{"type":"number","minimum":0,"maximum":604800},"smtp_admin_email":{"type":"string"},"smtp_host":{"type":"string"},"smtp_port":{"type":"string"},"smtp_user":{"type":"string"},"smtp_pass":{"type":"string"},"smtp_max_frequency":{"type":"number","minimum":0,"maximum":32767},"smtp_sender_name":{"type":"string"},"mailer_allow_unverified_email_sign_ins":{"type":"boolean"},"mailer_autoconfirm":{"type":"boolean"},"mailer_subjects_invite":{"type":"string"},"mailer_subjects_confirmation":{"type":"string"},"mailer_subjects_recovery":{"type":"string"},"mailer_subjects_email_change":{"type":"string"},"mailer_subjects_magic_link":{"type":"string"},"mailer_subjects_reauthentication":{"type":"string"},"mailer_templates_invite_content":{"type":"string"},"mailer_templates_confirmation_content":{"type":"string"},"mailer_templates_recovery_content":{"type":"string"},"mailer_templates_email_change_content":{"type":"string"},"mailer_templates_magic_link_content":{"type":"string"},"mailer_templates_reauthentication_content":{"type":"string"},"mfa_max_enrolled_factors":{"type":"number","minimum":0,"maximum":2147483647},"uri_allow_list":{"type":"string"},"external_anonymous_users_enabled":{"type":"boolean"},"external_email_enabled":{"type":"boolean"},"external_phone_enabled":{"type":"boolean"},"saml_enabled":{"type":"boolean"},"security_captcha_enabled":{"type":"boolean"},"security_captcha_provider":{"type":"string"},"security_captcha_secret":{"type":"string"},"sessions_timebox":{"type":"number","minimum":0},"sessions_inactivity_timeout":{"type":"number","minimum":0},"sessions_single_per_user":{"type":"boolean"},"sessions_tags":{"type":"string","pattern":"/^\\s*([a-z0-9_-]+(\\s*,+\\s*)?)*\\s*$/i"},"rate_limit_anonymous_users":{"type":"number","minimum":1,"maximum":2147483647},"rate_limit_email_sent":{"type":"number","minimum":1,"maximum":2147483647},"rate_limit_sms_sent":{"type":"number","minimum":1,"maximum":2147483647},"rate_limit_verify":{"type":"number","minimum":1,"maximum":2147483647},"rate_limit_token_refresh":{"type":"number","minimum":1,"maximum":2147483647},"mailer_secure_email_change_enabled":{"type":"boolean"},"refresh_token_rotation_enabled":{"type":"boolean"},"password_hibp_enabled":{"type":"boolean"},"password_min_length":{"type":"number","minimum":6,"maximum":32767},"password_required_characters":{"type":"string","enum":["abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789","abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789","abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~",""]},"security_manual_linking_enabled":{"type":"boolean"},"security_update_password_require_reauthentication":{"type":"boolean"},"security_refresh_token_reuse_interval":{"type":"number","minimum":0,"maximum":2147483647},"mailer_otp_exp":{"type":"number","minimum":0,"maximum":2147483647},"mailer_otp_length":{"type":"number","minimum":6,"maximum":10},"sms_autoconfirm":{"type":"boolean"},"sms_max_frequency":{"type":"number","minimum":0,"maximum":32767},"sms_otp_exp":{"type":"number","minimum":0,"maximum":2147483647},"sms_otp_length":{"type":"number","minimum":0,"maximum":32767},"sms_provider":{"type":"string"},"sms_messagebird_access_key":{"type":"string"},"sms_messagebird_originator":{"type":"string"},"sms_test_otp":{"type":"string","pattern":"/^([0-9]{1,15}=[0-9]+,?)*$/"},"sms_test_otp_valid_until":{"type":"string"},"sms_textlocal_api_key":{"type":"string"},"sms_textlocal_sender":{"type":"string"},"sms_twilio_account_sid":{"type":"string"},"sms_twilio_auth_token":{"type":"string"},"sms_twilio_content_sid":{"type":"string"},"sms_twilio_message_service_sid":{"type":"string"},"sms_twilio_verify_account_sid":{"type":"string"},"sms_twilio_verify_auth_token":{"type":"string"},"sms_twilio_verify_message_service_sid":{"type":"string"},"sms_vonage_api_key":{"type":"string"},"sms_vonage_api_secret":{"type":"string"},"sms_vonage_from":{"type":"string"},"sms_template":{"type":"string"},"hook_mfa_verification_attempt_enabled":{"type":"boolean"},"hook_mfa_verification_attempt_uri":{"type":"string"},"hook_mfa_verification_attempt_secrets":{"type":"string"},"hook_password_verification_attempt_enabled":{"type":"boolean"},"hook_password_verification_attempt_uri":{"type":"string"},"hook_password_verification_attempt_secrets":{"type":"string"},"hook_custom_access_token_enabled":{"type":"boolean"},"hook_custom_access_token_uri":{"type":"string"},"hook_custom_access_token_secrets":{"type":"string"},"hook_send_sms_enabled":{"type":"boolean"},"hook_send_sms_uri":{"type":"string"},"hook_send_sms_secrets":{"type":"string"},"hook_send_email_enabled":{"type":"boolean"},"hook_send_email_uri":{"type":"string"},"hook_send_email_secrets":{"type":"string"},"external_apple_enabled":{"type":"boolean"},"external_apple_client_id":{"type":"string"},"external_apple_secret":{"type":"string"},"external_apple_additional_client_ids":{"type":"string"},"external_azure_enabled":{"type":"boolean"},"external_azure_client_id":{"type":"string"},"external_azure_secret":{"type":"string"},"external_azure_url":{"type":"string"},"external_bitbucket_enabled":{"type":"boolean"},"external_bitbucket_client_id":{"type":"string"},"external_bitbucket_secret":{"type":"string"},"external_discord_enabled":{"type":"boolean"},"external_discord_client_id":{"type":"string"},"external_discord_secret":{"type":"string"},"external_facebook_enabled":{"type":"boolean"},"external_facebook_client_id":{"type":"string"},"external_facebook_secret":{"type":"string"},"external_figma_enabled":{"type":"boolean"},"external_figma_client_id":{"type":"string"},"external_figma_secret":{"type":"string"},"external_github_enabled":{"type":"boolean"},"external_github_client_id":{"type":"string"},"external_github_secret":{"type":"string"},"external_gitlab_enabled":{"type":"boolean"},"external_gitlab_client_id":{"type":"string"},"external_gitlab_secret":{"type":"string"},"external_gitlab_url":{"type":"string"},"external_google_enabled":{"type":"boolean"},"external_google_client_id":{"type":"string"},"external_google_secret":{"type":"string"},"external_google_additional_client_ids":{"type":"string"},"external_google_skip_nonce_check":{"type":"boolean"},"external_kakao_enabled":{"type":"boolean"},"external_kakao_client_id":{"type":"string"},"external_kakao_secret":{"type":"string"},"external_keycloak_enabled":{"type":"boolean"},"external_keycloak_client_id":{"type":"string"},"external_keycloak_secret":{"type":"string"},"external_keycloak_url":{"type":"string"},"external_linkedin_oidc_enabled":{"type":"boolean"},"external_linkedin_oidc_client_id":{"type":"string"},"external_linkedin_oidc_secret":{"type":"string"},"external_notion_enabled":{"type":"boolean"},"external_notion_client_id":{"type":"string"},"external_notion_secret":{"type":"string"},"external_slack_enabled":{"type":"boolean"},"external_slack_client_id":{"type":"string"},"external_slack_secret":{"type":"string"},"external_spotify_enabled":{"type":"boolean"},"external_spotify_client_id":{"type":"string"},"external_spotify_secret":{"type":"string"},"external_twitch_enabled":{"type":"boolean"},"external_twitch_client_id":{"type":"string"},"external_twitch_secret":{"type":"string"},"external_twitter_enabled":{"type":"boolean"},"external_twitter_client_id":{"type":"string"},"external_twitter_secret":{"type":"string"},"external_workos_enabled":{"type":"boolean"},"external_workos_client_id":{"type":"string"},"external_workos_secret":{"type":"string"},"external_workos_url":{"type":"string"},"external_zoom_enabled":{"type":"boolean"},"external_zoom_client_id":{"type":"string"},"external_zoom_secret":{"type":"string"},"db_max_pool_size":{"type":"number"},"api_max_request_duration":{"type":"number"}}},"CreateThirdPartyAuthBody":{"type":"object","properties":{"oidc_issuer_url":{"type":"string"},"jwks_url":{"type":"string"},"custom_jwks":{"type":"object"}}},"ThirdPartyAuth":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"oidc_issuer_url":{"type":"string","nullable":true},"jwks_url":{"type":"string","nullable":true},"custom_jwks":{"type":"object","nullable":true},"resolved_jwks":{"type":"object","nullable":true},"inserted_at":{"type":"string"},"updated_at":{"type":"string"},"resolved_at":{"type":"string","nullable":true}},"required":["id","type","inserted_at","updated_at"]},"V1RunQueryBody":{"type":"object","properties":{"query":{"type":"string"}},"required":["query"]},"V1CreateFunctionBody":{"type":"object","properties":{"slug":{"type":"string","pattern":"/^[A-Za-z0-9_-]+$/"},"name":{"type":"string"},"body":{"type":"string"},"verify_jwt":{"type":"boolean"}},"required":["slug","name","body"]},"FunctionResponse":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"status":{"enum":["ACTIVE","REMOVED","THROTTLED"],"type":"string"},"version":{"type":"number"},"created_at":{"type":"number"},"updated_at":{"type":"number"},"verify_jwt":{"type":"boolean"},"import_map":{"type":"boolean"},"entrypoint_path":{"type":"string"},"import_map_path":{"type":"string"}},"required":["id","slug","name","status","version","created_at","updated_at"]},"FunctionSlugResponse":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"status":{"enum":["ACTIVE","REMOVED","THROTTLED"],"type":"string"},"version":{"type":"number"},"created_at":{"type":"number"},"updated_at":{"type":"number"},"verify_jwt":{"type":"boolean"},"import_map":{"type":"boolean"},"entrypoint_path":{"type":"string"},"import_map_path":{"type":"string"}},"required":["id","slug","name","status","version","created_at","updated_at"]},"V1UpdateFunctionBody":{"type":"object","properties":{"name":{"type":"string"},"body":{"type":"string"},"verify_jwt":{"type":"boolean"}}},"V1StorageBucketResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"owner":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"public":{"type":"boolean"}},"required":["id","name","owner","created_at","updated_at","public"]},"AttributeValue":{"type":"object","properties":{"default":{"oneOf":[{"type":"object"},{"type":"number"},{"type":"string"},{"type":"boolean"}]},"name":{"type":"string"},"names":{"type":"array","items":{"type":"string"}}}},"AttributeMapping":{"type":"object","properties":{"keys":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeValue"}}},"required":["keys"]},"CreateProviderBody":{"type":"object","properties":{"type":{"type":"string","enum":["saml"],"description":"What type of provider will be created"},"metadata_xml":{"type":"string"},"metadata_url":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}},"attribute_mapping":{"$ref":"#/components/schemas/AttributeMapping"}},"required":["type"]},"SamlDescriptor":{"type":"object","properties":{"id":{"type":"string"},"entity_id":{"type":"string"},"metadata_url":{"type":"string"},"metadata_xml":{"type":"string"},"attribute_mapping":{"$ref":"#/components/schemas/AttributeMapping"}},"required":["id","entity_id"]},"Domain":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id"]},"CreateProviderResponse":{"type":"object","properties":{"id":{"type":"string"},"saml":{"$ref":"#/components/schemas/SamlDescriptor"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id"]},"Provider":{"type":"object","properties":{"id":{"type":"string"},"saml":{"$ref":"#/components/schemas/SamlDescriptor"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id"]},"ListProvidersResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Provider"}}},"required":["items"]},"GetProviderResponse":{"type":"object","properties":{"id":{"type":"string"},"saml":{"$ref":"#/components/schemas/SamlDescriptor"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id"]},"UpdateProviderBody":{"type":"object","properties":{"metadata_xml":{"type":"string"},"metadata_url":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}},"attribute_mapping":{"$ref":"#/components/schemas/AttributeMapping"}}},"UpdateProviderResponse":{"type":"object","properties":{"id":{"type":"string"},"saml":{"$ref":"#/components/schemas/SamlDescriptor"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id"]},"DeleteProviderResponse":{"type":"object","properties":{"id":{"type":"string"},"saml":{"$ref":"#/components/schemas/SamlDescriptor"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id"]},"V1Backup":{"type":"object","properties":{"status":{"type":"string","enum":["COMPLETED","FAILED","PENDING","REMOVED","ARCHIVED"]},"is_physical_backup":{"type":"boolean"},"inserted_at":{"type":"string"}},"required":["status","is_physical_backup","inserted_at"]},"V1PhysicalBackup":{"type":"object","properties":{"earliest_physical_backup_date_unix":{"type":"number"},"latest_physical_backup_date_unix":{"type":"number"}}},"V1BackupsResponse":{"type":"object","properties":{"region":{"type":"string"},"walg_enabled":{"type":"boolean"},"pitr_enabled":{"type":"boolean"},"backups":{"type":"array","items":{"$ref":"#/components/schemas/V1Backup"}},"physical_backup_data":{"$ref":"#/components/schemas/V1PhysicalBackup"}},"required":["region","walg_enabled","pitr_enabled","backups","physical_backup_data"]},"V1RestorePitrBody":{"type":"object","properties":{"recovery_time_target_unix":{"type":"number"}},"required":["recovery_time_target_unix"]},"V1OrganizationMemberResponse":{"type":"object","properties":{"user_id":{"type":"string"},"user_name":{"type":"string"},"email":{"type":"string"},"role_name":{"type":"string"},"mfa_enabled":{"type":"boolean"}},"required":["user_id","user_name","role_name","mfa_enabled"]},"BillingPlanId":{"type":"string","enum":["free","pro","team","enterprise"]},"V1OrganizationSlugResponse":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/BillingPlanId"},"opt_in_tags":{"type":"array","items":{"type":"string","enum":["AI_SQL_GENERATOR_OPT_IN"]}},"id":{"type":"string"},"name":{"type":"string"}},"required":["opt_in_tags","id","name"]}}}}
\ No newline at end of file
diff --git a/apps/docs/spec/api_v1_openapi.json b/apps/docs/spec/api_v1_openapi.json
new file mode 100644
index 00000000000..3851477d618
--- /dev/null
+++ b/apps/docs/spec/api_v1_openapi.json
@@ -0,0 +1,6802 @@
+{
+ "openapi": "3.0.0",
+ "paths": {
+ "/v1/branches/{branch_id}": {
+ "get": {
+ "operationId": "v1-get-a-branch-config",
+ "summary": "Get database branch config",
+ "description": "Fetches configurations of the specified database branch",
+ "parameters": [
+ {
+ "name": "branch_id",
+ "required": true,
+ "in": "path",
+ "description": "Branch ID",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BranchDetailResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to retrieve database branch"
+ }
+ },
+ "tags": [
+ "environments"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "patch": {
+ "operationId": "v1-update-a-branch-config",
+ "summary": "Update database branch config",
+ "description": "Updates the configuration of the specified database branch",
+ "parameters": [
+ {
+ "name": "branch_id",
+ "required": true,
+ "in": "path",
+ "description": "Branch ID",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateBranchBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BranchResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to update database branch"
+ }
+ },
+ "tags": [
+ "environments"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "delete": {
+ "operationId": "v1-delete-a-branch",
+ "summary": "Delete a database branch",
+ "description": "Deletes the specified database branch",
+ "parameters": [
+ {
+ "name": "branch_id",
+ "required": true,
+ "in": "path",
+ "description": "Branch ID",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BranchDeleteResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to delete database branch"
+ }
+ },
+ "tags": [
+ "environments"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/branches/{branch_id}/reset": {
+ "post": {
+ "operationId": "v1-reset-a-branch",
+ "summary": "Resets a database branch",
+ "description": "Resets the specified database branch",
+ "parameters": [
+ {
+ "name": "branch_id",
+ "required": true,
+ "in": "path",
+ "description": "Branch ID",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BranchResetResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to reset database branch"
+ }
+ },
+ "tags": [
+ "environments"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects": {
+ "get": {
+ "operationId": "v1-get-all-projects",
+ "summary": "List all projects",
+ "description": "Returns a list of all projects you've previously created.",
+ "parameters": [],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/V1ProjectResponse"
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "projects"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "post": {
+ "operationId": "v1-create-a-project",
+ "summary": "Create a project",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V1CreateProjectBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V1ProjectResponse"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "projects"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/organizations": {
+ "get": {
+ "operationId": "v1-list-all-organizations",
+ "summary": "List all organizations",
+ "description": "Returns a list of organizations that you currently belong to.",
+ "parameters": [],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/OrganizationResponseV1"
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Unexpected error listing organizations"
+ }
+ },
+ "tags": [
+ "organizations"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "post": {
+ "operationId": "v1-create-an-organization",
+ "summary": "Create an organization",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateOrganizationBodyV1"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OrganizationResponseV1"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Unexpected error creating an organization"
+ }
+ },
+ "tags": [
+ "organizations"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/oauth/authorize": {
+ "get": {
+ "operationId": "v1-authorize-user",
+ "summary": "[Beta] Authorize user through oauth",
+ "parameters": [
+ {
+ "name": "client_id",
+ "required": true,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "response_type",
+ "required": true,
+ "in": "query",
+ "schema": {
+ "enum": [
+ "code",
+ "token",
+ "id_token token"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "name": "redirect_uri",
+ "required": true,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "scope",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "state",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "response_mode",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "code_challenge",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "code_challenge_method",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "enum": [
+ "plain",
+ "sha256",
+ "S256"
+ ],
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "303": {
+ "description": ""
+ }
+ },
+ "tags": [
+ "oauth"
+ ],
+ "security": [
+ {
+ "oauth2": [
+ "read"
+ ]
+ }
+ ]
+ }
+ },
+ "/v1/oauth/token": {
+ "post": {
+ "operationId": "v1-exchange-oauth-token",
+ "summary": "[Beta] Exchange auth code for user's access and refresh token",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/x-www-form-urlencoded": {
+ "schema": {
+ "$ref": "#/components/schemas/OAuthTokenBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OAuthTokenResponse"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "oauth"
+ ],
+ "security": [
+ {
+ "oauth2": [
+ "write"
+ ]
+ }
+ ]
+ }
+ },
+ "/v1/snippets": {
+ "get": {
+ "operationId": "v1-list-all-snippets",
+ "summary": "Lists SQL snippets for the logged in user",
+ "parameters": [
+ {
+ "name": "project_ref",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SnippetList"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to list user's SQL snippets"
+ }
+ },
+ "tags": [
+ "database"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/snippets/{id}": {
+ "get": {
+ "operationId": "v1-get-a-snippet",
+ "summary": "Gets a specific SQL snippet",
+ "parameters": [
+ {
+ "name": "id",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SnippetResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to retrieve SQL snippet"
+ }
+ },
+ "tags": [
+ "database"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/api-keys": {
+ "get": {
+ "operationId": "v1-get-project-api-keys",
+ "summary": "Get project api keys",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ApiKeyResponse"
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ }
+ },
+ "tags": [
+ "secrets"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/branches": {
+ "get": {
+ "operationId": "v1-list-all-branches",
+ "summary": "List all database branches",
+ "description": "Returns all database branches of the specified project.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/BranchResponse"
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to retrieve database branches"
+ }
+ },
+ "tags": [
+ "environments"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "post": {
+ "operationId": "v1-create-a-branch",
+ "summary": "Create a database branch",
+ "description": "Creates a database branch from the specified project.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateBranchBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BranchResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to create database branch"
+ }
+ },
+ "tags": [
+ "environments"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "delete": {
+ "operationId": "v1-disable-preview-branching",
+ "summary": "Disables preview branching",
+ "description": "Disables preview branching for the specified project",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to disable preview branching"
+ }
+ },
+ "tags": [
+ "environments"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/custom-hostname": {
+ "get": {
+ "operationId": "v1-get-hostname-config",
+ "summary": "[Beta] Gets project's custom hostname config",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateCustomHostnameResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to retrieve project's custom hostname config"
+ }
+ },
+ "tags": [
+ "domains"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "delete": {
+ "operationId": "v1-Delete hostname config",
+ "summary": "[Beta] Deletes a project's custom hostname configuration",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to delete project custom hostname configuration"
+ }
+ },
+ "tags": [
+ "domains"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/custom-hostname/initialize": {
+ "post": {
+ "operationId": "v1-update-hostname-config",
+ "summary": "[Beta] Updates project's custom hostname configuration",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateCustomHostnameBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateCustomHostnameResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to update project custom hostname configuration"
+ }
+ },
+ "tags": [
+ "domains"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/custom-hostname/reverify": {
+ "post": {
+ "operationId": "v1-verify-dns-config",
+ "summary": "[Beta] Attempts to verify the DNS configuration for project's custom hostname configuration",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateCustomHostnameResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to verify project custom hostname configuration"
+ }
+ },
+ "tags": [
+ "domains"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/custom-hostname/activate": {
+ "post": {
+ "operationId": "v1-activate-custom-hostname",
+ "summary": "[Beta] Activates a custom hostname for a project.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateCustomHostnameResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to activate project custom hostname configuration"
+ }
+ },
+ "tags": [
+ "domains"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/network-bans/retrieve": {
+ "post": {
+ "operationId": "v1-list-all-network-bans",
+ "summary": "[Beta] Gets project's network bans",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NetworkBanResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to retrieve project's network bans"
+ }
+ },
+ "tags": [
+ "projects"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/network-bans": {
+ "delete": {
+ "operationId": "v1-delete-network-bans",
+ "summary": "[Beta] Remove network bans.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RemoveNetworkBanRequest"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": ""
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to remove network bans."
+ }
+ },
+ "tags": [
+ "projects"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/network-restrictions": {
+ "get": {
+ "operationId": "v1-get-network-restrictions",
+ "summary": "[Beta] Gets project's network restrictions",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NetworkRestrictionsResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to retrieve project's network restrictions"
+ }
+ },
+ "tags": [
+ "projects"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/network-restrictions/apply": {
+ "post": {
+ "operationId": "v1-update-network-restrictions",
+ "summary": "[Beta] Updates project's network restrictions",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NetworkRestrictionsRequest"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NetworkRestrictionsResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to update project network restrictions"
+ }
+ },
+ "tags": [
+ "projects"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/pgsodium": {
+ "get": {
+ "operationId": "v1-get-pgsodium-config",
+ "summary": "[Beta] Gets project's pgsodium config",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PgsodiumConfigResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to retrieve project's pgsodium config"
+ }
+ },
+ "tags": [
+ "secrets"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "put": {
+ "operationId": "v1-update-pgsodium-config",
+ "summary": "[Beta] Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdatePgsodiumConfigBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PgsodiumConfigResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to update project's pgsodium config"
+ }
+ },
+ "tags": [
+ "secrets"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/postgrest": {
+ "get": {
+ "operationId": "v1-get-postgrest-service-config",
+ "summary": "Gets project's postgrest config",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PostgrestConfigWithJWTSecretResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to retrieve project's postgrest config"
+ }
+ },
+ "tags": [
+ "rest"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "patch": {
+ "operationId": "v1-update-postgrest-service-config",
+ "summary": "Updates project's postgrest config",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdatePostgrestConfigBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V1PostgrestConfigResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to update project's postgrest config"
+ }
+ },
+ "tags": [
+ "rest"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}": {
+ "delete": {
+ "operationId": "v1-Delete a project",
+ "summary": "Deletes the given project",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V1ProjectRefResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ }
+ },
+ "tags": [
+ "projects"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/secrets": {
+ "get": {
+ "operationId": "v1-list-all-secrets",
+ "summary": "List all secrets",
+ "description": "Returns all secrets you've previously added to the specified project.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SecretResponse"
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to retrieve project's secrets"
+ }
+ },
+ "tags": [
+ "secrets"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "post": {
+ "operationId": "v1-bulk-create-secrets",
+ "summary": "Bulk create secrets",
+ "description": "Creates multiple secrets and adds them to the specified project.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/CreateSecretBody"
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": ""
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to create project's secrets"
+ }
+ },
+ "tags": [
+ "secrets"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "delete": {
+ "operationId": "v1-bulk-delete-secrets",
+ "summary": "Bulk delete secrets",
+ "description": "Deletes all secrets with the given names from the specified project",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to delete secrets with given names"
+ }
+ },
+ "tags": [
+ "secrets"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/ssl-enforcement": {
+ "get": {
+ "operationId": "v1-get-ssl-enforcement-config",
+ "summary": "[Beta] Get project's SSL enforcement configuration.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SslEnforcementResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to retrieve project's SSL enforcement config"
+ }
+ },
+ "tags": [
+ "database"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "put": {
+ "operationId": "v1-update-ssl-enforcement-config",
+ "summary": "[Beta] Update project's SSL enforcement configuration.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SslEnforcementRequest"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SslEnforcementResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to update project's SSL enforcement configuration."
+ }
+ },
+ "tags": [
+ "database"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/types/typescript": {
+ "get": {
+ "operationId": "v1-generate-typescript-types",
+ "summary": "Generate TypeScript types",
+ "description": "Returns the TypeScript types of your schema for use with supabase-js.",
+ "parameters": [
+ {
+ "name": "included_schemas",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "default": "public",
+ "type": "string"
+ }
+ },
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/TypescriptResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to generate TypeScript types"
+ }
+ },
+ "tags": [
+ "database"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/vanity-subdomain": {
+ "get": {
+ "operationId": "v1-get-vanity-subdomain-config",
+ "summary": "[Beta] Gets current vanity subdomain config",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/VanitySubdomainConfigResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to get project vanity subdomain configuration"
+ }
+ },
+ "tags": [
+ "domains"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "delete": {
+ "operationId": "v1-deactive-vanity-subdomain-config",
+ "summary": "[Beta] Deletes a project's vanity subdomain configuration",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to delete project vanity subdomain configuration"
+ }
+ },
+ "tags": [
+ "domains"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/vanity-subdomain/check-availability": {
+ "post": {
+ "operationId": "v1-check-vanity-subdomain-availability",
+ "summary": "[Beta] Checks vanity subdomain availability",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/VanitySubdomainBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SubdomainAvailabilityResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to check project vanity subdomain configuration"
+ }
+ },
+ "tags": [
+ "domains"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/vanity-subdomain/activate": {
+ "post": {
+ "operationId": "v1-activate-vanity-subdomain-config",
+ "summary": "[Beta] Activates a vanity subdomain for a project.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/VanitySubdomainBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ActivateVanitySubdomainResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to activate project vanity subdomain configuration"
+ }
+ },
+ "tags": [
+ "domains"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/upgrade": {
+ "post": {
+ "operationId": "v1-upgrade-postgres-version",
+ "summary": "[Beta] Upgrades the project's Postgres version",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpgradeDatabaseBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProjectUpgradeInitiateResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to initiate project upgrade"
+ }
+ },
+ "tags": [
+ "projects"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/upgrade/eligibility": {
+ "get": {
+ "operationId": "v1-get-postgrest-upgrade-eligibility",
+ "summary": "[Beta] Returns the project's eligibility for upgrades",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProjectUpgradeEligibilityResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to determine project upgrade eligibility"
+ }
+ },
+ "tags": [
+ "projects"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/upgrade/status": {
+ "get": {
+ "operationId": "v1-get-postgrest-upgrade-status",
+ "summary": "[Beta] Gets the latest status of the project's upgrade",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DatabaseUpgradeStatusResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to retrieve project upgrade status"
+ }
+ },
+ "tags": [
+ "projects"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/readonly": {
+ "get": {
+ "operationId": "v1-get-readonly-mode-status",
+ "summary": "Returns project's readonly mode status",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ReadOnlyStatusResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to get project readonly mode status"
+ }
+ },
+ "tags": [
+ "database"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/readonly/temporary-disable": {
+ "post": {
+ "operationId": "v1-disable-readonly-mode-temporarily",
+ "summary": "Disables project's readonly mode for the next 15 minutes",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to disable project's readonly mode"
+ }
+ },
+ "tags": [
+ "database"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/read-replicas/setup": {
+ "post": {
+ "operationId": "v1-setup-a-read-replica",
+ "summary": "[Beta] Set up a read replica",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SetUpReadReplicaBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to set up read replica"
+ }
+ },
+ "tags": [
+ "database"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/read-replicas/remove": {
+ "post": {
+ "operationId": "v1-remove-a-read-replica",
+ "summary": "[Beta] Remove a read replica",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RemoveReadReplicaBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to remove read replica"
+ }
+ },
+ "tags": [
+ "database"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/health": {
+ "get": {
+ "operationId": "v1-get-services-health",
+ "summary": "Gets project's service health status",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ },
+ {
+ "name": "timeout_ms",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "minimum": 0,
+ "maximum": 10000,
+ "type": "integer"
+ }
+ },
+ {
+ "name": "services",
+ "required": true,
+ "in": "query",
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "auth",
+ "db",
+ "pooler",
+ "realtime",
+ "rest",
+ "storage"
+ ]
+ }
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/V1ServiceHealthResponse"
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to retrieve project's service health status"
+ }
+ },
+ "tags": [
+ "projects"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/config/database/postgres": {
+ "get": {
+ "operationId": "get-postgres-config",
+ "summary": "Gets project's Postgres config",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PostgresConfigResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to retrieve project's Postgres config"
+ }
+ },
+ "tags": [
+ "database"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "put": {
+ "operationId": "update-postgres-config",
+ "summary": "Updates project's Postgres config",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdatePostgresConfigBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PostgresConfigResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to update project's Postgres config"
+ }
+ },
+ "tags": [
+ "database"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/config/database/pgbouncer": {
+ "get": {
+ "operationId": "v1-get-project-pgbouncer-config",
+ "summary": "Get project's pgbouncer config",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V1PgbouncerConfigResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to retrieve project's pgbouncer config"
+ }
+ },
+ "tags": [
+ "database"
+ ]
+ }
+ },
+ "/v1/projects/{ref}/config/auth": {
+ "get": {
+ "operationId": "v1-get-auth-service-config",
+ "summary": "Gets project's auth config",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AuthConfigResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to retrieve project's auth config"
+ }
+ },
+ "tags": [
+ "auth"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "patch": {
+ "operationId": "v1-update-auth-service-config",
+ "summary": "Updates a project's auth config",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateAuthConfigBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AuthConfigResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to update project's auth config"
+ }
+ },
+ "tags": [
+ "auth"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/database/query": {
+ "post": {
+ "operationId": "v1-run-a-query",
+ "summary": "[Beta] Run sql query",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V1RunQueryBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to run sql query"
+ }
+ },
+ "tags": [
+ "database"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/database/webhooks/enable": {
+ "post": {
+ "operationId": "v1-enable-database-webhook",
+ "summary": "[Beta] Enables Database Webhooks on the project",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": ""
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to enable Database Webhooks on the project"
+ }
+ },
+ "tags": [
+ "database"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/functions": {
+ "post": {
+ "operationId": "createFunction",
+ "summary": "Create a function",
+ "description": "Creates a function and adds it to the specified project.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ },
+ {
+ "name": "slug",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "pattern": "/^[A-Za-z0-9_-]+$/",
+ "type": "string"
+ }
+ },
+ {
+ "name": "name",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "verify_jwt",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "name": "import_map",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "name": "entrypoint_path",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "import_map_path",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V1CreateFunctionBody"
+ }
+ },
+ "application/vnd.denoland.eszip": {
+ "schema": {
+ "$ref": "#/components/schemas/V1CreateFunctionBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/FunctionResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to create project's function"
+ }
+ },
+ "tags": [
+ "edge functions"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "get": {
+ "operationId": "v1-list-all-functions",
+ "summary": "List all functions",
+ "description": "Returns all functions you've previously added to the specified project.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/FunctionResponse"
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to retrieve project's functions"
+ }
+ },
+ "tags": [
+ "edge functions"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/functions/{function_slug}": {
+ "get": {
+ "operationId": "v1-get-a-function",
+ "summary": "Retrieve a function",
+ "description": "Retrieves a function with the specified slug and project.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ },
+ {
+ "name": "function_slug",
+ "required": true,
+ "in": "path",
+ "description": "Function slug",
+ "schema": {
+ "pattern": "/^[A-Za-z0-9_-]+$/",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/FunctionSlugResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to retrieve function with given slug"
+ }
+ },
+ "tags": [
+ "edge functions"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "patch": {
+ "operationId": "v1-update-a-function",
+ "summary": "Update a function",
+ "description": "Updates a function with the specified slug and project.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ },
+ {
+ "name": "function_slug",
+ "required": true,
+ "in": "path",
+ "description": "Function slug",
+ "schema": {
+ "pattern": "/^[A-Za-z0-9_-]+$/",
+ "type": "string"
+ }
+ },
+ {
+ "name": "slug",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "pattern": "/^[A-Za-z0-9_-]+$/",
+ "type": "string"
+ }
+ },
+ {
+ "name": "name",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "verify_jwt",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "name": "import_map",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "name": "entrypoint_path",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "import_map_path",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V1UpdateFunctionBody"
+ }
+ },
+ "application/vnd.denoland.eszip": {
+ "schema": {
+ "$ref": "#/components/schemas/V1UpdateFunctionBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/FunctionResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to update function with given slug"
+ }
+ },
+ "tags": [
+ "edge functions"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "delete": {
+ "operationId": "v1-delete-a-function",
+ "summary": "Delete a function",
+ "description": "Deletes a function with the specified slug from the specified project.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ },
+ {
+ "name": "function_slug",
+ "required": true,
+ "in": "path",
+ "description": "Function slug",
+ "schema": {
+ "pattern": "/^[A-Za-z0-9_-]+$/",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to delete function with given slug"
+ }
+ },
+ "tags": [
+ "edge functions"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/functions/{function_slug}/body": {
+ "get": {
+ "operationId": "v1-get-a-function-body",
+ "summary": "Retrieve a function body",
+ "description": "Retrieves a function body for the specified slug and project.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ },
+ {
+ "name": "function_slug",
+ "required": true,
+ "in": "path",
+ "description": "Function slug",
+ "schema": {
+ "pattern": "/^[A-Za-z0-9_-]+$/",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to retrieve function body with given slug"
+ }
+ },
+ "tags": [
+ "edge functions"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/storage/buckets": {
+ "get": {
+ "operationId": "v1-list-all-buckets",
+ "summary": "Lists all buckets",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/V1StorageBucketResponse"
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to get list of buckets"
+ }
+ },
+ "tags": [
+ "storage"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/config/auth/sso/providers": {
+ "post": {
+ "operationId": "v1-create-a-sso-provider",
+ "summary": "Creates a new SSO provider",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateProviderBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateProviderResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "404": {
+ "description": "SAML 2.0 support is not enabled for this project"
+ }
+ },
+ "tags": [
+ "auth"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "get": {
+ "operationId": "v1-list-all-sso-provider",
+ "summary": "Lists all SSO providers",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ListProvidersResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "404": {
+ "description": "SAML 2.0 support is not enabled for this project"
+ }
+ },
+ "tags": [
+ "auth"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/config/auth/sso/providers/{provider_id}": {
+ "get": {
+ "operationId": "v1-get-a-sso-provider",
+ "summary": "Gets a SSO provider by its UUID",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ },
+ {
+ "name": "provider_id",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetProviderResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "404": {
+ "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist"
+ }
+ },
+ "tags": [
+ "auth"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "put": {
+ "operationId": "v1-update-a-sso-provider",
+ "summary": "Updates a SSO provider by its UUID",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ },
+ {
+ "name": "provider_id",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateProviderBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateProviderResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "404": {
+ "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist"
+ }
+ },
+ "tags": [
+ "auth"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "delete": {
+ "operationId": "v1-delete-a-sso-provider",
+ "summary": "Removes a SSO provider by its UUID",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ },
+ {
+ "name": "provider_id",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DeleteProviderResponse"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "404": {
+ "description": "Either SAML 2.0 was not enabled for this project, or the provider does not exist"
+ }
+ },
+ "tags": [
+ "auth"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/database/backups": {
+ "get": {
+ "operationId": "v1-list-all-backups",
+ "summary": "Lists all backups",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V1BackupsResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to get backups"
+ }
+ },
+ "tags": [
+ "database"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/projects/{ref}/database/backups/restore-pitr": {
+ "post": {
+ "operationId": "v1-restore-pitr-backup",
+ "summary": "Restores a PITR backup for a database",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V1RestorePitrBody"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": ""
+ }
+ },
+ "tags": [
+ "database"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/organizations/{slug}/members": {
+ "get": {
+ "operationId": "v1-list-organization-members",
+ "summary": "List members of an organization",
+ "parameters": [
+ {
+ "name": "slug",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/V1OrganizationMemberResponse"
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "organizations"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ },
+ "/v1/organizations/{slug}": {
+ "get": {
+ "operationId": "v1-get-an-organization",
+ "summary": "Gets information about the organization",
+ "parameters": [
+ {
+ "name": "slug",
+ "required": true,
+ "in": "path",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/V1OrganizationSlugResponse"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "organizations"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
+ }
+ },
+ "info": {
+ "title": "Supabase API (v1)",
+ "description": "",
+ "version": "1.0.0",
+ "contact": {
+
+ }
+ },
+ "tags": [
+ {
+ "name": "organizations",
+ "description": "Organization endpoints"
+ },
+ {
+ "name": "projects",
+ "description": "Project endpoints"
+ }
+ ],
+ "servers": [],
+ "components": {
+ "securitySchemes": {
+ "bearer": {
+ "scheme": "bearer",
+ "bearerFormat": "JWT",
+ "type": "http"
+ }
+ },
+ "schemas": {
+ "BranchDetailResponse": {
+ "type": "object",
+ "properties": {
+ "db_port": {
+ "type": "integer"
+ },
+ "ref": {
+ "type": "string"
+ },
+ "postgres_version": {
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "ACTIVE_HEALTHY",
+ "ACTIVE_UNHEALTHY",
+ "COMING_UP",
+ "GOING_DOWN",
+ "INACTIVE",
+ "INIT_FAILED",
+ "REMOVED",
+ "RESTORING",
+ "UNKNOWN",
+ "UPGRADING",
+ "PAUSING"
+ ],
+ "type": "string"
+ },
+ "db_host": {
+ "type": "string"
+ },
+ "db_user": {
+ "type": "string"
+ },
+ "db_pass": {
+ "type": "string"
+ },
+ "jwt_secret": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "db_port",
+ "ref",
+ "postgres_version",
+ "status",
+ "db_host"
+ ]
+ },
+ "UpdateBranchBody": {
+ "type": "object",
+ "properties": {
+ "branch_name": {
+ "type": "string"
+ },
+ "git_branch": {
+ "type": "string"
+ },
+ "reset_on_push": {
+ "type": "boolean"
+ },
+ "persistent": {
+ "type": "boolean"
+ }
+ }
+ },
+ "BranchResponse": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "project_ref": {
+ "type": "string"
+ },
+ "parent_project_ref": {
+ "type": "string"
+ },
+ "is_default": {
+ "type": "boolean"
+ },
+ "git_branch": {
+ "type": "string"
+ },
+ "pr_number": {
+ "type": "number"
+ },
+ "latest_check_run_id": {
+ "type": "number"
+ },
+ "reset_on_push": {
+ "type": "boolean"
+ },
+ "persistent": {
+ "type": "boolean"
+ },
+ "status": {
+ "enum": [
+ "CREATING_PROJECT",
+ "RUNNING_MIGRATIONS",
+ "MIGRATIONS_PASSED",
+ "MIGRATIONS_FAILED",
+ "FUNCTIONS_DEPLOYED",
+ "FUNCTIONS_FAILED"
+ ],
+ "type": "string"
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "name",
+ "project_ref",
+ "parent_project_ref",
+ "is_default",
+ "reset_on_push",
+ "persistent",
+ "status",
+ "created_at",
+ "updated_at"
+ ]
+ },
+ "BranchDeleteResponse": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ]
+ },
+ "BranchResetResponse": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ]
+ },
+ "V1DatabaseResponse": {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": "string",
+ "description": "Database host"
+ },
+ "version": {
+ "type": "string",
+ "description": "Database version"
+ }
+ },
+ "required": [
+ "host",
+ "version"
+ ]
+ },
+ "V1ProjectResponse": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Id of your project"
+ },
+ "organization_id": {
+ "type": "string",
+ "description": "Slug of your organization"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of your project"
+ },
+ "region": {
+ "type": "string",
+ "description": "Region of your project",
+ "example": "us-east-1"
+ },
+ "created_at": {
+ "type": "string",
+ "description": "Creation timestamp",
+ "example": "2023-03-29T16:32:59Z"
+ },
+ "database": {
+ "$ref": "#/components/schemas/V1DatabaseResponse"
+ },
+ "status": {
+ "enum": [
+ "ACTIVE_HEALTHY",
+ "ACTIVE_UNHEALTHY",
+ "COMING_UP",
+ "GOING_DOWN",
+ "INACTIVE",
+ "INIT_FAILED",
+ "REMOVED",
+ "RESTORING",
+ "UNKNOWN",
+ "UPGRADING",
+ "PAUSING"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "organization_id",
+ "name",
+ "region",
+ "created_at",
+ "status"
+ ]
+ },
+ "DesiredInstanceSize": {
+ "type": "string",
+ "enum": [
+ "micro",
+ "small",
+ "medium",
+ "large",
+ "xlarge",
+ "2xlarge",
+ "4xlarge",
+ "8xlarge",
+ "12xlarge",
+ "16xlarge"
+ ]
+ },
+ "V1CreateProjectBody": {
+ "type": "object",
+ "properties": {
+ "db_pass": {
+ "type": "string",
+ "description": "Database password"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of your project, should not contain dots"
+ },
+ "organization_id": {
+ "type": "string",
+ "description": "Slug of your organization"
+ },
+ "plan": {
+ "type": "string",
+ "enum": [
+ "free",
+ "pro"
+ ],
+ "description": "Subscription plan is now set on organization level and is ignored in this request",
+ "example": "free",
+ "deprecated": true
+ },
+ "region": {
+ "type": "string",
+ "enum": [
+ "us-east-1",
+ "us-west-1",
+ "us-west-2",
+ "ap-east-1",
+ "ap-southeast-1",
+ "ap-northeast-1",
+ "ap-northeast-2",
+ "ap-southeast-2",
+ "eu-west-1",
+ "eu-west-2",
+ "eu-west-3",
+ "eu-central-1",
+ "ca-central-1",
+ "ap-south-1",
+ "sa-east-1"
+ ],
+ "description": "Region you want your server to reside in",
+ "example": "us-east-1"
+ },
+ "kps_enabled": {
+ "type": "boolean",
+ "deprecated": true,
+ "description": "This field is deprecated and is ignored in this request"
+ },
+ "desired_instance_size": {
+ "$ref": "#/components/schemas/DesiredInstanceSize"
+ },
+ "template_url": {
+ "type": "string",
+ "description": "Template URL used to create the project from the CLI.",
+ "example": "https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone"
+ }
+ },
+ "required": [
+ "db_pass",
+ "name",
+ "organization_id",
+ "region"
+ ]
+ },
+ "OrganizationResponseV1": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ]
+ },
+ "CreateOrganizationBodyV1": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ]
+ },
+ "OAuthTokenBody": {
+ "type": "object",
+ "properties": {
+ "grant_type": {
+ "enum": [
+ "authorization_code",
+ "refresh_token"
+ ],
+ "type": "string"
+ },
+ "client_id": {
+ "type": "string"
+ },
+ "client_secret": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "code_verifier": {
+ "type": "string"
+ },
+ "redirect_uri": {
+ "type": "string"
+ },
+ "refresh_token": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "grant_type",
+ "client_id",
+ "client_secret"
+ ]
+ },
+ "OAuthTokenResponse": {
+ "type": "object",
+ "properties": {
+ "token_type": {
+ "type": "string",
+ "enum": [
+ "Bearer"
+ ]
+ },
+ "access_token": {
+ "type": "string"
+ },
+ "refresh_token": {
+ "type": "string"
+ },
+ "expires_in": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "token_type",
+ "access_token",
+ "refresh_token",
+ "expires_in"
+ ]
+ },
+ "SnippetProject": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ]
+ },
+ "SnippetUser": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number"
+ },
+ "username": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "username"
+ ]
+ },
+ "SnippetMeta": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "inserted_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "sql"
+ ]
+ },
+ "visibility": {
+ "enum": [
+ "user",
+ "project",
+ "org",
+ "public"
+ ],
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "project": {
+ "$ref": "#/components/schemas/SnippetProject"
+ },
+ "owner": {
+ "$ref": "#/components/schemas/SnippetUser"
+ },
+ "updated_by": {
+ "$ref": "#/components/schemas/SnippetUser"
+ }
+ },
+ "required": [
+ "id",
+ "inserted_at",
+ "updated_at",
+ "type",
+ "visibility",
+ "name",
+ "project",
+ "owner",
+ "updated_by"
+ ]
+ },
+ "SnippetList": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SnippetMeta"
+ }
+ }
+ },
+ "required": [
+ "data"
+ ]
+ },
+ "SnippetContent": {
+ "type": "object",
+ "properties": {
+ "favorite": {
+ "type": "boolean"
+ },
+ "schema_version": {
+ "type": "string"
+ },
+ "sql": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "favorite",
+ "schema_version",
+ "sql"
+ ]
+ },
+ "SnippetResponse": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "inserted_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "sql"
+ ]
+ },
+ "visibility": {
+ "enum": [
+ "user",
+ "project",
+ "org",
+ "public"
+ ],
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "project": {
+ "$ref": "#/components/schemas/SnippetProject"
+ },
+ "owner": {
+ "$ref": "#/components/schemas/SnippetUser"
+ },
+ "updated_by": {
+ "$ref": "#/components/schemas/SnippetUser"
+ },
+ "content": {
+ "$ref": "#/components/schemas/SnippetContent"
+ }
+ },
+ "required": [
+ "id",
+ "inserted_at",
+ "updated_at",
+ "type",
+ "visibility",
+ "name",
+ "project",
+ "owner",
+ "updated_by",
+ "content"
+ ]
+ },
+ "ApiKeyResponse": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "api_key": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "api_key"
+ ]
+ },
+ "CreateBranchBody": {
+ "type": "object",
+ "properties": {
+ "branch_name": {
+ "type": "string"
+ },
+ "git_branch": {
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "branch_name"
+ ]
+ },
+ "UpdateCustomHostnameResponse": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "enum": [
+ "1_not_started",
+ "2_initiated",
+ "3_challenge_verified",
+ "4_origin_setup_completed",
+ "5_services_reconfigured"
+ ],
+ "type": "string"
+ },
+ "custom_hostname": {
+ "type": "string"
+ },
+ "data": {
+ "type": "object"
+ }
+ },
+ "required": [
+ "status",
+ "custom_hostname",
+ "data"
+ ]
+ },
+ "UpdateCustomHostnameBody": {
+ "type": "object",
+ "properties": {
+ "custom_hostname": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "custom_hostname"
+ ]
+ },
+ "NetworkBanResponse": {
+ "type": "object",
+ "properties": {
+ "banned_ipv4_addresses": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "banned_ipv4_addresses"
+ ]
+ },
+ "RemoveNetworkBanRequest": {
+ "type": "object",
+ "properties": {
+ "ipv4_addresses": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "ipv4_addresses"
+ ]
+ },
+ "NetworkRestrictionsRequest": {
+ "type": "object",
+ "properties": {
+ "dbAllowedCidrs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "dbAllowedCidrsV6": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "NetworkRestrictionsResponse": {
+ "type": "object",
+ "properties": {
+ "entitlement": {
+ "enum": [
+ "disallowed",
+ "allowed"
+ ],
+ "type": "string"
+ },
+ "config": {
+ "$ref": "#/components/schemas/NetworkRestrictionsRequest"
+ },
+ "old_config": {
+ "$ref": "#/components/schemas/NetworkRestrictionsRequest"
+ },
+ "status": {
+ "enum": [
+ "stored",
+ "applied"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "entitlement",
+ "config",
+ "status"
+ ]
+ },
+ "PgsodiumConfigResponse": {
+ "type": "object",
+ "properties": {
+ "root_key": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "root_key"
+ ]
+ },
+ "UpdatePgsodiumConfigBody": {
+ "type": "object",
+ "properties": {
+ "root_key": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "root_key"
+ ]
+ },
+ "PostgrestConfigWithJWTSecretResponse": {
+ "type": "object",
+ "properties": {
+ "max_rows": {
+ "type": "integer"
+ },
+ "db_pool": {
+ "type": "integer",
+ "nullable": true,
+ "description": "If `null`, the value is automatically configured based on compute size."
+ },
+ "db_schema": {
+ "type": "string"
+ },
+ "db_extra_search_path": {
+ "type": "string"
+ },
+ "jwt_secret": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "max_rows",
+ "db_pool",
+ "db_schema",
+ "db_extra_search_path"
+ ]
+ },
+ "UpdatePostgrestConfigBody": {
+ "type": "object",
+ "properties": {
+ "max_rows": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 1000000
+ },
+ "db_pool": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 1000
+ },
+ "db_extra_search_path": {
+ "type": "string"
+ },
+ "db_schema": {
+ "type": "string"
+ }
+ }
+ },
+ "V1PostgrestConfigResponse": {
+ "type": "object",
+ "properties": {
+ "max_rows": {
+ "type": "integer"
+ },
+ "db_pool": {
+ "type": "integer",
+ "nullable": true,
+ "description": "If `null`, the value is automatically configured based on compute size."
+ },
+ "db_schema": {
+ "type": "string"
+ },
+ "db_extra_search_path": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "max_rows",
+ "db_pool",
+ "db_schema",
+ "db_extra_search_path"
+ ]
+ },
+ "V1ProjectRefResponse": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "number"
+ },
+ "ref": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "ref",
+ "name"
+ ]
+ },
+ "SecretResponse": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "value"
+ ]
+ },
+ "CreateSecretBody": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "maxLength": 256,
+ "pattern": "/^(?!SUPABASE_).*/",
+ "description": "Secret name must not start with the SUPABASE_ prefix.",
+ "example": "string"
+ },
+ "value": {
+ "type": "string",
+ "maxLength": 24576
+ }
+ },
+ "required": [
+ "name",
+ "value"
+ ]
+ },
+ "SslEnforcements": {
+ "type": "object",
+ "properties": {
+ "database": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "database"
+ ]
+ },
+ "SslEnforcementResponse": {
+ "type": "object",
+ "properties": {
+ "currentConfig": {
+ "$ref": "#/components/schemas/SslEnforcements"
+ },
+ "appliedSuccessfully": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "currentConfig",
+ "appliedSuccessfully"
+ ]
+ },
+ "SslEnforcementRequest": {
+ "type": "object",
+ "properties": {
+ "requestedConfig": {
+ "$ref": "#/components/schemas/SslEnforcements"
+ }
+ },
+ "required": [
+ "requestedConfig"
+ ]
+ },
+ "TypescriptResponse": {
+ "type": "object",
+ "properties": {
+ "types": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "types"
+ ]
+ },
+ "VanitySubdomainConfigResponse": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "enum": [
+ "not-used",
+ "custom-domain-used",
+ "active"
+ ],
+ "type": "string"
+ },
+ "custom_domain": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ]
+ },
+ "VanitySubdomainBody": {
+ "type": "object",
+ "properties": {
+ "vanity_subdomain": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "vanity_subdomain"
+ ]
+ },
+ "SubdomainAvailabilityResponse": {
+ "type": "object",
+ "properties": {
+ "available": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "available"
+ ]
+ },
+ "ActivateVanitySubdomainResponse": {
+ "type": "object",
+ "properties": {
+ "custom_domain": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "custom_domain"
+ ]
+ },
+ "UpgradeDatabaseBody": {
+ "type": "object",
+ "properties": {
+ "target_version": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "target_version"
+ ]
+ },
+ "ProjectUpgradeInitiateResponse": {
+ "type": "object",
+ "properties": {
+ "tracking_id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "tracking_id"
+ ]
+ },
+ "ProjectVersion": {
+ "type": "object",
+ "properties": {
+ "postgres_version": {
+ "type": "number"
+ },
+ "app_version": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "postgres_version",
+ "app_version"
+ ]
+ },
+ "ProjectUpgradeEligibilityResponse": {
+ "type": "object",
+ "properties": {
+ "eligible": {
+ "type": "boolean"
+ },
+ "current_app_version": {
+ "type": "string"
+ },
+ "latest_app_version": {
+ "type": "string"
+ },
+ "target_upgrade_versions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ProjectVersion"
+ }
+ },
+ "potential_breaking_changes": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "duration_estimate_hours": {
+ "type": "number"
+ },
+ "legacy_auth_custom_roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "extension_dependent_objects": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "eligible",
+ "current_app_version",
+ "latest_app_version",
+ "target_upgrade_versions",
+ "potential_breaking_changes",
+ "duration_estimate_hours",
+ "legacy_auth_custom_roles",
+ "extension_dependent_objects"
+ ]
+ },
+ "DatabaseUpgradeStatus": {
+ "type": "object",
+ "properties": {
+ "initiated_at": {
+ "type": "string"
+ },
+ "target_version": {
+ "type": "number"
+ },
+ "error": {
+ "enum": [
+ "1_upgraded_instance_launch_failed",
+ "2_volume_detachchment_from_upgraded_instance_failed",
+ "3_volume_attachment_to_original_instance_failed",
+ "4_data_upgrade_initiation_failed",
+ "5_data_upgrade_completion_failed",
+ "6_volume_detachchment_from_original_instance_failed",
+ "7_volume_attachment_to_upgraded_instance_failed",
+ "8_upgrade_completion_failed"
+ ],
+ "type": "string"
+ },
+ "progress": {
+ "enum": [
+ "0_requested",
+ "1_started",
+ "2_launched_upgraded_instance",
+ "3_detached_volume_from_upgraded_instance",
+ "4_attached_volume_to_original_instance",
+ "5_initiated_data_upgrade",
+ "6_completed_data_upgrade",
+ "7_detached_volume_from_original_instance",
+ "8_attached_volume_to_upgraded_instance",
+ "9_completed_upgrade"
+ ],
+ "type": "string"
+ },
+ "status": {
+ "enum": [0, 1, 2],
+ "type": "number"
+ }
+ },
+ "required": [
+ "initiated_at",
+ "target_version",
+ "status"
+ ]
+ },
+ "DatabaseUpgradeStatusResponse": {
+ "type": "object",
+ "properties": {
+ "databaseUpgradeStatus": {
+ "nullable": true,
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/DatabaseUpgradeStatus"
+ }
+ ]
+ }
+ },
+ "required": [
+ "databaseUpgradeStatus"
+ ]
+ },
+ "ReadOnlyStatusResponse": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ },
+ "override_enabled": {
+ "type": "boolean"
+ },
+ "override_active_until": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "enabled",
+ "override_enabled",
+ "override_active_until"
+ ]
+ },
+ "SetUpReadReplicaBody": {
+ "type": "object",
+ "properties": {
+ "read_replica_region": {
+ "type": "string",
+ "enum": [
+ "us-east-1",
+ "us-west-1",
+ "us-west-2",
+ "ap-east-1",
+ "ap-southeast-1",
+ "ap-northeast-1",
+ "ap-northeast-2",
+ "ap-southeast-2",
+ "eu-west-1",
+ "eu-west-2",
+ "eu-west-3",
+ "eu-central-1",
+ "ca-central-1",
+ "ap-south-1",
+ "sa-east-1"
+ ],
+ "description": "Region you want your read replica to reside in",
+ "example": "us-east-1"
+ }
+ },
+ "required": [
+ "read_replica_region"
+ ]
+ },
+ "RemoveReadReplicaBody": {
+ "type": "object",
+ "properties": {
+ "database_identifier": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "database_identifier"
+ ]
+ },
+ "AuthHealthResponse": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "version",
+ "description"
+ ]
+ },
+ "RealtimeHealthResponse": {
+ "type": "object",
+ "properties": {
+ "healthy": {
+ "type": "boolean"
+ },
+ "db_connected": {
+ "type": "boolean"
+ },
+ "connected_cluster": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "healthy",
+ "db_connected",
+ "connected_cluster"
+ ]
+ },
+ "V1ServiceHealthResponse": {
+ "type": "object",
+ "properties": {
+ "info": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/AuthHealthResponse"
+ },
+ {
+ "$ref": "#/components/schemas/RealtimeHealthResponse"
+ }
+ ]
+ },
+ "name": {
+ "enum": [
+ "auth",
+ "db",
+ "pooler",
+ "realtime",
+ "rest",
+ "storage"
+ ],
+ "type": "string"
+ },
+ "healthy": {
+ "type": "boolean"
+ },
+ "status": {
+ "enum": [
+ "COMING_UP",
+ "ACTIVE_HEALTHY",
+ "UNHEALTHY"
+ ],
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "healthy",
+ "status"
+ ]
+ },
+ "PostgresConfigResponse": {
+ "type": "object",
+ "properties": {
+ "statement_timeout": {
+ "type": "string"
+ },
+ "effective_cache_size": {
+ "type": "string"
+ },
+ "maintenance_work_mem": {
+ "type": "string"
+ },
+ "max_connections": {
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 262143
+ },
+ "max_locks_per_transaction": {
+ "type": "integer",
+ "minimum": 10,
+ "maximum": 2147483640
+ },
+ "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_standby_archive_delay": {
+ "type": "string"
+ },
+ "max_standby_streaming_delay": {
+ "type": "string"
+ },
+ "max_worker_processes": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 262143
+ },
+ "shared_buffers": {
+ "type": "string"
+ },
+ "work_mem": {
+ "type": "string"
+ },
+ "session_replication_role": {
+ "enum": [
+ "origin",
+ "replica",
+ "local"
+ ],
+ "type": "string"
+ }
+ }
+ },
+ "UpdatePostgresConfigBody": {
+ "type": "object",
+ "properties": {
+ "statement_timeout": {
+ "type": "string"
+ },
+ "effective_cache_size": {
+ "type": "string"
+ },
+ "maintenance_work_mem": {
+ "type": "string"
+ },
+ "max_connections": {
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 262143
+ },
+ "max_locks_per_transaction": {
+ "type": "integer",
+ "minimum": 10,
+ "maximum": 2147483640
+ },
+ "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_standby_archive_delay": {
+ "type": "string"
+ },
+ "max_standby_streaming_delay": {
+ "type": "string"
+ },
+ "max_worker_processes": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 262143
+ },
+ "shared_buffers": {
+ "type": "string"
+ },
+ "work_mem": {
+ "type": "string"
+ },
+ "session_replication_role": {
+ "enum": [
+ "origin",
+ "replica",
+ "local"
+ ],
+ "type": "string"
+ }
+ }
+ },
+ "V1PgbouncerConfigResponse": {
+ "type": "object",
+ "properties": {
+ "pool_mode": {
+ "type": "string",
+ "enum": [
+ "transaction",
+ "session",
+ "statement"
+ ]
+ },
+ "default_pool_size": {
+ "type": "number"
+ },
+ "ignore_startup_parameters": {
+ "type": "string"
+ },
+ "max_client_conn": {
+ "type": "number"
+ },
+ "connection_string": {
+ "type": "string"
+ }
+ }
+ },
+ "AuthConfigResponse": {
+ "type": "object",
+ "properties": {
+ "api_max_request_duration": {
+ "type": "number",
+ "nullable": true
+ },
+ "db_max_pool_size": {
+ "type": "number",
+ "nullable": true
+ },
+ "disable_signup": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_anonymous_users_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_apple_additional_client_ids": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_apple_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_apple_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_apple_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_azure_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_azure_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_azure_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_azure_url": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_bitbucket_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_bitbucket_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_bitbucket_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_discord_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_discord_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_discord_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_email_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_facebook_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_facebook_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_facebook_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_figma_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_figma_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_figma_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_github_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_github_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_github_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_gitlab_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_gitlab_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_gitlab_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_gitlab_url": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_google_additional_client_ids": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_google_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_google_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_google_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_google_skip_nonce_check": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_kakao_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_kakao_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_kakao_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_keycloak_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_keycloak_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_keycloak_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_keycloak_url": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_linkedin_oidc_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_linkedin_oidc_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_linkedin_oidc_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_notion_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_notion_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_notion_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_phone_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_slack_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_slack_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_slack_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_spotify_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_spotify_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_spotify_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_twitch_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_twitch_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_twitch_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_twitter_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_twitter_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_twitter_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_workos_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_workos_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_workos_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_workos_url": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_zoom_client_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "external_zoom_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "external_zoom_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "hook_custom_access_token_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "hook_custom_access_token_uri": {
+ "type": "string",
+ "nullable": true
+ },
+ "hook_custom_access_token_secrets": {
+ "type": "string",
+ "nullable": true
+ },
+ "hook_mfa_verification_attempt_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "hook_mfa_verification_attempt_uri": {
+ "type": "string",
+ "nullable": true
+ },
+ "hook_mfa_verification_attempt_secrets": {
+ "type": "string",
+ "nullable": true
+ },
+ "hook_password_verification_attempt_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "hook_password_verification_attempt_uri": {
+ "type": "string",
+ "nullable": true
+ },
+ "hook_password_verification_attempt_secrets": {
+ "type": "string",
+ "nullable": true
+ },
+ "hook_send_sms_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "hook_send_sms_uri": {
+ "type": "string",
+ "nullable": true
+ },
+ "hook_send_sms_secrets": {
+ "type": "string",
+ "nullable": true
+ },
+ "hook_send_email_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "hook_send_email_uri": {
+ "type": "string",
+ "nullable": true
+ },
+ "hook_send_email_secrets": {
+ "type": "string",
+ "nullable": true
+ },
+ "jwt_exp": {
+ "type": "number",
+ "nullable": true
+ },
+ "mailer_allow_unverified_email_sign_ins": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "mailer_autoconfirm": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "mailer_otp_exp": {
+ "type": "number"
+ },
+ "mailer_otp_length": {
+ "type": "number",
+ "nullable": true
+ },
+ "mailer_secure_email_change_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "mailer_subjects_confirmation": {
+ "type": "string",
+ "nullable": true
+ },
+ "mailer_subjects_email_change": {
+ "type": "string",
+ "nullable": true
+ },
+ "mailer_subjects_invite": {
+ "type": "string",
+ "nullable": true
+ },
+ "mailer_subjects_magic_link": {
+ "type": "string",
+ "nullable": true
+ },
+ "mailer_subjects_reauthentication": {
+ "type": "string",
+ "nullable": true
+ },
+ "mailer_subjects_recovery": {
+ "type": "string",
+ "nullable": true
+ },
+ "mailer_templates_confirmation_content": {
+ "type": "string",
+ "nullable": true
+ },
+ "mailer_templates_email_change_content": {
+ "type": "string",
+ "nullable": true
+ },
+ "mailer_templates_invite_content": {
+ "type": "string",
+ "nullable": true
+ },
+ "mailer_templates_magic_link_content": {
+ "type": "string",
+ "nullable": true
+ },
+ "mailer_templates_reauthentication_content": {
+ "type": "string",
+ "nullable": true
+ },
+ "mailer_templates_recovery_content": {
+ "type": "string",
+ "nullable": true
+ },
+ "mfa_max_enrolled_factors": {
+ "type": "number",
+ "nullable": true
+ },
+ "password_hibp_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "password_min_length": {
+ "type": "number",
+ "nullable": true
+ },
+ "password_required_characters": {
+ "type": "string",
+ "nullable": true
+ },
+ "rate_limit_anonymous_users": {
+ "type": "number",
+ "nullable": true
+ },
+ "rate_limit_email_sent": {
+ "type": "number",
+ "nullable": true
+ },
+ "rate_limit_sms_sent": {
+ "type": "number",
+ "nullable": true
+ },
+ "rate_limit_token_refresh": {
+ "type": "number",
+ "nullable": true
+ },
+ "rate_limit_verify": {
+ "type": "number",
+ "nullable": true
+ },
+ "refresh_token_rotation_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "saml_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "security_captcha_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "security_captcha_provider": {
+ "type": "string",
+ "nullable": true
+ },
+ "security_captcha_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "security_manual_linking_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "security_refresh_token_reuse_interval": {
+ "type": "number",
+ "nullable": true
+ },
+ "security_update_password_require_reauthentication": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "sessions_inactivity_timeout": {
+ "type": "number",
+ "nullable": true
+ },
+ "sessions_single_per_user": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "sessions_tags": {
+ "type": "string",
+ "nullable": true
+ },
+ "sessions_timebox": {
+ "type": "number",
+ "nullable": true
+ },
+ "site_url": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_autoconfirm": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "sms_max_frequency": {
+ "type": "number",
+ "nullable": true
+ },
+ "sms_messagebird_access_key": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_messagebird_originator": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_otp_exp": {
+ "type": "number",
+ "nullable": true
+ },
+ "sms_otp_length": {
+ "type": "number"
+ },
+ "sms_provider": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_template": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_test_otp": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_test_otp_valid_until": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_textlocal_api_key": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_textlocal_sender": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_twilio_account_sid": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_twilio_auth_token": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_twilio_content_sid": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_twilio_message_service_sid": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_twilio_verify_account_sid": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_twilio_verify_auth_token": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_twilio_verify_message_service_sid": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_vonage_api_key": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_vonage_api_secret": {
+ "type": "string",
+ "nullable": true
+ },
+ "sms_vonage_from": {
+ "type": "string",
+ "nullable": true
+ },
+ "smtp_admin_email": {
+ "type": "string",
+ "nullable": true
+ },
+ "smtp_host": {
+ "type": "string",
+ "nullable": true
+ },
+ "smtp_max_frequency": {
+ "type": "number",
+ "nullable": true
+ },
+ "smtp_pass": {
+ "type": "string",
+ "nullable": true
+ },
+ "smtp_port": {
+ "type": "string",
+ "nullable": true
+ },
+ "smtp_sender_name": {
+ "type": "string",
+ "nullable": true
+ },
+ "smtp_user": {
+ "type": "string",
+ "nullable": true
+ },
+ "uri_allow_list": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "required": [
+ "api_max_request_duration",
+ "db_max_pool_size",
+ "disable_signup",
+ "external_anonymous_users_enabled",
+ "external_apple_additional_client_ids",
+ "external_apple_client_id",
+ "external_apple_enabled",
+ "external_apple_secret",
+ "external_azure_client_id",
+ "external_azure_enabled",
+ "external_azure_secret",
+ "external_azure_url",
+ "external_bitbucket_client_id",
+ "external_bitbucket_enabled",
+ "external_bitbucket_secret",
+ "external_discord_client_id",
+ "external_discord_enabled",
+ "external_discord_secret",
+ "external_email_enabled",
+ "external_facebook_client_id",
+ "external_facebook_enabled",
+ "external_facebook_secret",
+ "external_figma_client_id",
+ "external_figma_enabled",
+ "external_figma_secret",
+ "external_github_client_id",
+ "external_github_enabled",
+ "external_github_secret",
+ "external_gitlab_client_id",
+ "external_gitlab_enabled",
+ "external_gitlab_secret",
+ "external_gitlab_url",
+ "external_google_additional_client_ids",
+ "external_google_client_id",
+ "external_google_enabled",
+ "external_google_secret",
+ "external_google_skip_nonce_check",
+ "external_kakao_client_id",
+ "external_kakao_enabled",
+ "external_kakao_secret",
+ "external_keycloak_client_id",
+ "external_keycloak_enabled",
+ "external_keycloak_secret",
+ "external_keycloak_url",
+ "external_linkedin_oidc_client_id",
+ "external_linkedin_oidc_enabled",
+ "external_linkedin_oidc_secret",
+ "external_notion_client_id",
+ "external_notion_enabled",
+ "external_notion_secret",
+ "external_phone_enabled",
+ "external_slack_client_id",
+ "external_slack_enabled",
+ "external_slack_secret",
+ "external_spotify_client_id",
+ "external_spotify_enabled",
+ "external_spotify_secret",
+ "external_twitch_client_id",
+ "external_twitch_enabled",
+ "external_twitch_secret",
+ "external_twitter_client_id",
+ "external_twitter_enabled",
+ "external_twitter_secret",
+ "external_workos_client_id",
+ "external_workos_enabled",
+ "external_workos_secret",
+ "external_workos_url",
+ "external_zoom_client_id",
+ "external_zoom_enabled",
+ "external_zoom_secret",
+ "hook_custom_access_token_enabled",
+ "hook_custom_access_token_uri",
+ "hook_custom_access_token_secrets",
+ "hook_mfa_verification_attempt_enabled",
+ "hook_mfa_verification_attempt_uri",
+ "hook_mfa_verification_attempt_secrets",
+ "hook_password_verification_attempt_enabled",
+ "hook_password_verification_attempt_uri",
+ "hook_password_verification_attempt_secrets",
+ "hook_send_sms_enabled",
+ "hook_send_sms_uri",
+ "hook_send_sms_secrets",
+ "hook_send_email_enabled",
+ "hook_send_email_uri",
+ "hook_send_email_secrets",
+ "jwt_exp",
+ "mailer_allow_unverified_email_sign_ins",
+ "mailer_autoconfirm",
+ "mailer_otp_exp",
+ "mailer_otp_length",
+ "mailer_secure_email_change_enabled",
+ "mailer_subjects_confirmation",
+ "mailer_subjects_email_change",
+ "mailer_subjects_invite",
+ "mailer_subjects_magic_link",
+ "mailer_subjects_reauthentication",
+ "mailer_subjects_recovery",
+ "mailer_templates_confirmation_content",
+ "mailer_templates_email_change_content",
+ "mailer_templates_invite_content",
+ "mailer_templates_magic_link_content",
+ "mailer_templates_reauthentication_content",
+ "mailer_templates_recovery_content",
+ "mfa_max_enrolled_factors",
+ "password_hibp_enabled",
+ "password_min_length",
+ "password_required_characters",
+ "rate_limit_anonymous_users",
+ "rate_limit_email_sent",
+ "rate_limit_sms_sent",
+ "rate_limit_token_refresh",
+ "rate_limit_verify",
+ "refresh_token_rotation_enabled",
+ "saml_enabled",
+ "security_captcha_enabled",
+ "security_captcha_provider",
+ "security_captcha_secret",
+ "security_manual_linking_enabled",
+ "security_refresh_token_reuse_interval",
+ "security_update_password_require_reauthentication",
+ "sessions_inactivity_timeout",
+ "sessions_single_per_user",
+ "sessions_tags",
+ "sessions_timebox",
+ "site_url",
+ "sms_autoconfirm",
+ "sms_max_frequency",
+ "sms_messagebird_access_key",
+ "sms_messagebird_originator",
+ "sms_otp_exp",
+ "sms_otp_length",
+ "sms_provider",
+ "sms_template",
+ "sms_test_otp",
+ "sms_test_otp_valid_until",
+ "sms_textlocal_api_key",
+ "sms_textlocal_sender",
+ "sms_twilio_account_sid",
+ "sms_twilio_auth_token",
+ "sms_twilio_content_sid",
+ "sms_twilio_message_service_sid",
+ "sms_twilio_verify_account_sid",
+ "sms_twilio_verify_auth_token",
+ "sms_twilio_verify_message_service_sid",
+ "sms_vonage_api_key",
+ "sms_vonage_api_secret",
+ "sms_vonage_from",
+ "smtp_admin_email",
+ "smtp_host",
+ "smtp_max_frequency",
+ "smtp_pass",
+ "smtp_port",
+ "smtp_sender_name",
+ "smtp_user",
+ "uri_allow_list"
+ ]
+ },
+ "UpdateAuthConfigBody": {
+ "type": "object",
+ "properties": {
+ "site_url": {
+ "type": "string",
+ "pattern": "/^[^,]+$/"
+ },
+ "disable_signup": {
+ "type": "boolean"
+ },
+ "jwt_exp": {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 604800
+ },
+ "smtp_admin_email": {
+ "type": "string"
+ },
+ "smtp_host": {
+ "type": "string"
+ },
+ "smtp_port": {
+ "type": "string"
+ },
+ "smtp_user": {
+ "type": "string"
+ },
+ "smtp_pass": {
+ "type": "string"
+ },
+ "smtp_max_frequency": {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 32767
+ },
+ "smtp_sender_name": {
+ "type": "string"
+ },
+ "mailer_allow_unverified_email_sign_ins": {
+ "type": "boolean"
+ },
+ "mailer_autoconfirm": {
+ "type": "boolean"
+ },
+ "mailer_subjects_invite": {
+ "type": "string"
+ },
+ "mailer_subjects_confirmation": {
+ "type": "string"
+ },
+ "mailer_subjects_recovery": {
+ "type": "string"
+ },
+ "mailer_subjects_email_change": {
+ "type": "string"
+ },
+ "mailer_subjects_magic_link": {
+ "type": "string"
+ },
+ "mailer_subjects_reauthentication": {
+ "type": "string"
+ },
+ "mailer_templates_invite_content": {
+ "type": "string"
+ },
+ "mailer_templates_confirmation_content": {
+ "type": "string"
+ },
+ "mailer_templates_recovery_content": {
+ "type": "string"
+ },
+ "mailer_templates_email_change_content": {
+ "type": "string"
+ },
+ "mailer_templates_magic_link_content": {
+ "type": "string"
+ },
+ "mailer_templates_reauthentication_content": {
+ "type": "string"
+ },
+ "mfa_max_enrolled_factors": {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 2147483647
+ },
+ "uri_allow_list": {
+ "type": "string"
+ },
+ "external_anonymous_users_enabled": {
+ "type": "boolean"
+ },
+ "external_email_enabled": {
+ "type": "boolean"
+ },
+ "external_phone_enabled": {
+ "type": "boolean"
+ },
+ "saml_enabled": {
+ "type": "boolean"
+ },
+ "security_captcha_enabled": {
+ "type": "boolean"
+ },
+ "security_captcha_provider": {
+ "type": "string"
+ },
+ "security_captcha_secret": {
+ "type": "string"
+ },
+ "sessions_timebox": {
+ "type": "number",
+ "minimum": 0
+ },
+ "sessions_inactivity_timeout": {
+ "type": "number",
+ "minimum": 0
+ },
+ "sessions_single_per_user": {
+ "type": "boolean"
+ },
+ "sessions_tags": {
+ "type": "string",
+ "pattern": "/^\\s*([a-z0-9_-]+(\\s*,+\\s*)?)*\\s*$/i"
+ },
+ "rate_limit_anonymous_users": {
+ "type": "number",
+ "minimum": 1,
+ "maximum": 2147483647
+ },
+ "rate_limit_email_sent": {
+ "type": "number",
+ "minimum": 1,
+ "maximum": 2147483647
+ },
+ "rate_limit_sms_sent": {
+ "type": "number",
+ "minimum": 1,
+ "maximum": 2147483647
+ },
+ "rate_limit_verify": {
+ "type": "number",
+ "minimum": 1,
+ "maximum": 2147483647
+ },
+ "rate_limit_token_refresh": {
+ "type": "number",
+ "minimum": 1,
+ "maximum": 2147483647
+ },
+ "mailer_secure_email_change_enabled": {
+ "type": "boolean"
+ },
+ "refresh_token_rotation_enabled": {
+ "type": "boolean"
+ },
+ "password_hibp_enabled": {
+ "type": "boolean"
+ },
+ "password_min_length": {
+ "type": "number",
+ "minimum": 6,
+ "maximum": 32767
+ },
+ "password_required_characters": {
+ "type": "string",
+ "enum": [
+ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789",
+ "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789",
+ "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|\u003C\u003E?,./`~",
+ ""
+ ]
+ },
+ "security_manual_linking_enabled": {
+ "type": "boolean"
+ },
+ "security_update_password_require_reauthentication": {
+ "type": "boolean"
+ },
+ "security_refresh_token_reuse_interval": {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 2147483647
+ },
+ "mailer_otp_exp": {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 2147483647
+ },
+ "mailer_otp_length": {
+ "type": "number",
+ "minimum": 6,
+ "maximum": 10
+ },
+ "sms_autoconfirm": {
+ "type": "boolean"
+ },
+ "sms_max_frequency": {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 32767
+ },
+ "sms_otp_exp": {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 2147483647
+ },
+ "sms_otp_length": {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 32767
+ },
+ "sms_provider": {
+ "type": "string"
+ },
+ "sms_messagebird_access_key": {
+ "type": "string"
+ },
+ "sms_messagebird_originator": {
+ "type": "string"
+ },
+ "sms_test_otp": {
+ "type": "string",
+ "pattern": "/^([0-9]{1,15}=[0-9]+,?)*$/"
+ },
+ "sms_test_otp_valid_until": {
+ "type": "string"
+ },
+ "sms_textlocal_api_key": {
+ "type": "string"
+ },
+ "sms_textlocal_sender": {
+ "type": "string"
+ },
+ "sms_twilio_account_sid": {
+ "type": "string"
+ },
+ "sms_twilio_auth_token": {
+ "type": "string"
+ },
+ "sms_twilio_content_sid": {
+ "type": "string"
+ },
+ "sms_twilio_message_service_sid": {
+ "type": "string"
+ },
+ "sms_twilio_verify_account_sid": {
+ "type": "string"
+ },
+ "sms_twilio_verify_auth_token": {
+ "type": "string"
+ },
+ "sms_twilio_verify_message_service_sid": {
+ "type": "string"
+ },
+ "sms_vonage_api_key": {
+ "type": "string"
+ },
+ "sms_vonage_api_secret": {
+ "type": "string"
+ },
+ "sms_vonage_from": {
+ "type": "string"
+ },
+ "sms_template": {
+ "type": "string"
+ },
+ "hook_mfa_verification_attempt_enabled": {
+ "type": "boolean"
+ },
+ "hook_mfa_verification_attempt_uri": {
+ "type": "string"
+ },
+ "hook_mfa_verification_attempt_secrets": {
+ "type": "string"
+ },
+ "hook_password_verification_attempt_enabled": {
+ "type": "boolean"
+ },
+ "hook_password_verification_attempt_uri": {
+ "type": "string"
+ },
+ "hook_password_verification_attempt_secrets": {
+ "type": "string"
+ },
+ "hook_custom_access_token_enabled": {
+ "type": "boolean"
+ },
+ "hook_custom_access_token_uri": {
+ "type": "string"
+ },
+ "hook_custom_access_token_secrets": {
+ "type": "string"
+ },
+ "hook_send_sms_enabled": {
+ "type": "boolean"
+ },
+ "hook_send_sms_uri": {
+ "type": "string"
+ },
+ "hook_send_sms_secrets": {
+ "type": "string"
+ },
+ "hook_send_email_enabled": {
+ "type": "boolean"
+ },
+ "hook_send_email_uri": {
+ "type": "string"
+ },
+ "hook_send_email_secrets": {
+ "type": "string"
+ },
+ "external_apple_enabled": {
+ "type": "boolean"
+ },
+ "external_apple_client_id": {
+ "type": "string"
+ },
+ "external_apple_secret": {
+ "type": "string"
+ },
+ "external_apple_additional_client_ids": {
+ "type": "string"
+ },
+ "external_azure_enabled": {
+ "type": "boolean"
+ },
+ "external_azure_client_id": {
+ "type": "string"
+ },
+ "external_azure_secret": {
+ "type": "string"
+ },
+ "external_azure_url": {
+ "type": "string"
+ },
+ "external_bitbucket_enabled": {
+ "type": "boolean"
+ },
+ "external_bitbucket_client_id": {
+ "type": "string"
+ },
+ "external_bitbucket_secret": {
+ "type": "string"
+ },
+ "external_discord_enabled": {
+ "type": "boolean"
+ },
+ "external_discord_client_id": {
+ "type": "string"
+ },
+ "external_discord_secret": {
+ "type": "string"
+ },
+ "external_facebook_enabled": {
+ "type": "boolean"
+ },
+ "external_facebook_client_id": {
+ "type": "string"
+ },
+ "external_facebook_secret": {
+ "type": "string"
+ },
+ "external_figma_enabled": {
+ "type": "boolean"
+ },
+ "external_figma_client_id": {
+ "type": "string"
+ },
+ "external_figma_secret": {
+ "type": "string"
+ },
+ "external_github_enabled": {
+ "type": "boolean"
+ },
+ "external_github_client_id": {
+ "type": "string"
+ },
+ "external_github_secret": {
+ "type": "string"
+ },
+ "external_gitlab_enabled": {
+ "type": "boolean"
+ },
+ "external_gitlab_client_id": {
+ "type": "string"
+ },
+ "external_gitlab_secret": {
+ "type": "string"
+ },
+ "external_gitlab_url": {
+ "type": "string"
+ },
+ "external_google_enabled": {
+ "type": "boolean"
+ },
+ "external_google_client_id": {
+ "type": "string"
+ },
+ "external_google_secret": {
+ "type": "string"
+ },
+ "external_google_additional_client_ids": {
+ "type": "string"
+ },
+ "external_google_skip_nonce_check": {
+ "type": "boolean"
+ },
+ "external_kakao_enabled": {
+ "type": "boolean"
+ },
+ "external_kakao_client_id": {
+ "type": "string"
+ },
+ "external_kakao_secret": {
+ "type": "string"
+ },
+ "external_keycloak_enabled": {
+ "type": "boolean"
+ },
+ "external_keycloak_client_id": {
+ "type": "string"
+ },
+ "external_keycloak_secret": {
+ "type": "string"
+ },
+ "external_keycloak_url": {
+ "type": "string"
+ },
+ "external_linkedin_oidc_enabled": {
+ "type": "boolean"
+ },
+ "external_linkedin_oidc_client_id": {
+ "type": "string"
+ },
+ "external_linkedin_oidc_secret": {
+ "type": "string"
+ },
+ "external_notion_enabled": {
+ "type": "boolean"
+ },
+ "external_notion_client_id": {
+ "type": "string"
+ },
+ "external_notion_secret": {
+ "type": "string"
+ },
+ "external_slack_enabled": {
+ "type": "boolean"
+ },
+ "external_slack_client_id": {
+ "type": "string"
+ },
+ "external_slack_secret": {
+ "type": "string"
+ },
+ "external_spotify_enabled": {
+ "type": "boolean"
+ },
+ "external_spotify_client_id": {
+ "type": "string"
+ },
+ "external_spotify_secret": {
+ "type": "string"
+ },
+ "external_twitch_enabled": {
+ "type": "boolean"
+ },
+ "external_twitch_client_id": {
+ "type": "string"
+ },
+ "external_twitch_secret": {
+ "type": "string"
+ },
+ "external_twitter_enabled": {
+ "type": "boolean"
+ },
+ "external_twitter_client_id": {
+ "type": "string"
+ },
+ "external_twitter_secret": {
+ "type": "string"
+ },
+ "external_workos_enabled": {
+ "type": "boolean"
+ },
+ "external_workos_client_id": {
+ "type": "string"
+ },
+ "external_workos_secret": {
+ "type": "string"
+ },
+ "external_workos_url": {
+ "type": "string"
+ },
+ "external_zoom_enabled": {
+ "type": "boolean"
+ },
+ "external_zoom_client_id": {
+ "type": "string"
+ },
+ "external_zoom_secret": {
+ "type": "string"
+ },
+ "db_max_pool_size": {
+ "type": "number"
+ },
+ "api_max_request_duration": {
+ "type": "number"
+ }
+ }
+ },
+ "V1RunQueryBody": {
+ "type": "object",
+ "properties": {
+ "query": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "query"
+ ]
+ },
+ "V1CreateFunctionBody": {
+ "type": "object",
+ "properties": {
+ "slug": {
+ "type": "string",
+ "pattern": "/^[A-Za-z0-9_-]+$/"
+ },
+ "name": {
+ "type": "string"
+ },
+ "body": {
+ "type": "string"
+ },
+ "verify_jwt": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "slug",
+ "name",
+ "body"
+ ]
+ },
+ "FunctionResponse": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "ACTIVE",
+ "REMOVED",
+ "THROTTLED"
+ ],
+ "type": "string"
+ },
+ "version": {
+ "type": "number"
+ },
+ "created_at": {
+ "type": "number"
+ },
+ "updated_at": {
+ "type": "number"
+ },
+ "verify_jwt": {
+ "type": "boolean"
+ },
+ "import_map": {
+ "type": "boolean"
+ },
+ "entrypoint_path": {
+ "type": "string"
+ },
+ "import_map_path": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "slug",
+ "name",
+ "status",
+ "version",
+ "created_at",
+ "updated_at"
+ ]
+ },
+ "FunctionSlugResponse": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "slug": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "ACTIVE",
+ "REMOVED",
+ "THROTTLED"
+ ],
+ "type": "string"
+ },
+ "version": {
+ "type": "number"
+ },
+ "created_at": {
+ "type": "number"
+ },
+ "updated_at": {
+ "type": "number"
+ },
+ "verify_jwt": {
+ "type": "boolean"
+ },
+ "import_map": {
+ "type": "boolean"
+ },
+ "entrypoint_path": {
+ "type": "string"
+ },
+ "import_map_path": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "slug",
+ "name",
+ "status",
+ "version",
+ "created_at",
+ "updated_at"
+ ]
+ },
+ "V1UpdateFunctionBody": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "body": {
+ "type": "string"
+ },
+ "verify_jwt": {
+ "type": "boolean"
+ }
+ }
+ },
+ "V1StorageBucketResponse": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "owner": {
+ "type": "string"
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ },
+ "public": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "id",
+ "name",
+ "owner",
+ "created_at",
+ "updated_at",
+ "public"
+ ]
+ },
+ "AttributeValue": {
+ "type": "object",
+ "properties": {
+ "default": {
+ "oneOf": [
+ {
+ "type": "object"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ },
+ "name": {
+ "type": "string"
+ },
+ "names": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "AttributeMapping": {
+ "type": "object",
+ "properties": {
+ "keys": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/AttributeValue"
+ }
+ }
+ },
+ "required": [
+ "keys"
+ ]
+ },
+ "CreateProviderBody": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "saml"
+ ],
+ "description": "What type of provider will be created"
+ },
+ "metadata_xml": {
+ "type": "string"
+ },
+ "metadata_url": {
+ "type": "string"
+ },
+ "domains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "attribute_mapping": {
+ "$ref": "#/components/schemas/AttributeMapping"
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ "SamlDescriptor": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "entity_id": {
+ "type": "string"
+ },
+ "metadata_url": {
+ "type": "string"
+ },
+ "metadata_xml": {
+ "type": "string"
+ },
+ "attribute_mapping": {
+ "$ref": "#/components/schemas/AttributeMapping"
+ }
+ },
+ "required": [
+ "id",
+ "entity_id"
+ ]
+ },
+ "Domain": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "domain": {
+ "type": "string"
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id"
+ ]
+ },
+ "CreateProviderResponse": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "saml": {
+ "$ref": "#/components/schemas/SamlDescriptor"
+ },
+ "domains": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Domain"
+ }
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id"
+ ]
+ },
+ "Provider": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "saml": {
+ "$ref": "#/components/schemas/SamlDescriptor"
+ },
+ "domains": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Domain"
+ }
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id"
+ ]
+ },
+ "ListProvidersResponse": {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Provider"
+ }
+ }
+ },
+ "required": [
+ "items"
+ ]
+ },
+ "GetProviderResponse": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "saml": {
+ "$ref": "#/components/schemas/SamlDescriptor"
+ },
+ "domains": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Domain"
+ }
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id"
+ ]
+ },
+ "UpdateProviderBody": {
+ "type": "object",
+ "properties": {
+ "metadata_xml": {
+ "type": "string"
+ },
+ "metadata_url": {
+ "type": "string"
+ },
+ "domains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "attribute_mapping": {
+ "$ref": "#/components/schemas/AttributeMapping"
+ }
+ }
+ },
+ "UpdateProviderResponse": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "saml": {
+ "$ref": "#/components/schemas/SamlDescriptor"
+ },
+ "domains": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Domain"
+ }
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id"
+ ]
+ },
+ "DeleteProviderResponse": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "saml": {
+ "$ref": "#/components/schemas/SamlDescriptor"
+ },
+ "domains": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Domain"
+ }
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id"
+ ]
+ },
+ "V1Backup": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "enum": [
+ "COMPLETED",
+ "FAILED",
+ "PENDING",
+ "REMOVED",
+ "ARCHIVED"
+ ]
+ },
+ "is_physical_backup": {
+ "type": "boolean"
+ },
+ "inserted_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "is_physical_backup",
+ "inserted_at"
+ ]
+ },
+ "V1PhysicalBackup": {
+ "type": "object",
+ "properties": {
+ "earliest_physical_backup_date_unix": {
+ "type": "number"
+ },
+ "latest_physical_backup_date_unix": {
+ "type": "number"
+ }
+ }
+ },
+ "V1BackupsResponse": {
+ "type": "object",
+ "properties": {
+ "region": {
+ "type": "string"
+ },
+ "walg_enabled": {
+ "type": "boolean"
+ },
+ "pitr_enabled": {
+ "type": "boolean"
+ },
+ "backups": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/V1Backup"
+ }
+ },
+ "physical_backup_data": {
+ "$ref": "#/components/schemas/V1PhysicalBackup"
+ }
+ },
+ "required": [
+ "region",
+ "walg_enabled",
+ "pitr_enabled",
+ "backups",
+ "physical_backup_data"
+ ]
+ },
+ "V1RestorePitrBody": {
+ "type": "object",
+ "properties": {
+ "recovery_time_target_unix": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "recovery_time_target_unix"
+ ]
+ },
+ "V1OrganizationMemberResponse": {
+ "type": "object",
+ "properties": {
+ "user_id": {
+ "type": "string"
+ },
+ "user_name": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "role_name": {
+ "type": "string"
+ },
+ "mfa_enabled": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "user_id",
+ "user_name",
+ "role_name",
+ "mfa_enabled"
+ ]
+ },
+ "BillingPlanId": {
+ "type": "string",
+ "enum": [
+ "free",
+ "pro",
+ "team",
+ "enterprise"
+ ]
+ },
+ "V1OrganizationSlugResponse": {
+ "type": "object",
+ "properties": {
+ "plan": {
+ "$ref": "#/components/schemas/BillingPlanId"
+ },
+ "opt_in_tags": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "AI_SQL_GENERATOR_OPT_IN"
+ ]
+ }
+ },
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "opt_in_tags",
+ "id",
+ "name"
+ ]
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/apps/docs/spec/common-api-sections.json b/apps/docs/spec/common-api-sections.json
index 865ee4f2949..cd5b88acd96 100644
--- a/apps/docs/spec/common-api-sections.json
+++ b/apps/docs/spec/common-api-sections.json
@@ -7,535 +7,476 @@
},
{
"type": "category",
- "title": "Projects",
+ "title": "auth",
"items": [
{
- "id": "list-all-projects",
- "title": "List all projects",
- "slug": "list-all-projects",
+ "id": "v1-create-a-sso-provider",
+ "title": "Create a sso provider",
+ "slug": "v1-create-a-sso-provider",
"type": "operation"
},
{
- "id": "get-project-api-keys",
- "title": "Get project api keys",
- "slug": "get-project-api-keys",
+ "id": "v1-delete-a-sso-provider",
+ "title": "Delete a sso provider",
+ "slug": "v1-delete-a-sso-provider",
"type": "operation"
},
{
- "id": "create-a-project",
- "title": "Create a project",
- "slug": "create-a-project",
+ "id": "v1-get-a-sso-provider",
+ "title": "Get a sso provider",
+ "slug": "v1-get-a-sso-provider",
"type": "operation"
},
{
- "id": "deletes-the-given-project",
- "title": "Delete a project",
- "slug": "deletes-the-given-project",
- "type": "operation"
- }
- ]
- },
- {
- "type": "category",
- "title": "Organizations",
- "items": [
- {
- "id": "list-all-organizations",
- "title": "List all organizations",
- "slug": "list-all-organizations",
+ "id": "v1-get-auth-service-config",
+ "title": "Get auth service config",
+ "slug": "v1-get-auth-service-config",
"type": "operation"
},
{
- "id": "gets-information-about-the-organization",
- "title": "Get an organization",
- "slug": "gets-information-about-the-organization",
+ "id": "v1-list-all-sso-provider",
+ "title": "List all sso provider",
+ "slug": "v1-list-all-sso-provider",
"type": "operation"
},
{
- "id": "create-an-organization",
- "title": "Create an organization",
- "slug": "create-an-organization",
+ "id": "v1-update-a-sso-provider",
+ "title": "Update a sso provider",
+ "slug": "v1-update-a-sso-provider",
"type": "operation"
},
{
- "id": "list-members-of-an-organization",
- "title": "List organization members",
- "slug": "list-members-of-an-organization",
+ "id": "v1-update-auth-service-config",
+ "title": "Update auth service config",
+ "slug": "v1-update-auth-service-config",
"type": "operation"
- }]
+ }
+ ]
},
{
"type": "category",
- "title": "Services",
+ "title": "database",
"items": [
{
- "id": "gets-projects-service-health-status",
- "title": "Get services health",
- "slug": "gets-projects-service-health-status",
+ "id": "v1-disable-readonly-mode-temporarily",
+ "title": "Disable readonly mode temporarily",
+ "slug": "v1-disable-readonly-mode-temporarily",
"type": "operation"
},
{
- "id": "gets-projects-auth-config",
- "title": "Get auth service config",
- "slug": "gets-projects-auth-config",
+ "id": "v1-enable-database-webhook",
+ "title": "Enable database webhook",
+ "slug": "v1-enable-database-webhook",
"type": "operation"
},
{
- "id": "updates-a-projects-auth-config",
- "title": "Update auth service config",
- "slug": "updates-a-projects-auth-config",
+ "id": "v1-generate-typescript-types",
+ "title": "Generate typescript types",
+ "slug": "v1-generate-typescript-types",
"type": "operation"
},
{
- "id": "gets-projects-postgrest-config",
- "title": "Get postgrest service config",
- "slug": "gets-projects-postgrest-config",
+ "id": "v1-get-a-snippet",
+ "title": "Get a snippet",
+ "slug": "v1-get-a-snippet",
"type": "operation"
},
{
- "id": "updates-projects-postgrest-config",
- "title": "Update postgrest service config",
- "slug": "updates-projects-postgrest-config",
+ "id": "get-postgres-config",
+ "title": "Get postgres config",
+ "slug": "get-postgres-config",
"type": "operation"
- }
- ]
- },
- {
- "type": "category",
- "title": "Database",
- "items": [
+ },
{
- "id": "gets-projects-postgres-config",
- "title": "Get Postgres config",
- "slug": "gets-projects-postgres-config",
+ "id": "v1-get-project-pgbouncer-config",
+ "title": "Get project pgbouncer config",
+ "slug": "v1-get-project-pgbouncer-config",
"type": "operation"
},
{
- "id": "updates-projects-postgres-config",
- "title": "Update Postgres config",
- "slug": "updates-projects-postgres-config",
+ "id": "v1-get-readonly-mode-status",
+ "title": "Get readonly mode status",
+ "slug": "v1-get-readonly-mode-status",
"type": "operation"
},
{
- "id": "returns-the-projects-eligibility-for-upgrades",
- "title": "Get Postgres upgrade eligibility",
- "slug": "returns-the-projects-eligibility-for-upgrades",
+ "id": "v1-get-ssl-enforcement-config",
+ "title": "Get ssl enforcement config",
+ "slug": "v1-get-ssl-enforcement-config",
"type": "operation"
},
{
- "id": "gets-the-latest-status-of-the-projects-upgrade",
- "title": "Get Postgres upgrade status",
- "slug": "gets-the-latest-status-of-the-projects-upgrade",
+ "id": "v1-list-all-backups",
+ "title": "List all backups",
+ "slug": "v1-list-all-backups",
"type": "operation"
},
{
- "id": "upgrades-the-projects-postgres-version",
- "title": "Upgrade Postgres version",
- "slug": "upgrades-the-projects-postgres-version",
+ "id": "v1-list-all-snippets",
+ "title": "List all snippets",
+ "slug": "v1-list-all-snippets",
"type": "operation"
},
{
- "id": "returns-projects-readonly-mode-status",
- "title": "Get readonly mode status",
- "slug": "returns-projects-readonly-mode-status",
+ "id": "v1-remove-a-read-replica",
+ "title": "Remove a read replica",
+ "slug": "v1-remove-a-read-replica",
"type": "operation"
},
{
- "id": "disables-projects-readonly-mode-for-the-next-15-minutes",
- "title": "Disable readonly mode temporarily",
- "slug": "disables-projects-readonly-mode-for-the-next-15-minutes",
+ "id": "v1-restore-pitr-backup",
+ "title": "Restore pitr backup",
+ "slug": "v1-restore-pitr-backup",
"type": "operation"
},
{
- "id": "run-sql-query",
+ "id": "v1-run-a-query",
"title": "Run a query",
- "slug": "run-sql-query",
+ "slug": "v1-run-a-query",
"type": "operation"
},
{
- "id": "enables-database-webhooks-on-the-project",
- "title": "Enable database webhook",
- "slug": "enables-database-webhooks-on-the-project",
+ "id": "v1-setup-a-read-replica",
+ "title": "Setup a read replica",
+ "slug": "v1-setup-a-read-replica",
+ "type": "operation"
+ },
+ {
+ "id": "update-postgres-config",
+ "title": "Update postgres config",
+ "slug": "update-postgres-config",
+ "type": "operation"
+ },
+ {
+ "id": "v1-update-ssl-enforcement-config",
+ "title": "Update ssl enforcement config",
+ "slug": "v1-update-ssl-enforcement-config",
"type": "operation"
}
]
},
{
"type": "category",
- "title": "Database Branching",
+ "title": "domains",
"items": [
{
- "id": "list-all-database-branches",
- "title": "List all branches",
- "slug": "list-all-database-branches",
+ "id": "v1-activate-custom-hostname",
+ "title": "Activate custom hostname",
+ "slug": "v1-activate-custom-hostname",
"type": "operation"
},
{
- "id": "get-database-branch-config",
- "title": "Get a branch config",
- "slug": "get-database-branch-config",
+ "id": "v1-activate-vanity-subdomain-config",
+ "title": "Activate vanity subdomain config",
+ "slug": "v1-activate-vanity-subdomain-config",
"type": "operation"
},
{
- "id": "create-a-database-branch",
- "title": "Create a branch",
- "slug": "create-a-database-branch",
+ "id": "v1-check-vanity-subdomain-availability",
+ "title": "Check vanity subdomain availability",
+ "slug": "v1-check-vanity-subdomain-availability",
"type": "operation"
},
{
- "id": "resets-a-database-branch",
- "title": "Reset a branch",
- "slug": "resets-a-database-branch",
+ "id": "v1-deactive-vanity-subdomain-config",
+ "title": "Deactive vanity subdomain config",
+ "slug": "v1-deactive-vanity-subdomain-config",
"type": "operation"
},
{
- "id": "update-database-branch-config",
- "title": "Update a branch config",
- "slug": "update-database-branch-config",
+ "id": "v1-get-hostname-config",
+ "title": "Get hostname config",
+ "slug": "v1-get-hostname-config",
"type": "operation"
},
{
- "id": "delete-a-database-branch",
- "title": "Delete a branch",
- "slug": "delete-a-database-branch",
+ "id": "v1-get-vanity-subdomain-config",
+ "title": "Get vanity subdomain config",
+ "slug": "v1-get-vanity-subdomain-config",
"type": "operation"
},
{
- "id": "disables-preview-branching",
- "title": "Disable preview branching",
- "slug": "disables-preview-branching",
+ "id": "v1-update-hostname-config",
+ "title": "Update hostname config",
+ "slug": "v1-update-hostname-config",
+ "type": "operation"
+ },
+ {
+ "id": "v1-verify-dns-config",
+ "title": "Verify dns config",
+ "slug": "v1-verify-dns-config",
"type": "operation"
}
]
},
{
"type": "category",
- "title": "Secrets",
+ "title": "edge functions",
"items": [
{
- "id": "list-all-secrets",
- "title": "List all secrets",
- "slug": "list-all-secrets",
+ "id": "v1-delete-a-function",
+ "title": "Delete a function",
+ "slug": "v1-delete-a-function",
"type": "operation"
},
{
- "id": "bulk-create-secrets",
- "title": "Bulk create secrets",
- "slug": "bulk-create-secrets",
+ "id": "v1-get-a-function",
+ "title": "Get a function",
+ "slug": "v1-get-a-function",
"type": "operation"
},
{
- "id": "bulk-delete-secrets",
- "title": "Bulk delete secrets",
- "slug": "bulk-delete-secrets",
+ "id": "v1-get-a-function-body",
+ "title": "Get a function body",
+ "slug": "v1-get-a-function-body",
"type": "operation"
- }
- ]
- },
- {
- "type": "category",
- "title": "Typescript",
- "items": [
+ },
+ {
+ "id": "v1-list-all-functions",
+ "title": "List all functions",
+ "slug": "v1-list-all-functions",
+ "type": "operation"
+ },
{
- "id": "generate-typescript-types",
- "title": "Generate TypeScript types",
- "slug": "generate-typescript-types",
+ "id": "v1-update-a-function",
+ "title": "Update a function",
+ "slug": "v1-update-a-function",
"type": "operation"
}
]
},
{
"type": "category",
- "title": "Functions",
+ "title": "environments",
"items": [
{
- "id": "create-a-function",
- "title": "Create a function",
- "slug": "create-a-function",
+ "id": "v1-create-a-branch",
+ "title": "Create a branch",
+ "slug": "v1-create-a-branch",
"type": "operation"
},
{
- "id": "list-all-functions",
- "title": "List all functions",
- "slug": "list-all-functions",
+ "id": "v1-delete-a-branch",
+ "title": "Delete a branch",
+ "slug": "v1-delete-a-branch",
"type": "operation"
},
{
- "id": "retrieve-a-function",
- "title": "Retrieve a function",
- "slug": "retrieve-a-function",
+ "id": "v1-disable-preview-branching",
+ "title": "Disable preview branching",
+ "slug": "v1-disable-preview-branching",
"type": "operation"
},
{
- "id": "update-a-function",
- "title": "Update a function",
- "slug": "update-a-function",
+ "id": "v1-get-a-branch-config",
+ "title": "Get a branch config",
+ "slug": "v1-get-a-branch-config",
"type": "operation"
},
{
- "id": "delete-a-function",
- "title": "Delete a function",
- "slug": "delete-a-function",
+ "id": "v1-list-all-branches",
+ "title": "List all branches",
+ "slug": "v1-list-all-branches",
"type": "operation"
},
{
- "id": "retrieve-a-function-body",
- "title": "Retrieve a function body",
- "slug": "retrieve-a-function-body",
+ "id": "v1-reset-a-branch",
+ "title": "Reset a branch",
+ "slug": "v1-reset-a-branch",
"type": "operation"
- }
- ]
- },
- {
- "type": "category",
- "title": "Storage",
- "items": [
+ },
{
- "id": "lists-all-buckets",
- "title": "List all buckets",
- "slug": "lists-all-buckets",
+ "id": "v1-update-a-branch-config",
+ "title": "Update a branch config",
+ "slug": "v1-update-a-branch-config",
"type": "operation"
}
]
},
{
"type": "category",
- "title": "Custom Hostname",
+ "title": "oauth",
"items": [
{
- "id": "gets-projects-custom-hostname-config",
- "title": "Retrieve hostname configuration",
- "slug": "gets-projects-custom-hostname-config",
- "type": "operation"
- },
- {
- "id": "deletes-a-projects-custom-hostname-configuration",
- "title": "Delete hostname configuration",
- "slug": "deletes-a-projects-custom-hostname-configuration",
- "type": "operation"
- },
- {
- "id": "updates-projects-custom-hostname-configuration",
- "title": "Update hostname configuration",
- "slug": "updates-projects-custom-hostname-configuration",
- "type": "operation"
- },
- {
- "id": "attempts-to-verify-the-dns-configuration-for-projects-custom-hostname-configuration",
- "title": "Verify DNS configuration",
- "slug": "attempts-to-verify-the-dns-configuration-for-projects-custom-hostname-configuration",
+ "id": "v1-authorize-user",
+ "title": "Authorize user",
+ "slug": "v1-authorize-user",
"type": "operation"
},
{
- "id": "activates-a-custom-hostname-for-a-project",
- "title": "Activate custom hostname",
- "slug": "activates-a-custom-hostname-for-a-project",
+ "id": "v1-exchange-oauth-token",
+ "title": "Exchange oauth token",
+ "slug": "v1-exchange-oauth-token",
"type": "operation"
}
]
},
{
"type": "category",
- "title": "Vanity Subdomain",
+ "title": "organizations",
"items": [
{
- "id": "gets-current-vanity-subdomain-config",
- "title": "Get vanity subdomain config",
- "slug": "gets-current-vanity-subdomain-config",
- "type": "operation"
- },
- {
- "id": "checks-vanity-subdomain-availability",
- "title": "Check vanity subdomain availability",
- "slug": "checks-vanity-subdomain-availability",
+ "id": "v1-create-an-organization",
+ "title": "Create an organization",
+ "slug": "v1-create-an-organization",
"type": "operation"
},
{
- "id": "activates-a-vanity-subdomain-for-a-project",
- "title": "Activate vanity subdomain config",
- "slug": "activates-a-vanity-subdomain-for-a-project",
+ "id": "v1-get-an-organization",
+ "title": "Get an organization",
+ "slug": "v1-get-an-organization",
"type": "operation"
},
{
- "id": "deletes-a-projects-vanity-subdomain-configuration",
- "title": "Deactive vanity subdomain config",
- "slug": "deletes-a-projects-vanity-subdomain-configuration",
- "type": "operation"
- }
- ]
- },
- {
- "type": "category",
- "title": "pgsodium",
- "items": [
- {
- "id": "gets-projects-pgsodium-config",
- "title": "Retrieve pgsodium config",
- "slug": "gets-projects-pgsodium-config",
+ "id": "v1-list-all-organizations",
+ "title": "List all organizations",
+ "slug": "v1-list-all-organizations",
"type": "operation"
},
{
- "id": "updates-projects-pgsodium-config-updating-the-root_key-can-cause-all-data-encrypted-with-the-older-key-to-become-inaccessible",
- "title": "Update pgsodium config",
- "slug": "updates-projects-pgsodium-config-updating-the-root_key-can-cause-all-data-encrypted-with-the-older-key-to-become-inaccessible",
+ "id": "v1-list-organization-members",
+ "title": "List organization members",
+ "slug": "v1-list-organization-members",
"type": "operation"
}
]
},
{
"type": "category",
- "title": "Network",
+ "title": "projects",
"items": [
{
- "id": "gets-projects-network-bans",
- "title": "Retrieve network bans",
- "slug": "gets-projects-network-bans",
+ "id": "v1-create-a-project",
+ "title": "Create a project",
+ "slug": "v1-create-a-project",
"type": "operation"
},
{
- "id": "remove-network-bans",
+ "id": "v1-delete-network-bans",
"title": "Delete network bans",
- "slug": "remove-network-bans",
+ "slug": "v1-delete-network-bans",
"type": "operation"
},
{
- "id": "gets-projects-network-restrictions",
- "title": "Retrieve network restrictions",
- "slug": "gets-projects-network-restrictions",
+ "id": "v1-get-all-projects",
+ "title": "Get all projects",
+ "slug": "v1-get-all-projects",
"type": "operation"
},
{
- "id": "updates-projects-network-restrictions",
- "title": "Update network restrictions",
- "slug": "updates-projects-network-restrictions",
- "type": "operation"
- }
- ]
- },
- {
- "type": "category",
- "title": "Ssl enforcement",
- "items": [
- {
- "id": "get-projects-ssl-enforcement-configuration",
- "title": "Get ssl enforcement config",
- "slug": "get-projects-ssl-enforcement-configuration",
+ "id": "v1-get-network-restrictions",
+ "title": "Get network restrictions",
+ "slug": "v1-get-network-restrictions",
"type": "operation"
},
{
- "id": "update-projects-ssl-enforcement-configuration",
- "title": "Update ssl enforcement config",
- "slug": "update-projects-ssl-enforcement-configuration",
+ "id": "v1-get-postgrest-upgrade-eligibility",
+ "title": "Get postgrest upgrade eligibility",
+ "slug": "v1-get-postgrest-upgrade-eligibility",
"type": "operation"
- }
- ]
- },
- {
- "type": "category",
- "title": "Single Sign-On",
- "items": [
+ },
{
- "id": "lists-all-sso-providers",
- "title": "List all sso providers",
- "slug": "lists-all-sso-providers",
+ "id": "v1-get-postgrest-upgrade-status",
+ "title": "Get postgrest upgrade status",
+ "slug": "v1-get-postgrest-upgrade-status",
"type": "operation"
},
{
- "id": "gets-a-sso-provider-by-its-uuid",
- "title": "Get a sso provider",
- "slug": "gets-a-sso-provider-by-its-uuid",
+ "id": "v1-get-services-health",
+ "title": "Get services health",
+ "slug": "v1-get-services-health",
"type": "operation"
},
{
- "id": "creates-a-new-sso-provider",
- "title": "Create a sso provider",
- "slug": "creates-a-new-sso-provider",
+ "id": "v1-list-all-network-bans",
+ "title": "List all network bans",
+ "slug": "v1-list-all-network-bans",
"type": "operation"
},
{
- "id": "updates-a-sso-provider-by-its-uuid",
- "title": "Update a sso provider",
- "slug": "updates-a-sso-provider-by-its-uuid",
+ "id": "v1-update-network-restrictions",
+ "title": "Update network restrictions",
+ "slug": "v1-update-network-restrictions",
"type": "operation"
},
{
- "id": "removes-a-sso-provider-by-its-uuid",
- "title": "Delete a sso provider",
- "slug": "removes-a-sso-provider-by-its-uuid",
+ "id": "v1-upgrade-postgres-version",
+ "title": "Upgrade postgres version",
+ "slug": "v1-upgrade-postgres-version",
"type": "operation"
}
]
},
{
"type": "category",
- "title": "Oauth",
+ "title": "rest",
"items": [
{
- "id": "authorize-user-through-oauth",
- "title": "Authorize user",
- "slug": "authorize-user-through-oauth",
+ "id": "v1-get-postgrest-service-config",
+ "title": "Get postgrest service config",
+ "slug": "v1-get-postgrest-service-config",
"type": "operation"
},
{
- "id": "exchange-auth-code-for-users-access-and-refresh-token",
- "title": "Exchange oauth token",
- "slug": "exchange-auth-code-for-users-access-and-refresh-token",
+ "id": "v1-update-postgrest-service-config",
+ "title": "Update postgrest service config",
+ "slug": "v1-update-postgrest-service-config",
"type": "operation"
}
]
},
{
"type": "category",
- "title": "Read replicas",
+ "title": "secrets",
"items": [
{
- "id": "set-up-a-read-replica",
- "title": "Setup a read replica",
- "slug": "set-up-a-read-replica",
+ "id": "v1-bulk-create-secrets",
+ "title": "Bulk create secrets",
+ "slug": "v1-bulk-create-secrets",
"type": "operation"
},
{
- "id": "remove-a-read-replica",
- "title": "Remove a read replica",
- "slug": "remove-a-read-replica",
+ "id": "v1-bulk-delete-secrets",
+ "title": "Bulk delete secrets",
+ "slug": "v1-bulk-delete-secrets",
"type": "operation"
- }
- ]
- },
- {
- "type": "category",
- "title": "Backups",
- "items": [
+ },
{
- "id": "lists-all-backups",
- "title": "List all backups",
- "slug": "lists-all-backups",
+ "id": "v1-get-pgsodium-config",
+ "title": "Get pgsodium config",
+ "slug": "v1-get-pgsodium-config",
"type": "operation"
},
{
- "id": "restores-a-pitr-backup-for-a-database",
- "title": "Restores PITR backup",
- "slug": "restores-a-pitr-backup-for-a-database",
+ "id": "v1-get-project-api-keys",
+ "title": "Get project api keys",
+ "slug": "v1-get-project-api-keys",
+ "type": "operation"
+ },
+ {
+ "id": "v1-list-all-secrets",
+ "title": "List all secrets",
+ "slug": "v1-list-all-secrets",
+ "type": "operation"
+ },
+ {
+ "id": "v1-update-pgsodium-config",
+ "title": "Update pgsodium config",
+ "slug": "v1-update-pgsodium-config",
"type": "operation"
}
]
},
{
"type": "category",
- "title": "Snippets",
+ "title": "storage",
"items": [
{
- "id": "lists-sql-snippets-for-the-logged-in-user",
- "title": "List all snippets",
- "slug": "lists-sql-snippets-for-the-logged-in-user",
- "type": "operation"
- },
- {
- "id": "gets-a-specific-sql-snippet",
- "title": "Get a snippet",
- "slug": "gets-a-specific-sql-snippet",
+ "id": "v1-list-all-buckets",
+ "title": "List all buckets",
+ "slug": "v1-list-all-buckets",
"type": "operation"
}
]
}
-]
+]
\ No newline at end of file
diff --git a/apps/docs/spec/sections/generateMgmtApiSections.ts b/apps/docs/spec/sections/generateMgmtApiSections.ts
new file mode 100644
index 00000000000..5437fdf7acc
--- /dev/null
+++ b/apps/docs/spec/sections/generateMgmtApiSections.ts
@@ -0,0 +1,97 @@
+const fs = require('fs');
+const path = require('path');
+
+function slugToTitle(slug) {
+ if (!slug) return ''
+ // remove version prefix if available
+ const prefixRegex = /^v\d+/;
+ const title = slug.replace(prefixRegex, '').replace(/-/g, ' ').trimStart()
+ return title.charAt(0).toUpperCase() + title.slice(1)
+}
+
+function isValidSlug(slug) {
+ const slugRegex = /^[a-z0-9]+(?:-[a-z0-9]+)*$/
+ return slugRegex.test(slug)
+}
+
+function extractSectionsFromOpenApi(filePath, outputPath) {
+ fs.readFile(filePath, 'utf8', (err, data) => {
+ if (err) {
+ console.error(`Error reading file ${filePath}:`, err);
+ return;
+ }
+
+ try {
+ const openApiJson = JSON.parse(data);
+ const categories = []
+ const sections = [];
+
+ if (openApiJson.paths) {
+ for (const route in openApiJson.paths) {
+ const methods = openApiJson.paths[route];
+ for (const method in methods) {
+ const tag = methods[method].tags[0];
+ const operationId = methods[method].operationId;
+ // If operationId is not in the form of a slug ignore it.
+ // This is intentional because operationId is not defined under the swagger
+ // spec and is extracted automatically from the function name.
+ if (!tag || !isValidSlug(operationId)) continue;
+
+ if (!categories.includes(tag)) {
+ categories.push(tag)
+ sections.push(
+ {
+ "type": "category",
+ "title": tag,
+ "items":[]
+ }
+ );
+ }
+
+ const sectionCate = sections.find((i) => i.title === tag);
+ sectionCate.items.push({
+ "id": operationId,
+ "title": slugToTitle(operationId),
+ "slug": operationId,
+ "type": "operation"
+ })
+ }
+ }
+ }
+
+ // finalize sections
+ sections.sort((a, b) => a.title.localeCompare(b.title));
+ sections.forEach((i) => i.items.sort((a, b) => a.title.localeCompare(b.title)));
+ sections.unshift({
+ "title": "Introduction",
+ "id": "introduction",
+ "slug": "introduction",
+ "type": "markdown",
+ });
+
+ fs.writeFile(outputPath, JSON.stringify(sections, null, 2), 'utf8', (err) => {
+ if (err) {
+ console.error(`Error writing to file ${outputPath}:`, err);
+ return;
+ }
+ console.log(`Sections successfully generated!!!`);
+ });
+ } catch (error) {
+ console.error('Error parsing JSON:', error);
+ }
+ });
+}
+
+// Get file paths from command line arguments
+const args = process.argv.slice(2);
+if (args.length < 2) {
+ console.error('Please provide the openapi file path and output file path as arguments.');
+ process.exit(1);
+}
+
+const inputFilePath = path.resolve(args[0]);
+const outputFilePath = path.resolve(args[1]);
+
+;(async () => {
+ extractSectionsFromOpenApi(inputFilePath, outputFilePath);
+})()
diff --git a/apps/docs/spec/transforms/api_v0_openapi_deparsed.json b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json
similarity index 95%
rename from apps/docs/spec/transforms/api_v0_openapi_deparsed.json
rename to apps/docs/spec/transforms/api_v1_openapi_deparsed.json
index eaf863682d3..1dfeaddd395 100644
--- a/apps/docs/spec/transforms/api_v0_openapi_deparsed.json
+++ b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json
@@ -20,7 +20,7 @@
"paths": {
"/v1/branches/{branch_id}": {
"get": {
- "operationId": "getBranchDetails",
+ "operationId": "v1-get-a-branch-config",
"summary": "Get database branch config",
"description": "Fetches configurations of the specified database branch",
"parameters": [
@@ -96,7 +96,7 @@
}
},
"tags": [
- "database branches (beta)"
+ "environments"
],
"security": [
{
@@ -105,7 +105,7 @@
]
},
"patch": {
- "operationId": "updateBranch",
+ "operationId": "v1-update-a-branch-config",
"summary": "Update database branch config",
"description": "Updates the configuration of the specified database branch",
"parameters": [
@@ -172,6 +172,9 @@
"pr_number": {
"type": "number"
},
+ "latest_check_run_id": {
+ "type": "number"
+ },
"reset_on_push": {
"type": "boolean"
},
@@ -217,7 +220,7 @@
}
},
"tags": [
- "database branches (beta)"
+ "environments"
],
"security": [
{
@@ -226,7 +229,7 @@
]
},
"delete": {
- "operationId": "deleteBranch",
+ "operationId": "v1-delete-a-branch",
"summary": "Delete a database branch",
"description": "Deletes the specified database branch",
"parameters": [
@@ -264,7 +267,7 @@
}
},
"tags": [
- "database branches (beta)"
+ "environments"
],
"security": [
{
@@ -275,7 +278,7 @@
},
"/v1/branches/{branch_id}/reset": {
"post": {
- "operationId": "resetBranch",
+ "operationId": "v1-reset-a-branch",
"summary": "Resets a database branch",
"description": "Resets the specified database branch",
"parameters": [
@@ -313,7 +316,7 @@
}
},
"tags": [
- "database branches (beta)"
+ "environments"
],
"security": [
{
@@ -324,7 +327,7 @@
},
"/v1/projects": {
"get": {
- "operationId": "getProjects",
+ "operationId": "v1-get-all-projects",
"summary": "List all projects",
"description": "Returns a list of all projects you've previously created.",
"parameters": [],
@@ -418,7 +421,7 @@
]
},
"post": {
- "operationId": "createProject",
+ "operationId": "v1-create-a-project",
"summary": "Create a project",
"parameters": [],
"requestBody": {
@@ -474,7 +477,8 @@
},
"kps_enabled": {
"type": "boolean",
- "deprecated": true
+ "deprecated": true,
+ "description": "This field is deprecated and is ignored in this request"
},
"desired_instance_size": {
"type": "string",
@@ -596,7 +600,7 @@
},
"/v1/organizations": {
"get": {
- "operationId": "getOrganizations",
+ "operationId": "v1-list-all-organizations",
"summary": "List all organizations",
"description": "Returns a list of organizations that you currently belong to.",
"parameters": [],
@@ -640,7 +644,7 @@
]
},
"post": {
- "operationId": "createOrganization",
+ "operationId": "v1-create-an-organization",
"summary": "Create an organization",
"parameters": [],
"requestBody": {
@@ -700,8 +704,8 @@
},
"/v1/oauth/authorize": {
"get": {
- "operationId": "authorize",
- "summary": "Authorize user through oauth",
+ "operationId": "v1-authorize-user",
+ "summary": "[Beta] Authorize user through oauth",
"parameters": [
{
"name": "client_id",
@@ -784,7 +788,7 @@
}
},
"tags": [
- "oauth (beta)"
+ "oauth"
],
"security": [
{
@@ -797,8 +801,8 @@
},
"/v1/oauth/token": {
"post": {
- "operationId": "token",
- "summary": "Exchange auth code for user's access and refresh token",
+ "operationId": "v1-exchange-oauth-token",
+ "summary": "[Beta] Exchange auth code for user's access and refresh token",
"parameters": [],
"requestBody": {
"required": true,
@@ -878,7 +882,7 @@
}
},
"tags": [
- "oauth (beta)"
+ "oauth"
],
"security": [
{
@@ -891,7 +895,7 @@
},
"/v1/snippets": {
"get": {
- "operationId": "listSnippets",
+ "operationId": "v1-list-all-snippets",
"summary": "Lists SQL snippets for the logged in user",
"parameters": [
{
@@ -932,13 +936,13 @@
]
},
"visibility": {
- "type": "string",
"enum": [
"user",
"project",
"org",
"public"
- ]
+ ],
+ "type": "string"
},
"name": {
"type": "string"
@@ -1018,7 +1022,7 @@
}
},
"tags": [
- "snippets"
+ "database"
],
"security": [
{
@@ -1029,7 +1033,7 @@
},
"/v1/snippets/{id}": {
"get": {
- "operationId": "getSnippet",
+ "operationId": "v1-get-a-snippet",
"summary": "Gets a specific SQL snippet",
"parameters": [
{
@@ -1165,7 +1169,7 @@
}
},
"tags": [
- "snippets"
+ "database"
],
"security": [
{
@@ -1176,7 +1180,7 @@
},
"/v1/projects/{ref}/api-keys": {
"get": {
- "operationId": "getProjectApiKeys",
+ "operationId": "v1-get-project-api-keys",
"summary": "Get project api keys",
"parameters": [
{
@@ -1222,7 +1226,7 @@
}
},
"tags": [
- "projects"
+ "secrets"
],
"security": [
{
@@ -1233,7 +1237,7 @@
},
"/v1/projects/{ref}/branches": {
"get": {
- "operationId": "getBranches",
+ "operationId": "v1-list-all-branches",
"summary": "List all database branches",
"description": "Returns all database branches of the specified project.",
"parameters": [
@@ -1280,6 +1284,9 @@
"pr_number": {
"type": "number"
},
+ "latest_check_run_id": {
+ "type": "number"
+ },
"reset_on_push": {
"type": "boolean"
},
@@ -1326,7 +1333,7 @@
}
},
"tags": [
- "database branches (beta)"
+ "environments"
],
"security": [
{
@@ -1335,7 +1342,7 @@
]
},
"post": {
- "operationId": "createBranch",
+ "operationId": "v1-create-a-branch",
"summary": "Create a database branch",
"description": "Creates a database branch from the specified project.",
"parameters": [
@@ -1404,6 +1411,9 @@
"pr_number": {
"type": "number"
},
+ "latest_check_run_id": {
+ "type": "number"
+ },
"reset_on_push": {
"type": "boolean"
},
@@ -1449,7 +1459,7 @@
}
},
"tags": [
- "database branches (beta)"
+ "environments"
],
"security": [
{
@@ -1458,7 +1468,7 @@
]
},
"delete": {
- "operationId": "disableBranch",
+ "operationId": "v1-disable-preview-branching",
"summary": "Disables preview branching",
"description": "Disables preview branching for the specified project",
"parameters": [
@@ -1483,7 +1493,7 @@
}
},
"tags": [
- "database branches (beta)"
+ "environments"
],
"security": [
{
@@ -1494,8 +1504,8 @@
},
"/v1/projects/{ref}/custom-hostname": {
"get": {
- "operationId": "getCustomHostnameConfig",
- "summary": "Gets project's custom hostname config",
+ "operationId": "v1-get-hostname-config",
+ "summary": "[Beta] Gets project's custom hostname config",
"parameters": [
{
"name": "ref",
@@ -1551,7 +1561,7 @@
}
},
"tags": [
- "custom hostname (beta)"
+ "domains"
],
"security": [
{
@@ -1560,8 +1570,8 @@
]
},
"delete": {
- "operationId": "removeCustomHostnameConfig",
- "summary": "Deletes a project's custom hostname configuration",
+ "operationId": "v1-Delete hostname config",
+ "summary": "[Beta] Deletes a project's custom hostname configuration",
"parameters": [
{
"name": "ref",
@@ -1587,7 +1597,7 @@
}
},
"tags": [
- "custom hostname (beta)"
+ "domains"
],
"security": [
{
@@ -1598,8 +1608,8 @@
},
"/v1/projects/{ref}/custom-hostname/initialize": {
"post": {
- "operationId": "createCustomHostnameConfig",
- "summary": "Updates project's custom hostname configuration",
+ "operationId": "v1-update-hostname-config",
+ "summary": "[Beta] Updates project's custom hostname configuration",
"parameters": [
{
"name": "ref",
@@ -1673,7 +1683,7 @@
}
},
"tags": [
- "custom hostname (beta)"
+ "domains"
],
"security": [
{
@@ -1684,8 +1694,8 @@
},
"/v1/projects/{ref}/custom-hostname/reverify": {
"post": {
- "operationId": "reverify",
- "summary": "Attempts to verify the DNS configuration for project's custom hostname configuration",
+ "operationId": "v1-verify-dns-config",
+ "summary": "[Beta] Attempts to verify the DNS configuration for project's custom hostname configuration",
"parameters": [
{
"name": "ref",
@@ -1741,7 +1751,7 @@
}
},
"tags": [
- "custom hostname (beta)"
+ "domains"
],
"security": [
{
@@ -1752,8 +1762,8 @@
},
"/v1/projects/{ref}/custom-hostname/activate": {
"post": {
- "operationId": "activate",
- "summary": "Activates a custom hostname for a project.",
+ "operationId": "v1-activate-custom-hostname",
+ "summary": "[Beta] Activates a custom hostname for a project.",
"parameters": [
{
"name": "ref",
@@ -1809,7 +1819,7 @@
}
},
"tags": [
- "custom hostname (beta)"
+ "domains"
],
"security": [
{
@@ -1820,8 +1830,8 @@
},
"/v1/projects/{ref}/network-bans/retrieve": {
"post": {
- "operationId": "getNetworkBans",
- "summary": "Gets project's network bans",
+ "operationId": "v1-list-all-network-bans",
+ "summary": "[Beta] Gets project's network bans",
"parameters": [
{
"name": "ref",
@@ -1865,7 +1875,7 @@
}
},
"tags": [
- "network bans (beta)"
+ "projects"
],
"security": [
{
@@ -1876,8 +1886,8 @@
},
"/v1/projects/{ref}/network-bans": {
"delete": {
- "operationId": "removeNetworkBan",
- "summary": "Remove network bans.",
+ "operationId": "v1-delete-network-bans",
+ "summary": "[Beta] Remove network bans.",
"parameters": [
{
"name": "ref",
@@ -1924,7 +1934,7 @@
}
},
"tags": [
- "network bans (beta)"
+ "projects"
],
"security": [
{
@@ -1935,8 +1945,8 @@
},
"/v1/projects/{ref}/network-restrictions": {
"get": {
- "operationId": "getNetworkRestrictions",
- "summary": "Gets project's network restrictions",
+ "operationId": "v1-get-network-restrictions",
+ "summary": "[Beta] Gets project's network restrictions",
"parameters": [
{
"name": "ref",
@@ -2024,7 +2034,7 @@
}
},
"tags": [
- "network restrictions (beta)"
+ "projects"
],
"security": [
{
@@ -2035,8 +2045,8 @@
},
"/v1/projects/{ref}/network-restrictions/apply": {
"post": {
- "operationId": "applyNetworkRestrictions",
- "summary": "Updates project's network restrictions",
+ "operationId": "v1-update-network-restrictions",
+ "summary": "[Beta] Updates project's network restrictions",
"parameters": [
{
"name": "ref",
@@ -2148,7 +2158,7 @@
}
},
"tags": [
- "network restrictions (beta)"
+ "projects"
],
"security": [
{
@@ -2159,8 +2169,8 @@
},
"/v1/projects/{ref}/pgsodium": {
"get": {
- "operationId": "getPgsodiumConfig",
- "summary": "Gets project's pgsodium config",
+ "operationId": "v1-get-pgsodium-config",
+ "summary": "[Beta] Gets project's pgsodium config",
"parameters": [
{
"name": "ref",
@@ -2201,7 +2211,7 @@
}
},
"tags": [
- "pgsodium (beta)"
+ "secrets"
],
"security": [
{
@@ -2210,8 +2220,8 @@
]
},
"put": {
- "operationId": "updatePgsodiumConfig",
- "summary": "Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.",
+ "operationId": "v1-update-pgsodium-config",
+ "summary": "[Beta] Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.",
"parameters": [
{
"name": "ref",
@@ -2270,7 +2280,7 @@
}
},
"tags": [
- "pgsodium (beta)"
+ "secrets"
],
"security": [
{
@@ -2281,7 +2291,7 @@
},
"/v1/projects/{ref}/postgrest": {
"get": {
- "operationId": "getPostgRESTConfig",
+ "operationId": "v1-get-postgrest-service-config",
"summary": "Gets project's postgrest config",
"parameters": [
{
@@ -2340,7 +2350,7 @@
}
},
"tags": [
- "services"
+ "rest"
],
"security": [
{
@@ -2349,7 +2359,7 @@
]
},
"patch": {
- "operationId": "updatePostgRESTConfig",
+ "operationId": "v1-update-postgrest-service-config",
"summary": "Updates project's postgrest config",
"parameters": [
{
@@ -2433,7 +2443,7 @@
}
},
"tags": [
- "services"
+ "rest"
],
"security": [
{
@@ -2444,7 +2454,7 @@
},
"/v1/projects/{ref}": {
"delete": {
- "operationId": "deleteProject",
+ "operationId": "v1-Delete a project",
"summary": "Deletes the given project",
"parameters": [
{
@@ -2502,7 +2512,7 @@
},
"/v1/projects/{ref}/secrets": {
"get": {
- "operationId": "getSecrets",
+ "operationId": "v1-list-all-secrets",
"summary": "List all secrets",
"description": "Returns all secrets you've previously added to the specified project.",
"parameters": [
@@ -2561,7 +2571,7 @@
]
},
"post": {
- "operationId": "createSecrets",
+ "operationId": "v1-bulk-create-secrets",
"summary": "Bulk create secrets",
"description": "Creates multiple secrets and adds them to the specified project.",
"parameters": [
@@ -2628,7 +2638,7 @@
]
},
"delete": {
- "operationId": "deleteSecrets",
+ "operationId": "v1-bulk-delete-secrets",
"summary": "Bulk delete secrets",
"description": "Deletes all secrets with the given names from the specified project",
"parameters": [
@@ -2687,8 +2697,8 @@
},
"/v1/projects/{ref}/ssl-enforcement": {
"get": {
- "operationId": "getSslEnforcementConfig",
- "summary": "Get project's SSL enforcement configuration.",
+ "operationId": "v1-get-ssl-enforcement-config",
+ "summary": "[Beta] Get project's SSL enforcement configuration.",
"parameters": [
{
"name": "ref",
@@ -2741,7 +2751,7 @@
}
},
"tags": [
- "ssl enforcement (beta)"
+ "database"
],
"security": [
{
@@ -2750,8 +2760,8 @@
]
},
"put": {
- "operationId": "updateSslEnforcementConfig",
- "summary": "Update project's SSL enforcement configuration.",
+ "operationId": "v1-update-ssl-enforcement-config",
+ "summary": "[Beta] Update project's SSL enforcement configuration.",
"parameters": [
{
"name": "ref",
@@ -2830,7 +2840,7 @@
}
},
"tags": [
- "ssl enforcement (beta)"
+ "database"
],
"security": [
{
@@ -2841,7 +2851,7 @@
},
"/v1/projects/{ref}/types/typescript": {
"get": {
- "operationId": "getTypescriptTypes",
+ "operationId": "v1-generate-typescript-types",
"summary": "Generate TypeScript types",
"description": "Returns the TypeScript types of your schema for use with supabase-js.",
"parameters": [
@@ -2893,7 +2903,7 @@
}
},
"tags": [
- "projects"
+ "database"
],
"security": [
{
@@ -2904,8 +2914,8 @@
},
"/v1/projects/{ref}/vanity-subdomain": {
"get": {
- "operationId": "getVanitySubdomainConfig",
- "summary": "Gets current vanity subdomain config",
+ "operationId": "v1-get-vanity-subdomain-config",
+ "summary": "[Beta] Gets current vanity subdomain config",
"parameters": [
{
"name": "ref",
@@ -2954,7 +2964,7 @@
}
},
"tags": [
- "vanity subdomain (beta)"
+ "domains"
],
"security": [
{
@@ -2963,8 +2973,8 @@
]
},
"delete": {
- "operationId": "removeVanitySubdomainConfig",
- "summary": "Deletes a project's vanity subdomain configuration",
+ "operationId": "v1-deactive-vanity-subdomain-config",
+ "summary": "[Beta] Deletes a project's vanity subdomain configuration",
"parameters": [
{
"name": "ref",
@@ -2990,7 +3000,7 @@
}
},
"tags": [
- "vanity subdomain (beta)"
+ "domains"
],
"security": [
{
@@ -3001,8 +3011,8 @@
},
"/v1/projects/{ref}/vanity-subdomain/check-availability": {
"post": {
- "operationId": "checkVanitySubdomainAvailability",
- "summary": "Checks vanity subdomain availability",
+ "operationId": "v1-check-vanity-subdomain-availability",
+ "summary": "[Beta] Checks vanity subdomain availability",
"parameters": [
{
"name": "ref",
@@ -3061,7 +3071,7 @@
}
},
"tags": [
- "vanity subdomain (beta)"
+ "domains"
],
"security": [
{
@@ -3072,8 +3082,8 @@
},
"/v1/projects/{ref}/vanity-subdomain/activate": {
"post": {
- "operationId": "activateVanitySubdomainPlease",
- "summary": "Activates a vanity subdomain for a project.",
+ "operationId": "v1-activate-vanity-subdomain-config",
+ "summary": "[Beta] Activates a vanity subdomain for a project.",
"parameters": [
{
"name": "ref",
@@ -3132,7 +3142,7 @@
}
},
"tags": [
- "vanity subdomain (beta)"
+ "domains"
],
"security": [
{
@@ -3143,8 +3153,8 @@
},
"/v1/projects/{ref}/upgrade": {
"post": {
- "operationId": "upgradeProject",
- "summary": "Upgrades the project's Postgres version",
+ "operationId": "v1-upgrade-postgres-version",
+ "summary": "[Beta] Upgrades the project's Postgres version",
"parameters": [
{
"name": "ref",
@@ -3203,7 +3213,7 @@
}
},
"tags": [
- "database version upgrade (beta)"
+ "projects"
],
"security": [
{
@@ -3214,8 +3224,8 @@
},
"/v1/projects/{ref}/upgrade/eligibility": {
"get": {
- "operationId": "upgradeEligibilityInformation",
- "summary": "Returns the project's eligibility for upgrades",
+ "operationId": "v1-get-postgrest-upgrade-eligibility",
+ "summary": "[Beta] Returns the project's eligibility for upgrades",
"parameters": [
{
"name": "ref",
@@ -3308,7 +3318,7 @@
}
},
"tags": [
- "database version upgrade (beta)"
+ "projects"
],
"security": [
{
@@ -3319,8 +3329,8 @@
},
"/v1/projects/{ref}/upgrade/status": {
"get": {
- "operationId": "getUpgradeStatus",
- "summary": "Gets the latest status of the project's upgrade",
+ "operationId": "v1-get-postgrest-upgrade-status",
+ "summary": "[Beta] Gets the latest status of the project's upgrade",
"parameters": [
{
"name": "ref",
@@ -3355,7 +3365,6 @@
"type": "number"
},
"error": {
- "type": "string",
"enum": [
"1_upgraded_instance_launch_failed",
"2_volume_detachchment_from_upgraded_instance_failed",
@@ -3365,10 +3374,10 @@
"6_volume_detachchment_from_original_instance_failed",
"7_volume_attachment_to_upgraded_instance_failed",
"8_upgrade_completion_failed"
- ]
+ ],
+ "type": "string"
},
"progress": {
- "type": "string",
"enum": [
"0_requested",
"1_started",
@@ -3380,15 +3389,16 @@
"7_detached_volume_from_original_instance",
"8_attached_volume_to_upgraded_instance",
"9_completed_upgrade"
- ]
+ ],
+ "type": "string"
},
"status": {
- "type": "number",
"enum": [
0,
1,
2
- ]
+ ],
+ "type": "number"
}
},
"required": [
@@ -3415,7 +3425,7 @@
}
},
"tags": [
- "database version upgrade (beta)"
+ "projects"
],
"security": [
{
@@ -3426,7 +3436,7 @@
},
"/v1/projects/{ref}/readonly": {
"get": {
- "operationId": "getReadOnlyModeStatus",
+ "operationId": "v1-get-readonly-mode-status",
"summary": "Returns project's readonly mode status",
"parameters": [
{
@@ -3473,7 +3483,7 @@
}
},
"tags": [
- "database readonly mode"
+ "database"
],
"security": [
{
@@ -3484,7 +3494,7 @@
},
"/v1/projects/{ref}/readonly/temporary-disable": {
"post": {
- "operationId": "temporarilyDisableReadonlyMode",
+ "operationId": "v1-disable-readonly-mode-temporarily",
"summary": "Disables project's readonly mode for the next 15 minutes",
"parameters": [
{
@@ -3508,7 +3518,7 @@
}
},
"tags": [
- "database readonly mode"
+ "database"
],
"security": [
{
@@ -3519,8 +3529,8 @@
},
"/v1/projects/{ref}/read-replicas/setup": {
"post": {
- "operationId": "setUpReadReplica",
- "summary": "Set up a read replica",
+ "operationId": "v1-setup-a-read-replica",
+ "summary": "[Beta] Set up a read replica",
"parameters": [
{
"name": "ref",
@@ -3580,7 +3590,7 @@
}
},
"tags": [
- "read replicas (beta)"
+ "database"
],
"security": [
{
@@ -3591,8 +3601,8 @@
},
"/v1/projects/{ref}/read-replicas/remove": {
"post": {
- "operationId": "removeReadReplica",
- "summary": "Remove a read replica",
+ "operationId": "v1-remove-a-read-replica",
+ "summary": "[Beta] Remove a read replica",
"parameters": [
{
"name": "ref",
@@ -3633,7 +3643,7 @@
}
},
"tags": [
- "read replicas (beta)"
+ "database"
],
"security": [
{
@@ -3644,7 +3654,7 @@
},
"/v1/projects/{ref}/health": {
"get": {
- "operationId": "checkServiceHealth",
+ "operationId": "v1-get-services-health",
"summary": "Gets project's service health status",
"parameters": [
{
@@ -3781,7 +3791,7 @@
}
},
"tags": [
- "services"
+ "projects"
],
"security": [
{
@@ -3792,7 +3802,7 @@
},
"/v1/projects/{ref}/config/database/postgres": {
"get": {
- "operationId": "getConfig",
+ "operationId": "get-postgres-config",
"summary": "Gets project's Postgres config",
"parameters": [
{
@@ -3884,7 +3894,7 @@
}
},
"tags": [
- "projects config"
+ "database"
],
"security": [
{
@@ -3893,7 +3903,7 @@
]
},
"put": {
- "operationId": "updateConfig",
+ "operationId": "update-postgres-config",
"summary": "Updates project's Postgres config",
"parameters": [
{
@@ -4056,7 +4066,7 @@
}
},
"tags": [
- "projects config"
+ "database"
],
"security": [
{
@@ -4067,7 +4077,7 @@
},
"/v1/projects/{ref}/config/database/pgbouncer": {
"get": {
- "operationId": "v1GetPgbouncerConfig",
+ "operationId": "v1-get-project-pgbouncer-config",
"summary": "Get project's pgbouncer config",
"parameters": [
{
@@ -4120,13 +4130,13 @@
}
},
"tags": [
- "projects config"
+ "database"
]
}
},
"/v1/projects/{ref}/config/auth": {
"get": {
- "operationId": "getV1AuthConfig",
+ "operationId": "v1-get-auth-service-config",
"summary": "Gets project's auth config",
"parameters": [
{
@@ -4502,8 +4512,7 @@
"nullable": true
},
"mailer_otp_exp": {
- "type": "number",
- "nullable": true
+ "type": "number"
},
"mailer_otp_length": {
"type": "number",
@@ -4670,8 +4679,7 @@
"nullable": true
},
"sms_otp_length": {
- "type": "number",
- "nullable": true
+ "type": "number"
},
"sms_provider": {
"type": "string",
@@ -4939,7 +4947,7 @@
}
},
"tags": [
- "projects config"
+ "auth"
],
"security": [
{
@@ -4948,7 +4956,7 @@
]
},
"patch": {
- "operationId": "updateV1AuthConfig",
+ "operationId": "v1-update-auth-service-config",
"summary": "Updates a project's auth config",
"parameters": [
{
@@ -5842,8 +5850,7 @@
"nullable": true
},
"mailer_otp_exp": {
- "type": "number",
- "nullable": true
+ "type": "number"
},
"mailer_otp_length": {
"type": "number",
@@ -6010,8 +6017,7 @@
"nullable": true
},
"sms_otp_length": {
- "type": "number",
- "nullable": true
+ "type": "number"
},
"sms_provider": {
"type": "string",
@@ -6279,371 +6285,7 @@
}
},
"tags": [
- "projects config"
- ],
- "security": [
- {
- "bearer": []
- }
- ]
- }
- },
- "/v1/projects/{ref}/config/auth/third-party-auth": {
- "post": {
- "operationId": "createTPAForProject",
- "summary": "Creates a new third-party auth integration",
- "parameters": [
- {
- "name": "ref",
- "required": true,
- "in": "path",
- "description": "Project ref",
- "schema": {
- "minLength": 20,
- "maxLength": 20,
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "oidc_issuer_url": {
- "type": "string"
- },
- "jwks_url": {
- "type": "string"
- },
- "custom_jwks": {
- "type": "object"
- }
- }
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "oidc_issuer_url": {
- "type": "string",
- "nullable": true
- },
- "jwks_url": {
- "type": "string",
- "nullable": true
- },
- "custom_jwks": {
- "type": "object",
- "nullable": true
- },
- "resolved_jwks": {
- "type": "object",
- "nullable": true
- },
- "inserted_at": {
- "type": "string"
- },
- "updated_at": {
- "type": "string"
- },
- "resolved_at": {
- "type": "string",
- "nullable": true
- }
- },
- "required": [
- "id",
- "type",
- "inserted_at",
- "updated_at"
- ]
- }
- }
- }
- },
- "403": {
- "description": ""
- }
- },
- "tags": [
- "third-party-auth (alpha)"
- ],
- "security": [
- {
- "bearer": []
- }
- ]
- },
- "get": {
- "operationId": "listTPAForProject",
- "summary": "Lists all third-party auth integrations",
- "parameters": [
- {
- "name": "ref",
- "required": true,
- "in": "path",
- "description": "Project ref",
- "schema": {
- "minLength": 20,
- "maxLength": 20,
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "oidc_issuer_url": {
- "type": "string",
- "nullable": true
- },
- "jwks_url": {
- "type": "string",
- "nullable": true
- },
- "custom_jwks": {
- "type": "object",
- "nullable": true
- },
- "resolved_jwks": {
- "type": "object",
- "nullable": true
- },
- "inserted_at": {
- "type": "string"
- },
- "updated_at": {
- "type": "string"
- },
- "resolved_at": {
- "type": "string",
- "nullable": true
- }
- },
- "required": [
- "id",
- "type",
- "inserted_at",
- "updated_at"
- ]
- }
- }
- }
- }
- },
- "403": {
- "description": ""
- }
- },
- "tags": [
- "third-party-auth (alpha)"
- ],
- "security": [
- {
- "bearer": []
- }
- ]
- }
- },
- "/v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}": {
- "delete": {
- "operationId": "deleteTPAForProject",
- "summary": "Removes a third-party auth integration",
- "parameters": [
- {
- "name": "ref",
- "required": true,
- "in": "path",
- "description": "Project ref",
- "schema": {
- "minLength": 20,
- "maxLength": 20,
- "type": "string"
- }
- },
- {
- "name": "tpa_id",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "oidc_issuer_url": {
- "type": "string",
- "nullable": true
- },
- "jwks_url": {
- "type": "string",
- "nullable": true
- },
- "custom_jwks": {
- "type": "object",
- "nullable": true
- },
- "resolved_jwks": {
- "type": "object",
- "nullable": true
- },
- "inserted_at": {
- "type": "string"
- },
- "updated_at": {
- "type": "string"
- },
- "resolved_at": {
- "type": "string",
- "nullable": true
- }
- },
- "required": [
- "id",
- "type",
- "inserted_at",
- "updated_at"
- ]
- }
- }
- }
- },
- "403": {
- "description": ""
- }
- },
- "tags": [
- "third-party-auth (alpha)"
- ],
- "security": [
- {
- "bearer": []
- }
- ]
- },
- "get": {
- "operationId": "getTPAForProject",
- "summary": "Get a third-party integration",
- "parameters": [
- {
- "name": "ref",
- "required": true,
- "in": "path",
- "description": "Project ref",
- "schema": {
- "minLength": 20,
- "maxLength": 20,
- "type": "string"
- }
- },
- {
- "name": "tpa_id",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "oidc_issuer_url": {
- "type": "string",
- "nullable": true
- },
- "jwks_url": {
- "type": "string",
- "nullable": true
- },
- "custom_jwks": {
- "type": "object",
- "nullable": true
- },
- "resolved_jwks": {
- "type": "object",
- "nullable": true
- },
- "inserted_at": {
- "type": "string"
- },
- "updated_at": {
- "type": "string"
- },
- "resolved_at": {
- "type": "string",
- "nullable": true
- }
- },
- "required": [
- "id",
- "type",
- "inserted_at",
- "updated_at"
- ]
- }
- }
- }
- },
- "403": {
- "description": ""
- }
- },
- "tags": [
- "third-party-auth (alpha)"
+ "auth"
],
"security": [
{
@@ -6654,8 +6296,8 @@
},
"/v1/projects/{ref}/database/query": {
"post": {
- "operationId": "v1RunQuery",
- "summary": "Run sql query",
+ "operationId": "v1-run-a-query",
+ "summary": "[Beta] Run sql query",
"parameters": [
{
"name": "ref",
@@ -6706,7 +6348,7 @@
}
},
"tags": [
- "projects (beta)"
+ "database"
],
"security": [
{
@@ -6717,8 +6359,8 @@
},
"/v1/projects/{ref}/database/webhooks/enable": {
"post": {
- "operationId": "v1EnableDatabaseWebhooks",
- "summary": "Enables Database Webhooks on the project",
+ "operationId": "v1-enable-database-webhook",
+ "summary": "[Beta] Enables Database Webhooks on the project",
"parameters": [
{
"name": "ref",
@@ -6744,7 +6386,7 @@
}
},
"tags": [
- "projects (beta)"
+ "database"
],
"security": [
{
@@ -6943,7 +6585,7 @@
}
},
"tags": [
- "functions"
+ "edge functions"
],
"security": [
{
@@ -6952,7 +6594,7 @@
]
},
"get": {
- "operationId": "getFunctions",
+ "operationId": "v1-list-all-functions",
"summary": "List all functions",
"description": "Returns all functions you've previously added to the specified project.",
"parameters": [
@@ -7039,7 +6681,7 @@
}
},
"tags": [
- "functions"
+ "edge functions"
],
"security": [
{
@@ -7050,7 +6692,7 @@
},
"/v1/projects/{ref}/functions/{function_slug}": {
"get": {
- "operationId": "getFunction",
+ "operationId": "v1-get-a-function",
"summary": "Retrieve a function",
"description": "Retrieves a function with the specified slug and project.",
"parameters": [
@@ -7144,7 +6786,7 @@
}
},
"tags": [
- "functions"
+ "edge functions"
],
"security": [
{
@@ -7153,7 +6795,7 @@
]
},
"patch": {
- "operationId": "updateFunction",
+ "operationId": "v1-update-a-function",
"summary": "Update a function",
"description": "Updates a function with the specified slug and project.",
"parameters": [
@@ -7333,7 +6975,7 @@
}
},
"tags": [
- "functions"
+ "edge functions"
],
"security": [
{
@@ -7342,7 +6984,7 @@
]
},
"delete": {
- "operationId": "deleteFunction",
+ "operationId": "v1-delete-a-function",
"summary": "Delete a function",
"description": "Deletes a function with the specified slug from the specified project.",
"parameters": [
@@ -7380,7 +7022,7 @@
}
},
"tags": [
- "functions"
+ "edge functions"
],
"security": [
{
@@ -7391,7 +7033,7 @@
},
"/v1/projects/{ref}/functions/{function_slug}/body": {
"get": {
- "operationId": "getFunctionBody",
+ "operationId": "v1-get-a-function-body",
"summary": "Retrieve a function body",
"description": "Retrieves a function body for the specified slug and project.",
"parameters": [
@@ -7429,7 +7071,7 @@
}
},
"tags": [
- "functions"
+ "edge functions"
],
"security": [
{
@@ -7440,7 +7082,7 @@
},
"/v1/projects/{ref}/storage/buckets": {
"get": {
- "operationId": "getBuckets",
+ "operationId": "v1-list-all-buckets",
"summary": "Lists all buckets",
"parameters": [
{
@@ -7516,7 +7158,7 @@
},
"/v1/projects/{ref}/config/auth/sso/providers": {
"post": {
- "operationId": "createProviderForProject",
+ "operationId": "v1-create-a-sso-provider",
"summary": "Creates a new SSO provider",
"parameters": [
{
@@ -7724,7 +7366,7 @@
}
},
"tags": [
- "sso"
+ "auth"
],
"security": [
{
@@ -7733,7 +7375,7 @@
]
},
"get": {
- "operationId": "listAllProviders",
+ "operationId": "v1-list-all-sso-provider",
"summary": "Lists all SSO providers",
"parameters": [
{
@@ -7877,7 +7519,7 @@
}
},
"tags": [
- "sso"
+ "auth"
],
"security": [
{
@@ -7888,7 +7530,7 @@
},
"/v1/projects/{ref}/config/auth/sso/providers/{provider_id}": {
"get": {
- "operationId": "getProviderById",
+ "operationId": "v1-get-a-sso-provider",
"summary": "Gets a SSO provider by its UUID",
"parameters": [
{
@@ -8029,7 +7671,7 @@
}
},
"tags": [
- "sso"
+ "auth"
],
"security": [
{
@@ -8038,7 +7680,7 @@
]
},
"put": {
- "operationId": "updateProviderById",
+ "operationId": "v1-update-a-sso-provider",
"summary": "Updates a SSO provider by its UUID",
"parameters": [
{
@@ -8244,7 +7886,7 @@
}
},
"tags": [
- "sso"
+ "auth"
],
"security": [
{
@@ -8253,7 +7895,7 @@
]
},
"delete": {
- "operationId": "removeProviderById",
+ "operationId": "v1-delete-a-sso-provider",
"summary": "Removes a SSO provider by its UUID",
"parameters": [
{
@@ -8394,7 +8036,7 @@
}
},
"tags": [
- "sso"
+ "auth"
],
"security": [
{
@@ -8405,7 +8047,7 @@
},
"/v1/projects/{ref}/database/backups": {
"get": {
- "operationId": "getBackups",
+ "operationId": "v1-list-all-backups",
"summary": "Lists all backups",
"parameters": [
{
@@ -8494,7 +8136,7 @@
}
},
"tags": [
- "backups"
+ "database"
],
"security": [
{
@@ -8505,7 +8147,7 @@
},
"/v1/projects/{ref}/database/backups/restore-pitr": {
"post": {
- "operationId": "v1RestorePitr",
+ "operationId": "v1-restore-pitr-backup",
"summary": "Restores a PITR backup for a database",
"parameters": [
{
@@ -8544,7 +8186,7 @@
}
},
"tags": [
- "backups"
+ "database"
],
"security": [
{
@@ -8555,7 +8197,7 @@
},
"/v1/organizations/{slug}/members": {
"get": {
- "operationId": "v1ListOrganizationMembers",
+ "operationId": "v1-list-organization-members",
"summary": "List members of an organization",
"parameters": [
{
@@ -8617,7 +8259,7 @@
},
"/v1/organizations/{slug}": {
"get": {
- "operationId": "getOrganization",
+ "operationId": "v1-get-an-organization",
"summary": "Gets information about the organization",
"parameters": [
{
@@ -8782,6 +8424,9 @@
"pr_number": {
"type": "number"
},
+ "latest_check_run_id": {
+ "type": "number"
+ },
"reset_on_push": {
"type": "boolean"
},
@@ -8990,7 +8635,8 @@
},
"kps_enabled": {
"type": "boolean",
- "deprecated": true
+ "deprecated": true,
+ "description": "This field is deprecated and is ignored in this request"
},
"desired_instance_size": {
"type": "string",
@@ -9156,13 +8802,13 @@
]
},
"visibility": {
- "type": "string",
"enum": [
"user",
"project",
"org",
"public"
- ]
+ ],
+ "type": "string"
},
"name": {
"type": "string"
@@ -9252,13 +8898,13 @@
]
},
"visibility": {
- "type": "string",
"enum": [
"user",
"project",
"org",
"public"
- ]
+ ],
+ "type": "string"
},
"name": {
"type": "string"
@@ -10008,7 +9654,6 @@
"type": "number"
},
"error": {
- "type": "string",
"enum": [
"1_upgraded_instance_launch_failed",
"2_volume_detachchment_from_upgraded_instance_failed",
@@ -10018,10 +9663,10 @@
"6_volume_detachchment_from_original_instance_failed",
"7_volume_attachment_to_upgraded_instance_failed",
"8_upgrade_completion_failed"
- ]
+ ],
+ "type": "string"
},
"progress": {
- "type": "string",
"enum": [
"0_requested",
"1_started",
@@ -10033,15 +9678,16 @@
"7_detached_volume_from_original_instance",
"8_attached_volume_to_upgraded_instance",
"9_completed_upgrade"
- ]
+ ],
+ "type": "string"
},
"status": {
- "type": "number",
"enum": [
0,
1,
2
- ]
+ ],
+ "type": "number"
}
},
"required": [
@@ -10066,7 +9712,6 @@
"type": "number"
},
"error": {
- "type": "string",
"enum": [
"1_upgraded_instance_launch_failed",
"2_volume_detachchment_from_upgraded_instance_failed",
@@ -10076,10 +9721,10 @@
"6_volume_detachchment_from_original_instance_failed",
"7_volume_attachment_to_upgraded_instance_failed",
"8_upgrade_completion_failed"
- ]
+ ],
+ "type": "string"
},
"progress": {
- "type": "string",
"enum": [
"0_requested",
"1_started",
@@ -10091,15 +9736,16 @@
"7_detached_volume_from_original_instance",
"8_attached_volume_to_upgraded_instance",
"9_completed_upgrade"
- ]
+ ],
+ "type": "string"
},
"status": {
- "type": "number",
"enum": [
0,
1,
2
- ]
+ ],
+ "type": "number"
}
},
"required": [
@@ -10799,8 +10445,7 @@
"nullable": true
},
"mailer_otp_exp": {
- "type": "number",
- "nullable": true
+ "type": "number"
},
"mailer_otp_length": {
"type": "number",
@@ -10967,8 +10612,7 @@
"nullable": true
},
"sms_otp_length": {
- "type": "number",
- "nullable": true
+ "type": "number"
},
"sms_provider": {
"type": "string",
@@ -11736,63 +11380,6 @@
}
}
},
- "CreateThirdPartyAuthBody": {
- "type": "object",
- "properties": {
- "oidc_issuer_url": {
- "type": "string"
- },
- "jwks_url": {
- "type": "string"
- },
- "custom_jwks": {
- "type": "object"
- }
- }
- },
- "ThirdPartyAuth": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "oidc_issuer_url": {
- "type": "string",
- "nullable": true
- },
- "jwks_url": {
- "type": "string",
- "nullable": true
- },
- "custom_jwks": {
- "type": "object",
- "nullable": true
- },
- "resolved_jwks": {
- "type": "object",
- "nullable": true
- },
- "inserted_at": {
- "type": "string"
- },
- "updated_at": {
- "type": "string"
- },
- "resolved_at": {
- "type": "string",
- "nullable": true
- }
- },
- "required": [
- "id",
- "type",
- "inserted_at",
- "updated_at"
- ]
- },
"V1RunQueryBody": {
"type": "object",
"properties": {