From be136df69e79f969a579f2c7a3342ff305109e3f Mon Sep 17 00:00:00 2001 From: "Andrey A." <56412611+aantti@users.noreply.github.com> Date: Fri, 31 Jul 2026 13:43:35 +0200 Subject: [PATCH 01/12] feat(self-hosted): use latest tag in setup.sh plus additional checks (#47848) --- docker/.gitignore | 1 + docker/setup.sh | 162 +++++++++++++++++++++++++++++++++++++++------- 2 files changed, 139 insertions(+), 24 deletions(-) diff --git a/docker/.gitignore b/docker/.gitignore index a1e9dc61e05fe..1f565391affe0 100644 --- a/docker/.gitignore +++ b/docker/.gitignore @@ -3,3 +3,4 @@ volumes/storage .env test.http docker-compose.override.yml +.supabase-version diff --git a/docker/setup.sh b/docker/setup.sh index 0ea8945a19bd5..84ec21be9d932 100755 --- a/docker/setup.sh +++ b/docker/setup.sh @@ -8,8 +8,9 @@ # 3. Optionally installs the AWS CLI v2 (--with-aws) # 4. Sparse-clones the repo to extract the contents of ./docker # 5. Creates a project directory in CWD and copies docker/* into it -# 6. Prompts for the main URLs and writes them to .env -# 7. Generates secrets and asymmetric API keys via utils/*.sh +# 6. Records the base version the deployment was set up from (.supabase-version) +# 7. Prompts for the main URLs and writes them to .env +# 8. Generates secrets and asymmetric API keys via utils/*.sh # # Usage: # sh setup.sh # interactive @@ -17,9 +18,14 @@ # sh setup.sh --project-dir my-supabase # name the project directory # sh setup.sh --skip-deps # skip system-package installation # sh setup.sh --with-aws # also install the AWS CLI v2 +# sh setup.sh --ref self-hosted/v0.7.0 # clone docker/ from a specific git ref +# sh setup.sh --head # clone docker/ from HEAD (skip tags) # # curl -fsSL | sh # bootstrap from scratch in CWD # +# By default the docker/ sources are cloned from the latest self-hosted release +# tag (self-hosted/v*), falling back to the default branch (HEAD) if none exist. +# set -e @@ -27,6 +33,8 @@ PROJECT_DIR="supabase-project" SKIP_DEPS=0 WITH_AWS=0 ASSUME_YES=0 +SOURCE_REF="" +FORCE_HEAD=0 print_help() { cat < Name of the project directory (default: supabase-project) --skip-deps Skip installation of system packages --with-aws Install the AWS CLI v2 + --ref Clone docker/ from this git ref instead of the + latest self-hosted tag (no HEAD fallback) + --head Clone docker/ from the default branch (HEAD), + skipping self-hosted tag detection -y, --yes Non-interactive: accept defaults, no prompts -h, --help Show this help and exit EOF @@ -46,12 +58,22 @@ while [ $# -gt 0 ]; do -p|--project-dir) PROJECT_DIR="$2"; shift 2 ;; --skip-deps) SKIP_DEPS=1; shift ;; --with-aws) WITH_AWS=1; shift ;; + --ref) SOURCE_REF="$2"; shift 2 ;; + --head) FORCE_HEAD=1; shift ;; -y|--yes) ASSUME_YES=1; shift ;; -h|--help) print_help; exit 0 ;; *) echo "Unknown option: $1" >&2; print_help; exit 1 ;; esac done +# Interactive vs not: -y forces non-interactive; otherwise we're non-interactive +# when there's no controlling terminal to prompt on (e.g. curl | sh in CI). +if [ "$ASSUME_YES" = "1" ] || ! ( : < /dev/tty ) 2>/dev/null; then + NON_INTERACTIVE=1 +else + NON_INTERACTIVE=0 +fi + if [ "$(id -u)" = "0" ]; then SUDO="" else @@ -67,7 +89,7 @@ die() { printf "ERROR: %s\n" "$*" >&2; exit 1; } # Falls back to the default with -y or when no controlling terminal exists. ask() { # ask -> echoes chosen value - if [ "$ASSUME_YES" = "1" ] || ! ( : < /dev/tty ) 2>/dev/null; then + if [ "$NON_INTERACTIVE" = "1" ]; then printf '%s' "$2" return fi @@ -77,6 +99,28 @@ ask() { printf '%s' "$reply" } +# True if the value looks like an http(s) URL (scheme check only, not validation). +valid_url() { + case "$1" in + http://?*|https://?*) return 0 ;; + *) return 1 ;; + esac +} + +# Like ask, but requires an http(s):// value. Re-prompts interactively; with no +# usable terminal (-y or curl | sh) a bad value is fatal rather than silently kept. +ask_url() { + # ask_url -> echoes a validated URL + while :; do + _url=$(ask "$1" "$2") + valid_url "$_url" && { printf '%s' "$_url"; return 0; } + if [ "$NON_INTERACTIVE" = "1" ]; then + die "$1 must start with http:// or https:// (got: '$_url')" + fi + printf " '%s' is not a URL - it must start with http:// or https://.\n" "$_url" > /dev/tty + done +} + OS_FAMILY="" OS_ID="" OS_CODENAME="" @@ -205,20 +249,72 @@ install_aws() { SRC_DIR="" SRC_TMP="" +RESOLVED_REF="" +REPO_URL="${SUPABASE_REPO_URL:-https://github.com/supabase/supabase}" +STAMP_FILE=".supabase-version" + +# Highest self-hosted/v* tag on the remote, or empty when the remote has none. +# Returns non-zero (printing nothing) when the remote can't be reached. +latest_release_tag() { + _refs=$(git ls-remote --tags --refs "$REPO_URL" 2>/dev/null) || return 1 + printf '%s\n' "$_refs" \ + | sed 's#^.*refs/tags/##' \ + | grep -E '^self-hosted/v[0-9]' \ + | sort -V | tail -n1 +} + +# Clone only docker/ from (empty = default branch) into . +sparse_clone() { + # sparse_clone [ref] + _dest="$1" + _ref="$2" + if [ -n "$_ref" ]; then + git clone --filter=blob:none --no-checkout --depth=1 --quiet \ + --branch "$_ref" "$REPO_URL" "$_dest" 2>/dev/null || return 1 + else + git clone --filter=blob:none --no-checkout --depth=1 --quiet \ + "$REPO_URL" "$_dest" 2>/dev/null || return 1 + fi + ( cd "$_dest" && + git sparse-checkout init --cone && + git sparse-checkout set docker && + git checkout --quiet ) 2>/dev/null || return 1 +} + +# Echo the commit the clone resolved to (for stamping HEAD-based checkouts). +resolved_sha() { + git -C "$1" rev-parse HEAD 2>/dev/null || true +} prepare_source() { - log "Sparse-cloning supabase repo" - SRC_TMP=$(mktemp -d) || return 1 - git clone --filter=blob:none --no-checkout --depth=1 --quiet \ - https://github.com/supabase/supabase "$SRC_TMP/supabase" 2>/dev/null || \ - { rm -rf "$SRC_TMP"; return 1; } - - cd "$SRC_TMP/supabase" || { rm -rf "$SRC_TMP"; return 1; } - git sparse-checkout init --cone && \ - git sparse-checkout set docker && \ - git checkout --quiet 2>/dev/null - SRC_DIR="$PWD/docker" - cd - > /dev/null + SRC_TMP=$(mktemp -d) || die "Could not create a temporary directory" + dest="$SRC_TMP/supabase" + + # Pick the ref to clone; empty means the default branch (HEAD), used only + # when no release tag exists yet (or --head). A resolved tag that fails to + # clone is an error, not a reason to silently install HEAD instead. + if [ -n "$SOURCE_REF" ]; then + ref="$SOURCE_REF" + elif [ "$FORCE_HEAD" = "1" ]; then + ref="" + else + if ref=$(latest_release_tag); then + [ -n "$ref" ] || log "No self-hosted release tag found; using the default branch (HEAD)" + else + die "Could not reach $REPO_URL to look up release tags. Check your network and retry, or pass --head (default branch) or --ref ." + fi + fi + + log "Sparse-cloning supabase repo at ${ref:-HEAD}" + sparse_clone "$dest" "$ref" || die "Could not clone '${ref:-HEAD}' from $REPO_URL" + + # Stamp the tag name for a release tag, else the exact commit SHA. + case "$ref" in + self-hosted/v*) RESOLVED_REF="$ref" ;; + *) RESOLVED_REF=$(resolved_sha "$dest") ;; + esac + + SRC_DIR="$dest/docker" } cleanup_src_tmp() { @@ -232,6 +328,20 @@ read_env() { grep "^$1=" .env 2>/dev/null | head -n1 | cut -d= -f2- } +# Record the base version this deployment was set up from, so update.sh can +# 3-way merge future upgrades against it: it fetches the snapshot at this ref +# as the merge base, and derives the base version from the ref itself. Just the +# ref - per-deployment state, not vendor content: gitignored. +write_version_stamp() { + [ -n "$1" ] || { warn "Could not resolve a base ref; skipping $STAMP_FILE"; return 0; } + { + echo "# Supabase self-hosted version stamp. Managed by setup.sh / update.sh." + echo "# Do not commit or edit by hand. Records the ref this deployment was based on." + echo "ref=$1" + } > "$STAMP_FILE" + log "Recorded base version in $STAMP_FILE (ref=$1)" +} + # --- Main --- log "Setup starting in $(pwd)" @@ -274,14 +384,12 @@ fi cd "$target" current_public_url=$(read_env SUPABASE_PUBLIC_URL) -current_api_url=$(read_env API_EXTERNAL_URL) current_site_url=$(read_env SITE_URL) [ -z "$current_public_url" ] && current_public_url="http://localhost:8000" -[ -z "$current_api_url" ] && current_api_url="$current_public_url" [ -z "$current_site_url" ] && current_site_url="http://localhost:3000" -if [ "$ASSUME_YES" = "1" ] || ! ( : < /dev/tty ) 2>/dev/null; then +if [ "$NON_INTERACTIVE" = "1" ]; then log "Non-interactive: using default URLs (edit .env to change)" else echo "" @@ -289,9 +397,9 @@ else echo "" fi -public_url=$(ask "SUPABASE_PUBLIC_URL (Studio + APIs)" "$current_public_url") -api_url=$(ask "API_EXTERNAL_URL (Auth callbacks)" "$public_url/auth/v1") -site_url=$(ask "SITE_URL (default Auth redirect)" "$current_site_url") +public_url=$(ask_url "SUPABASE_PUBLIC_URL (Studio + APIs)" "$current_public_url") +api_url=$(ask_url "API_EXTERNAL_URL (Auth callbacks)" "$public_url/auth/v1") +site_url=$(ask_url "SITE_URL (default Auth redirect)" "$current_site_url") # Suggest PROXY_DOMAIN from the public_url host (unless it's localhost-ish) public_host=$(printf '%s' "$public_url" | sed -e 's|^https*://||' -e 's|/.*$||' -e 's|:.*$||') @@ -324,8 +432,14 @@ sh utils/generate-keys.sh --update-env log "Generating asymmetric key pair and opaque API keys" sh utils/add-new-auth-keys.sh --update-env +write_version_stamp "$RESOLVED_REF" + log "Pulling Docker images" -docker compose pull || warn "docker compose pull failed; you can retry later." +if [ "$NON_INTERACTIVE" = "1" ]; then + docker compose --progress quiet pull || warn "docker compose pull failed; you can retry later." +else + docker compose pull || warn "docker compose pull failed; you can retry later." +fi echo "" echo "Setup complete. Project ready at: $(pwd)" @@ -336,6 +450,6 @@ echo " sh run.sh config" echo " sh run.sh secrets" echo " sh run.sh start" echo "" -echo "To enable docker-compose overrides (pg17, envoy, caddy, nginx, rustfs, s3, logs):" -echo " sh run.sh config add pg17" +echo "To enable docker-compose overrides (envoy, caddy, nginx, rustfs, s3, logs):" +echo " sh run.sh config add envoy" echo "" From 27f18f03595be957d7bb1a7c20aa90c31663a1c0 Mon Sep 17 00:00:00 2001 From: Illia Basalaiev <44750366+Ellba@users.noreply.github.com> Date: Fri, 31 Jul 2026 13:49:44 +0200 Subject: [PATCH 02/12] Spring Boot Quickstart (#48396) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? docs update ## What is the new behavior? Spring Boot quickstart guide ## Summary by CodeRabbit - **New Features** - Added a “Use Supabase with Spring Boot” quickstart guide, including project setup, Session pooler/JPA configuration, sample entity/repository, seed data, and a `GET /instruments` endpoint. - Added “Spring Boot” to the Getting Started “Framework Quickstarts” navigation, shown only when not in JS-only mode. - Added a Spring Boot AI prompt with step-by-step integration instructions. - **Documentation** - Updated MDX linting rules to allow “Spring Boot” and “Spring Data JPA” headings, and to permit “Initializr” spelling. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) Co-authored-by: Jeremias Menichelli --- .../NavigationMenu.constants.ts | 5 + .../quickstarts/spring-boot.mdx | 218 ++++++++++++++++++ apps/docs/data/ai-prompts.data.ts | 24 ++ supa-mdx-lint/Rule001HeadingCase.toml | 3 + supa-mdx-lint/Rule003Spelling.toml | 1 + 5 files changed, 251 insertions(+) create mode 100644 apps/docs/content/guides/getting-started/quickstarts/spring-boot.mdx diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts index 196a9cb40e8ee..b3a88a149eab5 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts @@ -422,6 +422,11 @@ export const gettingstarted: NavMenuConstant = { url: '/guides/getting-started/quickstarts/ruby-on-rails' as `/${string}`, enabled: !jsOnly, }, + { + name: 'Spring Boot', + url: '/guides/getting-started/quickstarts/spring-boot' as `/${string}`, + enabled: !jsOnly, + }, { name: 'SolidJS', url: '/guides/getting-started/quickstarts/solidjs', diff --git a/apps/docs/content/guides/getting-started/quickstarts/spring-boot.mdx b/apps/docs/content/guides/getting-started/quickstarts/spring-boot.mdx new file mode 100644 index 0000000000000..cc0015e5fcf4b --- /dev/null +++ b/apps/docs/content/guides/getting-started/quickstarts/spring-boot.mdx @@ -0,0 +1,218 @@ +--- +title: 'Use Supabase with Spring Boot' +subtitle: 'Learn how to create a Spring Boot project and connect it to your Supabase project.' +breadcrumb: 'Framework Quickstarts' +--- + + + +## Prerequisites + +Before you begin, make sure you have: + +- Java 17 or later, which you can check with `java -version` +- `curl` and `unzip`, to download and extract the generated project + +## 1. Create a Spring Boot project + +Use [Spring Initializr](https://start.spring.io) to scaffold a new project with the Web, Spring Data JPA, and Postgres Driver dependencies. Run the following from the directory where you keep your projects. + +```bash +curl https://start.spring.io/starter.zip \ + -d dependencies=web,data-jpa,postgresql \ + -d type=maven-project \ + -d language=java \ + -d groupId=com.example \ + -d artifactId=instruments \ + -d name=instruments \ + -o instruments.zip +unzip instruments.zip -d instruments && cd instruments +``` + +## 2. Install Supabase's Agent Skills (optional) + +Supabase's [Agent Skills](/docs/guides/ai-tools/ai-skills) is a curated set of instructions that give your AI agent procedural knowledge about working with Supabase. + +Install them so your AI coding agent can produce more accurate, reliable code using current Supabase patterns, such as authentication, server-side rendering, and database migrations, rather than relying solely on training data. + +To install, run the following command in the root of your project: + +```bash +npx skills add supabase/agent-skills +``` + +## 3. Set up the Postgres connection details + +Go to [database.new](https://database.new) and create a new Supabase project. Save your database password securely. + +When your project is up and running, navigate to its dashboard and click on [Connect](/dashboard/project/_?showConnect=true&method=session). + + + +The Transaction pooler (port `6543`) doesn't work as your app's main data source, because Spring Data JPA uses Hibernate, which relies on server-side prepared statements. Use the Session pooler, or the direct connection string if you're in an [IPv6 environment](/docs/guides/troubleshooting/supabase--your-network-ipv4-and-ipv6-compatibility-cHe3BP) or have the [IPv4 Add-On](/docs/guides/platform/ipv4-address). + + + +Under the **Session pooler** (port `5432`), select the **JDBC** tab and copy the connection string. Replace the password placeholder with your saved database password, and [percent-encode](https://en.wikipedia.org/wiki/Percent-encoding) any reserved characters it contains, such as `&`, `#`, `?`, or a space. + + + +You can reset your database password in your [Database Settings](/dashboard/project/_/database/settings) if you do not have it. + + + +The connection string contains your database password, and `application.properties` is committed with your project. Set the string as an environment variable instead, and set it the same way on whatever platform you deploy to. + +```bash +export SUPABASE_DB_URL='jdbc:postgresql://xxxx.pooler.supabase.com:5432/postgres?user=postgres.xxxx&password=[YOUR-PASSWORD]&sslmode=require' +``` + +The string you copied doesn't set `sslmode`, so add it. The driver defaults to `prefer`, which falls back to sending your data in plaintext if the encrypted attempt fails. You can also [enforce SSL](/docs/guides/platform/ssl-enforcement) on the database side. + +Then reference the variable, along with the driver, in `src/main/resources/application.properties`. + +```text name=src/main/resources/application.properties +spring.datasource.url=${SUPABASE_DB_URL} +spring.datasource.driver-class-name=org.postgresql.Driver +spring.jpa.hibernate.ddl-auto=update +``` + +If the app fails to start with `Unable to determine Dialect without JDBC metadata`, Hibernate couldn't open a connection at all. Look above that line in the logs for the real cause, most commonly `password authentication failed`. + +## 4. Change the default schema + +By default Hibernate creates tables in the `public` schema. We recommend changing this as Supabase exposes the `public` schema as a [data API](/docs/guides/api). + +Create the schema from the [Table Editor](/dashboard/project/_/editor) as your app will need it before start. Then point **Hibernate** at it in `application.properties`. + +```text name=src/main/resources/application.properties +spring.jpa.properties.hibernate.default_schema=app +``` + +## 5. Create an entity and repository + +Spring Data JPA maps Java classes to database tables. Create an `Instrument` entity in `src/main/java/com/example/instruments/Instrument.java`. With `spring.jpa.hibernate.ddl-auto=update` set, Hibernate creates the `instruments` table for you when the app starts. + +```java name=src/main/java/com/example/instruments/Instrument.java +package com.example.instruments; + +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; + +@Entity +@Table(name = "instruments") +public class Instrument { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + + public Instrument() {} + + public Instrument(String name) { + this.name = name; + } + + public Long getId() { + return id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} +``` + +Create an `InstrumentRepository` interface in the same package. Extending `JpaRepository` gives you `findAll`, `save`, and other query methods without writing any implementation. + +```java name=src/main/java/com/example/instruments/InstrumentRepository.java +package com.example.instruments; + +import org.springframework.data.jpa.repository.JpaRepository; + +public interface InstrumentRepository extends JpaRepository {} +``` + +## 6. Seed sample data + +Add a `CommandLineRunner` bean to `InstrumentsApplication.java` that saves some sample instruments the first time the app starts. + +```java name=src/main/java/com/example/instruments/InstrumentsApplication.java +package com.example.instruments; + +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; + +@SpringBootApplication +public class InstrumentsApplication { + + public static void main(String[] args) { + SpringApplication.run(InstrumentsApplication.class, args); + } + + @Bean + CommandLineRunner seedInstruments(InstrumentRepository instrumentRepository) { + return args -> { + if (instrumentRepository.count() == 0) { + instrumentRepository.save(new Instrument("violin")); + instrumentRepository.save(new Instrument("viola")); + instrumentRepository.save(new Instrument("cello")); + } + }; + } +} +``` + +## 7. Query data from the app + +Create an `InstrumentController` that fetches every row from the `instruments` table through the repository and returns it as JSON. + +```java name=src/main/java/com/example/instruments/InstrumentController.java +package com.example.instruments; + +import java.util.List; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class InstrumentController { + + private final InstrumentRepository instrumentRepository; + + public InstrumentController(InstrumentRepository instrumentRepository) { + this.instrumentRepository = instrumentRepository; + } + + @GetMapping("/instruments") + public List getInstruments() { + return instrumentRepository.findAll(); + } +} +``` + +## 8. Start the app + +Run the Spring Boot app, and go to http://localhost:8080/instruments in your browser. You should see the list of instruments. + +```bash +./mvnw spring-boot:run +``` + +## Next steps + +- Set up [Auth](/docs/guides/auth) for your app +- Replace `ddl-auto` with [database migrations](/docs/guides/deployment/database-migrations) before going to production +- [Insert more data](/docs/guides/database/import-data) into your database +- Upload and serve static files using [Storage](/docs/guides/storage) diff --git a/apps/docs/data/ai-prompts.data.ts b/apps/docs/data/ai-prompts.data.ts index 74cf6930033e6..788b3acf364e5 100644 --- a/apps/docs/data/ai-prompts.data.ts +++ b/apps/docs/data/ai-prompts.data.ts @@ -201,6 +201,30 @@ database.new and run the instruments table SQL. Then: REFERENCE https://supabase.com/docs/guides/getting-started/quickstarts/solidjs.md`, + 'spring-boot': `Help me add Supabase to my Spring Boot project. Create a Supabase project at +database.new. Then: +1. Run \`curl https://start.spring.io/starter.zip -d dependencies=web,data-jpa,postgresql + -d type=maven-project -d language=java -d groupId=com.example -d artifactId=instruments + -d name=instruments -o instruments.zip\` and unzip it to scaffold the project. +2. Copy the JDBC connection string for the Session pooler (port 5432) from the Supabase + Connect panel and export it as a \`SUPABASE_DB_URL\` environment variable, so the + password stays out of source control. Set \`spring.datasource.url=\${SUPABASE_DB_URL}\` + and \`spring.datasource.driver-class-name\` in \`application.properties\`. Avoid the + Transaction pooler (port 6543) since Hibernate relies on prepared statements. +3. Set \`spring.jpa.hibernate.ddl-auto=update\` and + \`spring.jpa.properties.hibernate.default_schema\` in \`application.properties\`, so + Hibernate creates tables outside the \`public\` schema that Supabase exposes as a data API. +4. Create an \`Instrument\` JPA entity mapped to the \`instruments\` table with + \`@Table(name = "instruments")\`, and an \`InstrumentRepository\` extending + \`JpaRepository\`. +5. Add a \`CommandLineRunner\` bean to \`InstrumentsApplication\` that seeds the table + with a few instruments the first time the app starts. +6. Create an \`InstrumentController\` with a \`GET /instruments\` endpoint that returns + \`instrumentRepository.findAll()\`. +7. Run \`./mvnw spring-boot:run\` and open http://localhost:8080/instruments. + +REFERENCE +https://supabase.com/docs/guides/getting-started/quickstarts/spring-boot.md`, sveltekit: `Help me add Supabase to my SvelteKit project. Create a Supabase project at database.new and run the instruments table SQL. Then: 1. Run \`npx sv create my-app\` to scaffold the app. diff --git a/supa-mdx-lint/Rule001HeadingCase.toml b/supa-mdx-lint/Rule001HeadingCase.toml index 5eefe35701799..6a497f7929abe 100644 --- a/supa-mdx-lint/Rule001HeadingCase.toml +++ b/supa-mdx-lint/Rule001HeadingCase.toml @@ -228,6 +228,9 @@ may_uppercase = [ "Spend Cap", "Spotify", "Spotify Developers?", + "Spring Boot", + "Spring Data JPA", + "Spring Initializr", "Sqitch", "Storage", "Studio", diff --git a/supa-mdx-lint/Rule003Spelling.toml b/supa-mdx-lint/Rule003Spelling.toml index 6c67ee9777114..2d9bd6b8d3f5c 100644 --- a/supa-mdx-lint/Rule003Spelling.toml +++ b/supa-mdx-lint/Rule003Spelling.toml @@ -270,6 +270,7 @@ allow_list = [ "Inbucket", "Inferencer", "Infisical", + "Initializr", "IntelliJ", "IntelliSense", "[Ii]nviter's", From 009528c6ca9d52735bcb7d1e828b19e4d6654fcc Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Fri, 31 Jul 2026 19:58:34 +0800 Subject: [PATCH 03/12] chore: update Lovable homepage logo (#48536) ## Summary - replace the outdated Lovable homepage logo --- .../_components/logos/PublicityLogos.tsx | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/apps/www/app/(home)/_components/logos/PublicityLogos.tsx b/apps/www/app/(home)/_components/logos/PublicityLogos.tsx index b262cda419312..4b4ff63a1917d 100644 --- a/apps/www/app/(home)/_components/logos/PublicityLogos.tsx +++ b/apps/www/app/(home)/_components/logos/PublicityLogos.tsx @@ -320,14 +320,37 @@ export function LoopsLogo(props: ComponentProps<'svg'>) { export function LovableLogo(props: ComponentProps<'svg'>) { return ( - + + + + + + + ) From 50e1eb74366579fcf300cf62cf585ac10813a6ef Mon Sep 17 00:00:00 2001 From: Charis <26616127+charislam@users.noreply.github.com> Date: Fri, 31 Jul 2026 09:01:05 -0400 Subject: [PATCH 04/12] chore(eslint): bump eslint-config-next to v16 for useEffectEvent (#48458) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Chore / build (ESLint config upgrade + lint cleanup). ## What is the current behavior? `eslint-plugin-react-hooks` v5 (pulled in transitively by `eslint-config-next` v15) doesn't recognize stable `useEffectEvent`, so every effect that calls an effect-event handler needs an `eslint-disable react-hooks/exhaustive-deps` to silence a false positive. There are 30 such dead disables across Studio. ## What is the new behavior? Bumps `eslint-config-next` to v16, which pulls in `eslint-plugin-react-hooks` v7 whose `exhaustive-deps` understands `useEffectEvent`, and removes the 30 now-dead disable directives (and their orphaned explanatory comments). Supporting changes: - **Flat-config migration**: v16 is a native flat-config array (v15 was eslintrc), so `eslint-config-supabase` now spreads it directly instead of bridging through `FlatCompat`. - **React Compiler rules off**: v16 enables react-hooks v7's `recommended`, which layers the React Compiler lint rules on top of the two classic rules. These are switched off (derived dynamically from what next enables) to keep this change scoped to the `exhaustive-deps` improvement. - **Plugin-registration fallout** (v16 scopes plugin registration to a file glob rather than registering globally like FlatCompat did): stop re-registering `@typescript-eslint` (shared) and `jsx-a11y` (studio); scope our react / react-hooks / jsx-a11y rule overrides (studio, www) to v16's plugin glob so they don't error on files outside it (e.g. `.cjs`). - **Lint surface preserved**: v16's glob newly includes `.mts`/`.cts` (v15 didn't lint them), which surfaced pre-existing errors in tooling scripts. The shared config keeps the prior surface by leaving `.mts`/`.cts` unlinted; linting them is left as a separate change. - **Ratchet**: rebaselines `@tanstack/query/exhaustive-deps` 9 → 89. v15 forced next's `@babel/eslint-parser` onto `.ts` files, hiding these deps; v16 parses `.ts` with `@typescript-eslint/parser` and correctly surfaces the intentional `connectionString`-excluded-from-`queryKey` pattern. Worth a follow-up to review whether any are real cache-correctness bugs. - Drops three now-dead devDeps from `eslint-config-supabase`: `@eslint/eslintrc`, `@eslint/js`, `@typescript-eslint/eslint-plugin`. Verified locally: `turbo run lint` → 7/7 packages pass with 0 errors; Studio `lint:ratchet` passes; Prettier clean on changed files; typecheck unaffected. ## Additional context ## Summary by CodeRabbit * **Chores** * Refined linting configuration and removed outdated lint suppressions across Studio. * Updated Next.js linting support and refreshed related development configuration. * Expanded lint baseline coverage for query-related code. --- .../studio/.github/eslint-rule-baselines.json | 83 +++- .../header/filter/FilterPopoverNew.tsx | 1 - .../grid/hooks/useFilterLifeCycle.ts | 1 - .../components/grid/utils/gridColumns.tsx | 1 - .../ApiAuthorization.Valid.tsx | 1 - .../FeaturePreview/FeaturePreviewContext.tsx | 1 - .../content/nextjs/app/supabasejs/content.tsx | 1 - .../DatabaseInfrastructureSection.tsx | 1 - .../interfaces/Organization/SSO/SSOConfig.tsx | 2 - .../hooks/useQueryInsightsTableColumns.tsx | 1 - .../Inspector/RealtimeTokensPopover.tsx | 1 - .../SQLEditor/SQLEditorControllers.tsx | 2 - .../interfaces/SQLEditor/useSnippetEditor.ts | 3 - .../interfaces/SQLEditor/useSqlEditorAi.ts | 6 - .../Settings/API/DataApiEnableSwitch.tsx | 1 - .../Settings/API/DataApiProjectUrlCard.tsx | 1 - .../InstanceConfiguration.tsx | 1 - .../StorageExplorer/StorageExplorer.tsx | 1 - .../StoragePoliciesBucketsSection.tsx | 1 - .../SpreadsheetImport/useSpreadsheetImport.ts | 2 - .../TableEditor/ApiAccessToggle.tsx | 3 - .../UnifiedLogs/components/LogsFilterBar.tsx | 1 - .../data/projects/project-detail-query.ts | 1 - apps/studio/eslint.config.cjs | 3 +- .../hooks/analytics/useComputeMetrics.ts | 1 - apps/studio/pages/cli/login.tsx | 1 - apps/www/eslint.config.cjs | 1 + packages/eslint-config-supabase/next.js | 35 +- packages/eslint-config-supabase/package.json | 5 +- pnpm-lock.yaml | 394 ++++++++++++++---- 30 files changed, 424 insertions(+), 133 deletions(-) diff --git a/apps/studio/.github/eslint-rule-baselines.json b/apps/studio/.github/eslint-rule-baselines.json index bb9dff36ebbd9..e19a374737311 100644 --- a/apps/studio/.github/eslint-rule-baselines.json +++ b/apps/studio/.github/eslint-rule-baselines.json @@ -2,7 +2,7 @@ "rules": { "react-hooks/exhaustive-deps": 160, "import/no-anonymous-default-export": 57, - "@tanstack/query/exhaustive-deps": 9, + "@tanstack/query/exhaustive-deps": 89, "@typescript-eslint/no-explicit-any": 875, "no-restricted-imports": 0, "no-restricted-exports": 193, @@ -208,11 +208,86 @@ "@tanstack/query/exhaustive-deps": { "components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx": 1, "components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.utils.tsx": 2, + "data/auth/index-worker-status-query.ts": 1, + "data/auth/user-query.ts": 1, + "data/auth/user-search-indexes-query.ts": 1, + "data/auth/users-count-query.ts": 1, + "data/auth/users-infinite-query.ts": 1, "data/branches/branch-diff-query.ts": 1, + "data/config/disk-breakdown-query.ts": 1, + "data/config/project-upgrade-status-query.ts": 1, + "data/database-cron-jobs/database-cron-job-query.ts": 1, + "data/database-cron-jobs/database-cron-jobs-count-estimate-query.ts": 1, + "data/database-cron-jobs/database-cron-jobs-count-query.ts": 1, + "data/database-cron-jobs/database-cron-jobs-infinite-query.ts": 1, + "data/database-cron-jobs/database-cron-jobs-minimal-infinite-query.ts": 1, + "data/database-cron-jobs/database-cron-jobs-runs-infinite-query.ts": 1, + "data/database-cron-jobs/database-cron-timezone-query.ts": 1, + "data/database-event-triggers/database-event-triggers-query.ts": 1, + "data/database-extensions/database-extensions-query.ts": 1, + "data/database-functions/database-functions-query.ts": 1, + "data/database-indexes/indexes-query.ts": 1, + "data/database-integrations/stripe/sync-state-query.ts": 1, + "data/database-policies/database-policies-query.ts": 1, + "data/database-publications/database-publications-query.ts": 1, + "data/database-queues/database-queue-messages-infinite-query.ts": 1, + "data/database-queues/database-queues-expose-postgrest-status-query.ts": 1, + "data/database-queues/database-queues-metrics-query.ts": 1, + "data/database-queues/database-queues-query.ts": 1, + "data/database-roles/database-roles-query.ts": 1, + "data/database-triggers/database-triggers-query.ts": 2, + "data/database/activity-query.ts": 1, + "data/database/constraints-query.ts": 1, + "data/database/database-size-query.ts": 1, "data/database/foreign-key-constraints-query.ts": 1, - "data/database/schemas-query.ts": 1, - "data/entity-types/entity-types-infinite-query.ts": 1, - "data/tables/tables-query.ts": 2 + "data/database/keywords-query.ts": 1, + "data/database/max-connections-query.ts": 1, + "data/database/migrations-query.ts": 1, + "data/database/retrieve-index-advisor-result-query.ts": 1, + "data/database/retrieve-index-from-select-query.ts": 1, + "data/database/schemas-query.ts": 2, + "data/database/supamonitor-enabled-query.ts": 1, + "data/database/table-columns-query.ts": 1, + "data/database/table-definition-query.ts": 1, + "data/database/table-index-advisor-query.ts": 1, + "data/database/view-definition-query.ts": 1, + "data/entity-types/entity-types-infinite-query.ts": 2, + "data/enumerated-types/enumerated-types-query.ts": 1, + "data/fdw/fdws-query.ts": 1, + "data/foreign-tables/foreign-tables-query.ts": 1, + "data/invoices/invoices-query.ts": 1, + "data/logs/unified-log-inspection-query.ts": 1, + "data/materialized-views/materialized-views-query.ts": 1, + "data/misc/get-default-region-query.ts": 1, + "data/oauth-server-apps/oauth-openid-configuration-query.ts": 1, + "data/organizations/organization-audit-logs-query.ts": 1, + "data/organizations/organization-billing-subscription-preview.ts": 1, + "data/organizations/organization-creation-preview.ts": 1, + "data/organizations/organization-credit-top-up-preview.ts": 1, + "data/pg-graphql/schema-comment-query.ts": 1, + "data/privileges/column-privileges-query.ts": 1, + "data/privileges/exposed-functions-query.ts": 1, + "data/privileges/exposed-tables-query.ts": 1, + "data/privileges/table-privileges-query.ts": 1, + "data/profile/profile-audit-logs-query.ts": 1, + "data/projects/project-detail-query.ts": 1, + "data/projects/project-type-generation-query.ts": 1, + "data/read-replicas/replica-lag-query.ts": 1, + "data/sql/ongoing-queries-query.ts": 1, + "data/storage/bucket-objects-infinite-query.ts": 1, + "data/storage/iceberg-namespace-tables-query.ts": 1, + "data/storage/public-buckets-with-select-policies-query.ts": 1, + "data/table-editor/table-editor-query.ts": 1, + "data/table-rows/table-rows-count-query.ts": 1, + "data/table-rows/table-rows-query.ts": 1, + "data/tables/table-names-query.ts": 1, + "data/tables/table-retrieve-query.ts": 1, + "data/tables/tables-query.ts": 4, + "data/usage/org-usage-query.ts": 1, + "data/usage/resource-warnings-query.ts": 1, + "data/vault/vault-secret-decrypted-value-query.ts": 1, + "data/vault/vault-secrets-query.ts": 1, + "data/views/views-query.ts": 1 }, "@typescript-eslint/no-explicit-any": { "components/grid/SupabaseGrid.tsx": 1, diff --git a/apps/studio/components/grid/components/header/filter/FilterPopoverNew.tsx b/apps/studio/components/grid/components/header/filter/FilterPopoverNew.tsx index 07a5a4aff6446..dc8a5e96c39eb 100644 --- a/apps/studio/components/grid/components/header/filter/FilterPopoverNew.tsx +++ b/apps/studio/components/grid/components/header/filter/FilterPopoverNew.tsx @@ -143,7 +143,6 @@ export const FilterPopoverNew = ({ useEffect(() => { syncFromFilters() - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, [filters]) const columns = useMemo(() => snap.table?.columns ?? [], [snap.table?.columns]) diff --git a/apps/studio/components/grid/hooks/useFilterLifeCycle.ts b/apps/studio/components/grid/hooks/useFilterLifeCycle.ts index 934bae3df1136..a86f43cb67d6d 100644 --- a/apps/studio/components/grid/hooks/useFilterLifeCycle.ts +++ b/apps/studio/components/grid/hooks/useFilterLifeCycle.ts @@ -22,7 +22,6 @@ export function useInitializeFiltersFromUrl() { useEffect(() => { initializeFilters() - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, []) } diff --git a/apps/studio/components/grid/utils/gridColumns.tsx b/apps/studio/components/grid/utils/gridColumns.tsx index fc9445a81d333..5c648162593e3 100644 --- a/apps/studio/components/grid/utils/gridColumns.tsx +++ b/apps/studio/components/grid/utils/gridColumns.tsx @@ -228,7 +228,6 @@ function getCellRenderer( if (!columnDef.isUpdatable) { formatter = DefaultFormatter } else { - // eslint-disable-next-line react/display-name formatter = (p: any) => } break diff --git a/apps/studio/components/interfaces/ApiAuthorization/ApiAuthorization.Valid.tsx b/apps/studio/components/interfaces/ApiAuthorization/ApiAuthorization.Valid.tsx index 507b06fa48145..621e49ea9d7ce 100644 --- a/apps/studio/components/interfaces/ApiAuthorization/ApiAuthorization.Valid.tsx +++ b/apps/studio/components/interfaces/ApiAuthorization/ApiAuthorization.Valid.tsx @@ -108,7 +108,6 @@ function usePrefillFormOnOrganizationsSuccess( if (organizationsState._tag === 'success') { prefillForm() } - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, [organizationsState._tag]) } diff --git a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx index ce32634141ea4..63541a53ed40f 100644 --- a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx +++ b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx @@ -66,7 +66,6 @@ export const FeaturePreviewContextProvider = ({ children }: PropsWithChildren) = // flag-derived defaults (e.g. default opt-in) are reflected in `flags`. if (hasLoaded) setIsInitialized(true) } - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, [hasLoaded]) const value = { diff --git a/apps/studio/components/interfaces/ConnectSheet/content/nextjs/app/supabasejs/content.tsx b/apps/studio/components/interfaces/ConnectSheet/content/nextjs/app/supabasejs/content.tsx index e9b3722ba28db..382b36fc72840 100644 --- a/apps/studio/components/interfaces/ConnectSheet/content/nextjs/app/supabasejs/content.tsx +++ b/apps/studio/components/interfaces/ConnectSheet/content/nextjs/app/supabasejs/content.tsx @@ -137,5 +137,4 @@ export const createClient = (request: NextRequest) => { } // [Joshen] Used as a dynamic import -// eslint-disable-next-line no-restricted-exports export default ContentFile diff --git a/apps/studio/components/interfaces/Observability/DatabaseInfrastructureSection.tsx b/apps/studio/components/interfaces/Observability/DatabaseInfrastructureSection.tsx index f101e93db6c48..13c5d8eeb5467 100644 --- a/apps/studio/components/interfaces/Observability/DatabaseInfrastructureSection.tsx +++ b/apps/studio/components/interfaces/Observability/DatabaseInfrastructureSection.tsx @@ -39,7 +39,6 @@ export const DatabaseInfrastructureSection = ({ const { data: project } = useSelectedProjectQuery() // refreshKey forces date recalculation when user clicks refresh button - // eslint-disable-next-line react-hooks/exhaustive-deps const { startDate, endDate, infraInterval } = useMemo(() => { const now = dayjs() const end = now.toISOString() diff --git a/apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx b/apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx index 6b0c41936ea9d..674a4a047b8fd 100644 --- a/apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx +++ b/apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx @@ -226,7 +226,6 @@ export const SSOConfig = () => { useEffect(() => { syncFormFromConfig() - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, [ssoConfig, organization?.slug]) // Automatically add an empty domain field when SP-initiated is enabled @@ -239,7 +238,6 @@ export const SSOConfig = () => { useEffect(() => { ensureDomainField() - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, [enableSpInitiated]) return ( diff --git a/apps/studio/components/interfaces/QueryInsights/hooks/useQueryInsightsTableColumns.tsx b/apps/studio/components/interfaces/QueryInsights/hooks/useQueryInsightsTableColumns.tsx index cd3fb64bea267..fa7eb46093635 100644 --- a/apps/studio/components/interfaces/QueryInsights/hooks/useQueryInsightsTableColumns.tsx +++ b/apps/studio/components/interfaces/QueryInsights/hooks/useQueryInsightsTableColumns.tsx @@ -1,6 +1,5 @@ import { ArrowDown, ArrowRight, ArrowUp, ChevronDown, ExternalLink, ScanSearch } from 'lucide-react' import { useMemo, type RefObject } from 'react' -// eslint-disable-next-line no-restricted-imports import { type Column, type DataGridHandle } from 'react-data-grid' import { Button, diff --git a/apps/studio/components/interfaces/Realtime/Inspector/RealtimeTokensPopover.tsx b/apps/studio/components/interfaces/Realtime/Inspector/RealtimeTokensPopover.tsx index 537edafb374b7..f8d5e327f44ad 100644 --- a/apps/studio/components/interfaces/Realtime/Inspector/RealtimeTokensPopover.tsx +++ b/apps/studio/components/interfaces/Realtime/Inspector/RealtimeTokensPopover.tsx @@ -49,7 +49,6 @@ export const RealtimeTokensPopover = ({ config, onChangeConfig }: RealtimeTokens onRoleUpdated() } isMounted.current = true - // eslint-disable-next-line react-hooks/exhaustive-deps }, [snap.role]) useEffect(() => { diff --git a/apps/studio/components/interfaces/SQLEditor/SQLEditorControllers.tsx b/apps/studio/components/interfaces/SQLEditor/SQLEditorControllers.tsx index b4af89af282b2..0aa70a05313fc 100644 --- a/apps/studio/components/interfaces/SQLEditor/SQLEditorControllers.tsx +++ b/apps/studio/components/interfaces/SQLEditor/SQLEditorControllers.tsx @@ -212,8 +212,6 @@ export const SQLEditorControllersProvider = ({ children }: PropsWithChildren) => useEffect(() => { // Save the departing snippet's scroll position on unmount / snippet switch. return () => saveScrollPosition(id) - // Temporary until we update eslint to ignore useEffectEvent - // eslint-disable-next-line react-hooks/exhaustive-deps }, [id]) useEffect(() => { diff --git a/apps/studio/components/interfaces/SQLEditor/useSnippetEditor.ts b/apps/studio/components/interfaces/SQLEditor/useSnippetEditor.ts index f7bfd296d9c90..aa2316904c41d 100644 --- a/apps/studio/components/interfaces/SQLEditor/useSnippetEditor.ts +++ b/apps/studio/components/interfaces/SQLEditor/useSnippetEditor.ts @@ -76,9 +76,6 @@ export function useSnippetEditor({ id, snippetName }: { id: string; snippetName: }) useEffect(() => { seedFromContentParam() - // The useEffectEvent return is stable and must not be a dependency; this - // disable can go once our eslint version understands useEffectEvent. - // eslint-disable-next-line react-hooks/exhaustive-deps }, []) return { snippet, disableEdit, handleEditorChange } diff --git a/apps/studio/components/interfaces/SQLEditor/useSqlEditorAi.ts b/apps/studio/components/interfaces/SQLEditor/useSqlEditorAi.ts index 5b41e45e6478f..97c5e589d6bcf 100644 --- a/apps/studio/components/interfaces/SQLEditor/useSqlEditorAi.ts +++ b/apps/studio/components/interfaces/SQLEditor/useSqlEditorAi.ts @@ -290,8 +290,6 @@ export function useSqlEditorAi({ id, editorMountCount, diff, prompt }: UseSqlEdi }) useEffect(() => { resetDiff() - // Temporary until we update eslint to ignore useEffectEvent - // eslint-disable-next-line react-hooks/exhaustive-deps }, [id]) const syncDiffEditor = useEffectEvent(() => { @@ -301,8 +299,6 @@ export function useSqlEditorAi({ id, editorMountCount, diff, prompt }: UseSqlEdi }) useEffect(() => { syncDiffEditor() - // Temporary until we update eslint to ignore useEffectEvent - // eslint-disable-next-line react-hooks/exhaustive-deps }, [selectedDiffType, sourceSqlDiff]) const drainDiffRequest = useEffectEvent(() => { @@ -328,8 +324,6 @@ export function useSqlEditorAi({ id, editorMountCount, diff, prompt }: UseSqlEdi }) useEffect(() => { drainDiffRequest() - // until we can upgrade eslint to ignore useEffectEvent - // eslint-disable-next-line react-hooks/exhaustive-deps }, [diffRequest.pending, editorMountCount]) // We want to check if the diff editor is mounted and if it is, we want to show the widget diff --git a/apps/studio/components/interfaces/Settings/API/DataApiEnableSwitch.tsx b/apps/studio/components/interfaces/Settings/API/DataApiEnableSwitch.tsx index 1ee28fc0afbe6..6a3e262ae2f05 100644 --- a/apps/studio/components/interfaces/Settings/API/DataApiEnableSwitch.tsx +++ b/apps/studio/components/interfaces/Settings/API/DataApiEnableSwitch.tsx @@ -61,7 +61,6 @@ export const DataApiEnableSwitch = () => { }) useEffect(() => { syncForm() - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, [isEnabled]) const doUpdate = useCallback( diff --git a/apps/studio/components/interfaces/Settings/API/DataApiProjectUrlCard.tsx b/apps/studio/components/interfaces/Settings/API/DataApiProjectUrlCard.tsx index 59e9016b8ba0a..e6e59078fc089 100644 --- a/apps/studio/components/interfaces/Settings/API/DataApiProjectUrlCard.tsx +++ b/apps/studio/components/interfaces/Settings/API/DataApiProjectUrlCard.tsx @@ -45,7 +45,6 @@ export const DataApiProjectUrlCard = () => { }) useEffect(() => { syncSelectedDb() - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, [querySource, projectRef]) const selectedDatabase = databases?.find((db) => db.identifier === state.selectedDatabaseId) diff --git a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration.tsx b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration.tsx index b59b45ceee616..4534fba7ceac5 100644 --- a/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration.tsx +++ b/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration.tsx @@ -254,7 +254,6 @@ const InstanceConfigurationUI = ({ diagramOnly = false }: InstanceConfigurationU }) useEffect(() => { runMeasuredLayout() - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, [nodesInitialized]) return ( diff --git a/apps/studio/components/interfaces/Storage/StorageExplorer/StorageExplorer.tsx b/apps/studio/components/interfaces/Storage/StorageExplorer/StorageExplorer.tsx index 0ff022f434e7f..e372d772d45b5 100644 --- a/apps/studio/components/interfaces/Storage/StorageExplorer/StorageExplorer.tsx +++ b/apps/studio/components/interfaces/Storage/StorageExplorer/StorageExplorer.tsx @@ -101,7 +101,6 @@ export const StorageExplorer = () => { useEffect(() => { if (bucket && projectRef) fetchContents(bucket) - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, [bucket, projectRef, debouncedSearchString, selectedBucket.id]) /** Checkbox selection methods */ diff --git a/apps/studio/components/interfaces/Storage/StoragePolicies/StoragePoliciesBucketsSection.tsx b/apps/studio/components/interfaces/Storage/StoragePolicies/StoragePoliciesBucketsSection.tsx index 42835b9e1cc38..b9650073a870c 100644 --- a/apps/studio/components/interfaces/Storage/StoragePolicies/StoragePoliciesBucketsSection.tsx +++ b/apps/studio/components/interfaces/Storage/StoragePolicies/StoragePoliciesBucketsSection.tsx @@ -160,7 +160,6 @@ const BucketsPoliciesVirtualizedList = ({ }) useEffect(() => { fetchNext() - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, [lastItem]) return ( diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/useSpreadsheetImport.ts b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/useSpreadsheetImport.ts index fc231f0dd3ec0..c8ea23c5a562a 100644 --- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/useSpreadsheetImport.ts +++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/useSpreadsheetImport.ts @@ -228,7 +228,6 @@ export function useSpreadsheetImport({ }) useEffect(() => { return cleanup - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, []) // When the component mounts with a file already in global state (e.g. dropped onto the @@ -242,7 +241,6 @@ export function useSpreadsheetImport({ }) useEffect(() => { processOnMount() - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, []) const processSpreadsheet = useCallback( diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ApiAccessToggle.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ApiAccessToggle.tsx index 6128fb98ef9ff..a12c45f92763e 100644 --- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ApiAccessToggle.tsx +++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ApiAccessToggle.tsx @@ -164,7 +164,6 @@ const useTableApiAccessHandler = ( }) useEffect(() => { resetState() - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, [params.type, selectedSchema, permissionsTemplateSchema, permissionsTemplateTable]) const syncDefaultPrivileges = useEffectEvent(() => { @@ -174,7 +173,6 @@ const useTableApiAccessHandler = ( }) useEffect(() => { syncDefaultPrivileges() - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, [defaultPrivilegesQuery.status]) const syncApiPrivileges = useEffectEvent(() => { @@ -195,7 +193,6 @@ const useTableApiAccessHandler = ( }) useEffect(() => { syncApiPrivileges() - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, [apiAccessStatus.status]) const isPending = diff --git a/apps/studio/components/interfaces/UnifiedLogs/components/LogsFilterBar.tsx b/apps/studio/components/interfaces/UnifiedLogs/components/LogsFilterBar.tsx index 6e985f95a8bc6..723adb10cd8c2 100644 --- a/apps/studio/components/interfaces/UnifiedLogs/components/LogsFilterBar.tsx +++ b/apps/studio/components/interfaces/UnifiedLogs/components/LogsFilterBar.tsx @@ -149,7 +149,6 @@ export const LogsFilterBar = () => { useEffect(() => { syncFromColumnFilters() - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, [columnFilters, user]) return ( diff --git a/apps/studio/data/projects/project-detail-query.ts b/apps/studio/data/projects/project-detail-query.ts index 6bb81111f0cce..a7b8a58cde6c9 100644 --- a/apps/studio/data/projects/project-detail-query.ts +++ b/apps/studio/data/projects/project-detail-query.ts @@ -123,7 +123,6 @@ export const useProjectDetailQuery = ( export function prefetchProjectDetail(client: QueryClient, { ref }: ProjectDetailVariables) { return client.fetchQuery({ - // eslint-disable-next-line @tanstack/query/exhaustive-deps queryKey: projectKeys.detail(ref), queryFn: ({ client, signal }) => getProjectDetail({ ref, skipWake: true }, signal, undefined, client), diff --git a/apps/studio/eslint.config.cjs b/apps/studio/eslint.config.cjs index c01030124c234..d5434834af9e5 100644 --- a/apps/studio/eslint.config.cjs +++ b/apps/studio/eslint.config.cjs @@ -1,7 +1,6 @@ const { defineConfig } = require('eslint/config') const { fixupPluginRules } = require('@eslint/compat') const barrelFiles = require('eslint-plugin-barrel-files') -const jsxA11y = require('eslint-plugin-jsx-a11y') const valtio = require('eslint-plugin-valtio') // eslint-plugin-react-hook-form@0.3.1 (latest) still calls the ESLint 8 // `context.getScope()`, which ESLint 9 removed. fixupPluginRules shims the @@ -44,9 +43,9 @@ module.exports = defineConfig([ { files: ['**/*.ts', '**/*.tsx'] }, supabaseConfig, { + files: ['**/*.{js,jsx,mjs,ts,tsx,mts,cts}'], plugins: { 'barrel-files': barrelFiles, - 'jsx-a11y': jsxA11y, valtio, 'react-hook-form': fixupPluginRules(reactHookForm), }, diff --git a/apps/studio/hooks/analytics/useComputeMetrics.ts b/apps/studio/hooks/analytics/useComputeMetrics.ts index 6ca5e0e42e6b7..63e3a5ba6204b 100644 --- a/apps/studio/hooks/analytics/useComputeMetrics.ts +++ b/apps/studio/hooks/analytics/useComputeMetrics.ts @@ -23,7 +23,6 @@ export function useComputeMetrics({ projectRef }: { projectRef?: string }): Comp // Intentionally anchored to mount time so the query key stays stable across re-renders. // React Query's staleTime handles background refresh without shifting the window. - // eslint-disable-next-line react-hooks/exhaustive-deps const { startDate, endDate } = useMemo(() => { const now = dayjs() return { diff --git a/apps/studio/pages/cli/login.tsx b/apps/studio/pages/cli/login.tsx index e663e16ca980b..04aba48ac8589 100644 --- a/apps/studio/pages/cli/login.tsx +++ b/apps/studio/pages/cli/login.tsx @@ -167,7 +167,6 @@ export const CliLoginScreen = ({ return () => { isActive = false } - // eslint-disable-next-line react-hooks/exhaustive-deps -- useEffectEvent fn intentionally not a dep (eslint-plugin-react-hooks v5 doesn't recognize stable useEffectEvent yet) }, [deviceCode, isLoggedIn, publicKey, routerReady, sessionId, tokenName]) if (status._tag === 'loading') { diff --git a/apps/www/eslint.config.cjs b/apps/www/eslint.config.cjs index 8ebf71dad2af9..e676d7ca68c74 100644 --- a/apps/www/eslint.config.cjs +++ b/apps/www/eslint.config.cjs @@ -4,6 +4,7 @@ const supabaseConfig = require('eslint-config-supabase/next') module.exports = defineConfig([ supabaseConfig, { + files: ['**/*.{js,jsx,mjs,ts,tsx,mts,cts}'], rules: { 'react-hooks/rules-of-hooks': 'warn', 'react/no-unescaped-entities': 'warn', diff --git a/packages/eslint-config-supabase/next.js b/packages/eslint-config-supabase/next.js index 20e41c405b7de..e32fe76ca7b1b 100644 --- a/packages/eslint-config-supabase/next.js +++ b/packages/eslint-config-supabase/next.js @@ -1,21 +1,31 @@ const { defineConfig } = require('eslint/config') -const js = require('@eslint/js') -const { FlatCompat } = require('@eslint/eslintrc') const prettierConfig = require('eslint-config-prettier/flat') const { default: turboConfig } = require('eslint-config-turbo/flat') const tanstackQuery = require('@tanstack/eslint-plugin-query') -const tseslint = require('@typescript-eslint/eslint-plugin') const tsparser = require('@typescript-eslint/parser') +const nextCoreWebVitals = require('eslint-config-next/core-web-vitals') + +const NEXT_PLUGIN_FILES = ['**/*.{js,jsx,mjs,ts,tsx,mts,cts}'] // Custom Supabase rules const noAwaitBeforeCopyToClipboard = require('./rules/no-await-before-copy-to-clipboard') const requireExplicitTabIndex = require('./rules/require-explicit-tabindex') -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all, -}) +// Transitional config that turns off all the React Compiler hook rules that come bundled +// with core-web-vitals@16. We want to upgrade to get exhaustive-deps updates without +// blowing up our error count. +const compilerRulesOff = {} +for (const cfg of nextCoreWebVitals) { + for (const key of Object.keys(cfg.rules ?? {})) { + if ( + key.startsWith('react-hooks/') && + key !== 'react-hooks/exhaustive-deps' && + key !== 'react-hooks/rules-of-hooks' + ) { + compilerRulesOff[key] = 'off' + } + } +} // Custom Supabase ESLint plugin const supabasePlugin = { @@ -37,7 +47,6 @@ const typescriptConfig = { }, }, plugins: { - '@typescript-eslint': tseslint, supabase: supabasePlugin, }, rules: { @@ -50,6 +59,10 @@ const typescriptConfig = { module.exports = defineConfig([ // Global ignore for build output and static assets { ignores: ['.next', 'dist', 'public', '.contentlayer'] }, + // eslint-config-next v16 registers its plugins for `.mts`/`.cts` (v15 didn't lint + // them at all), which newly surfaces errors in build/tooling scripts. Keep the prior + // lint surface and leave `.mts`/`.cts` unlinted; revisit as a separate change. + { ignores: ['**/*.mts', '**/*.cts'] }, turboConfig, prettierConfig, tanstackQuery.configs['flat/recommended'], @@ -59,12 +72,14 @@ module.exports = defineConfig([ }, }, typescriptConfig, + ...nextCoreWebVitals, { - extends: compat.extends('next/core-web-vitals'), + files: NEXT_PLUGIN_FILES, linterOptions: { reportUnusedDisableDirectives: 'warn', }, rules: { + ...compilerRulesOff, '@next/next/no-html-link-for-pages': 'off', 'react/jsx-key': 'off', 'no-restricted-imports': [ diff --git a/packages/eslint-config-supabase/package.json b/packages/eslint-config-supabase/package.json index 54b36915b7be6..3d40e794f5dd7 100644 --- a/packages/eslint-config-supabase/package.json +++ b/packages/eslint-config-supabase/package.json @@ -8,12 +8,9 @@ "clean": "rimraf .turbo tsconfig.tsbuildinfo" }, "devDependencies": { - "@eslint/eslintrc": "^3.0.0", - "@eslint/js": "^9.0.0", "@tanstack/eslint-plugin-query": "^5.0.0", - "@typescript-eslint/eslint-plugin": "^8.48.0", "@typescript-eslint/parser": "^8.48.0", - "eslint-config-next": "^15.5.0", + "eslint-config-next": "^16.0.0", "eslint-config-prettier": "^10.0.0", "eslint-config-turbo": "^2.5.0", "@typescript/native": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 12e2b783928f5..99d33c593762a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2329,18 +2329,9 @@ importers: packages/eslint-config-supabase: devDependencies: - '@eslint/eslintrc': - specifier: ^3.0.0 - version: 3.3.1(supports-color@8.1.1) - '@eslint/js': - specifier: ^9.0.0 - version: 9.37.0 '@tanstack/eslint-plugin-query': specifier: ^5.0.0 version: 5.91.2(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) - '@typescript-eslint/eslint-plugin': - specifier: ^8.48.0 - version: 8.48.0(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) '@typescript-eslint/parser': specifier: ^8.48.0 version: 8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) @@ -2348,8 +2339,8 @@ importers: specifier: 'catalog:' version: typescript@7.0.2 eslint-config-next: - specifier: ^15.5.0 - version: 15.5.4(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) + specifier: ^16.0.0 + version: 16.2.12(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) eslint-config-prettier: specifier: ^10.0.0 version: 10.1.8(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1)) @@ -3803,6 +3794,12 @@ packages: cpu: [x64] os: [win32] + '@eslint-community/eslint-utils@4.10.1': + resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + '@eslint-community/eslint-utils@4.9.0': resolution: {integrity: sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3813,6 +3810,10 @@ packages: resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@eslint-community/regexpp@4.12.2': + resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@eslint/compat@2.1.0': resolution: {integrity: sha512-LgaSCymEpw7tF53xvDw9SNsraPb1IBHxpdABIOM0hW8UAlP8znrjYtuxfR58FSJ3L9BhwD+FaPRFQpZq84Nh6g==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} @@ -4753,8 +4754,8 @@ packages: '@next/env@16.2.11': resolution: {integrity: sha512-0do5A3BJ2gxWr0ZCMcD6BhW+e595jyxdTl3rXTS6lOtD8ektMiW6CO+EPwt1Eca1DBnm90r/7GdiKWBKxH++DA==} - '@next/eslint-plugin-next@15.5.4': - resolution: {integrity: sha512-SR1vhXNNg16T4zffhJ4TS7Xn7eq4NfKfcOsRwea7RIAHrjRpI9ALYbamqIJqkAhowLlERffiwk0FMvTLNdnVtw==} + '@next/eslint-plugin-next@16.2.12': + resolution: {integrity: sha512-uF2z/qAK2q7B5/6CpnFcBRX6jOq5iCO+Uqh1UkJhXljX1JwLarLYhhoJadO6dPb6moTprOKewMXheBcbIoSbug==} '@next/mdx@15.3.1': resolution: {integrity: sha512-dnpuJRfqqCPFfLDy2hIej41JAl424zk1JOgRd7jjWu2aTeX6oi0gXdcnMAK4lhf7Xl9zSkL2stzDc1YtlB1xyg==} @@ -7124,9 +7125,6 @@ packages: '@rtsao/scc@1.1.0': resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} - '@rushstack/eslint-patch@1.10.3': - resolution: {integrity: sha512-qC/xYId4NMebE6w/V33Fh9gWxLgURiNYgVNObbJl2LZv0GUUItCcCqC5axQSwRaAgaxl2mELq1rMzlswaQ0Zxg==} - '@sec-ant/readable-stream@0.4.1': resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} @@ -8652,13 +8650,13 @@ packages: '@types/zxcvbn@4.4.2': resolution: {integrity: sha512-T7SEL8b/eN7AEhHQ8oFt7c6Y+l3p8OpH7KwJIe+5oBOPLMMioPeMsUTB3huNgEnXhiittV8Ohdw21Jg8E/f70Q==} - '@typescript-eslint/eslint-plugin@8.48.0': - resolution: {integrity: sha512-XxXP5tL1txl13YFtrECECQYeZjBZad4fyd3cFV4a19LkAY/bIp9fev3US4S5fDVV2JaYFiKAZ/GRTOLer+mbyQ==} + '@typescript-eslint/eslint-plugin@8.65.0': + resolution: {integrity: sha512-IEgob78X12rHpUmtcwFsXhZdVGJtwTVP8FiCLZkR6GlYVrl2PcuB+KhCE5BlVC/eQpQnu8WXRtkHZuPar+gCRA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.48.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/parser': ^8.65.0 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' '@typescript-eslint/parser@8.48.0': resolution: {integrity: sha512-jCzKdm/QK0Kg4V4IK/oMlRZlY+QOcdjv89U2NgKHZk1CYTj82/RVSx1mV/0gqCVMJ/DA+Zf/S4NBWNF8GQ+eqQ==} @@ -8667,39 +8665,72 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/parser@8.65.0': + resolution: {integrity: sha512-CZ4nMxWwgu1HEEFNkeaCptra9QCtkmKdgf3sWh1rl1trIhmxLilgTV4cwcbQ4wemnT4sWQN8CaKOmdYx+g2gMA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/project-service@8.48.0': resolution: {integrity: sha512-Ne4CTZyRh1BecBf84siv42wv5vQvVmgtk8AuiEffKTUo3DrBaGYZueJSxxBZ8fjk/N3DrgChH4TOdIOwOwiqqw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/project-service@8.65.0': + resolution: {integrity: sha512-SxnPhbTsGahizDgbu7oqFH/xVtzIqMd/s+WtnSxNxJZJpLbdT5IPdzg8EZxO3+PoKahXmwJLeNQOpKJb3/bi7Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/scope-manager@8.48.0': resolution: {integrity: sha512-uGSSsbrtJrLduti0Q1Q9+BF1/iFKaxGoQwjWOIVNJv0o6omrdyR8ct37m4xIl5Zzpkp69Kkmvom7QFTtue89YQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.65.0': + resolution: {integrity: sha512-Esbl8OSYiVxBokYgWPf7VVWg/BE798wXhimnn9ML9Pt5qoDf8bfQlgjlKXR/k98+AcNzlLKYrpCcrcuZ9DZLgg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/tsconfig-utils@8.48.0': resolution: {integrity: sha512-WNebjBdFdyu10sR1M4OXTt2OkMd5KWIL+LLfeH9KhgP+jzfDV/LI3eXzwJ1s9+Yc0Kzo2fQCdY/OpdusCMmh6w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/type-utils@8.48.0': - resolution: {integrity: sha512-zbeVaVqeXhhab6QNEKfK96Xyc7UQuoFWERhEnj3mLVnUWrQnv15cJNseUni7f3g557gm0e46LZ6IJ4NJVOgOpw==} + '@typescript-eslint/tsconfig-utils@8.65.0': + resolution: {integrity: sha512-j6GzGqCiRdA7Qhur2VVmKZAkBLfnHFQfx4TaJGL9RMveZqCo48jSHHO0DTgizEnGhtWnqmbtCUSrqSkdiY/0Hg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/type-utils@8.65.0': + resolution: {integrity: sha512-YjaZ7PRI5qY7ax2L3PbvX0rRyGtipAReCWs0mhhDBHjH/vl0g0BonaGXrKdKpMbIIsMIwDgbk/xzkBTyAltS5g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' '@typescript-eslint/types@8.48.0': resolution: {integrity: sha512-cQMcGQQH7kwKoVswD1xdOytxQR60MWKM1di26xSUtxehaDs/32Zpqsu5WJlXTtTTqyAVK8R7hvsUnIXRS+bjvA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.65.0': + resolution: {integrity: sha512-JSSwWNy+H0E/01jJEM+hrX6N0OFDzFzeIhHFSAS01tlVaevpG8cFyYRPhS5yjGOvBUx3sqQHVMjCL1CAZZMxBg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.48.0': resolution: {integrity: sha512-ljHab1CSO4rGrQIAyizUS6UGHHCiAYhbfcIZ1zVJr5nMryxlXMVWS3duFPSKvSUbFPwkXMFk1k0EMIjub4sRRQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/typescript-estree@8.65.0': + resolution: {integrity: sha512-JboAE2swaYt4tb1fHhHTABE2K+OLy09XfcTbhnk4Pw96f9dd2e9iYsJ28gBggHlo5z5x1rkyWvcPoTuNTd4oGg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/utils@8.48.0': resolution: {integrity: sha512-yTJO1XuGxCsSfIVt1+1UrLHtue8xz16V8apzPYI06W0HbEbEWHxHXgZaAgavIkoh+GeV6hKKd5jm0sS6OYxWXQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -8707,10 +8738,21 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/utils@8.65.0': + resolution: {integrity: sha512-gXiwIHsYreboxeJucHKPvgwl7dXt50mF8s1/c00cP/WoVTyWKFdtfhRWwZiXYFU5H2O8vVoSLNrexFZjYS/SGA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/visitor-keys@8.48.0': resolution: {integrity: sha512-T0XJMaRPOH3+LBbAfzR2jalckP1MSG/L9eUtY0DEzUyVaXJ/t6zN0nR7co5kz0Jko/nkSYCBRkz1djvjajVTTg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.65.0': + resolution: {integrity: sha512-8C71BQkGjiMmXtop7pHVJu1l2NNShFdkCyD6a2ezzs5vU/L3LRtb69EtcteFwz0mYMPzIgOw0n6OV4VBUWZd7A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript/typescript-aix-ppc64@7.0.2': resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} engines: {node: '>=16.20.0'} @@ -9382,6 +9424,10 @@ packages: resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} engines: {node: '>= 0.4'} + array-includes@3.1.9: + resolution: {integrity: sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==} + engines: {node: '>= 0.4'} + array-timsort@1.0.3: resolution: {integrity: sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==} @@ -9393,14 +9439,18 @@ packages: resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==} engines: {node: '>= 0.4'} - array.prototype.findlastindex@1.2.5: - resolution: {integrity: sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==} + array.prototype.findlastindex@1.2.6: + resolution: {integrity: sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==} engines: {node: '>= 0.4'} array.prototype.flat@1.3.2: resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} engines: {node: '>= 0.4'} + array.prototype.flat@1.3.3: + resolution: {integrity: sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==} + engines: {node: '>= 0.4'} + array.prototype.flatmap@1.3.3: resolution: {integrity: sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==} engines: {node: '>= 0.4'} @@ -10880,6 +10930,10 @@ packages: es-shim-unscopables@1.0.2: resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + es-shim-unscopables@1.1.0: + resolution: {integrity: sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==} + engines: {node: '>= 0.4'} + es-to-primitive@1.3.0: resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} engines: {node: '>= 0.4'} @@ -11017,10 +11071,10 @@ packages: resolution: {integrity: sha512-FVVO4DNEPub7/VWGERJytT+tllOP2SRt8rdlcneHNWXSECMU7Aj1nXwGfhhsL3h1aZGJbYokIe27wyN7CJpAfA==} engines: {node: '>= 10'} - eslint-config-next@15.5.4: - resolution: {integrity: sha512-BzgVVuT3kfJes8i2GHenC1SRJ+W3BTML11lAOYFOOPzrk2xp66jBOAGEFRw+3LkYCln5UzvFsLhojrshb5Zfaw==} + eslint-config-next@16.2.12: + resolution: {integrity: sha512-iaaf4vvKo5h2LBdGt0JuRv7t0Ysqr9FMCiFxbptDg8LqOE//mIKR80DdpOnSVM7qjLH3jT8P0aFiwXxBEGZRXw==} peerDependencies: - eslint: ^7.23.0 || ^8.0.0 || ^9.0.0 + eslint: '>=9.0.0' typescript: '>=3.3.1' peerDependenciesMeta: typescript: @@ -11069,13 +11123,34 @@ packages: eslint-import-resolver-webpack: optional: true + eslint-module-utils@2.14.0: + resolution: {integrity: sha512-W2WCRZ9Dqntd+2u8jJcVMV2PKulc6RdLgUUoh/yQr3uB6lo/ZOeGx11sv60/8S4QFFKNslAlWhr9u0Ef7ZW6Ig==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint: + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true + eslint-plugin-barrel-files@2.0.7: resolution: {integrity: sha512-t0q23FIpvHDTtnORW+bDJziGsal5uh9RJTJ1fyH8drd4lICOoXhJ5pLMUZ5C0VQei6dNmwTzzoTRgMkO9JgHEQ==} peerDependencies: eslint: '>= 5' - eslint-plugin-import@2.31.0: - resolution: {integrity: sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==} + eslint-plugin-import@2.32.0: + resolution: {integrity: sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -11094,11 +11169,11 @@ packages: resolution: {integrity: sha512-+KHoQvjGa6gxxDaVTDPXmqOL+tJ2fWTBggBQTafoVTTe41xLnq94+ZXpb7oTDDRMP97UN908iIX3mNwQqnRxHw==} engines: {node: '>=0.10.0'} - eslint-plugin-react-hooks@5.2.0: - resolution: {integrity: sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==} - engines: {node: '>=10'} + eslint-plugin-react-hooks@7.1.1: + resolution: {integrity: sha512-f2I7Gw6JbvCexzIInuSbZpfdQ44D7iqdWX01FKLvrPgqxoE7oMj8clOfto8U6vYiz4yd5oKu39rRSVOe1zRu0g==} + engines: {node: '>=18'} peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 || ^10.0.0 eslint-plugin-react@7.37.5: resolution: {integrity: sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==} @@ -11132,6 +11207,10 @@ packages: resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-visitor-keys@5.0.1: + resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + eslint@9.37.0: resolution: {integrity: sha512-XyLmROnACWqSxiGYArdef1fItQd47weqB7iwtfr9JHwRrqIXZdcFMvvEcL9xHCmL0SNsOvF0c42lWyM1U5dgig==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -11768,6 +11847,10 @@ packages: resolution: {integrity: sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==} engines: {node: '>=18'} + globals@16.4.0: + resolution: {integrity: sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==} + engines: {node: '>=18'} + globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -11803,9 +11886,6 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - graphiql@4.0.2: resolution: {integrity: sha512-sDDd5/zvocRU5fy1SPI0rVUWoK2pQft2BBV4L2/hW75OzTBSRsuOJRDZL/EHcwxdZ+Fc2XpPLUYQXFvT48GnfQ==} peerDependencies: @@ -12052,6 +12132,12 @@ packages: headers-polyfill@4.0.3: resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} + hermes-estree@0.25.1: + resolution: {integrity: sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==} + + hermes-parser@0.25.1: + resolution: {integrity: sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==} + hex-rgb@4.3.0: resolution: {integrity: sha512-Ox1pJVrDCyGHMG9CFg1tmrRUMRPRsAWYc/PinY0XzJU4K7y7vjNoLKIQ7BR5UJMCxNN8EM1MNDmHWA/B3aZUuw==} engines: {node: '>=6'} @@ -16574,6 +16660,12 @@ packages: peerDependencies: typescript: '>=4.8.4' + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'} @@ -16708,6 +16800,13 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} + typescript-eslint@8.65.0: + resolution: {integrity: sha512-/ggrHAwyjENDusvyxbuqxAC2dTnZg/Z8F+fgQtYIz+L6n/9HfSlEZcFGV/NsMNa6CkGk0xUjUAFwC0vHOflvIA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + typescript@6.0.2: resolution: {integrity: sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==} engines: {node: '>=14.17'} @@ -17696,6 +17795,12 @@ packages: peerDependencies: zod: ^3.25 || ^4 + zod-validation-error@4.0.2: + resolution: {integrity: sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + zod: ^3.25.0 || ^4.0.0 + zod@3.25.76: resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} @@ -19191,6 +19296,11 @@ snapshots: '@esbuild/win32-x64@0.28.1': optional: true + '@eslint-community/eslint-utils@4.10.1(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))': + dependencies: + eslint: 9.37.0(jiti@2.7.0)(supports-color@8.1.1) + eslint-visitor-keys: 3.4.3 + '@eslint-community/eslint-utils@4.9.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))': dependencies: eslint: 9.37.0(jiti@2.7.0)(supports-color@8.1.1) @@ -19198,6 +19308,8 @@ snapshots: '@eslint-community/regexpp@4.12.1': {} + '@eslint-community/regexpp@4.12.2': {} + '@eslint/compat@2.1.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))': dependencies: '@eslint/core': 1.2.1 @@ -20480,7 +20592,7 @@ snapshots: '@next/env@16.2.11': {} - '@next/eslint-plugin-next@15.5.4': + '@next/eslint-plugin-next@16.2.12': dependencies: fast-glob: 3.3.1 @@ -22767,8 +22879,6 @@ snapshots: '@rtsao/scc@1.1.0': {} - '@rushstack/eslint-patch@1.10.3': {} - '@sec-ant/readable-stream@0.4.1': {} '@sentry/babel-plugin-component-annotate@5.3.0': {} @@ -24613,19 +24723,18 @@ snapshots: '@types/zxcvbn@4.4.2': {} - '@typescript-eslint/eslint-plugin@8.48.0(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2)': + '@typescript-eslint/eslint-plugin@8.65.0(@typescript-eslint/parser@8.65.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2)': dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) - '@typescript-eslint/scope-manager': 8.48.0 - '@typescript-eslint/type-utils': 8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) - '@typescript-eslint/utils': 8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) - '@typescript-eslint/visitor-keys': 8.48.0 + '@eslint-community/regexpp': 4.12.2 + '@typescript-eslint/parser': 8.65.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.65.0 + '@typescript-eslint/type-utils': 8.65.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) + '@typescript-eslint/utils': 8.65.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) + '@typescript-eslint/visitor-keys': 8.65.0 eslint: 9.37.0(jiti@2.7.0)(supports-color@8.1.1) - graphemer: 1.4.0 ignore: 7.0.5 natural-compare: 1.4.0 - ts-api-utils: 2.1.0(typescript@6.0.2) + ts-api-utils: 2.5.0(typescript@6.0.2) typescript: 6.0.2 transitivePeerDependencies: - supports-color @@ -24642,6 +24751,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/parser@8.65.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2)': + dependencies: + '@typescript-eslint/scope-manager': 8.65.0 + '@typescript-eslint/types': 8.65.0 + '@typescript-eslint/typescript-estree': 8.65.0(supports-color@8.1.1)(typescript@6.0.2) + '@typescript-eslint/visitor-keys': 8.65.0 + debug: 4.4.3(supports-color@8.1.1) + eslint: 9.37.0(jiti@2.7.0)(supports-color@8.1.1) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/project-service@8.48.0(supports-color@8.1.1)(typescript@6.0.2)': dependencies: '@typescript-eslint/tsconfig-utils': 8.48.0(typescript@6.0.2) @@ -24651,29 +24772,49 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/project-service@8.65.0(supports-color@8.1.1)(typescript@6.0.2)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.65.0(typescript@6.0.2) + '@typescript-eslint/types': 8.65.0 + debug: 4.4.3(supports-color@8.1.1) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/scope-manager@8.48.0': dependencies: '@typescript-eslint/types': 8.48.0 '@typescript-eslint/visitor-keys': 8.48.0 + '@typescript-eslint/scope-manager@8.65.0': + dependencies: + '@typescript-eslint/types': 8.65.0 + '@typescript-eslint/visitor-keys': 8.65.0 + '@typescript-eslint/tsconfig-utils@8.48.0(typescript@6.0.2)': dependencies: typescript: 6.0.2 - '@typescript-eslint/type-utils@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2)': + '@typescript-eslint/tsconfig-utils@8.65.0(typescript@6.0.2)': dependencies: - '@typescript-eslint/types': 8.48.0 - '@typescript-eslint/typescript-estree': 8.48.0(supports-color@8.1.1)(typescript@6.0.2) - '@typescript-eslint/utils': 8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) + typescript: 6.0.2 + + '@typescript-eslint/type-utils@8.65.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2)': + dependencies: + '@typescript-eslint/types': 8.65.0 + '@typescript-eslint/typescript-estree': 8.65.0(supports-color@8.1.1)(typescript@6.0.2) + '@typescript-eslint/utils': 8.65.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) debug: 4.4.3(supports-color@8.1.1) eslint: 9.37.0(jiti@2.7.0)(supports-color@8.1.1) - ts-api-utils: 2.1.0(typescript@6.0.2) + ts-api-utils: 2.5.0(typescript@6.0.2) typescript: 6.0.2 transitivePeerDependencies: - supports-color '@typescript-eslint/types@8.48.0': {} + '@typescript-eslint/types@8.65.0': {} + '@typescript-eslint/typescript-estree@8.48.0(supports-color@8.1.1)(typescript@6.0.2)': dependencies: '@typescript-eslint/project-service': 8.48.0(supports-color@8.1.1)(typescript@6.0.2) @@ -24689,6 +24830,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.65.0(supports-color@8.1.1)(typescript@6.0.2)': + dependencies: + '@typescript-eslint/project-service': 8.65.0(supports-color@8.1.1)(typescript@6.0.2) + '@typescript-eslint/tsconfig-utils': 8.65.0(typescript@6.0.2) + '@typescript-eslint/types': 8.65.0 + '@typescript-eslint/visitor-keys': 8.65.0 + debug: 4.4.3(supports-color@8.1.1) + minimatch: 10.2.3 + semver: 7.8.1 + tinyglobby: 0.2.17 + ts-api-utils: 2.5.0(typescript@6.0.2) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2)': dependencies: '@eslint-community/eslint-utils': 4.9.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1)) @@ -24700,11 +24856,27 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/utils@8.65.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2)': + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1)) + '@typescript-eslint/scope-manager': 8.65.0 + '@typescript-eslint/types': 8.65.0 + '@typescript-eslint/typescript-estree': 8.65.0(supports-color@8.1.1)(typescript@6.0.2) + eslint: 9.37.0(jiti@2.7.0)(supports-color@8.1.1) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/visitor-keys@8.48.0': dependencies: '@typescript-eslint/types': 8.48.0 eslint-visitor-keys: 4.2.1 + '@typescript-eslint/visitor-keys@8.65.0': + dependencies: + '@typescript-eslint/types': 8.65.0 + eslint-visitor-keys: 5.0.1 + '@typescript/typescript-aix-ppc64@7.0.2': optional: true @@ -25431,6 +25603,17 @@ snapshots: get-intrinsic: 1.3.0 is-string: 1.1.1 + array-includes@3.1.9: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.4 + define-properties: 1.2.1 + es-abstract: 1.24.0 + es-object-atoms: 1.1.1 + get-intrinsic: 1.3.0 + is-string: 1.1.1 + math-intrinsics: 1.1.0 + array-timsort@1.0.3: {} array-union@2.1.0: {} @@ -25444,14 +25627,15 @@ snapshots: es-object-atoms: 1.1.1 es-shim-unscopables: 1.0.2 - array.prototype.findlastindex@1.2.5: + array.prototype.findlastindex@1.2.6: dependencies: call-bind: 1.0.8 + call-bound: 1.0.4 define-properties: 1.2.1 es-abstract: 1.24.0 es-errors: 1.3.0 es-object-atoms: 1.1.1 - es-shim-unscopables: 1.0.2 + es-shim-unscopables: 1.1.0 array.prototype.flat@1.3.2: dependencies: @@ -25460,6 +25644,13 @@ snapshots: es-abstract: 1.24.0 es-shim-unscopables: 1.0.2 + array.prototype.flat@1.3.3: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.24.0 + es-shim-unscopables: 1.0.2 + array.prototype.flatmap@1.3.3: dependencies: call-bind: 1.0.8 @@ -27116,6 +27307,10 @@ snapshots: dependencies: hasown: 2.0.4 + es-shim-unscopables@1.1.0: + dependencies: + hasown: 2.0.4 + es-to-primitive@1.3.0: dependencies: is-callable: 1.2.7 @@ -27252,22 +27447,22 @@ snapshots: eslint-barrel-file-utils-win32-ia32-msvc: 0.0.10 eslint-barrel-file-utils-win32-x64-msvc: 0.0.10 - eslint-config-next@15.5.4(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2): + eslint-config-next@16.2.12(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2): dependencies: - '@next/eslint-plugin-next': 15.5.4 - '@rushstack/eslint-patch': 1.10.3 - '@typescript-eslint/eslint-plugin': 8.48.0(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) - '@typescript-eslint/parser': 8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) + '@next/eslint-plugin-next': 16.2.12 eslint: 9.37.0(jiti@2.7.0)(supports-color@8.1.1) eslint-import-resolver-node: 0.3.9(supports-color@8.1.1) - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-node@0.3.9(supports-color@8.1.1))(eslint-plugin-import@2.31.0)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-node@0.3.9(supports-color@8.1.1))(eslint-plugin-import@2.32.0)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1)) eslint-plugin-react: 7.37.5(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1)) - eslint-plugin-react-hooks: 5.2.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1)) + eslint-plugin-react-hooks: 7.1.1(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + globals: 16.4.0 + typescript-eslint: 8.65.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) optionalDependencies: typescript: 6.0.2 transitivePeerDependencies: + - '@typescript-eslint/parser' - eslint-import-resolver-webpack - supports-color @@ -27289,13 +27484,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-node@0.3.9(supports-color@8.1.1))(eslint-plugin-import@2.31.0)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-node@0.3.9(supports-color@8.1.1))(eslint-plugin-import@2.32.0)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1): dependencies: debug: 4.4.3(supports-color@8.1.1) enhanced-resolve: 5.20.1 eslint: 9.37.0(jiti@2.7.0)(supports-color@8.1.1) eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-node@0.3.9(supports-color@8.1.1))(eslint-import-resolver-typescript@3.6.1)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) fast-glob: 3.3.3 get-tsconfig: 4.10.0 is-core-module: 2.16.1 @@ -27313,7 +27508,18 @@ snapshots: '@typescript-eslint/parser': 8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) eslint: 9.37.0(jiti@2.7.0)(supports-color@8.1.1) eslint-import-resolver-node: 0.3.9(supports-color@8.1.1) - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-node@0.3.9(supports-color@8.1.1))(eslint-plugin-import@2.31.0)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-node@0.3.9(supports-color@8.1.1))(eslint-plugin-import@2.32.0)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + + eslint-module-utils@2.14.0(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-node@0.3.9(supports-color@8.1.1))(eslint-import-resolver-typescript@3.6.1)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1): + dependencies: + debug: 3.2.7(supports-color@8.1.1) + optionalDependencies: + '@typescript-eslint/parser': 8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) + eslint: 9.37.0(jiti@2.7.0)(supports-color@8.1.1) + eslint-import-resolver-node: 0.3.9(supports-color@8.1.1) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-node@0.3.9(supports-color@8.1.1))(eslint-plugin-import@2.32.0)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -27323,18 +27529,18 @@ snapshots: eslint-barrel-file-utils: 0.0.10 requireindex: 1.2.0 - eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-typescript@3.6.1)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1): dependencies: '@rtsao/scc': 1.1.0 - array-includes: 3.1.8 - array.prototype.findlastindex: 1.2.5 - array.prototype.flat: 1.3.2 + array-includes: 3.1.9 + array.prototype.findlastindex: 1.2.6 + array.prototype.flat: 1.3.3 array.prototype.flatmap: 1.3.3 debug: 3.2.7(supports-color@8.1.1) doctrine: 2.1.0 eslint: 9.37.0(jiti@2.7.0)(supports-color@8.1.1) eslint-import-resolver-node: 0.3.9(supports-color@8.1.1) - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-node@0.3.9(supports-color@8.1.1))(eslint-import-resolver-typescript@3.6.1)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + eslint-module-utils: 2.14.0(@typescript-eslint/parser@8.48.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint-import-resolver-node@0.3.9(supports-color@8.1.1))(eslint-import-resolver-typescript@3.6.1)(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) hasown: 2.0.4 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -27375,9 +27581,16 @@ snapshots: dependencies: requireindex: 1.1.0 - eslint-plugin-react-hooks@5.2.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1)): + eslint-plugin-react-hooks@7.1.1(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1): dependencies: + '@babel/core': 7.29.7(supports-color@8.1.1) + '@babel/parser': 7.29.7 eslint: 9.37.0(jiti@2.7.0)(supports-color@8.1.1) + hermes-parser: 0.25.1 + zod: 4.4.3 + zod-validation-error: 4.0.2(zod@4.4.3) + transitivePeerDependencies: + - supports-color eslint-plugin-react@7.37.5(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1)): dependencies: @@ -27423,6 +27636,8 @@ snapshots: eslint-visitor-keys@4.2.1: {} + eslint-visitor-keys@5.0.1: {} + eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1): dependencies: '@eslint-community/eslint-utils': 4.9.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1)) @@ -28173,6 +28388,8 @@ snapshots: globals@15.15.0: {} + globals@16.4.0: {} + globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -28219,8 +28436,6 @@ snapshots: graceful-fs@4.2.11: {} - graphemer@1.4.0: {} - graphiql@4.0.2(@codemirror/language@6.11.0)(@emotion/is-prop-valid@1.4.0)(@types/node@22.13.14)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(graphql-ws@6.0.4(graphql@16.11.0)(ws@8.21.0))(graphql@16.11.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6): dependencies: '@graphiql/plugin-doc-explorer': 0.0.1(@codemirror/language@6.11.0)(@emotion/is-prop-valid@1.4.0)(@types/node@22.13.14)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(graphql-ws@6.0.4(graphql@16.11.0)(ws@8.21.0))(graphql@16.11.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6) @@ -28598,6 +28813,12 @@ snapshots: headers-polyfill@4.0.3: {} + hermes-estree@0.25.1: {} + + hermes-parser@0.25.1: + dependencies: + hermes-estree: 0.25.1 + hex-rgb@4.3.0: {} highlight.js@10.7.3: {} @@ -34311,6 +34532,10 @@ snapshots: dependencies: typescript: 6.0.2 + ts-api-utils@2.5.0(typescript@6.0.2): + dependencies: + typescript: 6.0.2 + ts-dedent@2.2.0: {} ts-easing@0.2.0: {} @@ -34463,6 +34688,17 @@ snapshots: typedarray@0.0.6: {} + typescript-eslint@8.65.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2): + dependencies: + '@typescript-eslint/eslint-plugin': 8.65.0(@typescript-eslint/parser@8.65.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2))(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) + '@typescript-eslint/parser': 8.65.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) + '@typescript-eslint/typescript-estree': 8.65.0(supports-color@8.1.1)(typescript@6.0.2) + '@typescript-eslint/utils': 8.65.0(eslint@9.37.0(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@6.0.2) + eslint: 9.37.0(jiti@2.7.0)(supports-color@8.1.1) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + typescript@6.0.2: {} typescript@7.0.2: @@ -35509,6 +35745,10 @@ snapshots: dependencies: zod: 3.25.76 + zod-validation-error@4.0.2(zod@4.4.3): + dependencies: + zod: 4.4.3 + zod@3.25.76: {} zod@4.4.3: {} From 4adef69037edb7bbee10823b1695bccfde26a464 Mon Sep 17 00:00:00 2001 From: "supabase-supabase-autofixer[bot]" <248690971+supabase-supabase-autofixer[bot]@users.noreply.github.com> Date: Fri, 31 Jul 2026 07:49:45 -0600 Subject: [PATCH 05/12] feat: update mgmt api docs (#48282) This PR updates mgmt api docs automatically. Co-authored-by: phamhieu <689843+phamhieu@users.noreply.github.com> --- apps/docs/spec/api_v1_openapi.json | 2487 +- apps/docs/spec/api_v2_openapi.json | 15396 +++++++++- apps/docs/spec/common-api-sections.json | 30 + .../transforms/api_v1_openapi_deparsed.json | 17874 ++---------- .../transforms/api_v2_openapi_deparsed.json | 24255 ++++++++++++++-- 5 files changed, 41874 insertions(+), 18168 deletions(-) diff --git a/apps/docs/spec/api_v1_openapi.json b/apps/docs/spec/api_v1_openapi.json index d77b7729a328c..59bf4cc4e8e66 100644 --- a/apps/docs/spec/api_v1_openapi.json +++ b/apps/docs/spec/api_v1_openapi.json @@ -13,7 +13,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -22,7 +22,12 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { "type": "string", "format": "uuid", "deprecated": true } + { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "deprecated": true + } ] } } @@ -38,15 +43,12 @@ }, "500": { "description": "Failed to retrieve database branch" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["branching_production_read"] }, - { "fga_permissions": ["branching_development_read"] } - ], + "security": [{ "bearer": [] }], "summary": "Get database branch config", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:read", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_read"], ["branching_production_read"]], "x-oauth-scope": "environment:read" }, "patch": { @@ -60,7 +62,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -69,7 +71,12 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { "type": "string", "format": "uuid", "deprecated": true } + { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "deprecated": true + } ] } } @@ -89,15 +96,12 @@ }, "500": { "description": "Failed to update database branch" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["branching_production_write"] }, - { "fga_permissions": ["branching_development_write"] } - ], + "security": [{ "bearer": [] }], "summary": "Update database branch config", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" }, "delete": { @@ -111,7 +115,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -120,7 +124,12 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { "type": "string", "format": "uuid", "deprecated": true } + { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "deprecated": true + } ] } }, @@ -129,7 +138,7 @@ "required": false, "in": "query", "description": "If set to false, schedule deletion with 1-hour grace period (only when soft deletion is enabled).", - "schema": { "default": "true", "example": false, "type": "boolean" } + "schema": { "example": false, "type": "string" } } ], "responses": { @@ -143,15 +152,12 @@ }, "500": { "description": "Failed to delete database branch" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["branching_production_delete"] }, - { "fga_permissions": ["branching_development_delete"] } - ], + "security": [{ "bearer": [] }], "summary": "Delete a database branch", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_delete"], ["branching_production_delete"]], "x-oauth-scope": "environment:write" } }, @@ -167,7 +173,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -176,7 +182,12 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { "type": "string", "format": "uuid", "deprecated": true } + { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "deprecated": true + } ] } } @@ -198,15 +209,12 @@ }, "500": { "description": "Failed to push database branch" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["branching_production_write"] }, - { "fga_permissions": ["branching_development_write"] } - ], + "security": [{ "bearer": [] }], "summary": "Pushes a database branch", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -222,7 +230,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -231,7 +239,12 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { "type": "string", "format": "uuid", "deprecated": true } + { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "deprecated": true + } ] } } @@ -253,15 +266,12 @@ }, "500": { "description": "Failed to merge database branch" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["branching_production_write"] }, - { "fga_permissions": ["branching_development_write"] } - ], + "security": [{ "bearer": [] }], "summary": "Merges a database branch", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -277,7 +287,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -286,7 +296,12 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { "type": "string", "format": "uuid", "deprecated": true } + { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "deprecated": true + } ] } } @@ -308,15 +323,12 @@ }, "500": { "description": "Failed to reset database branch" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["branching_production_write"] }, - { "fga_permissions": ["branching_development_write"] } - ], + "security": [{ "bearer": [] }], "summary": "Resets a database branch", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -332,7 +344,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -341,7 +353,12 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { "type": "string", "format": "uuid", "deprecated": true } + { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "deprecated": true + } ] } } @@ -357,15 +374,12 @@ }, "500": { "description": "Failed to restore database branch" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["branching_production_write"] }, - { "fga_permissions": ["branching_development_write"] } - ], + "security": [{ "bearer": [] }], "summary": "Restore a scheduled branch deletion", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -381,7 +395,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -390,7 +404,12 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { "type": "string", "format": "uuid", "deprecated": true } + { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "deprecated": true + } ] } }, @@ -404,8 +423,8 @@ "name": "pgdelta", "required": false, "in": "query", - "description": "Use pg-delta instead of Migra for diffing when true", - "schema": { "example": false, "type": "boolean" } + "description": "Use pg-delta instead of Migra for diffing when true. \nBoolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", + "schema": { "example": "true", "type": "string" } } ], "responses": { @@ -415,15 +434,12 @@ }, "500": { "description": "Failed to diff database branch" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["branching_production_write"] }, - { "fga_permissions": ["branching_development_write"] } - ], + "security": [{ "bearer": [] }], "summary": "[Beta] Diffs a database branch", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -448,11 +464,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["projects_read"] }], + "security": [{ "bearer": [] }], "summary": "List all projects", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["projects_read"]], "x-oauth-scope": "projects:read" }, "post": { @@ -475,11 +492,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["organization_projects_create"] }], + "security": [{ "bearer": [] }], "summary": "Create a project", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["organization_projects_create"]], "x-oauth-scope": "projects:write" } }, @@ -574,11 +592,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Unexpected error listing organizations" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["organizations_read"] }], + "security": [{ "bearer": [] }], "summary": "List all organizations", "tags": ["Organizations"], "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organizations_read"]], "x-oauth-scope": "organizations:read" }, "post": { @@ -606,10 +625,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Unexpected error creating an organization" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["organizations_create"] }], + "security": [{ "bearer": [] }], "summary": "Create an organization", "tags": ["Organizations"], - "x-endpoint-owners": ["management-api", "billing"] + "x-endpoint-owners": ["management-api", "billing"], + "x-fga-permissions": [["organizations_create"]] } }, "/v1/oauth/authorize": { @@ -622,6 +642,7 @@ "in": "query", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "66666666-6666-4666-8666-666666666666", "type": "string" } @@ -694,11 +715,14 @@ "required": false, "in": "query", "description": "Resource indicator for MCP (Model Context Protocol) clients", - "schema": { "format": "uri", "type": "string" } + "schema": { + "format": "uri", + "example": "https://mcp.supabase.com/projects", + "type": "string" + } } ], "responses": { "204": { "description": "" } }, - "security": [{ "oauth2": ["read"] }], "summary": "[Beta] Authorize user through oauth", "tags": ["OAuth"], "x-endpoint-owners": ["auth", "management-api"] @@ -727,7 +751,6 @@ } } }, - "security": [{ "oauth2": ["write"] }], "summary": "[Beta] Exchange auth code for user's access and refresh token", "tags": ["OAuth"], "x-endpoint-owners": ["auth", "management-api"] @@ -746,7 +769,6 @@ } }, "responses": { "204": { "description": "" } }, - "security": [{ "oauth2": ["write"] }], "summary": "[Beta] Revoke oauth app authorization and it's corresponding tokens", "tags": ["OAuth"], "x-endpoint-owners": ["auth", "management-api"] @@ -776,6 +798,7 @@ "in": "query", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "66666666-6666-4666-8666-666666666666", "type": "string" } @@ -827,13 +850,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["organization_admin_write", "project_admin_write"] } - ], + "security": [{ "bearer": [] }], "summary": "Authorize user through oauth and claim a project", "tags": ["OAuth"], - "x-endpoint-owners": ["management-api"] + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_write", "project_admin_write"]] } }, "/v1/snippets": { @@ -885,11 +906,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to list user's SQL snippets" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["snippets_read"] }], + "security": [{ "bearer": [] }], "summary": "Lists SQL snippets for the logged in user", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["snippets_read"]], "x-oauth-scope": "database:read" } }, @@ -903,6 +925,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "44444444-4444-4444-8444-444444444444", "type": "string" } @@ -920,11 +943,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve SQL snippet" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["snippets_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets a specific SQL snippet", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["snippets_read"]], "x-oauth-scope": "database:read" } }, @@ -947,9 +971,9 @@ } }, "/v1/projects/{ref}/actions": { - "get": { - "description": "Returns a paginated list of action runs of the specified project.", - "operationId": "v1-list-action-runs", + "head": { + "description": "Returns the total number of action runs of the specified project.", + "operationId": "v1-count-action-runs", "parameters": [ { "name": "ref", @@ -963,44 +987,33 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - }, - { - "name": "offset", - "required": false, - "in": "query", - "schema": { "minimum": 0, "example": 0, "type": "number" } - }, - { - "name": "limit", - "required": false, - "in": "query", - "schema": { "minimum": 10, "example": 20, "type": "number" } } ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/ListActionRunResponse" } + "headers": { + "X-Total-Count": { + "schema": { "type": "integer", "format": "int64", "minimum": 0 }, + "description": "total count value" } - } + }, + "description": "" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, - "500": { "description": "Failed to list action runs" } + "500": { "description": "Failed to count action runs" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["action_runs_read"] }], - "summary": "List all action runs", + "security": [{ "bearer": [] }], + "summary": "Count the number of action runs", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:read", "position": "after" }], - "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["action_runs_read"]], "x-oauth-scope": "environment:read" }, - "head": { - "description": "Returns the total number of action runs of the specified project.", - "operationId": "v1-count-action-runs", + "get": { + "description": "Returns a paginated list of action runs of the specified project.", + "operationId": "v1-list-action-runs", "parameters": [ { "name": "ref", @@ -1014,27 +1027,40 @@ "example": "abcdefghijklmnopqrst", "type": "string" } + }, + { + "name": "offset", + "required": false, + "in": "query", + "schema": { "minimum": 0, "example": 0, "type": "number" } + }, + { + "name": "limit", + "required": false, + "in": "query", + "schema": { "minimum": 10, "example": 20, "type": "number" } } ], "responses": { "200": { - "headers": { - "X-Total-Count": { - "schema": { "type": "integer", "format": "int64", "minimum": 0 }, - "description": "total count value" + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ListActionRunResponse" } } - }, - "description": "" + } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, - "500": { "description": "Failed to count action runs" } + "500": { "description": "Failed to list action runs" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["action_runs_read"] }], - "summary": "Count the number of action runs", + "security": [{ "bearer": [] }], + "summary": "List all action runs", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:read", "position": "after" }], + "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["action_runs_read"]], "x-oauth-scope": "environment:read" } }, @@ -1076,11 +1102,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get action run status" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["action_runs_read"] }], + "security": [{ "bearer": [] }], "summary": "Get the status of an action run", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:read", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["action_runs_read"]], "x-oauth-scope": "environment:read" } }, @@ -1130,11 +1157,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update action run status" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["action_runs_write"] }], + "security": [{ "bearer": [] }], "summary": "Update the status of an action run", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["action_runs_write"]], "x-oauth-scope": "environment:write" } }, @@ -1174,11 +1202,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get action run logs" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["action_runs_read"] }], + "security": [{ "bearer": [] }], "summary": "Get the logs of an action run", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:read", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["action_runs_read"]], "x-oauth-scope": "environment:read" } }, @@ -1203,8 +1232,8 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string, true or false", - "schema": { "example": true, "type": "boolean" } + "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", + "schema": { "example": "true", "type": "string" } } ], "responses": { @@ -1223,11 +1252,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["api_gateway_keys_read"] }], + "security": [{ "bearer": [] }], "summary": "Get project api keys", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:read", "position": "after" }], "x-endpoint-owners": ["auth", "management-api"], + "x-fga-permissions": [["api_gateway_keys_read"]], "x-oauth-scope": "secrets:read" }, "post": { @@ -1250,8 +1280,8 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string, true or false", - "schema": { "example": true, "type": "boolean" } + "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", + "schema": { "example": "true", "type": "string" } } ], "requestBody": { @@ -1271,11 +1301,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["api_gateway_keys_write"] }], + "security": [{ "bearer": [] }], "summary": "Creates a new API key for the project", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth", "management-api"], + "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -1310,11 +1341,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["api_gateway_keys_read"] }], + "security": [{ "bearer": [] }], "summary": "Check whether JWT based legacy (anon, service_role) API keys are enabled. This API endpoint will be removed in the future, check for HTTP 404 Not Found.", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:read", "position": "after" }], "x-endpoint-owners": ["auth", "management-api"], + "x-fga-permissions": [["api_gateway_keys_read"]], "x-oauth-scope": "secrets:read" }, "put": { @@ -1337,8 +1369,8 @@ "name": "enabled", "required": true, "in": "query", - "description": "Boolean string, true or false", - "schema": { "example": true, "type": "boolean" } + "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", + "schema": { "example": "true", "type": "string" } } ], "responses": { @@ -1354,11 +1386,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["api_gateway_keys_write"] }], + "security": [{ "bearer": [] }], "summary": "Disable or re-enable JWT based legacy (anon, service_role) API keys. This API endpoint will be removed in the future, check for HTTP 404 Not Found.", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth", "management-api"], + "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -1385,6 +1418,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "22222222-2222-4222-8222-222222222222", "type": "string" } @@ -1393,8 +1427,8 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string, true or false", - "schema": { "example": true, "type": "boolean" } + "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", + "schema": { "example": "true", "type": "string" } } ], "requestBody": { @@ -1414,11 +1448,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["api_gateway_keys_write"] }], + "security": [{ "bearer": [] }], "summary": "Updates an API key for the project", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth", "management-api"], + "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" }, "get": { @@ -1443,6 +1478,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "22222222-2222-4222-8222-222222222222", "type": "string" } @@ -1451,8 +1487,8 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string, true or false", - "schema": { "example": true, "type": "boolean" } + "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", + "schema": { "example": "true", "type": "string" } } ], "responses": { @@ -1466,11 +1502,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["api_gateway_keys_read"] }], + "security": [{ "bearer": [] }], "summary": "Get API key", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:read", "position": "after" }], "x-endpoint-owners": ["auth", "management-api"], + "x-fga-permissions": [["api_gateway_keys_read"]], "x-oauth-scope": "secrets:read" }, "delete": { @@ -1495,6 +1532,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "22222222-2222-4222-8222-222222222222", "type": "string" } @@ -1504,14 +1542,14 @@ "required": false, "in": "query", "description": "Boolean string, true or false", - "schema": { "example": true, "type": "boolean" } + "schema": { "example": true, "type": "string" } }, { "name": "was_compromised", "required": false, "in": "query", "description": "Boolean string, true or false", - "schema": { "example": false, "type": "boolean" } + "schema": { "example": false, "type": "string" } }, { "name": "reason", @@ -1531,11 +1569,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["api_gateway_keys_write"] }], + "security": [{ "bearer": [] }], "summary": "Deletes an API key for the project", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth", "management-api"], + "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -1572,15 +1611,12 @@ }, "500": { "description": "Failed to retrieve database branches" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["branching_production_read"] }, - { "fga_permissions": ["branching_development_read"] } - ], + "security": [{ "bearer": [] }], "summary": "List all database branches", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:read", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_read"], ["branching_production_read"]], "x-oauth-scope": "environment:read" }, "post": { @@ -1616,15 +1652,12 @@ }, "500": { "description": "Failed to create database branch" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["branching_production_create"] }, - { "fga_permissions": ["branching_development_create"] } - ], + "security": [{ "bearer": [] }], "summary": "Create a database branch", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_create"], ["branching_production_create"]], "x-oauth-scope": "environment:write" }, "delete": { @@ -1652,11 +1685,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to disable preview branching" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["branching_production_delete"] }], + "security": [{ "bearer": [] }], "summary": "Disables preview branching", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_production_delete"]], "x-oauth-scope": "environment:write" } }, @@ -1694,15 +1728,12 @@ }, "500": { "description": "Failed to fetch database branch" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["branching_production_read"] }, - { "fga_permissions": ["branching_development_read"] } - ], + "security": [{ "bearer": [] }], "summary": "Get a database branch", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:read", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_read"], ["branching_production_read"]], "x-oauth-scope": "environment:read" } }, @@ -1738,11 +1769,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's custom hostname config" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["custom_domain_read"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Gets project's custom hostname config", "tags": ["Domains"], "x-badges": [{ "name": "OAuth scope: domains:read", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["custom_domain_read"]], "x-oauth-scope": "domains:read" }, "delete": { @@ -1766,7 +1798,7 @@ "required": false, "in": "query", "description": "If true, also removes the custom domain add-on from the project subscription.", - "schema": { "default": "false", "type": "boolean" } + "schema": { "type": "string" } } ], "responses": { @@ -1776,11 +1808,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to delete project custom hostname configuration" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["custom_domain_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Deletes a project's custom hostname configuration", "tags": ["Domains"], "x-badges": [{ "name": "OAuth scope: domains:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -1824,11 +1857,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project custom hostname configuration" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["custom_domain_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Updates project's custom hostname configuration", "tags": ["Domains"], "x-badges": [{ "name": "OAuth scope: domains:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -1864,11 +1898,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to verify project custom hostname configuration" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["custom_domain_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Attempts to verify the DNS configuration for project's custom hostname configuration", "tags": ["Domains"], "x-badges": [{ "name": "OAuth scope: domains:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -1904,11 +1939,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to activate project custom hostname configuration" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["custom_domain_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Activates a custom hostname for a project.", "tags": ["Domains"], "x-badges": [{ "name": "OAuth scope: domains:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -1934,7 +1970,38 @@ "200": { "description": "", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/JitStateResponse" } } + "application/json": { + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "type": "object", + "properties": { + "state": { "type": "string", "enum": ["enabled", "disabled"] }, + "appliedSuccessfully": { "type": "boolean" } + }, + "required": ["state"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "state": { "type": "string", "const": "unavailable" }, + "unavailableReason": { + "type": "string", + "enum": [ + "postgres_upgrade_required", + "ssl_enforcement_required", + "temporarily_unavailable" + ] + } + }, + "required": ["state", "unavailableReason"], + "additionalProperties": false + } + ] + } + } } }, "401": { "description": "Unauthorized" }, @@ -1942,11 +2009,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's temporary access configuration." } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_read"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Get project's temporary access configuration.", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["security", "management-api"], + "x-fga-permissions": [["project_admin_read"]], "x-oauth-scope": "database:read" }, "put": { @@ -1978,7 +2046,38 @@ "200": { "description": "", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/JitStateResponse" } } + "application/json": { + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "type": "object", + "properties": { + "state": { "type": "string", "enum": ["enabled", "disabled"] }, + "appliedSuccessfully": { "type": "boolean" } + }, + "required": ["state"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "state": { "type": "string", "const": "unavailable" }, + "unavailableReason": { + "type": "string", + "enum": [ + "postgres_upgrade_required", + "ssl_enforcement_required", + "temporarily_unavailable" + ] + } + }, + "required": ["state", "unavailableReason"], + "additionalProperties": false + } + ] + } + } } }, "401": { "description": "Unauthorized" }, @@ -1986,11 +2085,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's temporary access configuration." } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Update project's temporary access configuration.", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["security", "management-api"], + "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "database:write" } }, @@ -2026,11 +2126,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's network bans" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_network_bans_read"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Gets project's network bans", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["database_network_bans_read"]], "x-oauth-scope": "projects:read" } }, @@ -2066,11 +2167,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's enriched network bans" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_network_bans_read"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Gets project's network bans with additional information about which databases they affect", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["database_network_bans_read"]], "x-oauth-scope": "projects:read" } }, @@ -2107,11 +2209,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to remove network bans." } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_network_bans_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Remove network bans.", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["database_network_bans_write"]], "x-oauth-scope": "projects:write" } }, @@ -2147,14 +2250,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's network restrictions" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["database_network_restrictions_read"] } - ], + "security": [{ "bearer": [] }], "summary": "[Beta] Gets project's network restrictions", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_network_restrictions_read"]], "x-oauth-scope": "projects:read" }, "patch": { @@ -2196,14 +2297,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project network restrictions" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["database_network_restrictions_write"] } - ], + "security": [{ "bearer": [] }], "summary": "[Alpha] Updates project's network restrictions by adding or removing CIDRs", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_network_restrictions_write"]], "x-oauth-scope": "projects:write" } }, @@ -2247,14 +2346,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project network restrictions" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["database_network_restrictions_write"] } - ], + "security": [{ "bearer": [] }], "summary": "[Beta] Updates project's network restrictions", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_network_restrictions_write"]], "x-oauth-scope": "projects:write" } }, @@ -2290,11 +2387,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's pgsodium config" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Gets project's pgsodium config", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:read", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "secrets:read" }, "put": { @@ -2336,11 +2434,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's pgsodium config" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "secrets:write" } }, @@ -2376,11 +2475,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's postgrest config" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["data_api_config_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets project's postgrest config", "tags": ["Rest"], "x-badges": [{ "name": "OAuth scope: rest:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["data_api_config_read"]], "x-oauth-scope": "rest:read" }, "patch": { @@ -2422,11 +2522,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's postgrest config" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["data_api_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Updates project's postgrest config", "tags": ["Rest"], "x-badges": [{ "name": "OAuth scope: rest:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["data_api_config_write"]], "x-oauth-scope": "rest:write" } }, @@ -2462,11 +2563,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets a specific project that belongs to the authenticated user", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["project_admin_read"]], "x-oauth-scope": "projects:read" }, "delete": { @@ -2499,11 +2601,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], + "security": [{ "bearer": [] }], "summary": "Deletes the given project", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra", "dev-workflows"], + "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" }, "patch": { @@ -2543,11 +2646,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], + "security": [{ "bearer": [] }], "summary": "Updates the given project", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -2587,11 +2691,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's secrets" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_secrets_read"] }], + "security": [{ "bearer": [] }], "summary": "List all secrets", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:read", "position": "after" }], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_secrets_read"]], "x-oauth-scope": "secrets:read" }, "post": { @@ -2625,11 +2730,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to create project's secrets" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_secrets_write"] }], + "security": [{ "bearer": [] }], "summary": "Bulk create secrets", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_secrets_write"]], "x-oauth-scope": "secrets:write" }, "delete": { @@ -2663,11 +2769,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to delete secrets with given names" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_secrets_write"] }], + "security": [{ "bearer": [] }], "summary": "Bulk delete secrets", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_secrets_write"]], "x-oauth-scope": "secrets:write" } }, @@ -2703,11 +2810,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's SSL enforcement config" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_ssl_config_read"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Get project's SSL enforcement configuration.", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_ssl_config_read"]], "x-oauth-scope": "database:read" }, "put": { @@ -2749,11 +2857,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's SSL enforcement configuration." } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_ssl_config_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Update project's SSL enforcement configuration.", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_ssl_config_write"]], "x-oauth-scope": "database:write" } }, @@ -2796,11 +2905,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to generate TypeScript types" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_read"] }], + "security": [{ "bearer": [] }], "summary": "Generate TypeScript types", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["database_read"]], "x-oauth-scope": "database:read" } }, @@ -2832,14 +2942,17 @@ } }, "400": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan." + "description": "This feature requires the Pro, Team, or Enterprise organization plan.", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/PlanGateErrorBody" } } + } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get project vanity subdomain configuration" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["vanity_subdomain_read"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Gets current vanity subdomain config", "tags": ["Domains"], "x-allowed-plans": ["Pro", "Team", "Enterprise"], @@ -2848,6 +2961,7 @@ { "name": "Only available on Pro, Team, Enterprise", "position": "before" } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["vanity_subdomain_read"]], "x-oauth-scope": "domains:read" }, "delete": { @@ -2874,11 +2988,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to delete project vanity subdomain configuration" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["vanity_subdomain_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Deletes a project's vanity subdomain configuration", "tags": ["Domains"], "x-badges": [{ "name": "OAuth scope: domains:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["vanity_subdomain_write"]], "x-oauth-scope": "domains:write" } }, @@ -2916,14 +3031,17 @@ } }, "400": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan." + "description": "This feature requires the Pro, Team, or Enterprise organization plan.", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/PlanGateErrorBody" } } + } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to check project vanity subdomain configuration" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["vanity_subdomain_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Checks vanity subdomain availability", "tags": ["Domains"], "x-allowed-plans": ["Pro", "Team", "Enterprise"], @@ -2932,6 +3050,7 @@ { "name": "Only available on Pro, Team, Enterprise", "position": "before" } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["vanity_subdomain_write"]], "x-oauth-scope": "domains:write" } }, @@ -2969,14 +3088,17 @@ } }, "400": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan." + "description": "This feature requires the Pro, Team, or Enterprise organization plan.", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/PlanGateErrorBody" } } + } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to activate project vanity subdomain configuration" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["vanity_subdomain_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Activates a vanity subdomain for a project.", "tags": ["Domains"], "x-allowed-plans": ["Pro", "Team", "Enterprise"], @@ -2985,6 +3107,7 @@ { "name": "Only available on Pro, Team, Enterprise", "position": "before" } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["vanity_subdomain_write"]], "x-oauth-scope": "domains:write" } }, @@ -3026,14 +3149,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to initiate project upgrade" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["project_admin_write", "database_write"] } - ], + "security": [{ "bearer": [] }], "summary": "[Beta] Upgrades the project's Postgres version", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["project_admin_write", "database_write"]], "x-oauth-scope": "projects:write" } }, @@ -3069,14 +3190,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to determine project upgrade eligibility" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["project_admin_read", "database_read"] } - ], + "security": [{ "bearer": [] }], "summary": "[Beta] Returns the project's eligibility for upgrades", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["project_admin_read", "database_read"]], "x-oauth-scope": "projects:read" } }, @@ -3118,14 +3237,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project upgrade status" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["project_admin_read", "database_read"] } - ], + "security": [{ "bearer": [] }], "summary": "[Beta] Gets the latest status of the project's upgrade", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["project_admin_read", "database_read"]], "x-oauth-scope": "projects:read" } }, @@ -3161,11 +3278,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get project readonly mode status" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_readonly_config_read"] }], + "security": [{ "bearer": [] }], "summary": "Returns project's readonly mode status", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra", "support-tooling"], + "x-fga-permissions": [["database_readonly_config_read"]], "x-oauth-scope": "database:read" } }, @@ -3194,11 +3312,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to disable project's readonly mode" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_readonly_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Disables project's readonly mode for the next 15 minutes", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra", "support-tooling"], + "x-fga-permissions": [["database_readonly_config_write"]], "x-oauth-scope": "database:write" } }, @@ -3232,18 +3351,22 @@ "204": { "description": "" }, "401": { "description": "Unauthorized" }, "402": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan." + "description": "This feature requires the Pro, Team, or Enterprise organization plan.", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/PlanGateErrorBody" } } + } }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to set up read replica" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["infra_read_replicas_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Set up a read replica", "tags": ["Database"], "x-allowed-plans": ["Pro", "Team", "Enterprise"], "x-badges": [{ "name": "Only available on Pro, Team, Enterprise", "position": "before" }], - "x-endpoint-owners": ["management-api", "infra"] + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["infra_read_replicas_write"]] } }, "/v1/projects/{ref}/read-replicas/remove": { @@ -3279,10 +3402,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to remove read replica" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["infra_read_replicas_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Remove a read replica", "tags": ["Database"], - "x-endpoint-owners": ["management-api", "infra"] + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["infra_read_replicas_write"]] } }, "/v1/projects/{ref}/health": { @@ -3306,25 +3430,37 @@ "name": "services", "required": true, "in": "query", + "description": "Comma-separated list of enums or array of enums.", "schema": { - "example": ["auth", "rest"], - "type": "array", - "items": { - "type": "string", - "enum": [ - "auth", - "db", - "db_postgres_user", - "pooler", - "realtime", - "rest", - "storage", - "pg_bouncer" - ] - } - } - }, - { + "example": ["auth,db", "auth"], + "anyOf": [ + { + "type": "string", + "description": "Comma-separated list of enums:\n\n- `auth`\n- `db`\n- `db_postgres_user`\n- `pooler`\n- `realtime`\n- `rest`\n- `storage`\n- `pg_bouncer`", + "example": ["auth,db", "auth"] + }, + { + "type": "array", + "items": { + "type": "string", + "enum": [ + "auth", + "db", + "db_postgres_user", + "pooler", + "realtime", + "rest", + "storage", + "pg_bouncer" + ] + }, + "description": "Array of enums.", + "example": ["{field}=auth&{field}=db", "{field}=auth"] + } + ] + } + }, + { "name": "timeout_ms", "required": false, "in": "query", @@ -3348,11 +3484,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's service health status" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets project's service health status", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["project_admin_read"]], "x-oauth-scope": "projects:read" } }, @@ -3387,11 +3524,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_signing_keys_write"] }], + "security": [{ "bearer": [] }], "summary": "Set up the project's existing JWT secret as an in_use JWT signing key. This endpoint will be removed in the future always check for HTTP 404 Not Found.", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" }, "get": { @@ -3424,11 +3562,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_signing_keys_read"] }], + "security": [{ "bearer": [] }], "summary": "Get the signing key information for the JWT secret imported as signing key for this project. This endpoint will be removed in the future, check for HTTP 404 Not Found.", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: secrets:read", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_signing_keys_read"]], "x-oauth-scope": "secrets:read" } }, @@ -3471,11 +3610,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_signing_keys_write"] }], + "security": [{ "bearer": [] }], "summary": "Create a new signing key for the project in standby status", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" }, "get": { @@ -3508,11 +3648,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_signing_keys_read"] }], + "security": [{ "bearer": [] }], "summary": "List all signing keys for the project", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: secrets:read", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_signing_keys_read"]], "x-oauth-scope": "secrets:read" } }, @@ -3526,6 +3667,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "33333333-3333-4333-8333-333333333333", "type": "string" } @@ -3557,10 +3699,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_signing_keys_read"] }], + "security": [{ "bearer": [] }], "summary": "Get information about a signing key", "tags": ["Auth"], - "x-endpoint-owners": ["auth"] + "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_signing_keys_read"]] }, "delete": { "operationId": "v1-remove-project-signing-key", @@ -3571,6 +3714,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "33333333-3333-4333-8333-333333333333", "type": "string" } @@ -3602,11 +3746,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_signing_keys_write"] }], + "security": [{ "bearer": [] }], "summary": "Remove a signing key from a project. Only possible if the key has been in revoked status for a while.", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" }, "patch": { @@ -3618,6 +3763,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "33333333-3333-4333-8333-333333333333", "type": "string" } @@ -3657,11 +3803,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_signing_keys_write"] }], + "security": [{ "bearer": [] }], "summary": "Update a signing key, mainly its status", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -3697,11 +3844,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's auth config" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets project's auth config", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:read", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" }, "patch": { @@ -3743,14 +3891,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's auth config" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["auth_config_write", "project_admin_write"] } - ], + "security": [{ "bearer": [] }], "summary": "Updates a project's auth config", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:write", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_write", "project_admin_write"]], "x-oauth-scope": "auth:write" } }, @@ -3791,11 +3937,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Creates a new third-party auth integration", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:write", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" }, "get": { @@ -3831,11 +3978,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_read"] }], + "security": [{ "bearer": [] }], "summary": "Lists all third-party auth integrations", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:read", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" } }, @@ -3862,6 +4010,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "88888888-8888-4888-8888-888888888888", "type": "string" } @@ -3878,11 +4027,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Removes a third-party auth integration", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:write", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" }, "get": { @@ -3907,6 +4057,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "88888888-8888-4888-8888-888888888888", "type": "string" } @@ -3923,11 +4074,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_read"] }], + "security": [{ "bearer": [] }], "summary": "Get a third-party integration", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:read", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" } }, @@ -3955,11 +4107,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], + "security": [{ "bearer": [] }], "summary": "Pauses the given project", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -3987,11 +4140,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], + "security": [{ "bearer": [] }], "summary": "Restarts the given project", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -4028,11 +4182,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_read"] }], + "security": [{ "bearer": [] }], "summary": "Lists available restore versions for the given project", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["project_admin_read"]], "x-oauth-scope": "projects:read" }, "post": { @@ -4058,11 +4213,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], + "security": [{ "bearer": [] }], "summary": "Restores the given project", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -4090,11 +4246,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], + "security": [{ "bearer": [] }], "summary": "Cancels the given project restoration", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -4131,10 +4288,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to list project addons" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["infra_add_ons_read"] }], + "security": [{ "bearer": [] }], "summary": "List billing addons and compute instance selections", "tags": ["Billing"], - "x-endpoint-owners": ["billing"] + "x-endpoint-owners": ["billing"], + "x-fga-permissions": [["infra_add_ons_read"]] }, "patch": { "description": "Selects an addon variant, for example scaling the project’s compute instance up or down, and applies it to the project.", @@ -4169,10 +4327,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to apply project addon" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["infra_add_ons_write"] }], + "security": [{ "bearer": [] }], "summary": "Apply or update billing addons, including compute instance size", "tags": ["Billing"], - "x-endpoint-owners": ["billing"] + "x-endpoint-owners": ["billing"], + "x-fga-permissions": [["infra_add_ons_write"]] } }, "/v1/projects/{ref}/billing/addons/{addon_variant}": { @@ -4199,7 +4358,7 @@ "in": "path", "schema": { "example": "pitr_7", - "oneOf": [ + "anyOf": [ { "type": "string", "enum": [ @@ -4237,10 +4396,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to remove project addon" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["infra_add_ons_write"] }], + "security": [{ "bearer": [] }], "summary": "Remove billing addons or revert compute instance sizing", "tags": ["Billing"], - "x-endpoint-owners": ["billing"] + "x-endpoint-owners": ["billing"], + "x-fga-permissions": [["infra_add_ons_write"]] } }, "/v1/projects/{ref}/claim-token": { @@ -4274,10 +4434,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets project claim token", "tags": ["Projects"], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["project_admin_read"]], "x-internal": true }, "post": { @@ -4310,13 +4471,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["organization_admin_write", "project_admin_write"] } - ], + "security": [{ "bearer": [] }], "summary": "Creates project claim token", "tags": ["Projects"], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_write", "project_admin_write"]], "x-internal": true }, "delete": { @@ -4342,13 +4501,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["organization_admin_write", "project_admin_write"] } - ], + "security": [{ "bearer": [] }], "summary": "Revokes project claim token", "tags": ["Projects"], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_write", "project_admin_write"]], "x-internal": true } }, @@ -4385,11 +4542,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["advisors_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets project performance advisors.", "tags": ["Advisors"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["advisors_read"]], "x-oauth-scope": "database:read" } }, @@ -4432,11 +4590,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["advisors_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets project security advisors.", "tags": ["Advisors"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["advisors_read"]], "x-oauth-scope": "database:read" } }, @@ -4464,19 +4623,32 @@ "required": false, "in": "query", "description": "Custom SQL query to execute on the logs. See [querying logs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer) for more details.", - "schema": { "type": "string" } + "schema": { + "example": "select event_message from edge_logs limit 10", + "type": "string" + } }, { "name": "iso_timestamp_start", "required": false, "in": "query", - "schema": { "format": "date-time", "example": "2025-03-01T00:00:00Z", "type": "string" } + "schema": { + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "example": "2025-03-01T00:00:00Z", + "type": "string" + } }, { "name": "iso_timestamp_end", "required": false, "in": "query", - "schema": { "format": "date-time", "example": "2025-03-01T23:59:59Z", "type": "string" } + "schema": { + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "example": "2025-03-01T23:59:59Z", + "type": "string" + } } ], "responses": { @@ -4491,11 +4663,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_logs_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets project's logs", "tags": ["Analytics"], "x-badges": [{ "name": "OAuth scope: analytics:read", "position": "after" }], "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_logs_read"]], "x-oauth-scope": "analytics:read" } }, @@ -4523,19 +4696,32 @@ "required": false, "in": "query", "description": "Custom SQL query to execute on the logs. See [querying logs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer) for more details.", - "schema": { "type": "string" } + "schema": { + "example": "select event_message from edge_logs limit 10", + "type": "string" + } }, { "name": "iso_timestamp_start", "required": false, "in": "query", - "schema": { "format": "date-time", "example": "2025-03-01T00:00:00Z", "type": "string" } + "schema": { + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "example": "2025-03-01T00:00:00Z", + "type": "string" + } }, { "name": "iso_timestamp_end", "required": false, "in": "query", - "schema": { "format": "date-time", "example": "2025-03-01T23:59:59Z", "type": "string" } + "schema": { + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "example": "2025-03-01T23:59:59Z", + "type": "string" + } } ], "responses": { @@ -4550,11 +4736,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_logs_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets all project's logs in a single log stream", "tags": ["Analytics"], "x-badges": [{ "name": "OAuth scope: analytics:read", "position": "after" }], "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_logs_read"]], "x-oauth-scope": "analytics:read" } }, @@ -4600,10 +4787,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get project's usage api counts" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_usage_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets project's usage api counts", "tags": ["Analytics"], - "x-endpoint-owners": ["analytics"] + "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_usage_read"]] } }, "/v1/projects/{ref}/analytics/endpoints/usage.api-requests-count": { @@ -4638,10 +4826,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get project's usage api requests count" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_usage_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets project's usage api requests count", "tags": ["Analytics"], - "x-endpoint-owners": ["analytics"] + "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_usage_read"]] } }, "/v1/projects/{ref}/analytics/endpoints/functions.combined-stats": { @@ -4690,10 +4879,52 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get project's function combined statistics" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_usage_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets a project's function combined statistics", "tags": ["Analytics"], - "x-endpoint-owners": ["analytics"] + "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_usage_read"]] + } + }, + "/v1/projects/{ref}/analytics/endpoints/metrics": { + "get": { + "description": "Prometheus scrape endpoint. Returns metrics of a customer project in the Prometheus open exposition format.", + "operationId": "v1-scrape-project-metrics", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Prometheus / OpenMetrics text exposition", + "content": { + "text/plain": { "schema": { "type": "string" } }, + "application/openmetrics-text": { "schema": { "type": "string" } } + } + }, + "401": { "description": "Unauthorized" }, + "403": { "description": "Forbidden action" }, + "429": { "description": "Rate limit exceeded" }, + "500": { "description": "Failed to fetch project's metrics" } + }, + "security": [{ "bearer": [] }], + "summary": "Scrape a project's metrics", + "tags": ["Analytics"], + "x-badges": [{ "name": "OAuth scope: analytics:read", "position": "after" }], + "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_logs_read"]], + "x-oauth-scope": "analytics:read" } }, "/v1/projects/{ref}/cli/login-role": { @@ -4734,11 +4965,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to create login role" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Create a login role for CLI with temporary password", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["database_write"]], "x-oauth-scope": "database:write" }, "delete": { @@ -4772,17 +5004,17 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to delete login roles" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Delete existing login roles used by CLI", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["database_write"]], "x-oauth-scope": "database:write" } }, "/v1/projects/{ref}/database/migrations": { "get": { - "description": "Only available to selected partner OAuth apps", "operationId": "v1-list-migration-history", "parameters": [ { @@ -4813,15 +5045,15 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to list database migrations" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_migrations_read"] }], + "security": [{ "bearer": [] }], "summary": "List applied migration versions", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_migrations_read"]], "x-oauth-scope": "database:read" }, "post": { - "description": "Only available to selected partner OAuth apps", "operationId": "v1-apply-a-migration", "parameters": [ { @@ -4860,15 +5092,15 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to apply database migration" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_migrations_write"] }], + "security": [{ "bearer": [] }], "summary": "Apply a database migration", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_migrations_write"]], "x-oauth-scope": "database:write" }, "put": { - "description": "Only available to selected partner OAuth apps", "operationId": "v1-upsert-a-migration", "parameters": [ { @@ -4907,15 +5139,15 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to upsert database migration" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_migrations_write"] }], + "security": [{ "bearer": [] }], "summary": "Upsert a database migration without applying", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_migrations_write"]], "x-oauth-scope": "database:write" }, "delete": { - "description": "Only available to selected partner OAuth apps", "operationId": "v1-rollback-migrations", "parameters": [ { @@ -4946,17 +5178,17 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to rollback database migration" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_migrations_write"] }], + "security": [{ "bearer": [] }], "summary": "Rollback database migrations and remove them from history table", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_migrations_write"]], "x-oauth-scope": "database:write" } }, "/v1/projects/{ref}/database/migrations/{version}": { "get": { - "description": "Only available to selected partner OAuth apps", "operationId": "v1-get-a-migration", "parameters": [ { @@ -4993,15 +5225,15 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get database migration" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_migrations_read"] }], + "security": [{ "bearer": [] }], "summary": "Fetch an existing entry from migration history", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_migrations_read"]], "x-oauth-scope": "database:read" }, "patch": { - "description": "Only available to selected partner OAuth apps", "operationId": "v1-patch-a-migration", "parameters": [ { @@ -5039,11 +5271,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to patch database migration" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_migrations_write"] }], + "security": [{ "bearer": [] }], "summary": "Patch an existing entry in migration history", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_migrations_write"]], "x-oauth-scope": "database:write" } }, @@ -5078,15 +5311,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to run sql query" } }, - "security": [ - { "bearer": [] }, - { "fga_permissions": ["database_write"] }, - { "fga_permissions": ["database_read"] } - ], + "security": [{ "bearer": [] }], "summary": "[Beta] Run sql query", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["database_read"], ["database_write"]], "x-oauth-scope": "database:write" } }, @@ -5122,11 +5352,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to run read-only sql query" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_read"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Run a sql query as supabase_read_only_user", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["database_read"]], "x-oauth-scope": "database:read" } }, @@ -5155,11 +5386,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to enable Database Webhooks on the project" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_webhooks_config_write"] }], + "security": [{ "bearer": [] }], "summary": "[Beta] Enables Database Webhooks on the project", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["database_webhooks_config_write"]], "x-oauth-scope": "database:write" } }, @@ -5196,11 +5428,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets database metadata for the given project.", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["database_read"]], "x-oauth-scope": "projects:read" } }, @@ -5244,11 +5477,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update database password" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Updates the database password", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["database_config_write"]], "x-oauth-scope": "database:write" } }, @@ -5283,11 +5517,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to list database jit access" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_jit_read"] }], + "security": [{ "bearer": [] }], "summary": "Get user-id to role mappings for JIT access", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["security"], + "x-fga-permissions": [["database_jit_read"]], "x-oauth-scope": "database:read" }, "post": { @@ -5330,11 +5565,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to authorize database jit access" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_jit_read"] }], + "security": [{ "bearer": [] }], "summary": "Authorize user-id to role mappings for JIT access", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["security"], + "x-fga-permissions": [["database_jit_read"]], "x-oauth-scope": "database:read" }, "put": { @@ -5373,10 +5609,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update JIT access" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_jit_write"] }], + "security": [{ "bearer": [] }], "summary": "Updates a user mapping for JIT access", "tags": ["Database"], - "x-endpoint-owners": ["security"] + "x-endpoint-owners": ["security"], + "x-fga-permissions": [["database_jit_write"]] } }, "/v1/projects/{ref}/database/jit/list": { @@ -5412,10 +5649,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to list database jit access" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_jit_read"] }], + "security": [{ "bearer": [] }], "summary": "List all user-id to role mappings for JIT access", "tags": ["Database"], - "x-endpoint-owners": ["security"] + "x-endpoint-owners": ["security"], + "x-fga-permissions": [["database_jit_write"]] } }, "/v1/projects/{ref}/database/jit/invite": { @@ -5459,10 +5697,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to invite external user" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_jit_write"] }], + "security": [{ "bearer": [] }], "summary": "Invites an external user to a database for JIT access", "tags": ["Database"], - "x-endpoint-owners": ["security"] + "x-endpoint-owners": ["security"], + "x-fga-permissions": [["database_jit_write"]] } }, "/v1/projects/{ref}/database/jit/invite/accept": { @@ -5531,6 +5770,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "55555555-5555-4555-8555-555555555555", "type": "string" } @@ -5543,10 +5783,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to revoke invite for external user" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_jit_write"] }], + "security": [{ "bearer": [] }], "summary": "Deletes the invite for an external user to a database for JIT access", "tags": ["Database"], - "x-endpoint-owners": ["security"] + "x-endpoint-owners": ["security"], + "x-fga-permissions": [["database_jit_write"]] } }, "/v1/projects/{ref}/database/jit/{user_id}": { @@ -5573,6 +5814,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "55555555-5555-4555-8555-555555555555", "type": "string" } @@ -5585,10 +5827,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to remove JIT access" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_jit_write"] }], + "security": [{ "bearer": [] }], "summary": "Delete JIT access by user-id", "tags": ["Database"], - "x-endpoint-owners": ["security"] + "x-endpoint-owners": ["security"], + "x-fga-permissions": [["database_jit_write"]] } }, "/v1/projects/{ref}/database/openapi": { @@ -5627,11 +5870,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to fetch PostgREST OpenAPI spec" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_read"] }], + "security": [{ "bearer": [] }], "summary": "Get PostgREST OpenAPI spec", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["database_read"]], "x-oauth-scope": "database:read" } }, @@ -5671,11 +5915,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's functions" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_read"] }], + "security": [{ "bearer": [] }], "summary": "List all functions", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:read", "position": "after" }], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_read"]], "x-oauth-scope": "edge_functions:read" }, "post": { @@ -5712,15 +5957,13 @@ "name": "verify_jwt", "required": false, "in": "query", - "description": "Boolean string, true or false", - "schema": { "example": true, "type": "boolean" } + "schema": { "example": true, "type": "string" } }, { "name": "import_map", "required": false, "in": "query", - "description": "Boolean string, true or false", - "schema": { "example": false, "type": "boolean" } + "schema": { "example": false, "type": "string" } }, { "name": "entrypoint_path", @@ -5768,11 +6011,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to create project's function" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_write"] }], + "security": [{ "bearer": [] }], "summary": "Create a function", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:write", "position": "after" }], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" }, "put": { @@ -5816,11 +6060,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update functions" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_write"] }], + "security": [{ "bearer": [] }], "summary": "Bulk update functions", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:write", "position": "after" }], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" } }, @@ -5856,8 +6101,7 @@ "name": "bundleOnly", "required": false, "in": "query", - "description": "Boolean string, true or false", - "schema": { "example": false, "type": "boolean" } + "schema": { "example": false, "type": "string" } } ], "requestBody": { @@ -5883,11 +6127,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to deploy function" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_write"] }], + "security": [{ "bearer": [] }], "summary": "Deploy a function", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:write", "position": "after" }], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" } }, @@ -5931,11 +6176,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve function with given slug" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_read"] }], + "security": [{ "bearer": [] }], "summary": "Retrieve a function", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:read", "position": "after" }], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_read"]], "x-oauth-scope": "edge_functions:read" }, "patch": { @@ -5978,15 +6224,13 @@ "name": "verify_jwt", "required": false, "in": "query", - "description": "Boolean string, true or false", - "schema": { "example": true, "type": "boolean" } + "schema": { "example": true, "type": "string" } }, { "name": "import_map", "required": false, "in": "query", - "description": "Boolean string, true or false", - "schema": { "example": false, "type": "boolean" } + "schema": { "example": false, "type": "string" } }, { "name": "entrypoint_path", @@ -6033,11 +6277,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update function with given slug" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_write"] }], + "security": [{ "bearer": [] }], "summary": "Update a function", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:write", "position": "after" }], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" }, "delete": { @@ -6072,11 +6317,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to delete function with given slug" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_write"] }], + "security": [{ "bearer": [] }], "summary": "Delete a function", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:write", "position": "after" }], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" } }, @@ -6118,11 +6364,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve function body with given slug" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_read"] }], + "security": [{ "bearer": [] }], "summary": "Retrieve a function body", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:read", "position": "after" }], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_read"]], "x-oauth-scope": "edge_functions:read" } }, @@ -6161,11 +6408,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get list of buckets" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["storage_read"] }], + "security": [{ "bearer": [] }], "summary": "Lists all buckets", "tags": ["Storage"], "x-badges": [{ "name": "OAuth scope: storage:read", "position": "after" }], "x-endpoint-owners": ["storage"], + "x-fga-permissions": [["storage_read"]], "x-oauth-scope": "storage:read" } }, @@ -6199,10 +6447,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get database disk attributes" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["infra_disk_config_read"] }], + "security": [{ "bearer": [] }], "summary": "Get database disk attributes", "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"] + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["infra_disk_config_read"]] }, "post": { "operationId": "v1-modify-database-disk", @@ -6234,10 +6483,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to modify database disk" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["infra_disk_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Modify database disk", "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"] + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["infra_disk_config_write"]] } }, "/v1/projects/{ref}/config/disk/util": { @@ -6272,10 +6522,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get disk utilization" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["infra_disk_config_read"] }], + "security": [{ "bearer": [] }], "summary": "Get disk utilization", "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"] + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["infra_disk_config_read"]] } }, "/v1/projects/{ref}/config/disk/autoscale": { @@ -6310,10 +6561,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get project disk autoscale config" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["infra_disk_config_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets project disk autoscale config", "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"] + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["infra_disk_config_read"]] } }, "/v1/projects/{ref}/config/storage": { @@ -6348,10 +6600,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's storage config" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["storage_config_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets project's storage config", "tags": ["Storage"], - "x-endpoint-owners": ["storage"] + "x-endpoint-owners": ["storage"], + "x-fga-permissions": [["storage_config_read"]] }, "patch": { "operationId": "v1-update-storage-config", @@ -6385,10 +6638,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's storage config" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["storage_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Updates project's storage config", "tags": ["Storage"], - "x-endpoint-owners": ["storage"] + "x-endpoint-owners": ["storage"], + "x-fga-permissions": [["storage_config_write"]] } }, "/v1/projects/{ref}/config/database/pgbouncer": { @@ -6423,11 +6677,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's pgbouncer config" } }, - "security": [{ "fga_permissions": ["database_read"] }], "summary": "Get project's pgbouncer config", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_read"]], "x-oauth-scope": "database:read" } }, @@ -6466,11 +6720,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's supavisor config" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_pooling_config_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets project's supavisor config", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_pooling_config_read"]], "x-oauth-scope": "database:read" }, "patch": { @@ -6512,11 +6767,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's supavisor config" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_pooling_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Updates project's supavisor config", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_pooling_config_write"]], "x-oauth-scope": "database:write" } }, @@ -6552,11 +6808,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's Postgres config" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_config_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets project's Postgres config", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_config_read"]], "x-oauth-scope": "database:read" }, "put": { @@ -6598,11 +6855,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's Postgres config" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["database_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Updates project's Postgres config", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_config_write"]], "x-oauth-scope": "database:write" } }, @@ -6637,10 +6895,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["realtime_config_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets realtime configuration", "tags": ["Realtime"], - "x-endpoint-owners": ["realtime"] + "x-endpoint-owners": ["realtime"], + "x-fga-permissions": [["realtime_config_read"]] }, "patch": { "operationId": "v1-update-realtime-config", @@ -6673,10 +6932,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["realtime_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Updates realtime configuration", "tags": ["Realtime"], - "x-endpoint-owners": ["realtime"] + "x-endpoint-owners": ["realtime"], + "x-fga-permissions": [["realtime_config_write"]] } }, "/v1/projects/{ref}/config/realtime/shutdown": { @@ -6704,10 +6964,11 @@ "404": { "description": "Tenant not found" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["realtime_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Shutdowns realtime connections for a project", "tags": ["Realtime"], - "x-endpoint-owners": ["realtime"] + "x-endpoint-owners": ["realtime"], + "x-fga-permissions": [["realtime_config_write"]] } }, "/v1/projects/{ref}/config/auth/sso/providers": { @@ -6748,11 +7009,12 @@ "404": { "description": "SAML 2.0 support is not enabled for this project" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Creates a new SSO provider", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:write", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" }, "get": { @@ -6786,11 +7048,12 @@ "404": { "description": "SAML 2.0 support is not enabled for this project" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_read"] }], + "security": [{ "bearer": [] }], "summary": "Lists all SSO providers", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:read", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" } }, @@ -6817,6 +7080,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "77777777-7777-4777-8777-777777777777", "type": "string" } @@ -6838,11 +7102,12 @@ }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets a SSO provider by its UUID", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:read", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" }, "put": { @@ -6867,6 +7132,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "77777777-7777-4777-8777-777777777777", "type": "string" } @@ -6894,11 +7160,12 @@ }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Updates a SSO provider by its UUID", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:write", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" }, "delete": { @@ -6923,6 +7190,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "77777777-7777-4777-8777-777777777777", "type": "string" } @@ -6944,11 +7212,12 @@ }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Removes a SSO provider by its UUID", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:write", "position": "after" }], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" } }, @@ -6982,11 +7251,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get backups" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["backups_read"] }], + "security": [{ "bearer": [] }], "summary": "Lists all backups", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_read"]], "x-oauth-scope": "database:read" } }, @@ -7020,11 +7290,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["backups_write"] }], + "security": [{ "bearer": [] }], "summary": "Restores a PITR backup for a database", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_write"]], "x-oauth-scope": "database:write" } }, @@ -7067,11 +7338,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["backups_write"] }], + "security": [{ "bearer": [] }], "summary": "Initiates a creation of a restore point for a database", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_write"]], "x-internal": true, "x-oauth-scope": "database:write" }, @@ -7112,11 +7384,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get requested restore points" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["backups_read"] }], + "security": [{ "bearer": [] }], "summary": "Get restore points for project", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_read"]], "x-internal": true, "x-oauth-scope": "database:read" } @@ -7151,11 +7424,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["backups_write"] }], + "security": [{ "bearer": [] }], "summary": "Restores a physical backup for a database", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_write"]], "x-internal": true, "x-oauth-scope": "database:write" } @@ -7188,13 +7462,18 @@ } }, "401": { "description": "Unauthorized" }, - "402": { "description": "This feature requires the Enterprise organization plan." }, + "402": { + "description": "This feature requires the Enterprise organization plan.", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/PlanGateErrorBody" } } + } + }, "403": { "description": "Forbidden action" }, "404": { "description": "Project or backup schedule not found" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve backup schedule" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["backups_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets the backup schedule for a project", "tags": ["Database"], "x-allowed-plans": ["Enterprise"], @@ -7203,6 +7482,7 @@ { "name": "Only available on Enterprise", "position": "before" } ], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_read"]], "x-oauth-scope": "database:read" }, "patch": { @@ -7242,13 +7522,18 @@ }, "400": { "description": "Invalid schedule_for format" }, "401": { "description": "Unauthorized" }, - "402": { "description": "This feature requires the Enterprise organization plan." }, + "402": { + "description": "This feature requires the Enterprise organization plan.", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/PlanGateErrorBody" } } + } + }, "403": { "description": "Forbidden action" }, "404": { "description": "Project or backup schedule not found" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update backup schedule" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["backups_write"] }], + "security": [{ "bearer": [] }], "summary": "Updates the backup schedule time for a project", "tags": ["Database"], "x-allowed-plans": ["Enterprise"], @@ -7257,6 +7542,7 @@ { "name": "Only available on Enterprise", "position": "before" } ], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_write"]], "x-oauth-scope": "database:write" } }, @@ -7290,11 +7576,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["backups_write"] }], + "security": [{ "bearer": [] }], "summary": "Initiates an undo to a given restore point", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_write"]], "x-internal": true, "x-oauth-scope": "database:write" } @@ -7329,11 +7616,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["organization_admin_read"] }], + "security": [{ "bearer": [] }], "summary": "Get entitlements for an organization", "tags": ["Organizations"], "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }], "x-endpoint-owners": ["billing"], + "x-fga-permissions": [["organization_admin_read"]], "x-oauth-scope": "organizations:read" } }, @@ -7366,11 +7654,12 @@ } } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["members_read"] }], + "security": [{ "bearer": [] }], "summary": "List members of an organization", "tags": ["Organizations"], "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["members_read"]], "x-oauth-scope": "organizations:read" } }, @@ -7403,11 +7692,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["organization_admin_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets information about the organization", "tags": ["Organizations"], "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_read"]], "x-oauth-scope": "organizations:read" } }, @@ -7446,10 +7736,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["organization_admin_write"] }], + "security": [{ "bearer": [] }], "summary": "Gets project details for the specified organization and claim token", "tags": ["Organizations"], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_write"]], "x-internal": true }, "post": { @@ -7479,10 +7770,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["organization_admin_write"] }], + "security": [{ "bearer": [] }], "summary": "Claims project for the specified organization", "tags": ["Organizations"], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_write"]], "x-internal": true } }, @@ -7507,7 +7799,13 @@ "required": false, "in": "query", "description": "Number of projects to skip", - "schema": { "minimum": 0, "default": 0, "example": 0, "type": "integer" } + "schema": { + "minimum": 0, + "maximum": 9007199254740991, + "default": 0, + "example": 0, + "type": "integer" + } }, { "name": "limit", @@ -7563,11 +7861,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve projects" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["organization_projects_read"] }], + "security": [{ "bearer": [] }], "summary": "Gets all projects for the given organization", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_projects_read"]], "x-oauth-scope": "projects:read" } } @@ -7629,7 +7928,12 @@ ] }, "db_host": { "type": "string" }, - "db_port": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, + "db_port": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 + }, "db_user": { "type": "string" }, "db_pass": { "type": "string" }, "jwt_secret": { "type": "string" } @@ -7650,9 +7954,9 @@ "branch_name": { "type": "string" }, "git_branch": { "type": "string" }, "reset_on_push": { - "type": "boolean", "description": "This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead.", - "deprecated": true + "deprecated": true, + "type": "boolean" }, "persistent": { "type": "boolean" }, "status": { @@ -7684,17 +7988,26 @@ "BranchResponse": { "type": "object", "properties": { - "id": { "type": "string", "format": "uuid" }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "name": { "type": "string" }, "project_ref": { "type": "string" }, "parent_project_ref": { "type": "string" }, "is_default": { "type": "boolean" }, "git_branch": { "type": "string" }, - "pr_number": { "type": "integer", "format": "int32" }, + "pr_number": { + "type": "integer", + "format": "int32", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "latest_check_run_id": { - "type": "number", "description": "This field is deprecated and will not be populated.", - "deprecated": true + "deprecated": true, + "type": "number" }, "persistent": { "type": "boolean" }, "status": { @@ -7710,12 +8023,28 @@ "description": "This field is deprecated. List action runs to get branch status instead.", "deprecated": true }, - "created_at": { "type": "string", "format": "date-time" }, - "updated_at": { "type": "string", "format": "date-time" }, - "review_requested_at": { "type": "string", "format": "date-time" }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + }, + "review_requested_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + }, "with_data": { "type": "boolean" }, "notify_url": { "type": "string", "format": "uri" }, - "deletion_scheduled_at": { "type": "string", "format": "date-time" }, + "deletion_scheduled_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + }, "preview_project_status": { "type": "string", "enum": [ @@ -7852,9 +8181,9 @@ "db_pass": { "type": "string", "description": "Database password" }, "name": { "type": "string", "maxLength": 256, "description": "Name of your project" }, "organization_id": { - "type": "string", + "deprecated": true, "description": "Deprecated: Use `organization_slug` instead.", - "deprecated": true + "type": "string" }, "organization_slug": { "type": "string", @@ -7863,13 +8192,12 @@ "example": "tsrqponmlkjihgfedcba" }, "plan": { - "type": "string", - "enum": ["free", "pro"], "deprecated": true, - "description": "Subscription Plan is now set on organization level and is ignored in this request" + "description": "Subscription Plan is now set on organization level and is ignored in this request", + "type": "string", + "enum": ["free", "pro"] }, "region": { - "type": "string", "description": "Region you want your server to reside in. Use region_selection instead.", "deprecated": true, "enum": [ @@ -7891,10 +8219,11 @@ "ca-central-1", "ap-south-1", "sa-east-1" - ] + ], + "type": "string" }, "region_selection": { - "discriminator": { "propertyName": "type" }, + "description": "Region selection. Only one of region or region_selection can be specified.", "oneOf": [ { "type": "object", @@ -7939,13 +8268,12 @@ }, "required": ["type", "code"] } - ], - "description": "Region selection. Only one of region or region_selection can be specified." + ] }, "kps_enabled": { - "type": "boolean", "deprecated": true, - "description": "This field is deprecated and is ignored in this request" + "description": "This field is deprecated and is ignored in this request", + "type": "boolean" }, "desired_instance_size": { "description": "Desired instance size. Omit this field to always default to the smallest possible size.", @@ -7973,24 +8301,25 @@ ] }, "template_url": { + "description": "Template URL used to create the project from the CLI.", "type": "string", - "format": "uri", - "description": "Template URL used to create the project from the CLI." + "format": "uri" }, + "release_channel": { "deprecated": true, "type": "null" }, + "postgres_engine": { "deprecated": true, "type": "null" }, "high_availability": { - "type": "boolean", - "description": "[Experimental] Whether to enable high availability for the project." + "description": "[Experimental] Whether to enable high availability for the project.", + "type": "boolean" } }, "required": ["db_pass", "name", "organization_slug"], - "additionalProperties": false, - "hideDefinitions": ["release_channel", "postgres_engine"], "example": { "db_pass": "correct-horse-battery-staple", "name": "acme-prod", "organization_slug": "tsrqponmlkjihgfedcba", "region": "us-east-1" - } + }, + "additionalProperties": false }, "V1ProjectResponse": { "type": "object", @@ -8193,8 +8522,8 @@ "type": "object", "properties": { "name": { "type": "string", "maxLength": 256 } }, "required": ["name"], - "additionalProperties": false, - "example": { "name": "Acme" } + "example": { "name": "Acme" }, + "additionalProperties": false }, "OAuthTokenBody": { "type": "object", @@ -8207,24 +8536,27 @@ "urn:ietf:params:oauth:grant-type:jwt-bearer" ] }, - "client_id": { "type": "string", "format": "uuid" }, + "client_id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "client_secret": { "type": "string" }, "code": { "type": "string" }, "code_verifier": { "type": "string" }, "redirect_uri": { "type": "string" }, "refresh_token": { "type": "string" }, "assertion": { - "type": "string", - "description": "IDJAG assertion JWT for grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer. Beta - available on Team and Enterprise plans only." + "description": "IDJAG assertion JWT for grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer. Beta - available on Team and Enterprise plans only.", + "type": "string" }, "resource": { + "description": "Resource indicator for MCP (Model Context Protocol) clients", "type": "string", - "format": "uri", - "description": "Resource indicator for MCP (Model Context Protocol) clients" + "format": "uri" }, "scope": { "type": "string" } }, - "additionalProperties": false, "example": { "grant_type": "authorization_code", "client_id": "66666666-6666-4666-8666-666666666666", @@ -8233,17 +8565,22 @@ "code_verifier": "qW0Z6d9pQnW0mL1dK1q9wFq6Yz2nV5rA8jT3mP7sH4c", "redirect_uri": "https://app.acme.com/auth/callback", "scope": "projects:read projects:write" - } + }, + "additionalProperties": false }, "OAuthTokenResponse": { "type": "object", "properties": { "access_token": { "type": "string" }, "refresh_token": { - "type": "string", - "description": "The `urn:ietf:params:oauth:grant-type:jwt-bearer` grant type issues access tokens only, no refresh token is returned and the token cannot be revoked via `/v1/oauth/revoke`." + "description": "The `urn:ietf:params:oauth:grant-type:jwt-bearer` grant type issues access tokens only, no refresh token is returned and the token cannot be revoked via `/v1/oauth/revoke`.", + "type": "string" + }, + "expires_in": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "expires_in": { "type": "integer" }, "token_type": { "type": "string", "enum": ["Bearer"] } }, "required": ["access_token", "expires_in", "token_type"], @@ -8252,17 +8589,21 @@ "OAuthRevokeTokenBody": { "type": "object", "properties": { - "client_id": { "type": "string", "format": "uuid" }, + "client_id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "client_secret": { "type": "string" }, "refresh_token": { "type": "string" } }, "required": ["client_id", "client_secret", "refresh_token"], - "additionalProperties": false, "example": { "client_id": "66666666-6666-4666-8666-666666666666", "client_secret": "sb_secret_live_example_9f4d3a206b2e4a7e8c91", "refresh_token": "oauth_refresh_9f4d3a206b2e4a7e8c91" - } + }, + "additionalProperties": false }, "SnippetList": { "type": "object", @@ -8345,9 +8686,9 @@ "type": "object", "properties": { "favorite": { - "type": "boolean", "deprecated": true, - "description": "Deprecated: Rely on root-level favorite property instead." + "description": "Deprecated: Rely on root-level favorite property instead.", + "type": "boolean" }, "schema_version": { "type": "string" }, "sql": { "type": "string" } @@ -8529,16 +8870,31 @@ "id": { "type": "string", "nullable": true }, "type": { "type": "string", - "enum": ["legacy", "publishable", "secret"], + "enum": ["legacy", "publishable", "secret", null], "nullable": true }, "prefix": { "type": "string", "nullable": true }, "name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "hash": { "type": "string", "nullable": true }, - "secret_jwt_template": { "type": "object", "additionalProperties": {}, "nullable": true }, - "inserted_at": { "type": "string", "format": "date-time", "nullable": true }, - "updated_at": { "type": "string", "format": "date-time", "nullable": true } + "secret_jwt_template": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {}, + "nullable": true + }, + "inserted_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "nullable": true + } }, "required": ["name"] }, @@ -8558,7 +8914,12 @@ "pattern": "^[a-z_][a-z0-9_]+$" }, "description": { "type": "string", "nullable": true }, - "secret_jwt_template": { "type": "object", "additionalProperties": {}, "nullable": true } + "secret_jwt_template": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {}, + "nullable": true + } }, "required": ["type", "name"], "example": { "type": "secret", "name": "ci_secret_key", "description": "CI deploy key" } @@ -8573,7 +8934,12 @@ "pattern": "^[a-z_][a-z0-9_]+$" }, "description": { "type": "string", "nullable": true }, - "secret_jwt_template": { "type": "object", "additionalProperties": {}, "nullable": true } + "secret_jwt_template": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {}, + "nullable": true + } }, "example": { "name": "ci_secret_key_rotated", "description": "Rotated after March release" } }, @@ -8637,6 +9003,25 @@ "notify_url": "https://example.com/webhooks/branches" } }, + "UpdateCustomHostnameResponseJsonValue": { + "description": "Any JSON-serializable value", + "anyOf": [ + { + "anyOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }], + "nullable": true + }, + { + "type": "array", + "items": { "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" } + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" + } + } + ] + }, "UpdateCustomHostnameResponse": { "type": "object", "properties": { @@ -8657,11 +9042,11 @@ "success": { "type": "boolean" }, "errors": { "type": "array", - "items": { "description": "Any JSON-serializable value" } + "items": { "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" } }, "messages": { "type": "array", - "items": { "description": "Any JSON-serializable value" } + "items": { "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" } }, "result": { "type": "object", @@ -8724,34 +9109,10 @@ }, "UpdateCustomHostnameBody": { "type": "object", - "properties": { "custom_hostname": { "type": "string", "maxLength": 253, "minLength": 1 } }, + "properties": { "custom_hostname": { "type": "string", "minLength": 1, "maxLength": 253 } }, "required": ["custom_hostname"], "example": { "custom_hostname": "docs.example.com" } }, - "JitStateResponse": { - "discriminator": { "propertyName": "state" }, - "oneOf": [ - { - "type": "object", - "properties": { - "state": { "type": "string", "enum": ["enabled", "disabled"] }, - "appliedSuccessfully": { "type": "boolean" } - }, - "required": ["state"] - }, - { - "type": "object", - "properties": { - "state": { "type": "string", "enum": ["unavailable"] }, - "unavailableReason": { - "type": "string", - "enum": ["postgres_upgrade_required", "temporarily_unavailable"] - } - }, - "required": ["state", "unavailableReason"] - } - ] - }, "JitAccessRequestRequest": { "type": "object", "properties": { "state": { "type": "string", "enum": ["enabled", "disabled"] } }, @@ -8793,8 +9154,8 @@ }, "requester_ip": { "default": false, - "type": "boolean", - "description": "Include requester's public IP in the list of addresses to unban." + "description": "Include requester's public IP in the list of addresses to unban.", + "type": "boolean" }, "identifier": { "type": "string" } }, @@ -8811,9 +9172,14 @@ "dbAllowedCidrs": { "type": "array", "items": { "type": "string" } }, "dbAllowedCidrsV6": { "type": "array", "items": { "type": "string" } } }, + "example": { + "dbAllowedCidrs": ["203.0.113.0/24"], + "dbAllowedCidrsV6": ["2001:db8::/32"] + }, "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." }, "old_config": { + "description": "Populated when a new config has been received, but not registered as successfully applied to a project.", "type": "object", "properties": { "dbAllowedCidrs": { "type": "array", "items": { "type": "string" } }, @@ -8822,12 +9188,19 @@ "example": { "dbAllowedCidrs": ["203.0.113.0/24"], "dbAllowedCidrsV6": ["2001:db8::/32"] - }, - "description": "Populated when a new config has been received, but not registered as successfully applied to a project." + } }, "status": { "type": "string", "enum": ["stored", "applied"] }, - "updated_at": { "type": "string", "format": "date-time" }, - "applied_at": { "type": "string", "format": "date-time" } + "updated_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + }, + "applied_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + } }, "required": ["entitlement", "config", "status"] }, @@ -8884,6 +9257,7 @@ "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." }, "old_config": { + "description": "Populated when a new config has been received, but not registered as successfully applied to a project.", "type": "object", "properties": { "dbAllowedCidrs": { @@ -8897,41 +9271,71 @@ "required": ["address", "type"] } } - }, - "description": "Populated when a new config has been received, but not registered as successfully applied to a project." + } + }, + "updated_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + }, + "applied_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, - "updated_at": { "type": "string", "format": "date-time" }, - "applied_at": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["stored", "applied"] } }, "required": ["entitlement", "config", "status"] }, "PgsodiumConfigResponse": { "type": "object", - "properties": { "root_key": { "type": "string" } }, - "required": ["root_key"] + "properties": { + "root_key": { + "type": "string", + "description": "The pgsodium root key: 32 bytes, hex-encoded (64 characters)." + } + }, + "required": ["root_key"], + "example": { + "root_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" + } }, "UpdatePgsodiumConfigBody": { "type": "object", - "properties": { "root_key": { "type": "string" } }, + "properties": { + "root_key": { + "type": "string", + "description": "The pgsodium root key: 32 bytes, hex-encoded (64 characters)." + } + }, "required": ["root_key"], - "example": { "root_key": "MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=" } + "example": { + "root_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" + } }, "PostgrestConfigWithJWTSecretResponse": { "type": "object", "properties": { "db_schema": { "type": "string" }, - "max_rows": { "type": "integer" }, + "max_rows": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "db_extra_search_path": { "type": "string" }, "db_pool": { "type": "integer", - "nullable": true, - "description": "If `null`, the value is automatically configured based on compute size." + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "If `null`, the value is automatically configured based on compute size.", + "nullable": true }, "db_pool_acquisition_timeout": { "type": "integer", - "nullable": true, - "description": "If `null`, the value is automatically configured to 10." + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "If `null`, the value is automatically configured to 10.", + "nullable": true }, "jwt_secret": { "type": "string" } }, @@ -8958,17 +9362,25 @@ "type": "object", "properties": { "db_schema": { "type": "string" }, - "max_rows": { "type": "integer" }, + "max_rows": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "db_extra_search_path": { "type": "string" }, "db_pool": { "type": "integer", - "nullable": true, - "description": "If `null`, the value is automatically configured based on compute size." + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "If `null`, the value is automatically configured based on compute size.", + "nullable": true }, "db_pool_acquisition_timeout": { "type": "integer", - "nullable": true, - "description": "If `null`, the value is automatically configured to 10." + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "If `null`, the value is automatically configured to 10.", + "nullable": true } }, "required": [ @@ -8982,7 +9394,7 @@ "V1ProjectRefResponse": { "type": "object", "properties": { - "id": { "type": "integer" }, + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "ref": { "type": "string" }, "name": { "type": "string" } }, @@ -9004,6 +9416,7 @@ "required": ["name", "value"] }, "CreateSecretBody": { + "maxItems": 100, "type": "array", "items": { "type": "object", @@ -9065,6 +9478,36 @@ }, "required": ["status"] }, + "PlanGateErrorBody": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable explanation of the plan gate" + }, + "error": { + "description": "Present on entitlement denials. Other errors with this status code (validation, billing state) carry only message.", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Machine-readable marker for plan-gated denials", + "enum": ["entitlement_required"] + }, + "feature": { + "type": "string", + "description": "Entitlement feature key that failed the check" + }, + "upgrade_url": { + "description": "Billing page URL for the organization, present when the org is resolvable", + "type": "string" + } + }, + "required": ["code", "feature"] + } + }, + "required": ["message"] + }, "VanitySubdomainBody": { "type": "object", "properties": { "vanity_subdomain": { "type": "string", "maxLength": 63 } }, @@ -9149,7 +9592,7 @@ "validation_errors": { "type": "array", "items": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { @@ -9215,7 +9658,12 @@ "type": "string", "enum": ["user_defined_objects_in_internal_schemas"] }, - "obj_type": { "type": "string", "enum": ["table", "function"] }, + "obj_type": { + "anyOf": [ + { "type": "string", "enum": ["table"] }, + { "type": "string", "enum": ["function"] } + ] + }, "schema_name": { "type": "string" }, "obj_name": { "type": "string" } }, @@ -9245,7 +9693,6 @@ "warnings": { "type": "array", "items": { - "discriminator": { "propertyName": "type" }, "oneOf": [ { "type": "object", @@ -9403,7 +9850,7 @@ }, "status": { "type": "string", "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"] }, "info": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { @@ -9423,7 +9870,11 @@ }, "db_connected": { "type": "boolean" }, "replication_connected": { "type": "boolean" }, - "connected_cluster": { "type": "integer" } + "connected_cluster": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } }, "required": [ "healthy", @@ -9446,17 +9897,29 @@ "SigningKeyResponse": { "type": "object", "properties": { - "id": { "type": "string", "format": "uuid" }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "algorithm": { "type": "string", "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, "status": { "type": "string", "enum": ["in_use", "previously_used", "revoked", "standby"] }, "public_jwk": { "nullable": true }, - "created_at": { "type": "string", "format": "date-time" }, - "updated_at": { "type": "string", "format": "date-time" } + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + } }, - "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "required": ["id", "algorithm", "status", "public_jwk", "created_at", "updated_at"], "additionalProperties": false }, "CreateSigningKeyBody": { @@ -9465,18 +9928,21 @@ "algorithm": { "type": "string", "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, "status": { "type": "string", "enum": ["in_use", "standby"] }, "private_jwk": { - "discriminator": { "propertyName": "kty" }, "oneOf": [ { "type": "object", "properties": { - "kid": { "type": "string", "format": "uuid" }, + "kid": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { - "type": "array", - "items": { "type": "string", "enum": ["sign", "verify"] }, "minItems": 2, - "maxItems": 2 + "maxItems": 2, + "type": "array", + "items": { "type": "string", "enum": ["sign", "verify"] } }, "ext": { "type": "boolean", "enum": [true] }, "kty": { "type": "string", "enum": ["RSA"] }, @@ -9496,13 +9962,17 @@ { "type": "object", "properties": { - "kid": { "type": "string", "format": "uuid" }, + "kid": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { - "type": "array", - "items": { "type": "string", "enum": ["sign", "verify"] }, "minItems": 2, - "maxItems": 2 + "maxItems": 2, + "type": "array", + "items": { "type": "string", "enum": ["sign", "verify"] } }, "ext": { "type": "boolean", "enum": [true] }, "kty": { "type": "string", "enum": ["EC"] }, @@ -9518,13 +9988,17 @@ { "type": "object", "properties": { - "kid": { "type": "string", "format": "uuid" }, + "kid": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { - "type": "array", - "items": { "type": "string", "enum": ["sign", "verify"] }, "minItems": 2, - "maxItems": 2 + "maxItems": 2, + "type": "array", + "items": { "type": "string", "enum": ["sign", "verify"] } }, "ext": { "type": "boolean", "enum": [true] }, "kty": { "type": "string", "enum": ["OKP"] }, @@ -9539,13 +10013,17 @@ { "type": "object", "properties": { - "kid": { "type": "string", "format": "uuid" }, + "kid": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { - "type": "array", - "items": { "type": "string", "enum": ["sign", "verify"] }, "minItems": 2, - "maxItems": 2 + "maxItems": 2, + "type": "array", + "items": { "type": "string", "enum": ["sign", "verify"] } }, "ext": { "type": "boolean", "enum": [true] }, "kty": { "type": "string", "enum": ["oct"] }, @@ -9559,8 +10037,8 @@ } }, "required": ["algorithm"], - "additionalProperties": false, - "example": { "algorithm": "RS256", "status": "standby" } + "example": { "algorithm": "RS256", "status": "standby" }, + "additionalProperties": false }, "SigningKeysResponse": { "type": "object", @@ -9570,17 +10048,29 @@ "items": { "type": "object", "properties": { - "id": { "type": "string", "format": "uuid" }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "algorithm": { "type": "string", "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, "status": { "type": "string", "enum": ["in_use", "previously_used", "revoked", "standby"] }, "public_jwk": { "nullable": true }, - "created_at": { "type": "string", "format": "date-time" }, - "updated_at": { "type": "string", "format": "date-time" } + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + } }, - "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "required": ["id", "algorithm", "status", "public_jwk", "created_at", "updated_at"], "additionalProperties": false } } @@ -9597,17 +10087,27 @@ } }, "required": ["status"], - "additionalProperties": false, - "example": { "status": "standby" } + "example": { "status": "standby" }, + "additionalProperties": false }, "AuthConfigResponse": { "type": "object", "properties": { - "api_max_request_duration": { "type": "integer", "nullable": true }, - "db_max_pool_size": { "type": "integer", "nullable": true }, + "api_max_request_duration": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, + "db_max_pool_size": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, "db_max_pool_size_unit": { "type": "string", - "enum": ["connections", "percent"], + "enum": ["connections", "percent", null], "nullable": true }, "disable_signup": { "type": "boolean", "nullable": true }, @@ -9727,11 +10227,25 @@ "hook_after_user_created_enabled": { "type": "boolean", "nullable": true }, "hook_after_user_created_uri": { "type": "string", "nullable": true }, "hook_after_user_created_secrets": { "type": "string", "nullable": true }, - "jwt_exp": { "type": "integer", "nullable": true }, + "jwt_exp": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, "mailer_allow_unverified_email_sign_ins": { "type": "boolean", "nullable": true }, "mailer_autoconfirm": { "type": "boolean", "nullable": true }, - "mailer_otp_exp": { "type": "integer" }, - "mailer_otp_length": { "type": "integer", "nullable": true }, + "mailer_otp_exp": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "mailer_otp_length": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "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 }, @@ -9799,7 +10313,12 @@ }, "mailer_notifications_identity_linked_enabled": { "type": "boolean", "nullable": true }, "mailer_notifications_identity_unlinked_enabled": { "type": "boolean", "nullable": true }, - "mfa_max_enrolled_factors": { "type": "integer", "nullable": true }, + "mfa_max_enrolled_factors": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, "mfa_totp_enroll_enabled": { "type": "boolean", "nullable": true }, "mfa_totp_verify_enabled": { "type": "boolean", "nullable": true }, "mfa_phone_enroll_enabled": { "type": "boolean", "nullable": true }, @@ -9810,31 +10329,81 @@ "webauthn_rp_display_name": { "type": "string", "nullable": true }, "webauthn_rp_id": { "type": "string", "nullable": true }, "webauthn_rp_origins": { "type": "string", "nullable": true }, - "mfa_phone_otp_length": { "type": "integer" }, + "mfa_phone_otp_length": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "mfa_phone_template": { "type": "string", "nullable": true }, - "mfa_phone_max_frequency": { "type": "integer", "nullable": true }, + "mfa_phone_max_frequency": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, "nimbus_oauth_client_id": { "type": "string", "nullable": true }, "nimbus_oauth_email_optional": { "type": "boolean", "nullable": true }, "nimbus_oauth_client_secret": { "type": "string", "nullable": true }, "password_hibp_enabled": { "type": "boolean", "nullable": true }, - "password_min_length": { "type": "integer", "nullable": true }, + "password_min_length": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, "password_required_characters": { "type": "string", "enum": [ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", - "" + "", + null ], "nullable": true }, - "rate_limit_anonymous_users": { "type": "integer", "nullable": true }, - "rate_limit_email_sent": { "type": "integer", "nullable": true }, - "rate_limit_sms_sent": { "type": "integer", "nullable": true }, - "rate_limit_token_refresh": { "type": "integer", "nullable": true }, - "rate_limit_verify": { "type": "integer", "nullable": true }, - "rate_limit_otp": { "type": "integer", "nullable": true }, - "rate_limit_web3": { "type": "integer", "nullable": true }, + "rate_limit_anonymous_users": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, + "rate_limit_email_sent": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, + "rate_limit_sms_sent": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, + "rate_limit_token_refresh": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, + "rate_limit_verify": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, + "rate_limit_otp": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, + "rate_limit_web3": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, "refresh_token_rotation_enabled": { "type": "boolean", "nullable": true }, "saml_enabled": { "type": "boolean", "nullable": true }, "saml_external_url": { "type": "string", "nullable": true }, @@ -9843,12 +10412,17 @@ "security_captcha_enabled": { "type": "boolean", "nullable": true }, "security_captcha_provider": { "type": "string", - "enum": ["turnstile", "hcaptcha"], + "enum": ["turnstile", "hcaptcha", null], "nullable": true }, "security_captcha_secret": { "type": "string", "nullable": true }, "security_manual_linking_enabled": { "type": "boolean", "nullable": true }, - "security_refresh_token_reuse_interval": { "type": "integer", "nullable": true }, + "security_refresh_token_reuse_interval": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, "security_update_password_require_reauthentication": { "type": "boolean", "nullable": true @@ -9859,19 +10433,38 @@ "sessions_timebox": { "type": "number", "nullable": true }, "site_url": { "type": "string", "nullable": true }, "sms_autoconfirm": { "type": "boolean", "nullable": true }, - "sms_max_frequency": { "type": "integer", "nullable": true }, + "sms_max_frequency": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, "sms_messagebird_access_key": { "type": "string", "nullable": true }, "sms_messagebird_originator": { "type": "string", "nullable": true }, - "sms_otp_exp": { "type": "integer", "nullable": true }, - "sms_otp_length": { "type": "integer" }, + "sms_otp_exp": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, + "sms_otp_length": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "sms_provider": { "type": "string", - "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage", null], "nullable": true }, "sms_template": { "type": "string", "nullable": true }, "sms_test_otp": { "type": "string", "nullable": true }, - "sms_test_otp_valid_until": { "type": "string", "format": "date-time", "nullable": true }, + "sms_test_otp_valid_until": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "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 }, @@ -9884,9 +10477,19 @@ "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", "format": "email", "nullable": true }, + "smtp_admin_email": { + "type": "string", + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", + "nullable": true + }, "smtp_host": { "type": "string", "nullable": true }, - "smtp_max_frequency": { "type": "integer", "nullable": true }, + "smtp_max_frequency": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, "smtp_pass": { "type": "string", "nullable": true }, "smtp_port": { "type": "string", "nullable": true }, "smtp_sender_name": { "type": "string", "nullable": true }, @@ -9896,7 +10499,11 @@ "oauth_server_allow_dynamic_registration": { "type": "boolean" }, "oauth_server_authorization_path": { "type": "string", "nullable": true }, "custom_oauth_enabled": { "type": "boolean" }, - "custom_oauth_max_providers": { "type": "integer" } + "custom_oauth_max_providers": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } }, "required": [ "api_max_request_duration", @@ -10144,7 +10751,12 @@ "site_url": { "type": "string", "pattern": "^[^,]+$", "nullable": true }, "disable_signup": { "type": "boolean", "nullable": true }, "jwt_exp": { "type": "integer", "minimum": 0, "maximum": 604800, "nullable": true }, - "smtp_admin_email": { "type": "string", "format": "email", "nullable": true }, + "smtp_admin_email": { + "type": "string", + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", + "nullable": true + }, "smtp_host": { "type": "string", "nullable": true }, "smtp_port": { "type": "string", "nullable": true }, "smtp_user": { "type": "string", "nullable": true }, @@ -10240,7 +10852,7 @@ "security_captcha_enabled": { "type": "boolean", "nullable": true }, "security_captcha_provider": { "type": "string", - "enum": ["turnstile", "hcaptcha"], + "enum": ["turnstile", "hcaptcha", null], "nullable": true }, "security_captcha_secret": { "type": "string", "nullable": true }, @@ -10309,7 +10921,8 @@ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", - "" + "", + null ], "nullable": true }, @@ -10342,7 +10955,7 @@ "sms_otp_length": { "type": "integer", "minimum": 0, "maximum": 32767 }, "sms_provider": { "type": "string", - "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage", null], "nullable": true }, "sms_messagebird_access_key": { "type": "string", "nullable": true }, @@ -10352,7 +10965,12 @@ "pattern": "^([0-9]{1,15}=[0-9]+,?)*$", "nullable": true }, - "sms_test_otp_valid_until": { "type": "string", "format": "date-time", "nullable": true }, + "sms_test_otp_valid_until": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "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 }, @@ -10479,13 +11097,23 @@ "external_zoom_client_id": { "type": "string", "nullable": true }, "external_zoom_email_optional": { "type": "boolean", "nullable": true }, "external_zoom_secret": { "type": "string", "nullable": true }, - "db_max_pool_size": { "type": "integer", "nullable": true }, + "db_max_pool_size": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, "db_max_pool_size_unit": { "type": "string", - "enum": ["connections", "percent"], + "enum": ["connections", "percent", null], + "nullable": true + }, + "api_max_request_duration": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, - "api_max_request_duration": { "type": "integer", "nullable": true }, "mfa_totp_enroll_enabled": { "type": "boolean", "nullable": true }, "mfa_totp_verify_enabled": { "type": "boolean", "nullable": true }, "mfa_web_authn_enroll_enabled": { "type": "boolean", "nullable": true }, @@ -10537,7 +11165,11 @@ "ThirdPartyAuth": { "type": "object", "properties": { - "id": { "type": "string", "format": "uuid" }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "type": { "type": "string" }, "oidc_issuer_url": { "type": "string", "nullable": true }, "jwks_url": { "type": "string", "nullable": true }, @@ -10573,6 +11205,25 @@ }, "required": ["available_versions"] }, + "ListProjectAddonsResponseJsonValue": { + "description": "Any JSON-serializable value", + "anyOf": [ + { + "anyOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }], + "nullable": true + }, + { + "type": "array", + "items": { "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" } + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" + } + } + ] + }, "ListProjectAddonsResponse": { "type": "object", "properties": { @@ -10598,7 +11249,7 @@ "type": "object", "properties": { "id": { - "oneOf": [ + "anyOf": [ { "type": "string", "enum": [ @@ -10642,7 +11293,7 @@ }, "required": ["description", "type", "interval", "amount"] }, - "meta": { "description": "Any JSON-serializable value" } + "meta": { "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" } }, "required": ["id", "name", "price"] } @@ -10675,7 +11326,7 @@ "type": "object", "properties": { "id": { - "oneOf": [ + "anyOf": [ { "type": "string", "enum": [ @@ -10719,7 +11370,7 @@ }, "required": ["description", "type", "interval", "amount"] }, - "meta": { "description": "Any JSON-serializable value" } + "meta": { "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" } }, "required": ["id", "name", "price"] } @@ -10735,7 +11386,7 @@ "type": "object", "properties": { "addon_variant": { - "oneOf": [ + "anyOf": [ { "type": "string", "enum": [ @@ -10787,7 +11438,11 @@ "token_alias": { "type": "string" }, "expires_at": { "type": "string" }, "created_at": { "type": "string" }, - "created_by": { "type": "string", "format": "uuid" } + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + } }, "required": ["token_alias", "expires_at", "created_at", "created_by"] }, @@ -10798,7 +11453,11 @@ "token_alias": { "type": "string" }, "expires_at": { "type": "string" }, "created_at": { "type": "string" }, - "created_by": { "type": "string", "format": "uuid" } + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + } }, "required": ["token", "token_alias", "expires_at", "created_at", "created_by"] }, @@ -10811,7 +11470,6 @@ "type": "object", "properties": { "name": { - "type": "string", "enum": [ "unindexed_foreign_keys", "auth_users_exposed", @@ -10842,7 +11500,8 @@ "leaked_service_key", "no_backup_admin", "vulnerable_postgres_version" - ] + ], + "type": "string" }, "title": { "type": "string" }, "level": { "type": "string", "enum": ["ERROR", "WARN", "INFO"] }, @@ -10891,7 +11550,7 @@ "properties": { "result": { "type": "array", "items": {} }, "error": { - "oneOf": [ + "anyOf": [ { "type": "string" }, { "type": "object", @@ -10928,7 +11587,11 @@ "items": { "type": "object", "properties": { - "timestamp": { "type": "string", "format": "date-time" }, + "timestamp": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|))$" + }, "total_auth_requests": { "type": "number" }, "total_realtime_requests": { "type": "number" }, "total_rest_requests": { "type": "number" }, @@ -10944,7 +11607,7 @@ } }, "error": { - "oneOf": [ + "anyOf": [ { "type": "string" }, { "type": "object", @@ -10985,7 +11648,7 @@ } }, "error": { - "oneOf": [ + "anyOf": [ { "type": "string" }, { "type": "object", @@ -11025,7 +11688,12 @@ "properties": { "role": { "type": "string", "minLength": 1 }, "password": { "type": "string", "minLength": 1 }, - "ttl_seconds": { "type": "integer", "minimum": 1, "format": "int64" } + "ttl_seconds": { + "type": "integer", + "minimum": 1, + "maximum": 9007199254740991, + "format": "int64" + } }, "required": ["role", "password", "ttl_seconds"] }, @@ -11127,12 +11795,12 @@ "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], - "additionalProperties": true + "additionalProperties": {} } } }, "required": ["name", "schemas"], - "additionalProperties": true + "additionalProperties": {} } } }, @@ -11152,7 +11820,11 @@ "JitAccessResponse": { "type": "object", "properties": { - "user_id": { "type": "string", "format": "uuid" }, + "user_id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "user_roles": { "type": "array", "items": { @@ -11167,7 +11839,13 @@ "type": "array", "items": { "type": "object", - "properties": { "cidr": { "type": "string" } }, + "properties": { + "cidr": { + "type": "string", + "format": "cidrv4", + "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" + } + }, "required": ["cidr"] } }, @@ -11175,7 +11853,13 @@ "type": "array", "items": { "type": "object", - "properties": { "cidr": { "type": "string" } }, + "properties": { + "cidr": { + "type": "string", + "format": "cidrv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" + } + }, "required": ["cidr"] } } @@ -11193,7 +11877,20 @@ "type": "object", "properties": { "role": { "type": "string", "minLength": 1 }, - "rhost": { "type": "string", "minLength": 1 } + "rhost": { + "anyOf": [ + { + "type": "string", + "format": "ipv4", + "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$" + }, + { + "type": "string", + "format": "ipv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$" + } + ] + } }, "required": ["role", "rhost"], "example": { "role": "postgres", "rhost": "203.0.113.10" } @@ -11201,7 +11898,11 @@ "JitAuthorizeAccessResponse": { "type": "object", "properties": { - "user_id": { "type": "string", "format": "uuid" }, + "user_id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "user_role": { "type": "object", "properties": { @@ -11214,7 +11915,13 @@ "type": "array", "items": { "type": "object", - "properties": { "cidr": { "type": "string" } }, + "properties": { + "cidr": { + "type": "string", + "format": "cidrv4", + "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" + } + }, "required": ["cidr"] } }, @@ -11222,7 +11929,13 @@ "type": "array", "items": { "type": "object", - "properties": { "cidr": { "type": "string" } }, + "properties": { + "cidr": { + "type": "string", + "format": "cidrv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" + } + }, "required": ["cidr"] } } @@ -11241,11 +11954,15 @@ "items": { "type": "array", "items": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { - "user_id": { "type": "string", "format": "uuid" }, + "user_id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "primary_email": { "type": "string", "nullable": true }, "invite_id": { "type": "null" }, "expires_at": { "type": "null" }, @@ -11263,7 +11980,13 @@ "type": "array", "items": { "type": "object", - "properties": { "cidr": { "type": "string" } }, + "properties": { + "cidr": { + "type": "string", + "format": "cidrv4", + "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" + } + }, "required": ["cidr"] } }, @@ -11271,7 +11994,13 @@ "type": "array", "items": { "type": "object", - "properties": { "cidr": { "type": "string" } }, + "properties": { + "cidr": { + "type": "string", + "format": "cidrv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" + } + }, "required": ["cidr"] } } @@ -11290,7 +12019,11 @@ "properties": { "user_id": { "type": "null" }, "primary_email": { "type": "string" }, - "invite_id": { "type": "string", "format": "uuid" }, + "invite_id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "expires_at": { "type": "string" }, "user_roles": { "type": "array", @@ -11306,7 +12039,13 @@ "type": "array", "items": { "type": "object", - "properties": { "cidr": { "type": "string" } }, + "properties": { + "cidr": { + "type": "string", + "format": "cidrv4", + "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" + } + }, "required": ["cidr"] } }, @@ -11314,7 +12053,13 @@ "type": "array", "items": { "type": "object", - "properties": { "cidr": { "type": "string" } }, + "properties": { + "cidr": { + "type": "string", + "format": "cidrv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" + } + }, "required": ["cidr"] } } @@ -11337,7 +12082,12 @@ "UpdateJitAccessBody": { "type": "object", "properties": { - "user_id": { "type": "string", "format": "uuid", "minLength": 1 }, + "user_id": { + "type": "string", + "minLength": 1, + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "roles": { "type": "array", "items": { @@ -11352,7 +12102,13 @@ "type": "array", "items": { "type": "object", - "properties": { "cidr": { "type": "string" } }, + "properties": { + "cidr": { + "type": "string", + "format": "cidrv4", + "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" + } + }, "required": ["cidr"] } }, @@ -11360,7 +12116,13 @@ "type": "array", "items": { "type": "object", - "properties": { "cidr": { "type": "string" } }, + "properties": { + "cidr": { + "type": "string", + "format": "cidrv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" + } + }, "required": ["cidr"] } } @@ -11388,7 +12150,12 @@ "InviteExternalUserJitAccessBody": { "type": "object", "properties": { - "email": { "type": "string", "format": "email", "minLength": 1 }, + "email": { + "type": "string", + "minLength": 1, + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + }, "roles": { "type": "array", "items": { @@ -11403,7 +12170,13 @@ "type": "array", "items": { "type": "object", - "properties": { "cidr": { "type": "string" } }, + "properties": { + "cidr": { + "type": "string", + "format": "cidrv4", + "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" + } + }, "required": ["cidr"] } }, @@ -11411,7 +12184,13 @@ "type": "array", "items": { "type": "object", - "properties": { "cidr": { "type": "string" } }, + "properties": { + "cidr": { + "type": "string", + "format": "cidrv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" + } + }, "required": ["cidr"] } } @@ -11439,8 +12218,16 @@ "InviteExternalUserJitResponse": { "type": "object", "properties": { - "email": { "type": "string", "format": "email" }, - "invite_id": { "type": "string", "format": "uuid" }, + "email": { + "type": "string", + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + }, + "invite_id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, "user_roles": { "type": "array", "items": { @@ -11455,7 +12242,13 @@ "type": "array", "items": { "type": "object", - "properties": { "cidr": { "type": "string" } }, + "properties": { + "cidr": { + "type": "string", + "format": "cidrv4", + "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" + } + }, "required": ["cidr"] } }, @@ -11463,7 +12256,13 @@ "type": "array", "items": { "type": "object", - "properties": { "cidr": { "type": "string" } }, + "properties": { + "cidr": { + "type": "string", + "format": "cidrv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" + } + }, "required": ["cidr"] } } @@ -11480,7 +12279,12 @@ "AcceptInviteExternalUserJitAccessBody": { "type": "object", "properties": { - "email": { "type": "string", "format": "email", "minLength": 1 }, + "email": { + "type": "string", + "minLength": 1, + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + }, "token": { "type": "string", "minLength": 1 } }, "required": ["email", "token"], @@ -11493,9 +12297,23 @@ "slug": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, - "version": { "type": "integer" }, - "created_at": { "type": "integer", "format": "int64" }, - "updated_at": { "type": "integer", "format": "int64" }, + "version": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "created_at": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "format": "int64" + }, + "updated_at": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "format": "int64" + }, "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, "entrypoint_path": { "type": "string" }, @@ -11529,8 +12347,17 @@ "slug": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_-]*$" }, "name": { "type": "string" }, "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, - "version": { "type": "integer" }, - "created_at": { "type": "integer", "format": "int64" }, + "version": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "created_at": { + "type": "integer", + "format": "int64", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, "entrypoint_path": { "type": "string" }, @@ -11563,9 +12390,23 @@ "slug": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, - "version": { "type": "integer" }, - "created_at": { "type": "integer", "format": "int64" }, - "updated_at": { "type": "integer", "format": "int64" }, + "version": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "created_at": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "format": "int64" + }, + "updated_at": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "format": "int64" + }, "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, "entrypoint_path": { "type": "string" }, @@ -11594,7 +12435,7 @@ "required": ["entrypoint_path"] } }, - "required": ["metadata"], + "required": ["file", "metadata"], "example": { "file": ["./supabase/functions/hello-world/index.ts"], "metadata": { "entrypoint_path": "index.ts", "verify_jwt": true, "name": "Hello World" } @@ -11607,9 +12448,23 @@ "slug": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, - "version": { "type": "integer" }, - "created_at": { "type": "integer", "format": "int64" }, - "updated_at": { "type": "integer", "format": "int64" }, + "version": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "created_at": { + "type": "integer", + "format": "int64", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "updated_at": { + "type": "integer", + "format": "int64", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, "entrypoint_path": { "type": "string" }, @@ -11625,9 +12480,23 @@ "slug": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, - "version": { "type": "integer" }, - "created_at": { "type": "integer", "format": "int64" }, - "updated_at": { "type": "integer", "format": "int64" }, + "version": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "created_at": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "format": "int64" + }, + "updated_at": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "format": "int64" + }, "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, "entrypoint_path": { "type": "string" }, @@ -11666,13 +12535,28 @@ "type": "object", "properties": { "attributes": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { - "iops": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, - "size_gb": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, - "throughput_mibps": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, + "iops": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 + }, + "size_gb": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 + }, + "throughput_mibps": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 + }, "type": { "type": "string", "enum": ["gp3"] } }, "required": ["iops", "size_gb", "type"] @@ -11680,8 +12564,18 @@ { "type": "object", "properties": { - "iops": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, - "size_gb": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, + "iops": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 + }, + "size_gb": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 + }, "type": { "type": "string", "enum": ["io2"] } }, "required": ["iops", "size_gb", "type"] @@ -11696,14 +12590,28 @@ "type": "object", "properties": { "attributes": { - "discriminator": { "propertyName": "type" }, "oneOf": [ { "type": "object", "properties": { - "iops": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, - "size_gb": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, - "throughput_mibps": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, + "iops": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 + }, + "size_gb": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 + }, + "throughput_mibps": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 + }, "type": { "type": "string", "enum": ["gp3"] } }, "required": ["iops", "size_gb", "type"] @@ -11711,8 +12619,18 @@ { "type": "object", "properties": { - "iops": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, - "size_gb": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, + "iops": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 + }, + "size_gb": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 + }, "type": { "type": "string", "enum": ["io2"] } }, "required": ["iops", "size_gb", "type"] @@ -11746,24 +12664,24 @@ "properties": { "growth_percent": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true, - "nullable": true, - "description": "Growth percentage for disk autoscaling" + "exclusiveMinimum": 0, + "maximum": 9007199254740991, + "description": "Growth percentage for disk autoscaling", + "nullable": true }, "min_increment_gb": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true, - "nullable": true, - "description": "Minimum increment size for disk autoscaling in GB" + "exclusiveMinimum": 0, + "maximum": 9007199254740991, + "description": "Minimum increment size for disk autoscaling in GB", + "nullable": true }, "max_size_gb": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true, - "nullable": true, - "description": "Maximum limit the disk size will grow to in GB" + "exclusiveMinimum": 0, + "maximum": 9007199254740991, + "description": "Maximum limit the disk size will grow to in GB", + "nullable": true } }, "required": ["growth_percent", "min_increment_gb", "max_size_gb"] @@ -11771,7 +12689,12 @@ "StorageConfigResponse": { "type": "object", "properties": { - "fileSizeLimit": { "type": "integer", "format": "int64" }, + "fileSizeLimit": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "format": "int64" + }, "features": { "type": "object", "properties": { @@ -11794,9 +12717,9 @@ "type": "object", "properties": { "enabled": { "type": "boolean" }, - "maxNamespaces": { "type": "integer", "minimum": 0 }, - "maxTables": { "type": "integer", "minimum": 0 }, - "maxCatalogs": { "type": "integer", "minimum": 0 } + "maxNamespaces": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, + "maxTables": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, + "maxCatalogs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["enabled", "maxNamespaces", "maxTables", "maxCatalogs"] }, @@ -11804,8 +12727,8 @@ "type": "object", "properties": { "enabled": { "type": "boolean" }, - "maxBuckets": { "type": "integer", "minimum": 0 }, - "maxIndexes": { "type": "integer", "minimum": 0 } + "maxBuckets": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, + "maxIndexes": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["enabled", "maxBuckets", "maxIndexes"] } @@ -11848,9 +12771,9 @@ "properties": { "fileSizeLimit": { "type": "integer", + "format": "int64", "minimum": 0, - "maximum": 536870912000, - "format": "int64" + "maximum": 536870912000 }, "features": { "type": "object", @@ -11874,9 +12797,9 @@ "type": "object", "properties": { "enabled": { "type": "boolean" }, - "maxNamespaces": { "type": "integer", "minimum": 0 }, - "maxTables": { "type": "integer", "minimum": 0 }, - "maxCatalogs": { "type": "integer", "minimum": 0 } + "maxNamespaces": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, + "maxTables": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, + "maxCatalogs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["enabled", "maxNamespaces", "maxTables", "maxCatalogs"] }, @@ -11884,8 +12807,8 @@ "type": "object", "properties": { "enabled": { "type": "boolean" }, - "maxBuckets": { "type": "integer", "minimum": 0 }, - "maxIndexes": { "type": "integer", "minimum": 0 } + "maxBuckets": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, + "maxIndexes": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["enabled", "maxBuckets", "maxIndexes"] } @@ -11897,24 +12820,48 @@ "required": ["upstreamTarget"] } }, - "additionalProperties": false, "example": { "fileSizeLimit": 10485760, "features": { "imageTransformation": { "enabled": true } } - } + }, + "additionalProperties": false }, "V1PgbouncerConfigResponse": { "type": "object", "properties": { - "default_pool_size": { "type": "integer" }, + "default_pool_size": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "ignore_startup_parameters": { "type": "string" }, - "max_client_conn": { "type": "integer" }, + "max_client_conn": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "pool_mode": { "type": "string", "enum": ["transaction", "session", "statement"] }, "connection_string": { "type": "string" }, - "server_idle_timeout": { "type": "integer" }, - "server_lifetime": { "type": "integer" }, - "query_wait_timeout": { "type": "integer" }, - "reserve_pool_size": { "type": "integer" } + "server_idle_timeout": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "server_lifetime": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "query_wait_timeout": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "reserve_pool_size": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } } }, "SupavisorConfigResponse": { @@ -11925,12 +12872,26 @@ "is_using_scram_auth": { "type": "boolean" }, "db_user": { "type": "string" }, "db_host": { "type": "string" }, - "db_port": { "type": "integer" }, + "db_port": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "db_name": { "type": "string" }, "connection_string": { "type": "string" }, "connectionString": { "type": "string", "description": "Use connection_string instead" }, - "default_pool_size": { "type": "integer", "nullable": true }, - "max_client_conn": { "type": "integer", "nullable": true }, + "default_pool_size": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, + "max_client_conn": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, "pool_mode": { "type": "string", "enum": ["transaction", "session"] } }, "required": [ @@ -11958,9 +12919,9 @@ "nullable": true }, "pool_mode": { + "description": "Dedicated pooler mode for the project", "type": "string", - "enum": ["transaction", "session"], - "description": "Dedicated pooler mode for the project" + "enum": ["transaction", "session"] } }, "example": { "default_pool_size": 25, "pool_mode": "transaction" } @@ -11968,7 +12929,12 @@ "UpdateSupavisorConfigResponse": { "type": "object", "properties": { - "default_pool_size": { "type": "integer", "nullable": true }, + "default_pool_size": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "nullable": true + }, "pool_mode": { "type": "string" } }, "required": ["default_pool_size", "pool_mode"] @@ -12001,15 +12967,29 @@ "track_activity_query_size": { "type": "string" }, "max_connections": { "type": "integer", "minimum": 1, "maximum": 262143 }, "max_locks_per_transaction": { "type": "integer", "minimum": 10, "maximum": 2147483640 }, + "max_logical_replication_workers": { "type": "integer", "minimum": 0, "maximum": 262143 }, "max_parallel_maintenance_workers": { "type": "integer", "minimum": 0, "maximum": 1024 }, "max_parallel_workers": { "type": "integer", "minimum": 0, "maximum": 1024 }, "max_parallel_workers_per_gather": { "type": "integer", "minimum": 0, "maximum": 1024 }, - "max_replication_slots": { "type": "integer" }, + "max_replication_slots": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "max_slot_wal_keep_size": { "type": "string" }, "max_standby_archive_delay": { "type": "string" }, "max_standby_streaming_delay": { "type": "string" }, + "max_sync_workers_per_subscription": { + "type": "integer", + "minimum": 0, + "maximum": 262143 + }, "max_wal_size": { "type": "string" }, - "max_wal_senders": { "type": "integer" }, + "max_wal_senders": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "max_worker_processes": { "type": "integer", "minimum": 0, "maximum": 262143 }, "session_replication_role": { "type": "string", "enum": ["origin", "replica", "local"] }, "shared_buffers": { "type": "string" }, @@ -12062,15 +13042,29 @@ "track_activity_query_size": { "type": "string" }, "max_connections": { "type": "integer", "minimum": 1, "maximum": 262143 }, "max_locks_per_transaction": { "type": "integer", "minimum": 10, "maximum": 2147483640 }, + "max_logical_replication_workers": { "type": "integer", "minimum": 0, "maximum": 262143 }, "max_parallel_maintenance_workers": { "type": "integer", "minimum": 0, "maximum": 1024 }, "max_parallel_workers": { "type": "integer", "minimum": 0, "maximum": 1024 }, "max_parallel_workers_per_gather": { "type": "integer", "minimum": 0, "maximum": 1024 }, - "max_replication_slots": { "type": "integer" }, + "max_replication_slots": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "max_slot_wal_keep_size": { "type": "string" }, "max_standby_archive_delay": { "type": "string" }, "max_standby_streaming_delay": { "type": "string" }, + "max_sync_workers_per_subscription": { + "type": "integer", + "minimum": 0, + "maximum": 262143 + }, "max_wal_size": { "type": "string" }, - "max_wal_senders": { "type": "integer" }, + "max_wal_senders": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "max_worker_processes": { "type": "integer", "minimum": 0, "maximum": 262143 }, "session_replication_role": { "type": "string", "enum": ["origin", "replica", "local"] }, "shared_buffers": { "type": "string" }, @@ -12095,82 +13089,82 @@ "hot_standby_feedback": { "type": "boolean" }, "restart_database": { "type": "boolean" } }, - "additionalProperties": false, "example": { "max_connections": 120, "shared_buffers": "256MB", "work_mem": "4MB", "statement_timeout": "60000ms" - } + }, + "additionalProperties": false }, "RealtimeConfigResponse": { "type": "object", "properties": { "private_only": { "type": "boolean", - "nullable": true, - "description": "Whether to only allow private channels" + "description": "Whether to only allow private channels", + "nullable": true }, "connection_pool": { "type": "integer", "minimum": 1, "maximum": 100, - "nullable": true, - "description": "Sets connection pool size for Realtime Authorization" + "description": "Sets connection pool size for Realtime Authorization", + "nullable": true }, "max_concurrent_users": { "type": "integer", "minimum": 1, "maximum": 50000, - "nullable": true, - "description": "Sets maximum number of concurrent users rate limit" + "description": "Sets maximum number of concurrent users rate limit", + "nullable": true }, "max_events_per_second": { "type": "integer", "minimum": 1, "maximum": 50000, - "nullable": true, - "description": "Sets maximum number of events per second rate per channel limit" + "description": "Sets maximum number of events per second rate per channel limit", + "nullable": true }, "max_bytes_per_second": { "type": "integer", "minimum": 1, "maximum": 10000000, - "nullable": true, - "description": "Sets maximum number of bytes per second rate per channel limit" + "description": "Sets maximum number of bytes per second rate per channel limit", + "nullable": true }, "max_channels_per_client": { "type": "integer", "minimum": 1, "maximum": 10000, - "nullable": true, - "description": "Sets maximum number of channels per client rate limit" + "description": "Sets maximum number of channels per client rate limit", + "nullable": true }, "max_joins_per_second": { "type": "integer", "minimum": 1, "maximum": 5000, - "nullable": true, - "description": "Sets maximum number of joins per second rate limit" + "description": "Sets maximum number of joins per second rate limit", + "nullable": true }, "max_presence_events_per_second": { "type": "integer", "minimum": 1, "maximum": 5000, - "nullable": true, - "description": "Sets maximum number of presence events per second rate limit" + "description": "Sets maximum number of presence events per second rate limit", + "nullable": true }, "max_payload_size_in_kb": { "type": "integer", "minimum": 1, "maximum": 10000, - "nullable": true, - "description": "Sets maximum number of payload size in KB rate limit" + "description": "Sets maximum number of payload size in KB rate limit", + "nullable": true }, "suspend": { "type": "boolean", - "nullable": true, - "description": "Disables the Realtime service for this project when true. Set to false to re-enable it." + "description": "Disables the Realtime service for this project when true. Set to false to re-enable it.", + "nullable": true }, "presence_enabled": { "type": "boolean", "description": "Whether to enable presence" } }, @@ -12249,12 +13243,12 @@ }, "presence_enabled": { "type": "boolean", "description": "Whether to enable presence" } }, - "additionalProperties": false, "example": { "private_only": false, "max_concurrent_users": 1000, "max_channels_per_client": 100 - } + }, + "additionalProperties": false }, "CreateProviderBody": { "type": "object", @@ -12278,7 +13272,7 @@ "name": { "type": "string" }, "names": { "type": "array", "items": { "type": "string" } }, "default": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": {} }, { "type": "number" }, { "type": "string" }, @@ -12323,7 +13317,6 @@ "saml": { "type": "object", "properties": { - "id": { "type": "string" }, "entity_id": { "type": "string" }, "metadata_url": { "type": "string" }, "metadata_xml": { "type": "string" }, @@ -12338,7 +13331,7 @@ "name": { "type": "string" }, "names": { "type": "array", "items": { "type": "string" } }, "default": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": {} }, { "type": "number" }, { "type": "string" }, @@ -12362,19 +13355,17 @@ ] } }, - "required": ["id", "entity_id"] + "required": ["entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { - "id": { "type": "string" }, "domain": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } - }, - "required": ["id"] + } } }, "created_at": { "type": "string" }, @@ -12394,7 +13385,6 @@ "saml": { "type": "object", "properties": { - "id": { "type": "string" }, "entity_id": { "type": "string" }, "metadata_url": { "type": "string" }, "metadata_xml": { "type": "string" }, @@ -12409,7 +13399,7 @@ "name": { "type": "string" }, "names": { "type": "array", "items": { "type": "string" } }, "default": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": {} }, { "type": "number" }, { "type": "string" }, @@ -12433,19 +13423,17 @@ ] } }, - "required": ["id", "entity_id"] + "required": ["entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { - "id": { "type": "string" }, "domain": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } - }, - "required": ["id"] + } } }, "created_at": { "type": "string" }, @@ -12464,7 +13452,6 @@ "saml": { "type": "object", "properties": { - "id": { "type": "string" }, "entity_id": { "type": "string" }, "metadata_url": { "type": "string" }, "metadata_xml": { "type": "string" }, @@ -12479,7 +13466,7 @@ "name": { "type": "string" }, "names": { "type": "array", "items": { "type": "string" } }, "default": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": {} }, { "type": "number" }, { "type": "string" }, @@ -12503,19 +13490,17 @@ ] } }, - "required": ["id", "entity_id"] + "required": ["entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { - "id": { "type": "string" }, "domain": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } - }, - "required": ["id"] + } } }, "created_at": { "type": "string" }, @@ -12540,7 +13525,7 @@ "name": { "type": "string" }, "names": { "type": "array", "items": { "type": "string" } }, "default": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": {} }, { "type": "number" }, { "type": "string" }, @@ -12576,7 +13561,6 @@ "saml": { "type": "object", "properties": { - "id": { "type": "string" }, "entity_id": { "type": "string" }, "metadata_url": { "type": "string" }, "metadata_xml": { "type": "string" }, @@ -12591,7 +13575,7 @@ "name": { "type": "string" }, "names": { "type": "array", "items": { "type": "string" } }, "default": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": {} }, { "type": "number" }, { "type": "string" }, @@ -12615,19 +13599,17 @@ ] } }, - "required": ["id", "entity_id"] + "required": ["entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { - "id": { "type": "string" }, "domain": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } - }, - "required": ["id"] + } } }, "created_at": { "type": "string" }, @@ -12642,7 +13624,6 @@ "saml": { "type": "object", "properties": { - "id": { "type": "string" }, "entity_id": { "type": "string" }, "metadata_url": { "type": "string" }, "metadata_xml": { "type": "string" }, @@ -12657,7 +13638,7 @@ "name": { "type": "string" }, "names": { "type": "array", "items": { "type": "string" } }, "default": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": {} }, { "type": "number" }, { "type": "string" }, @@ -12681,19 +13662,17 @@ ] } }, - "required": ["id", "entity_id"] + "required": ["entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { - "id": { "type": "string" }, "domain": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } - }, - "required": ["id"] + } } }, "created_at": { "type": "string" }, @@ -12712,7 +13691,11 @@ "items": { "type": "object", "properties": { - "id": { "type": "integer" }, + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "is_physical_backup": { "type": "boolean" }, "status": { "type": "string", @@ -12726,8 +13709,16 @@ "physical_backup_data": { "type": "object", "properties": { - "earliest_physical_backup_date_unix": { "type": "integer" }, - "latest_physical_backup_date_unix": { "type": "integer" } + "earliest_physical_backup_date_unix": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "latest_physical_backup_date_unix": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } } } }, @@ -12736,7 +13727,12 @@ "V1RestorePitrBody": { "type": "object", "properties": { - "recovery_time_target_unix": { "type": "integer", "minimum": 0, "format": "int64" } + "recovery_time_target_unix": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "format": "int64" + } }, "required": ["recovery_time_target_unix"], "example": { "recovery_time_target_unix": 1740787200 } @@ -12752,13 +13748,20 @@ "properties": { "name": { "type": "string" }, "status": { "type": "string", "enum": ["AVAILABLE", "PENDING", "REMOVED", "FAILED"] }, - "completed_on": { "type": "string", "format": "date-time", "nullable": true } + "completed_on": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "nullable": true + } }, "required": ["name", "status", "completed_on"] }, "V1RestoreBackupBody": { "type": "object", - "properties": { "id": { "type": "integer" } }, + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } + }, "required": ["id"], "example": { "id": 12345 } }, @@ -12767,12 +13770,14 @@ "properties": { "schedule_for": { "type": "string", + "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?$", "description": "Time of day to schedule daily backups, in UTC. Format: HH:MM:SS.", "example": "04:00:00" }, "updated_at": { "type": "string", "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", "description": "Timestamp of when the backup schedule was last updated.", "example": "2026-05-04T14:40:44+00:00" } @@ -12784,6 +13789,7 @@ "properties": { "schedule_for": { "type": "string", + "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?$", "description": "Time of day to schedule daily backups, in UTC. Format: HH:MM:SS.", "example": "04:00:00" } @@ -12883,7 +13889,7 @@ "hasAccess": { "type": "boolean" }, "type": { "type": "string", "enum": ["boolean", "numeric", "set"] }, "config": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { "enabled": { "type": "boolean" } }, @@ -12937,7 +13943,6 @@ "opt_in_tags": { "type": "array", "items": { - "type": "string", "enum": [ "AI_SQL_GENERATOR_OPT_IN", "AI_DATA_GENERATOR_OPT_IN", @@ -13005,7 +14010,7 @@ }, "target_subscription_plan": { "type": "string", - "enum": ["free", "pro", "team", "enterprise", "platform"], + "enum": ["free", "pro", "team", "enterprise", "platform", null], "nullable": true } }, @@ -13021,7 +14026,11 @@ }, "expires_at": { "type": "string" }, "created_at": { "type": "string" }, - "created_by": { "type": "string", "format": "uuid" } + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + } }, "required": ["project", "preview", "expires_at", "created_at", "created_by"] }, diff --git a/apps/docs/spec/api_v2_openapi.json b/apps/docs/spec/api_v2_openapi.json index 3f82b25778f73..2e07d5ac062e4 100644 --- a/apps/docs/spec/api_v2_openapi.json +++ b/apps/docs/spec/api_v2_openapi.json @@ -33,11 +33,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to fetch log drains" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_config_read"] }], + "security": [{ "bearer": [] }], "summary": "List project log drains", "tags": ["Analytics"], "x-badges": [{ "name": "OAuth scope: analytics_config:read", "position": "after" }], "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_config_read"]], "x-oauth-scope": "analytics_config:read" }, "post": { @@ -74,13 +75,18 @@ }, "401": { "description": "Unauthorized" }, "402": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan." + "description": "This feature requires the Pro, Team, or Enterprise organization plan.", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/PlanGateErrorBodyV2" } + } + } }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to create a log drain" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Create a log drain for a project", "tags": ["Analytics"], "x-allowed-plans": ["Pro", "Team", "Enterprise"], @@ -89,6 +95,7 @@ { "name": "OAuth scope: analytics_config:write", "position": "after" } ], "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_config_write"]], "x-oauth-scope": "analytics_config:write" } }, @@ -114,7 +121,11 @@ "required": true, "in": "path", "description": "Log drains identifier", - "schema": { "format": "uuid", "type": "string" } + "schema": { + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "type": "string" + } } ], "requestBody": { @@ -137,11 +148,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update log drain" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Update a project log drain", "tags": ["Analytics"], "x-badges": [{ "name": "OAuth scope: analytics_config:write", "position": "after" }], "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_config_write"]], "x-oauth-scope": "analytics_config:write" }, "delete": { @@ -165,7 +177,11 @@ "required": true, "in": "path", "description": "Log drains identifier", - "schema": { "format": "uuid", "type": "string" } + "schema": { + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "type": "string" + } } ], "responses": { @@ -175,11 +191,12 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to delete a log drain" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_config_write"] }], + "security": [{ "bearer": [] }], "summary": "Delete a project log drain", "tags": ["Analytics"], "x-badges": [{ "name": "OAuth scope: analytics_config:write", "position": "after" }], "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_config_write"]], "x-oauth-scope": "analytics_config:write" } }, @@ -222,10 +239,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_read"] }], + "security": [{ "bearer": [] }], "summary": "Previews transferring a project to a different organizations, shows eligibility and impact", "tags": ["Projects"], - "x-endpoint-owners": ["management-api"] + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["project_admin_read"]] } }, "/v2/projects/{ref}/transfers": { @@ -260,10 +278,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["organization_admin_write"] }], + "security": [{ "bearer": [] }], "summary": "Transfers a project to a different organization", "tags": ["Projects"], - "x-endpoint-owners": ["management-api"] + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_write"]] } }, "/v2/projects/{ref}/private-link/associations": { @@ -298,10 +317,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve AWS accounts for project" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_read"] }], + "security": [{ "bearer": [] }], "summary": "List AWS accounts attached to the project PrivateLink share", "tags": ["Projects"], - "x-endpoint-owners": ["platform-networking", "management-api"] + "x-endpoint-owners": ["platform-networking", "management-api"], + "x-fga-permissions": [["project_admin_read"]] }, "post": { "description": "Adds an AWS account to the project's PrivateLink configuration and schedules the AWS resources to be created.", @@ -340,23 +360,29 @@ }, "401": { "description": "Unauthorized" }, "402": { - "description": "This feature requires the Team, or Enterprise organization plan." + "description": "This feature requires the Team, or Enterprise organization plan.", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/PlanGateErrorBodyV2" } + } + } }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to add AWS account to PrivateLink share" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], + "security": [{ "bearer": [] }], "summary": "Add an AWS account to the project PrivateLink share", "tags": ["Projects"], "x-allowed-plans": ["Team", "Enterprise"], "x-badges": [{ "name": "Only available on Team, Enterprise", "position": "before" }], - "x-endpoint-owners": ["platform-networking", "management-api"] + "x-endpoint-owners": ["platform-networking", "management-api"], + "x-fga-permissions": [["project_admin_write"]] } }, "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}": { "delete": { - "description": "Removes an AWS account from the project's PrivateLink configuration. Cleans up the associated AWS resources.", + "description": "Removes an AWS account from the project's PrivateLink configuration (targeting the primary database). Cleans up the associated AWS resources.", "operationId": "v2-delete-private-link-association", "parameters": [ { @@ -374,7 +400,7 @@ }, { "name": "aws_account_id", - "required": false, + "required": true, "in": "path", "description": "AWS account ID used in PrivateLink association", "schema": { "type": "string" } @@ -387,10 +413,58 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to remove AWS account from PrivateLink share" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], + "security": [{ "bearer": [] }], "summary": "Remove an AWS account from the project PrivateLink share", "tags": ["Projects"], - "x-endpoint-owners": ["platform-networking", "management-api"] + "x-endpoint-owners": ["platform-networking", "management-api"], + "x-fga-permissions": [["project_admin_write"]] + } + }, + "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}/database/{database_identifier}": { + "delete": { + "description": "Removes an AWS account from the project's PrivateLink configuration for the given read replica. Cleans up the associated AWS resources.", + "operationId": "v2-delete-private-link-association-for-database", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + }, + { + "name": "aws_account_id", + "required": true, + "in": "path", + "description": "AWS account ID used in PrivateLink association", + "schema": { "type": "string" } + }, + { + "name": "database_identifier", + "required": true, + "in": "path", + "description": "Identifier of the read replica this PrivateLink association targets", + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "" }, + "401": { "description": "Unauthorized" }, + "403": { "description": "Forbidden action" }, + "429": { "description": "Rate limit exceeded" }, + "500": { "description": "Failed to remove AWS account from PrivateLink share" } + }, + "security": [{ "bearer": [] }], + "summary": "Remove an AWS account from a specific database PrivateLink share", + "tags": ["Projects"], + "x-endpoint-owners": ["platform-networking", "management-api"], + "x-fga-permissions": [["project_admin_write"]] } }, "/v2/organizations/{slug}/members": { @@ -415,12 +489,21 @@ "in": "query", "schema": { "properties": { - "size": { "type": "integer", "minimum": 1, "maximum": 100, "required": false }, - "after": { "type": "string", "format": "uuid", "required": false }, - "before": { "type": "string", "format": "uuid", "required": false } + "size": { "type": "integer", "minimum": 1, "maximum": 100 }, + "after": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "before": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + } }, "type": "object" - } + }, + "style": "deepObject" }, { "name": "filter", @@ -428,11 +511,16 @@ "in": "query", "schema": { "properties": { - "username": { "type": "string", "required": false }, - "primary_email": { "type": "string", "format": "email", "required": false } + "username": { "type": "string" }, + "primary_email": { + "type": "string", + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + } }, "type": "object" - } + }, + "style": "deepObject" } ], "responses": { @@ -448,11 +536,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["members_read"] }], + "security": [{ "bearer": [] }], "summary": "List members of an organization", "tags": ["Organizations"], "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["members_read"]], "x-oauth-scope": "organizations:read" } }, @@ -476,7 +565,11 @@ "name": "user_id", "required": true, "in": "path", - "schema": { "format": "uuid", "type": "string" } + "schema": { + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "type": "string" + } } ], "requestBody": { @@ -497,17 +590,25 @@ } }, "401": { "description": "Unauthorized" }, - "402": { "description": "This feature requires the Enterprise organization plan." }, + "402": { + "description": "This feature requires the Enterprise organization plan.", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/PlanGateErrorBodyV2" } + } + } + }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to assign organization member role" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["organization_admin_write"] }], + "security": [{ "bearer": [] }], "summary": "Assign or change an organization member role", "tags": ["Organizations"], "x-allowed-plans": ["Enterprise"], "x-badges": [{ "name": "Only available on Enterprise", "position": "before" }], - "x-endpoint-owners": ["management-api"] + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_write"]] } }, "/v2/organizations/{slug}/roles": { @@ -540,11 +641,12 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["members_read"] }], + "security": [{ "bearer": [] }], "summary": "List roles of an organization", "tags": ["Organizations"], "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["members_read"]], "x-oauth-scope": "organizations:read" } }, @@ -583,11 +685,18 @@ } }, "401": { "description": "Unauthorized" }, - "402": { "description": "This feature requires the Enterprise organization plan." }, + "402": { + "description": "This feature requires the Enterprise organization plan.", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/PlanGateErrorBodyV2" } + } + } + }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }, { "fga_permissions": ["members_write"] }], + "security": [{ "bearer": [] }], "summary": "Creates organization invitations", "tags": ["Organizations Members Invitations"], "x-allowed-plans": ["Enterprise"], @@ -596,8 +705,14615 @@ { "name": "Only available on Enterprise", "position": "before" } ], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["members_write"]], + "x-oauth-scope": "organizations:write" + }, + "delete": { + "description": "Bulk delete member invitations for an organization by email address.", + "operationId": "v2-delete-organization-invitations", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/V2DeleteInvitationsRequest" } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/V2DeleteInvitationsResponse" } + } + } + }, + "401": { "description": "Unauthorized" }, + "402": { + "description": "This feature requires the Enterprise organization plan.", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/PlanGateErrorBodyV2" } + } + } + }, + "403": { "description": "Forbidden action" }, + "429": { "description": "Rate limit exceeded" } + }, + "security": [{ "bearer": [] }], + "summary": "Deletes organization invitations by email", + "tags": ["Organizations Members Invitations"], + "x-allowed-plans": ["Enterprise"], + "x-badges": [ + { "name": "OAuth scope: organizations:write", "position": "after" }, + { "name": "Only available on Enterprise", "position": "before" } + ], + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["members_write"]], "x-oauth-scope": "organizations:write" } + }, + "/v2/organizations/{slug}/projects": { + "get": { + "description": "Returns a cursor-paginated list of projects for the specified organization, including their databases.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the number of projects returned per page.", + "operationId": "v2-list-organization-projects", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba", + "type": "string" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "properties": { + "size": { "type": "integer", "minimum": 1, "maximum": 100 }, + "after": { "type": "string", "minLength": 1 }, + "before": { "type": "string", "minLength": 1 } + }, + "type": "object" + }, + "style": "deepObject" + }, + { + "name": "sort", + "required": false, + "in": "query", + "description": "Sort order by creation time: `inserted_at` (oldest first) or `-inserted_at` (newest first). Defaults to `inserted_at`.", + "schema": { + "example": "-inserted_at", + "type": "string", + "enum": ["inserted_at", "-inserted_at"] + } + }, + { + "name": "search", + "required": false, + "in": "query", + "description": "Case-insensitive substring match on the project name.", + "schema": { "minLength": 1, "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/V2ListProjectsResponse" } + } + } + }, + "401": { "description": "Unauthorized" }, + "403": { "description": "Forbidden action" }, + "429": { "description": "Rate limit exceeded" } + }, + "security": [{ "bearer": [] }], + "summary": "List projects of an organization", + "tags": ["Organizations"], + "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_projects_read"]], + "x-oauth-scope": "projects:read" + } + }, + "/v2/organizations/{slug}/integrations/github/connections": { + "get": { + "description": "Returns a cursor-paginated list of the GitHub connections of the organization's projects.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the page size.\nPaging walks the organization projects, so a page holds at most `page[size]` connections and can hold fewer (or none) when some of its projects are not connected.\nFollow `links.next` until it is `null` rather than stopping on a short page.\n\nUse `filter[project_ref]` to narrow the list down to a single project.", + "operationId": "v2-list-organization-github-connections", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba", + "type": "string" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "properties": { + "size": { "type": "integer", "minimum": 1, "maximum": 100 }, + "after": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + }, + "before": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + } + }, + "type": "object" + }, + "style": "deepObject" + }, + { + "name": "filter", + "required": false, + "in": "query", + "schema": { + "properties": { + "project_ref": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + } + }, + "type": "object" + }, + "style": "deepObject" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/V2ListGitHubConnectionsResponse" } + } + } + }, + "401": { "description": "Unauthorized" }, + "403": { "description": "Forbidden action" }, + "429": { "description": "Rate limit exceeded" } + }, + "security": [{ "bearer": [] }], + "summary": "List GitHub connections of an organization", + "tags": ["Organizations"], + "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], + "x-endpoint-owners": ["management-api", "dev-workflows"], + "x-fga-permissions": [["organization_projects_read"]], + "x-oauth-scope": "projects:read" + } + }, + "/v2/projects/{ref}/webhooks/endpoints": { + "get": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "query", + "name": "page[offset]", + "schema": { "default": "0", "type": "string", "pattern": "^\\d+$" }, + "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend." + }, + { + "in": "query", + "name": "page[limit]", + "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" }, + "description": "Up to how many records to return." + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "Collection of endpoints", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { "type": "string", "maxLength": 512 }, + { "type": "null" } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "links": { + "type": "object", + "properties": { + "first": { + "description": "URL path to the first page if available.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0", + "anyOf": [{ "type": "string" }, { "type": "null" }] + }, + "prev": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "URL path to the previous page.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0" + }, + "next": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "URL path to the next page.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20" + }, + "last": { + "description": "URL path to the last page if available.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30", + "anyOf": [{ "type": "string" }, { "type": "null" }] + } + }, + "required": ["prev", "next"] + } + }, + "required": ["data", "links"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "List endpoints", + "description": "List all Webhook endpoints based on a project's ref or an organization's slug." + }, + "post": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + } + ], + "tags": ["Project webhooks"], + "responses": { + "201": { + "description": "Created endpoint", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Create endpoint", + "description": "Create new endpoint configuration to subscribe to specific webhook events.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "default": true, + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "signing_secret": { + "type": "string", + "minLength": 8, + "maxLength": 64, + "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." + } + }, + "required": ["url", "event_types", "signing_secret"] + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + } + } + } + } + }, + "delete": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "Deleted endpoints", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { "type": "string", "maxLength": 512 }, + { "type": "null" } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Delete all endpoints", + "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op." + } + }, + "/v2/projects/{ref}/webhooks/endpoints/{id}": { + "get": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "Endpoint details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "not_found.endpoint" }, + "message": { "type": "string", "const": "Not Found: Endpoint not found" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Get endpoint", + "description": "Get details of a specific endpoint." + }, + "patch": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "Updated endpoint details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "not_found.endpoint" }, + "message": { "type": "string", "const": "Not Found: Endpoint not found" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Update endpoint", + "description": "Update endpoint's configuration.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "signing_secret": { + "type": "string", + "minLength": 8, + "maxLength": 64, + "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." + } + } + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + } + } + } + } + }, + "delete": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "Deleted endpoint details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "not_found.endpoint" }, + "message": { "type": "string", "const": "Not Found: Endpoint not found" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Delete endpoint", + "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op." + } + }, + "/v2/projects/{ref}/webhooks/endpoints/{id}/deliveries": { + "get": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + }, + { + "in": "query", + "name": "page[before]", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param." + }, + { + "in": "query", + "name": "page[after]", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param." + }, + { + "in": "query", + "name": "page[size]", + "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" }, + "description": "Up to how many records to return." + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "List of deliveries", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "delivery", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "event_id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of the event, which triggered the delivery (UUID v7)." + }, + "status": { + "type": "string", + "enum": ["pending", "success", "failure", "skipped"], + "description": "Status of the delivery attempt." + }, + "response_code": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "HTTP status code of the response, `0` if unavailable." + }, + "response_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "HTTP headers of the response, `{}` if unavailable." + }, + "response_body": { + "anyOf": [ + { + "anyOf": [ + { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { "type": "string" }, + "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." + }, + { + "type": "string", + "description": "String representation of an HTTP body of the response." + } + ] + }, + { "type": "null" } + ] + }, + "attempt_timestamp": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of the attempt." + } + }, + "required": [ + "id", + "event_id", + "status", + "response_code", + "response_headers", + "response_body", + "attempt_timestamp" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "links": { + "type": "object", + "properties": { + "first": { + "description": "URL path to the first page if available.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10", + "anyOf": [{ "type": "string" }, { "type": "null" }] + }, + "prev": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "URL path to the previous page.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7" + }, + "next": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "URL path to the next page.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4" + }, + "last": { + "description": "URL path to the last page if available.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", + "anyOf": [{ "type": "string" }, { "type": "null" }] + } + }, + "required": ["prev", "next"] + } + }, + "required": ["data", "links"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "not_found.endpoint" }, + "message": { "type": "string", "const": "Not Found: Endpoint not found" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "List deliveries", + "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed." + } + }, + "/v2/projects/{ref}/webhooks/endpoints/{id}/test": { + "post": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Project webhooks"], + "responses": { + "201": { + "description": "Event published", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "event", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an event (UUID v7)." + } + }, + "required": ["type", "id"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { + "type": "string", + "const": "bad_request.endpoint.test.disabled" + }, + "message": { + "type": "string", + "const": "Bad Request: Endpoint is disabled" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "EndpointTestDisabled" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { + "type": "string", + "const": "bad_request.endpoint.test.wrong_event_type" + }, + "message": { + "type": "string", + "const": "Bad Request: Provided event type is not subscribed to by the endpoint" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "EndpointTestWrongEventType" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "EndpointTestDisabled": { + "value": { + "error": { + "code": "bad_request.endpoint.test.disabled", + "message": "Bad Request: Endpoint is disabled", + "description": "Endpoint is disabled, to send test event endpoint must first be enabled." + } + } + }, + "EndpointTestWrongEventType": { + "value": { + "error": { + "code": "bad_request.endpoint.test.wrong_event_type", + "message": "Bad Request: Provided event type is not subscribed to by the endpoint", + "description": "Only event types that the endpoint is subscribed to can be specified." + } + } + }, + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "not_found.endpoint" }, + "message": { "type": "string", "const": "Not Found: Endpoint not found" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Send test event", + "description": "Publish a test event to verify the endpoint is working.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "event", + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "type": { + "description": "Webhook event type.", + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "project.v1.paused", + "project.v1.created", + "project.v1.restored", + "project.v1.transferred", + "project.v1.removed", + "project.v1.restarted", + "project.v1.status.changed", + "project.v1.backup.started", + "project.v1.branch.created", + "project.v1.branch.updated", + "project.v1.branch.removed", + "organization.v1.member.invitation.created", + "organization.v1.member.invitation.canceled", + "organization.v1.member.added", + "organization.v1.member.removed", + "organization.v1.member.role.assigned", + "organization.v1.member.role.removed", + "organization.v1.member.role.updated", + "organization.v1.billing.plan.upgraded", + "organization.v1.billing.plan.downgraded", + "project.v1.branch.deleted" + ] + } + }, + "required": ["type"] + } + }, + "required": ["type", "attributes"] + } + } + } + } + } + } + } + }, + "/v2/projects/{ref}/webhooks/deliveries/{id}": { + "get": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of a delivery (UUID v7)." + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "Delivery details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "delivery", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "event_id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of the event, which triggered the delivery (UUID v7)." + }, + "status": { + "type": "string", + "enum": ["pending", "success", "failure", "skipped"], + "description": "Status of the delivery attempt." + }, + "response_code": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "HTTP status code of the response, `0` if unavailable." + }, + "response_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "HTTP headers of the response, `{}` if unavailable." + }, + "response_body": { + "anyOf": [ + { + "anyOf": [ + { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { "type": "string" }, + "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." + }, + { + "type": "string", + "description": "String representation of an HTTP body of the response." + } + ] + }, + { "type": "null" } + ] + }, + "attempt_timestamp": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of the attempt." + }, + "event": { + "type": "object", + "properties": { + "type": { + "description": "Webhook event type.", + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "project.v1.paused", + "project.v1.created", + "project.v1.restored", + "project.v1.transferred", + "project.v1.removed", + "project.v1.restarted", + "project.v1.status.changed", + "project.v1.backup.started", + "project.v1.branch.created", + "project.v1.branch.updated", + "project.v1.branch.removed", + "organization.v1.member.invitation.created", + "organization.v1.member.invitation.canceled", + "organization.v1.member.added", + "organization.v1.member.removed", + "organization.v1.member.role.assigned", + "organization.v1.member.role.removed", + "organization.v1.member.role.updated", + "organization.v1.billing.plan.upgraded", + "organization.v1.billing.plan.downgraded", + "project.v1.branch.deleted" + ] + }, + "payload": { + "type": "object", + "properties": { + "organization_slug": { + "type": "string", + "pattern": "^[\\w-]+$", + "description": "Organization slug", + "example": "tsrqponmlkjihgfedcba" + }, + "project_ref": { + "anyOf": [ + { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + }, + { "type": "null" } + ] + } + }, + "required": ["organization_slug", "project_ref"], + "additionalProperties": {}, + "description": "Final data sent to the consumer." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of event publication." + } + }, + "required": ["type", "payload", "timestamp"] + } + }, + "required": [ + "id", + "event_id", + "status", + "response_code", + "response_headers", + "response_body", + "attempt_timestamp", + "event" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "DeliveryNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "not_found.delivery" }, + "message": { "type": "string", "const": "Not Found: Delivery not found" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.delivery", + "message": "Not Found: Delivery not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Get delivery", + "description": "Get details of a specific delivery attempt." + } + }, + "/v2/projects/{ref}/webhooks/deliveries/{id}/retry": { + "post": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of a delivery (UUID v7)." + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "Delivery details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "event", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an event (UUID v7)." + } + }, + "required": ["type", "id"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "DeliveryNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "not_found.delivery" }, + "message": { "type": "string", "const": "Not Found: Delivery not found" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.delivery", + "message": "Not Found: Delivery not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Retry delivery", + "description": "Retry delivering the same event again.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds." + } + }, + "/v2/organizations/{slug}/webhooks/endpoints": { + "get": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "query", + "name": "page[offset]", + "schema": { "default": "0", "type": "string", "pattern": "^\\d+$" }, + "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend." + }, + { + "in": "query", + "name": "page[limit]", + "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" }, + "description": "Up to how many records to return." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "Collection of endpoints", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { "type": "string", "maxLength": 512 }, + { "type": "null" } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "links": { + "type": "object", + "properties": { + "first": { + "description": "URL path to the first page if available.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0", + "anyOf": [{ "type": "string" }, { "type": "null" }] + }, + "prev": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "URL path to the previous page.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0" + }, + "next": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "URL path to the next page.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20" + }, + "last": { + "description": "URL path to the last page if available.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30", + "anyOf": [{ "type": "string" }, { "type": "null" }] + } + }, + "required": ["prev", "next"] + } + }, + "required": ["data", "links"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "List endpoints", + "description": "List all Webhook endpoints based on a project's ref or an organization's slug." + }, + "post": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + } + ], + "tags": ["Organization webhooks"], + "responses": { + "201": { + "description": "Created endpoint", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Create endpoint", + "description": "Create new endpoint configuration to subscribe to specific webhook events.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "default": true, + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "signing_secret": { + "type": "string", + "minLength": 8, + "maxLength": 64, + "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." + } + }, + "required": ["url", "event_types", "signing_secret"] + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + } + } + } + } + }, + "delete": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "Deleted endpoints", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { "type": "string", "maxLength": 512 }, + { "type": "null" } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Delete all endpoints", + "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op." + } + }, + "/v2/organizations/{slug}/webhooks/endpoints/{id}": { + "get": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "Endpoint details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "not_found.endpoint" }, + "message": { "type": "string", "const": "Not Found: Endpoint not found" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Get endpoint", + "description": "Get details of a specific endpoint." + }, + "patch": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "Updated endpoint details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "not_found.endpoint" }, + "message": { "type": "string", "const": "Not Found: Endpoint not found" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Update endpoint", + "description": "Update endpoint's configuration.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "signing_secret": { + "type": "string", + "minLength": 8, + "maxLength": 64, + "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." + } + } + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + } + } + } + } + }, + "delete": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "Deleted endpoint details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [{ "type": "v1.project.paused" }] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { "Authorization": "Bearer example_token" } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "not_found.endpoint" }, + "message": { "type": "string", "const": "Not Found: Endpoint not found" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Delete endpoint", + "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op." + } + }, + "/v2/organizations/{slug}/webhooks/endpoints/{id}/deliveries": { + "get": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + }, + { + "in": "query", + "name": "page[before]", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param." + }, + { + "in": "query", + "name": "page[after]", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param." + }, + { + "in": "query", + "name": "page[size]", + "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" }, + "description": "Up to how many records to return." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "List of deliveries", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "delivery", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "event_id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of the event, which triggered the delivery (UUID v7)." + }, + "status": { + "type": "string", + "enum": ["pending", "success", "failure", "skipped"], + "description": "Status of the delivery attempt." + }, + "response_code": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "HTTP status code of the response, `0` if unavailable." + }, + "response_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "HTTP headers of the response, `{}` if unavailable." + }, + "response_body": { + "anyOf": [ + { + "anyOf": [ + { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { "type": "string" }, + "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." + }, + { + "type": "string", + "description": "String representation of an HTTP body of the response." + } + ] + }, + { "type": "null" } + ] + }, + "attempt_timestamp": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of the attempt." + } + }, + "required": [ + "id", + "event_id", + "status", + "response_code", + "response_headers", + "response_body", + "attempt_timestamp" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "links": { + "type": "object", + "properties": { + "first": { + "description": "URL path to the first page if available.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10", + "anyOf": [{ "type": "string" }, { "type": "null" }] + }, + "prev": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "URL path to the previous page.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7" + }, + "next": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "description": "URL path to the next page.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4" + }, + "last": { + "description": "URL path to the last page if available.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", + "anyOf": [{ "type": "string" }, { "type": "null" }] + } + }, + "required": ["prev", "next"] + } + }, + "required": ["data", "links"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "not_found.endpoint" }, + "message": { "type": "string", "const": "Not Found: Endpoint not found" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "List deliveries", + "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed." + } + }, + "/v2/organizations/{slug}/webhooks/endpoints/{id}/test": { + "post": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "201": { + "description": "Event published", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "event", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an event (UUID v7)." + } + }, + "required": ["type", "id"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { + "type": "string", + "const": "bad_request.endpoint.test.disabled" + }, + "message": { + "type": "string", + "const": "Bad Request: Endpoint is disabled" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "EndpointTestDisabled" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { + "type": "string", + "const": "bad_request.endpoint.test.wrong_event_type" + }, + "message": { + "type": "string", + "const": "Bad Request: Provided event type is not subscribed to by the endpoint" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "EndpointTestWrongEventType" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "EndpointTestDisabled": { + "value": { + "error": { + "code": "bad_request.endpoint.test.disabled", + "message": "Bad Request: Endpoint is disabled", + "description": "Endpoint is disabled, to send test event endpoint must first be enabled." + } + } + }, + "EndpointTestWrongEventType": { + "value": { + "error": { + "code": "bad_request.endpoint.test.wrong_event_type", + "message": "Bad Request: Provided event type is not subscribed to by the endpoint", + "description": "Only event types that the endpoint is subscribed to can be specified." + } + } + }, + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "not_found.endpoint" }, + "message": { "type": "string", "const": "Not Found: Endpoint not found" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Send test event", + "description": "Publish a test event to verify the endpoint is working.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "event", + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "type": { + "description": "Webhook event type.", + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "project.v1.paused", + "project.v1.created", + "project.v1.restored", + "project.v1.transferred", + "project.v1.removed", + "project.v1.restarted", + "project.v1.status.changed", + "project.v1.backup.started", + "project.v1.branch.created", + "project.v1.branch.updated", + "project.v1.branch.removed", + "organization.v1.member.invitation.created", + "organization.v1.member.invitation.canceled", + "organization.v1.member.added", + "organization.v1.member.removed", + "organization.v1.member.role.assigned", + "organization.v1.member.role.removed", + "organization.v1.member.role.updated", + "organization.v1.billing.plan.upgraded", + "organization.v1.billing.plan.downgraded", + "project.v1.branch.deleted" + ] + } + }, + "required": ["type"] + } + }, + "required": ["type", "attributes"] + } + } + } + } + } + } + } + }, + "/v2/organizations/{slug}/webhooks/deliveries/{id}": { + "get": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of a delivery (UUID v7)." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "Delivery details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "delivery", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "event_id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of the event, which triggered the delivery (UUID v7)." + }, + "status": { + "type": "string", + "enum": ["pending", "success", "failure", "skipped"], + "description": "Status of the delivery attempt." + }, + "response_code": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "HTTP status code of the response, `0` if unavailable." + }, + "response_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { "type": "string" } + }, + { "type": "null" } + ], + "description": "HTTP headers of the response, `{}` if unavailable." + }, + "response_body": { + "anyOf": [ + { + "anyOf": [ + { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { "type": "string" }, + "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." + }, + { + "type": "string", + "description": "String representation of an HTTP body of the response." + } + ] + }, + { "type": "null" } + ] + }, + "attempt_timestamp": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of the attempt." + }, + "event": { + "type": "object", + "properties": { + "type": { + "description": "Webhook event type.", + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "project.v1.paused", + "project.v1.created", + "project.v1.restored", + "project.v1.transferred", + "project.v1.removed", + "project.v1.restarted", + "project.v1.status.changed", + "project.v1.backup.started", + "project.v1.branch.created", + "project.v1.branch.updated", + "project.v1.branch.removed", + "organization.v1.member.invitation.created", + "organization.v1.member.invitation.canceled", + "organization.v1.member.added", + "organization.v1.member.removed", + "organization.v1.member.role.assigned", + "organization.v1.member.role.removed", + "organization.v1.member.role.updated", + "organization.v1.billing.plan.upgraded", + "organization.v1.billing.plan.downgraded", + "project.v1.branch.deleted" + ] + }, + "payload": { + "type": "object", + "properties": { + "organization_slug": { + "type": "string", + "pattern": "^[\\w-]+$", + "description": "Organization slug", + "example": "tsrqponmlkjihgfedcba" + }, + "project_ref": { + "anyOf": [ + { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + }, + { "type": "null" } + ] + } + }, + "required": ["organization_slug", "project_ref"], + "additionalProperties": {}, + "description": "Final data sent to the consumer." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of event publication." + } + }, + "required": ["type", "payload", "timestamp"] + } + }, + "required": [ + "id", + "event_id", + "status", + "response_code", + "response_headers", + "response_body", + "attempt_timestamp", + "event" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "DeliveryNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "not_found.delivery" }, + "message": { "type": "string", "const": "Not Found: Delivery not found" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.delivery", + "message": "Not Found: Delivery not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Get delivery", + "description": "Get details of a specific delivery attempt." + } + }, + "/v2/organizations/{slug}/webhooks/deliveries/{id}/retry": { + "post": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of a delivery (UUID v7)." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "Delivery details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "event", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an event (UUID v7)." + } + }, + "required": ["type", "id"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_slug" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "bad_request.invalid_ref" }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "unauthorized" }, + "message": { "type": "string", "const": "Unauthorized" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.permission_denied" }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "forbidden.access_disabled" }, + "message": { "type": "string", "const": "Forbidden: Access disabled" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "DeliveryNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "not_found.delivery" }, + "message": { "type": "string", "const": "Not Found: Delivery not found" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.delivery", + "message": "Not Found: Delivery not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "request_timeout" }, + "message": { "type": "string", "const": "Request Timeout" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "request_timeout", "message": "Request Timeout" } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "too_many_requests" }, + "message": { "type": "string", "const": "Too Many Requests" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { "code": "too_many_requests", "message": "Too Many Requests" } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string", "const": "internal_server_error" }, + "message": { "type": "string", "const": "Internal Server Error" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { "$ref": "#/components/schemas/APIErrorObject" } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Retry delivery", + "description": "Retry delivering the same event again.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds." + } } }, "info": { @@ -621,8 +15337,8 @@ "properties": { "type": { "type": "string", - "enum": ["log_drain"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["log_drain"] }, "id": { "type": "string" }, "attributes": { @@ -631,7 +15347,7 @@ "name": { "type": "string" }, "description": { "type": "string" }, "config": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { @@ -757,14 +15473,14 @@ "data": { "type": "object", "properties": { - "type": { "type": "string", "enum": ["log_drain"], "description": "Resource type." }, + "type": { "type": "string", "description": "Resource type.", "enum": ["log_drain"] }, "attributes": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "config": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { @@ -889,7 +15605,7 @@ "data": { "type": "object", "properties": { - "type": { "type": "string", "enum": ["log_drain"], "description": "Resource type." }, + "type": { "type": "string", "description": "Resource type.", "enum": ["log_drain"] }, "id": { "type": "string" }, "attributes": { "type": "object", @@ -897,7 +15613,7 @@ "name": { "type": "string" }, "description": { "type": "string" }, "config": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { @@ -1016,20 +15732,41 @@ }, "required": ["data"] }, + "PlanGateErrorBodyV2": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "HTTP status-derived error code, e.g. \"payment_required\"" + }, + "message": { + "type": "string", + "description": "Human-readable explanation of the plan gate" + } + }, + "required": ["code", "message"], + "description": "Plan-gate error object" + } + }, + "required": ["error"] + }, "UpdateLogDrainRequestOpenApi": { "type": "object", "properties": { "data": { "type": "object", "properties": { - "type": { "type": "string", "enum": ["log_drain"], "description": "Resource type." }, + "type": { "type": "string", "description": "Resource type.", "enum": ["log_drain"] }, "attributes": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "config": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { @@ -1156,8 +15893,8 @@ "properties": { "type": { "type": "string", - "enum": ["project_transfer_input"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["project_transfer_input"] }, "attributes": { "type": "object", @@ -1178,8 +15915,8 @@ "properties": { "type": { "type": "string", - "enum": ["project_transfer_result"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["project_transfer_result"] }, "attributes": { "type": "object", @@ -1237,8 +15974,8 @@ "properties": { "type": { "type": "string", - "enum": ["private_link_association"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["private_link_association"] }, "id": { "type": "string" }, "attributes": { @@ -1252,8 +15989,8 @@ "description": "The AWS account ID this PrivateLink share is associated with." }, "account_name": { - "type": "string", - "description": "Human-readable name for the AWS account." + "description": "Human-readable name for the AWS account.", + "type": "string" }, "status": { "type": "string", @@ -1270,11 +16007,27 @@ "shared_at": { "type": "string", "format": "date-time", - "nullable": true, - "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending." + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending.", + "nullable": true + }, + "database_type": { + "type": "string", + "enum": ["PRIMARY", "READ_REPLICA"], + "description": "Whether this PrivateLink share targets the primary database or a read replica." + }, + "database_identifier": { + "type": "string", + "description": "Identifier of the database this PrivateLink share targets - the project ref for the primary, or the read replica identifier." } }, - "required": ["aws_account_id", "status", "shared_at"] + "required": [ + "aws_account_id", + "status", + "shared_at", + "database_type", + "database_identifier" + ] } }, "required": ["type", "id", "attributes"] @@ -1291,8 +16044,8 @@ "properties": { "type": { "type": "string", - "enum": ["private_link_association"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["private_link_association"] }, "attributes": { "type": "object", @@ -1305,9 +16058,13 @@ "description": "The AWS account ID to add to the project PrivateLink share." }, "account_name": { + "description": "Optional human-readable name for the AWS account.", "type": "string", - "maxLength": 128, - "description": "Optional human-readable name for the AWS account." + "maxLength": 128 + }, + "database_identifier": { + "description": "Identifier of the read replica this PrivateLink share should target. Omit to target the primary database.", + "type": "string" } }, "required": ["aws_account_id"] @@ -1326,8 +16083,8 @@ "properties": { "type": { "type": "string", - "enum": ["private_link_association"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["private_link_association"] }, "id": { "type": "string" }, "attributes": { @@ -1341,8 +16098,8 @@ "description": "The AWS account ID this PrivateLink share is associated with." }, "account_name": { - "type": "string", - "description": "Human-readable name for the AWS account." + "description": "Human-readable name for the AWS account.", + "type": "string" }, "status": { "type": "string", @@ -1359,11 +16116,27 @@ "shared_at": { "type": "string", "format": "date-time", - "nullable": true, - "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending." + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending.", + "nullable": true + }, + "database_type": { + "type": "string", + "enum": ["PRIMARY", "READ_REPLICA"], + "description": "Whether this PrivateLink share targets the primary database or a read replica." + }, + "database_identifier": { + "type": "string", + "description": "Identifier of the database this PrivateLink share targets - the project ref for the primary, or the read replica identifier." } }, - "required": ["aws_account_id", "status", "shared_at"] + "required": [ + "aws_account_id", + "status", + "shared_at", + "database_type", + "database_identifier" + ] } }, "required": ["type", "id", "attributes"] @@ -1381,22 +16154,26 @@ "properties": { "type": { "type": "string", - "enum": ["organization_member"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["organization_member"] + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$" }, - "id": { "type": "string", "format": "uuid" }, "attributes": { "type": "object", "properties": { "username": { "type": "string", - "nullable": true, - "description": "Member's username" + "description": "Member's username", + "nullable": true }, "primary_email": { "type": "string", - "nullable": true, - "description": "Member's primary email" + "description": "Member's primary email", + "nullable": true }, "mfa_enabled": { "type": "boolean", @@ -1408,8 +16185,8 @@ }, "avatar_url": { "type": "string", - "nullable": true, - "description": "Member's avatar URL" + "description": "Member's avatar URL", + "nullable": true }, "roles": { "type": "array", @@ -1462,27 +16239,27 @@ "properties": { "first": { "type": "string", - "nullable": true, "description": "URL path to the first page if available.", - "example": "/v2/organizations/my-org/members?page[size]=10" + "example": "/v2/organizations/my-org/members?page[size]=10", + "nullable": true }, "prev": { "type": "string", - "nullable": true, "description": "URL path to the previous page.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7" + "example": "/v2/organizations/my-org/members?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7", + "nullable": true }, "next": { "type": "string", - "nullable": true, "description": "URL path to the next page.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4" + "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4", + "nullable": true }, "last": { "type": "string", - "nullable": true, "description": "URL path to the last page if available.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295" + "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", + "nullable": true } }, "required": ["prev", "next"] @@ -1498,8 +16275,8 @@ "properties": { "type": { "type": "string", - "enum": ["organization_member_role"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["organization_member_role"] }, "attributes": { "type": "object", @@ -1511,6 +16288,8 @@ "example": "developer" }, "projects": { + "description": "The projects to assign a project-scoped role for. If omitted, assigns an org-wide role.", + "minItems": 1, "type": "array", "items": { "type": "object", @@ -1522,9 +16301,7 @@ } }, "required": ["ref"] - }, - "minItems": 1, - "description": "The projects to assign a project-scoped role for. If omitted, assigns an org-wide role." + } } }, "required": ["role"] @@ -1543,8 +16320,8 @@ "properties": { "type": { "type": "string", - "enum": ["organization_member_role"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["organization_member_role"] }, "attributes": { "type": "object", @@ -1587,10 +16364,9 @@ "properties": { "type": { "type": "string", - "enum": ["organization_role"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["organization_role"] }, - "id": {}, "attributes": { "type": "object", "properties": { @@ -1613,19 +16389,25 @@ "type": "object", "properties": { "data": { + "minItems": 1, + "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["organization_invitation"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["organization_invitation"] }, "attributes": { "type": "object", "properties": { - "email": { "type": "string", "format": "email" }, + "email": { + "type": "string", + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + }, "role": { "type": "string", "enum": ["owner", "administrator", "developer", "read-only"], @@ -1633,6 +16415,8 @@ "example": "developer" }, "projects": { + "description": "The projects to limit a user to. If omitted, user will have org-wide access with the provided role.", + "minItems": 1, "type": "array", "items": { "type": "object", @@ -1644,9 +16428,7 @@ } }, "required": ["ref"] - }, - "minItems": 1, - "description": "The projects to limit a user to. If omitted, user will have org-wide access with the provided role." + } }, "require_sso": { "type": "boolean" } }, @@ -1654,9 +16436,7 @@ } }, "required": ["type", "attributes"] - }, - "minItems": 1, - "maxItems": 50 + } } }, "required": ["data"] @@ -1713,7 +16493,13 @@ }, "meta": { "type": "object", - "properties": { "email": { "type": "string", "format": "email" } }, + "properties": { + "email": { + "type": "string", + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + } + }, "required": ["email"] } }, @@ -1730,13 +16516,82 @@ "properties": { "type": { "type": "string", - "enum": ["organization_invitation"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["organization_invitation"] + }, + "attributes": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + } + }, + "required": ["email"] + } + }, + "required": ["type", "attributes"] + } + } + }, + "required": ["data"] + }, + "V2DeleteInvitationsRequest": { + "type": "object", + "properties": { + "data": { + "minItems": 1, + "maxItems": 100, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["organization_invitation"] + }, + "attributes": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + } + }, + "required": ["email"] + } + }, + "required": ["type", "attributes"] + } + } + }, + "required": ["data"] + }, + "V2DeleteInvitationsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["organization_invitation"] }, - "id": {}, "attributes": { "type": "object", - "properties": { "email": { "type": "string", "format": "email" } }, + "properties": { + "email": { + "type": "string", + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + } + }, "required": ["email"] } }, @@ -1745,6 +16600,333 @@ } }, "required": ["data"] + }, + "V2ListProjectsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { "type": "string", "description": "Resource type.", "enum": ["project"] }, + "id": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + }, + "attributes": { + "type": "object", + "properties": { + "name": { "type": "string", "description": "Project name" }, + "status": { + "type": "string", + "enum": [ + "INACTIVE", + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "UNKNOWN", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UPGRADING", + "PAUSING", + "RESTORE_FAILED", + "RESTARTING", + "PAUSE_FAILED", + "RESIZING" + ], + "description": "Project status" + }, + "cloud_provider": { + "type": "string", + "description": "Cloud provider hosting the project" + }, + "region": { + "type": "string", + "description": "Region the project is hosted in" + }, + "inserted_at": { + "type": "string", + "description": "When the project was created" + }, + "databases": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cloud_provider": { "type": "string" }, + "identifier": { "type": "string" }, + "region": { "type": "string", "nullable": true }, + "status": { + "type": "string", + "enum": [ + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UNKNOWN", + "INIT_READ_REPLICA", + "INIT_READ_REPLICA_FAILED", + "RESTARTING", + "RESIZING" + ] + }, + "type": { "type": "string", "enum": ["PRIMARY", "READ_REPLICA"] }, + "infra_compute_size": { + "type": "string", + "enum": [ + "pico", + "nano", + "micro", + "small", + "medium", + "large", + "xlarge", + "2xlarge", + "4xlarge", + "8xlarge", + "12xlarge", + "16xlarge", + "24xlarge", + "24xlarge_optimized_memory", + "24xlarge_optimized_cpu", + "24xlarge_high_memory", + "48xlarge", + "48xlarge_optimized_memory", + "48xlarge_optimized_cpu", + "48xlarge_high_memory" + ] + }, + "disk_volume_size_gb": { "type": "number" }, + "disk_type": { "type": "string", "enum": ["gp3", "io2"] }, + "disk_throughput_mbps": { "type": "number" }, + "disk_last_modified_at": { "type": "string" } + }, + "required": ["cloud_provider", "identifier", "region", "status", "type"] + }, + "description": "The project's databases including compute and disk attributes." + } + }, + "required": [ + "name", + "status", + "cloud_provider", + "region", + "inserted_at", + "databases" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "links": { + "type": "object", + "properties": { + "first": { + "type": "string", + "description": "URL path to the first page if available.", + "example": "/v2/organizations/my-org/projects?page[size]=10", + "nullable": true + }, + "prev": { + "type": "string", + "description": "URL path to the previous page.", + "example": "/v2/organizations/my-org/projects?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7", + "nullable": true + }, + "next": { + "type": "string", + "description": "URL path to the next page.", + "example": "/v2/organizations/my-org/projects?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4", + "nullable": true + }, + "last": { + "type": "string", + "description": "URL path to the last page if available.", + "example": "/v2/organizations/my-org/projects?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", + "nullable": true + } + }, + "required": ["prev", "next"] + } + }, + "required": ["data", "links"] + }, + "V2ListGitHubConnectionsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["github_connection"] + }, + "id": { "type": "string", "description": "Connection id.", "example": "7" }, + "attributes": { + "type": "object", + "properties": { + "inserted_at": { + "type": "string", + "description": "When the connection was created" + }, + "updated_at": { + "type": "string", + "description": "When the connection was last updated" + }, + "installation_id": { + "type": "number", + "description": "GitHub App installation id" + }, + "workdir": { + "type": "string", + "description": "Directory within the repository the project lives in" + }, + "supabase_changes_only": { + "type": "boolean", + "description": "Whether branches are only created for changes under `supabase/`" + }, + "branch_limit": { + "type": "number", + "description": "Maximum number of preview branches" + }, + "new_branch_per_pr": { + "type": "boolean", + "description": "Whether a preview branch is created for every pull request" + }, + "project": { + "type": "object", + "properties": { + "id": { "type": "number" }, + "ref": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + }, + "name": { "type": "string" } + }, + "required": ["id", "ref", "name"], + "description": "The connected Supabase project" + }, + "repository": { + "type": "object", + "properties": { "id": { "type": "number" }, "name": { "type": "string" } }, + "required": ["id", "name"], + "description": "The connected GitHub repository" + }, + "user": { + "type": "object", + "properties": { + "id": { "type": "number" }, + "username": { "type": "string" }, + "primary_email": { "type": "string", "nullable": true } + }, + "required": ["id", "username", "primary_email"], + "description": "The user who created the connection, if still known", + "nullable": true + } + }, + "required": [ + "inserted_at", + "updated_at", + "installation_id", + "workdir", + "supabase_changes_only", + "branch_limit", + "new_branch_per_pr", + "project", + "repository", + "user" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "links": { + "type": "object", + "properties": { + "first": { + "type": "string", + "description": "URL path to the first page if available.", + "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10", + "nullable": true + }, + "prev": { + "type": "string", + "description": "URL path to the previous page.", + "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7", + "nullable": true + }, + "next": { + "type": "string", + "description": "URL path to the next page.", + "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4", + "nullable": true + }, + "last": { + "type": "string", + "description": "URL path to the last page if available.", + "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", + "nullable": true + } + }, + "required": ["prev", "next"] + } + }, + "required": ["data", "links"] + }, + "APIErrorObject": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "code": { "type": "string" }, + "message": { "type": "string" }, + "description": { "type": "string" }, + "links": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { "type": "string" }, + "rel": { "type": "string" }, + "title": { "type": "string" }, + "type": { "type": "string" }, + "describedby": { "type": "string" }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { "type": "string" }, + "additionalProperties": {} + }, + "issues": { "type": "array", "items": { "$ref": "#/components/schemas/APIErrorObject" } } + }, + "required": ["code", "message"] } } } diff --git a/apps/docs/spec/common-api-sections.json b/apps/docs/spec/common-api-sections.json index ffe92d96efb4e..9421f19a16b03 100644 --- a/apps/docs/spec/common-api-sections.json +++ b/apps/docs/spec/common-api-sections.json @@ -76,6 +76,12 @@ "slug": "v2-list-log-drains", "type": "operation" }, + { + "id": "v1-scrape-project-metrics", + "title": "Scrape project metrics", + "slug": "v1-scrape-project-metrics", + "type": "operation" + }, { "id": "v2-update-log-drain", "title": "Update log drain", @@ -760,6 +766,12 @@ "slug": "v1-list-all-organizations", "type": "operation" }, + { + "id": "v2-list-organization-github-connections", + "title": "List organization github connections", + "slug": "v2-list-organization-github-connections", + "type": "operation" + }, { "id": "v1-list-organization-members", "title": "List organization members", @@ -772,6 +784,12 @@ "slug": "v2-list-organization-members", "type": "operation" }, + { + "id": "v2-list-organization-projects", + "title": "List organization projects", + "slug": "v2-list-organization-projects", + "type": "operation" + }, { "id": "v2-list-organization-roles", "title": "List organization roles", @@ -789,6 +807,12 @@ "title": "Create organization invitations", "slug": "v2-create-organization-invitations", "type": "operation" + }, + { + "id": "v2-delete-organization-invitations", + "title": "Delete organization invitations", + "slug": "v2-delete-organization-invitations", + "type": "operation" } ] }, @@ -844,6 +868,12 @@ "slug": "v2-delete-private-link-association", "type": "operation" }, + { + "id": "v2-delete-private-link-association-for-database", + "title": "Delete private link association for database", + "slug": "v2-delete-private-link-association-for-database", + "type": "operation" + }, { "id": "v1-get-all-projects-for-organization", "title": "Get all projects for organization", diff --git a/apps/docs/spec/transforms/api_v1_openapi_deparsed.json b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json index c7576a9b540b5..da424d3bcd57a 100644 --- a/apps/docs/spec/transforms/api_v1_openapi_deparsed.json +++ b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json @@ -78,7 +78,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -90,6 +90,7 @@ { "type": "string", "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -102,67 +103,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "ref": { - "type": "string" - }, - "postgres_version": { - "type": "string" - }, - "postgres_engine": { - "type": "string" - }, - "release_channel": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "INACTIVE", - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "UNKNOWN", - "GOING_DOWN", - "INIT_FAILED", - "REMOVED", - "RESTORING", - "UPGRADING", - "PAUSING", - "RESTORE_FAILED", - "RESTARTING", - "PAUSE_FAILED", - "RESIZING" - ] - }, - "db_host": { - "type": "string" - }, - "db_port": { - "type": "integer", - "minimum": 0, - "exclusiveMinimum": true - }, - "db_user": { - "type": "string" - }, - "db_pass": { - "type": "string" - }, - "jwt_secret": { - "type": "string" - } - }, - "required": [ - "ref", - "postgres_version", - "postgres_engine", - "release_channel", - "status", - "db_host", - "db_port" - ] + "$ref": "#/components/schemas/BranchDetailResponse" } } } @@ -174,12 +115,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["branching_production_read"] - }, - { - "fga_permissions": ["branching_development_read"] } ], "summary": "Get database branch config", @@ -191,6 +126,7 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_read"], ["branching_production_read"]], "x-oauth-scope": "environment:read" }, "patch": { @@ -204,7 +140,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -216,6 +152,7 @@ { "type": "string", "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -227,49 +164,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "branch_name": { - "type": "string" - }, - "git_branch": { - "type": "string" - }, - "reset_on_push": { - "type": "boolean", - "description": "This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead.", - "deprecated": true - }, - "persistent": { - "type": "boolean" - }, - "status": { - "type": "string", - "enum": [ - "CREATING_PROJECT", - "RUNNING_MIGRATIONS", - "MIGRATIONS_PASSED", - "MIGRATIONS_FAILED", - "FUNCTIONS_DEPLOYED", - "FUNCTIONS_FAILED" - ] - }, - "request_review": { - "type": "boolean" - }, - "notify_url": { - "type": "string", - "format": "uri", - "description": "HTTP endpoint to receive branch status updates." - } - }, - "example": { - "branch_name": "preview-login-page", - "git_branch": "feature/login-page", - "persistent": true, - "request_review": true, - "notify_url": "https://example.com/webhooks/branches" - } + "$ref": "#/components/schemas/UpdateBranchBody" } } } @@ -280,108 +175,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string" - }, - "project_ref": { - "type": "string" - }, - "parent_project_ref": { - "type": "string" - }, - "is_default": { - "type": "boolean" - }, - "git_branch": { - "type": "string" - }, - "pr_number": { - "type": "integer", - "format": "int32" - }, - "latest_check_run_id": { - "type": "number", - "description": "This field is deprecated and will not be populated.", - "deprecated": true - }, - "persistent": { - "type": "boolean" - }, - "status": { - "type": "string", - "enum": [ - "CREATING_PROJECT", - "RUNNING_MIGRATIONS", - "MIGRATIONS_PASSED", - "MIGRATIONS_FAILED", - "FUNCTIONS_DEPLOYED", - "FUNCTIONS_FAILED" - ], - "description": "This field is deprecated. List action runs to get branch status instead.", - "deprecated": true - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "review_requested_at": { - "type": "string", - "format": "date-time" - }, - "with_data": { - "type": "boolean" - }, - "notify_url": { - "type": "string", - "format": "uri" - }, - "deletion_scheduled_at": { - "type": "string", - "format": "date-time" - }, - "preview_project_status": { - "type": "string", - "enum": [ - "INACTIVE", - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "UNKNOWN", - "GOING_DOWN", - "INIT_FAILED", - "REMOVED", - "RESTORING", - "UPGRADING", - "PAUSING", - "RESTORE_FAILED", - "RESTARTING", - "PAUSE_FAILED", - "RESIZING" - ] - } - }, - "required": [ - "id", - "name", - "project_ref", - "parent_project_ref", - "is_default", - "persistent", - "status", - "created_at", - "updated_at", - "with_data" - ] + "$ref": "#/components/schemas/BranchResponse" } } } @@ -393,12 +187,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["branching_production_write"] - }, - { - "fga_permissions": ["branching_development_write"] } ], "summary": "Update database branch config", @@ -410,6 +198,7 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" }, "delete": { @@ -423,7 +212,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -435,6 +224,7 @@ { "type": "string", "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -446,9 +236,8 @@ "in": "query", "description": "If set to false, schedule deletion with 1-hour grace period (only when soft deletion is enabled).", "schema": { - "default": "true", "example": false, - "type": "boolean" + "type": "string" } } ], @@ -458,14 +247,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "enum": ["ok"] - } - }, - "required": ["message"] + "$ref": "#/components/schemas/BranchDeleteResponse" } } } @@ -477,12 +259,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["branching_production_delete"] - }, - { - "fga_permissions": ["branching_development_delete"] } ], "summary": "Delete a database branch", @@ -494,6 +270,7 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_delete"], ["branching_production_delete"]], "x-oauth-scope": "environment:write" } }, @@ -509,7 +286,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -521,6 +298,7 @@ { "type": "string", "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -532,15 +310,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "migration_version": { - "type": "string" - } - }, - "example": { - "migration_version": "20250312000000" - } + "$ref": "#/components/schemas/BranchActionBody" } } } @@ -551,17 +321,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "workflow_run_id": { - "type": "string" - }, - "message": { - "type": "string", - "enum": ["ok"] - } - }, - "required": ["workflow_run_id", "message"] + "$ref": "#/components/schemas/BranchUpdateResponse" } } } @@ -573,12 +333,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["branching_production_write"] - }, - { - "fga_permissions": ["branching_development_write"] } ], "summary": "Pushes a database branch", @@ -590,6 +344,7 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -605,7 +360,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -617,6 +372,7 @@ { "type": "string", "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -628,15 +384,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "migration_version": { - "type": "string" - } - }, - "example": { - "migration_version": "20250312000000" - } + "$ref": "#/components/schemas/BranchActionBody" } } } @@ -647,17 +395,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "workflow_run_id": { - "type": "string" - }, - "message": { - "type": "string", - "enum": ["ok"] - } - }, - "required": ["workflow_run_id", "message"] + "$ref": "#/components/schemas/BranchUpdateResponse" } } } @@ -669,12 +407,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["branching_production_write"] - }, - { - "fga_permissions": ["branching_development_write"] } ], "summary": "Merges a database branch", @@ -686,6 +418,7 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -701,7 +434,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -713,6 +446,7 @@ { "type": "string", "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -724,15 +458,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "migration_version": { - "type": "string" - } - }, - "example": { - "migration_version": "20250312000000" - } + "$ref": "#/components/schemas/BranchActionBody" } } } @@ -743,17 +469,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "workflow_run_id": { - "type": "string" - }, - "message": { - "type": "string", - "enum": ["ok"] - } - }, - "required": ["workflow_run_id", "message"] + "$ref": "#/components/schemas/BranchUpdateResponse" } } } @@ -765,12 +481,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["branching_production_write"] - }, - { - "fga_permissions": ["branching_development_write"] } ], "summary": "Resets a database branch", @@ -782,6 +492,7 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -797,7 +508,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -809,6 +520,7 @@ { "type": "string", "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -821,14 +533,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "enum": ["Branch restoration initiated"] - } - }, - "required": ["message"] + "$ref": "#/components/schemas/BranchRestoreResponse" } } } @@ -840,12 +545,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["branching_production_write"] - }, - { - "fga_permissions": ["branching_development_write"] } ], "summary": "Restore a scheduled branch deletion", @@ -857,6 +556,7 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -872,7 +572,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "oneOf": [ + "anyOf": [ { "type": "string", "minLength": 20, @@ -884,6 +584,7 @@ { "type": "string", "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -902,10 +603,10 @@ "name": "pgdelta", "required": false, "in": "query", - "description": "Use pg-delta instead of Migra for diffing when true", + "description": "Use pg-delta instead of Migra for diffing when true. \nBoolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", "schema": { - "example": false, - "type": "boolean" + "example": "true", + "type": "string" } } ], @@ -927,12 +628,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["branching_production_write"] - }, - { - "fga_permissions": ["branching_development_write"] } ], "summary": "[Beta] Diffs a database branch", @@ -944,6 +639,7 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -960,98 +656,7 @@ "schema": { "type": "array", "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "deprecated": true, - "description": "Deprecated: Use `ref` instead." - }, - "ref": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - }, - "organization_id": { - "type": "string", - "description": "Deprecated: Use `organization_slug` instead.", - "deprecated": true - }, - "organization_slug": { - "type": "string", - "pattern": "^[\\w-]+$", - "description": "Organization slug", - "example": "tsrqponmlkjihgfedcba" - }, - "name": { - "type": "string", - "description": "Name of your project" - }, - "region": { - "type": "string", - "description": "Region of your project" - }, - "created_at": { - "type": "string", - "description": "Creation timestamp" - }, - "status": { - "type": "string", - "enum": [ - "INACTIVE", - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "UNKNOWN", - "GOING_DOWN", - "INIT_FAILED", - "REMOVED", - "RESTORING", - "UPGRADING", - "PAUSING", - "RESTORE_FAILED", - "RESTARTING", - "PAUSE_FAILED", - "RESIZING" - ] - }, - "database": { - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "Database host" - }, - "version": { - "type": "string", - "description": "Database version" - }, - "postgres_engine": { - "type": "string", - "description": "Database engine" - }, - "release_channel": { - "type": "string", - "description": "Release channel" - } - }, - "required": ["host", "version", "postgres_engine", "release_channel"] - } - }, - "required": [ - "id", - "ref", - "organization_id", - "organization_slug", - "name", - "region", - "created_at", - "status", - "database" - ] + "$ref": "#/components/schemas/V1ProjectWithDatabaseResponse" } } } @@ -1070,9 +675,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["projects_read"] } ], "summary": "List all projects", @@ -1084,6 +686,7 @@ } ], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["projects_read"]], "x-oauth-scope": "projects:read" }, "post": { @@ -1094,165 +697,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "db_pass": { - "type": "string", - "description": "Database password" - }, - "name": { - "type": "string", - "maxLength": 256, - "description": "Name of your project" - }, - "organization_id": { - "type": "string", - "description": "Deprecated: Use `organization_slug` instead.", - "deprecated": true - }, - "organization_slug": { - "type": "string", - "pattern": "^[\\w-]+$", - "description": "Organization slug", - "example": "tsrqponmlkjihgfedcba" - }, - "plan": { - "type": "string", - "enum": ["free", "pro"], - "deprecated": true, - "description": "Subscription Plan is now set on organization level and is ignored in this request" - }, - "region": { - "type": "string", - "description": "Region you want your server to reside in. Use region_selection instead.", - "deprecated": true, - "enum": [ - "us-east-1", - "us-east-2", - "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-north-1", - "eu-central-1", - "eu-central-2", - "ca-central-1", - "ap-south-1", - "sa-east-1" - ] - }, - "region_selection": { - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["specific"] - }, - "code": { - "type": "string", - "description": "Specific region code. The codes supported are not a stable API, and should be retrieved from the /available-regions endpoint.", - "enum": [ - "us-east-1", - "us-east-2", - "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-north-1", - "eu-central-1", - "eu-central-2", - "ca-central-1", - "ap-south-1", - "sa-east-1" - ] - } - }, - "required": ["type", "code"] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["smartGroup"] - }, - "code": { - "type": "string", - "enum": ["americas", "emea", "apac"], - "description": "The Smart Region Group's code. The codes supported are not a stable API, and should be retrieved from the /available-regions endpoint." - } - }, - "required": ["type", "code"] - } - ], - "description": "Region selection. Only one of region or region_selection can be specified." - }, - "kps_enabled": { - "type": "boolean", - "deprecated": true, - "description": "This field is deprecated and is ignored in this request" - }, - "desired_instance_size": { - "description": "Desired instance size. Omit this field to always default to the smallest possible size.", - "type": "string", - "enum": [ - "nano", - "micro", - "small", - "medium", - "large", - "xlarge", - "2xlarge", - "4xlarge", - "8xlarge", - "12xlarge", - "16xlarge", - "24xlarge", - "24xlarge_optimized_memory", - "24xlarge_optimized_cpu", - "24xlarge_high_memory", - "48xlarge", - "48xlarge_optimized_memory", - "48xlarge_optimized_cpu", - "48xlarge_high_memory" - ] - }, - "template_url": { - "type": "string", - "format": "uri", - "description": "Template URL used to create the project from the CLI." - }, - "high_availability": { - "type": "boolean", - "description": "[Experimental] Whether to enable high availability for the project." - } - }, - "required": ["db_pass", "name", "organization_slug"], - "additionalProperties": false, - "hideDefinitions": ["release_channel", "postgres_engine"], - "example": { - "db_pass": "correct-horse-battery-staple", - "name": "acme-prod", - "organization_slug": "tsrqponmlkjihgfedcba", - "region": "us-east-1" - } + "$ref": "#/components/schemas/V1CreateProjectBody" } } } @@ -1263,75 +708,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "deprecated": true, - "description": "Deprecated: Use `ref` instead." - }, - "ref": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - }, - "organization_id": { - "type": "string", - "description": "Deprecated: Use `organization_slug` instead.", - "deprecated": true - }, - "organization_slug": { - "type": "string", - "pattern": "^[\\w-]+$", - "description": "Organization slug", - "example": "tsrqponmlkjihgfedcba" - }, - "name": { - "type": "string", - "description": "Name of your project" - }, - "region": { - "type": "string", - "description": "Region of your project" - }, - "created_at": { - "type": "string", - "description": "Creation timestamp" - }, - "status": { - "type": "string", - "enum": [ - "INACTIVE", - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "UNKNOWN", - "GOING_DOWN", - "INIT_FAILED", - "REMOVED", - "RESTORING", - "UPGRADING", - "PAUSING", - "RESTORE_FAILED", - "RESTARTING", - "PAUSE_FAILED", - "RESIZING" - ] - } - }, - "required": [ - "id", - "ref", - "organization_id", - "organization_slug", - "name", - "region", - "created_at", - "status" - ] + "$ref": "#/components/schemas/V1ProjectResponse" } } } @@ -1349,9 +726,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["organization_projects_create"] } ], "summary": "Create a project", @@ -1363,6 +737,7 @@ } ], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["organization_projects_create"]], "x-oauth-scope": "projects:write" } }, @@ -1428,153 +803,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "recommendations": { - "type": "object", - "properties": { - "smartGroup": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "code": { - "type": "string", - "enum": ["americas", "emea", "apac"] - }, - "type": { - "type": "string", - "enum": ["smartGroup"] - } - }, - "required": ["name", "code", "type"] - }, - "specific": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "code": { - "type": "string", - "enum": [ - "us-east-1", - "us-east-2", - "us-west-1", - "us-west-2", - "ap-southeast-1", - "ap-northeast-1", - "ap-northeast-2", - "ap-east-1", - "ap-southeast-2", - "eu-west-1", - "eu-west-2", - "eu-west-3", - "eu-north-1", - "eu-central-1", - "eu-central-2", - "ca-central-1", - "ap-south-1", - "sa-east-1" - ] - }, - "type": { - "type": "string", - "enum": ["specific"] - }, - "provider": { - "type": "string", - "enum": ["AWS", "FLY", "AWS_K8S", "AWS_NIMBUS"] - }, - "status": { - "type": "string", - "enum": ["capacity", "other"] - } - }, - "required": ["name", "code", "type", "provider"] - } - } - }, - "required": ["smartGroup", "specific"] - }, - "all": { - "type": "object", - "properties": { - "smartGroup": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "code": { - "type": "string", - "enum": ["americas", "emea", "apac"] - }, - "type": { - "type": "string", - "enum": ["smartGroup"] - } - }, - "required": ["name", "code", "type"] - } - }, - "specific": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "code": { - "type": "string", - "enum": [ - "us-east-1", - "us-east-2", - "us-west-1", - "us-west-2", - "ap-southeast-1", - "ap-northeast-1", - "ap-northeast-2", - "ap-east-1", - "ap-southeast-2", - "eu-west-1", - "eu-west-2", - "eu-west-3", - "eu-north-1", - "eu-central-1", - "eu-central-2", - "ca-central-1", - "ap-south-1", - "sa-east-1" - ] - }, - "type": { - "type": "string", - "enum": ["specific"] - }, - "provider": { - "type": "string", - "enum": ["AWS", "FLY", "AWS_K8S", "AWS_NIMBUS"] - }, - "status": { - "type": "string", - "enum": ["capacity", "other"] - } - }, - "required": ["name", "code", "type", "provider"] - } - } - }, - "required": ["smartGroup", "specific"] - } - }, - "required": ["recommendations", "all"] + "$ref": "#/components/schemas/RegionsInfo" } } } @@ -1610,24 +839,7 @@ "schema": { "type": "array", "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Deprecated: Use `slug` instead.", - "deprecated": true - }, - "slug": { - "type": "string", - "pattern": "^[\\w-]+$", - "description": "Organization slug", - "example": "tsrqponmlkjihgfedcba" - }, - "name": { - "type": "string" - } - }, - "required": ["id", "slug", "name"] + "$ref": "#/components/schemas/OrganizationResponseV1" } } } @@ -1649,9 +861,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["organizations_read"] } ], "summary": "List all organizations", @@ -1663,6 +872,7 @@ } ], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organizations_read"]], "x-oauth-scope": "organizations:read" }, "post": { @@ -1673,18 +883,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 256 - } - }, - "required": ["name"], - "additionalProperties": false, - "example": { - "name": "Acme" - } + "$ref": "#/components/schemas/CreateOrganizationV1" } } } @@ -1695,24 +894,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Deprecated: Use `slug` instead.", - "deprecated": true - }, - "slug": { - "type": "string", - "pattern": "^[\\w-]+$", - "description": "Organization slug", - "example": "tsrqponmlkjihgfedcba" - }, - "name": { - "type": "string" - } - }, - "required": ["id", "slug", "name"] + "$ref": "#/components/schemas/OrganizationResponseV1" } } } @@ -1733,14 +915,12 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["organizations_create"] } ], "summary": "Create an organization", "tags": ["Organizations"], - "x-endpoint-owners": ["management-api", "billing"] + "x-endpoint-owners": ["management-api", "billing"], + "x-fga-permissions": [["organizations_create"]] } }, "/v1/oauth/authorize": { @@ -1753,6 +933,7 @@ "in": "query", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "66666666-6666-4666-8666-666666666666", "type": "string" } @@ -1848,6 +1029,7 @@ "description": "Resource indicator for MCP (Model Context Protocol) clients", "schema": { "format": "uri", + "example": "https://mcp.supabase.com/projects", "type": "string" } } @@ -1857,11 +1039,6 @@ "description": "" } }, - "security": [ - { - "oauth2": ["read"] - } - ], "summary": "[Beta] Authorize user through oauth", "tags": ["OAuth"], "x-endpoint-owners": ["auth", "management-api"] @@ -1877,58 +1054,7 @@ "content": { "application/x-www-form-urlencoded": { "schema": { - "type": "object", - "properties": { - "grant_type": { - "type": "string", - "enum": [ - "authorization_code", - "refresh_token", - "urn:ietf:params:oauth:grant-type:jwt-bearer" - ] - }, - "client_id": { - "type": "string", - "format": "uuid" - }, - "client_secret": { - "type": "string" - }, - "code": { - "type": "string" - }, - "code_verifier": { - "type": "string" - }, - "redirect_uri": { - "type": "string" - }, - "refresh_token": { - "type": "string" - }, - "assertion": { - "type": "string", - "description": "IDJAG assertion JWT for grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer. Beta - available on Team and Enterprise plans only." - }, - "resource": { - "type": "string", - "format": "uri", - "description": "Resource indicator for MCP (Model Context Protocol) clients" - }, - "scope": { - "type": "string" - } - }, - "additionalProperties": false, - "example": { - "grant_type": "authorization_code", - "client_id": "66666666-6666-4666-8666-666666666666", - "client_secret": "sb_secret_live_example_9f4d3a206b2e4a7e8c91", - "code": "oauth_code_9f4d3a206b2e4a7e8c91", - "code_verifier": "qW0Z6d9pQnW0mL1dK1q9wFq6Yz2nV5rA8jT3mP7sH4c", - "redirect_uri": "https://app.acme.com/auth/callback", - "scope": "projects:read projects:write" - } + "$ref": "#/components/schemas/OAuthTokenBody" } } } @@ -1939,35 +1065,12 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "access_token": { - "type": "string" - }, - "refresh_token": { - "type": "string", - "description": "The `urn:ietf:params:oauth:grant-type:jwt-bearer` grant type issues access tokens only, no refresh token is returned and the token cannot be revoked via `/v1/oauth/revoke`." - }, - "expires_in": { - "type": "integer" - }, - "token_type": { - "type": "string", - "enum": ["Bearer"] - } - }, - "required": ["access_token", "expires_in", "token_type"], - "additionalProperties": false + "$ref": "#/components/schemas/OAuthTokenResponse" } } } } }, - "security": [ - { - "oauth2": ["write"] - } - ], "summary": "[Beta] Exchange auth code for user's access and refresh token", "tags": ["OAuth"], "x-endpoint-owners": ["auth", "management-api"] @@ -1982,26 +1085,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "client_id": { - "type": "string", - "format": "uuid" - }, - "client_secret": { - "type": "string" - }, - "refresh_token": { - "type": "string" - } - }, - "required": ["client_id", "client_secret", "refresh_token"], - "additionalProperties": false, - "example": { - "client_id": "66666666-6666-4666-8666-666666666666", - "client_secret": "sb_secret_live_example_9f4d3a206b2e4a7e8c91", - "refresh_token": "oauth_refresh_9f4d3a206b2e4a7e8c91" - } + "$ref": "#/components/schemas/OAuthRevokeTokenBody" } } } @@ -2011,11 +1095,6 @@ "description": "" } }, - "security": [ - { - "oauth2": ["write"] - } - ], "summary": "[Beta] Revoke oauth app authorization and it's corresponding tokens", "tags": ["OAuth"], "x-endpoint-owners": ["auth", "management-api"] @@ -2045,6 +1124,7 @@ "in": "query", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "66666666-6666-4666-8666-666666666666", "type": "string" } @@ -2123,14 +1203,12 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["organization_admin_write", "project_admin_write"] } ], "summary": "Authorize user through oauth and claim a project", "tags": ["OAuth"], - "x-endpoint-owners": ["management-api"] + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_write", "project_admin_write"]] } }, "/v1/snippets": { @@ -2193,97 +1271,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "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", - "nullable": true - }, - "project": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "required": ["id", "name"] - }, - "owner": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "username": { - "type": "string" - } - }, - "required": ["id", "username"] - }, - "updated_by": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "username": { - "type": "string" - } - }, - "required": ["id", "username"] - }, - "favorite": { - "type": "boolean" - } - }, - "required": [ - "id", - "inserted_at", - "updated_at", - "type", - "visibility", - "name", - "description", - "project", - "owner", - "updated_by", - "favorite" - ] - } - }, - "cursor": { - "type": "string" - } - }, - "required": ["data"] + "$ref": "#/components/schemas/SnippetList" } } } @@ -2304,9 +1292,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["snippets_read"] } ], "summary": "Lists SQL snippets for the logged in user", @@ -2318,6 +1303,7 @@ } ], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["snippets_read"]], "x-oauth-scope": "database:read" } }, @@ -2331,6 +1317,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "44444444-4444-4444-8444-444444444444", "type": "string" } @@ -2342,103 +1329,7 @@ "content": { "application/json": { "schema": { - "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", - "nullable": true - }, - "project": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "required": ["id", "name"] - }, - "owner": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "username": { - "type": "string" - } - }, - "required": ["id", "username"] - }, - "updated_by": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "username": { - "type": "string" - } - }, - "required": ["id", "username"] - }, - "favorite": { - "type": "boolean" - }, - "content": { - "type": "object", - "properties": { - "favorite": { - "type": "boolean", - "deprecated": true, - "description": "Deprecated: Rely on root-level favorite property instead." - }, - "schema_version": { - "type": "string" - }, - "sql": { - "type": "string" - } - }, - "required": ["schema_version", "sql"] - } - }, - "required": [ - "id", - "inserted_at", - "updated_at", - "type", - "visibility", - "name", - "description", - "project", - "owner", - "updated_by", - "favorite", - "content" - ] + "$ref": "#/components/schemas/SnippetResponse" } } } @@ -2459,9 +1350,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["snippets_read"] } ], "summary": "Gets a specific SQL snippet", @@ -2473,6 +1361,7 @@ } ], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["snippets_read"]], "x-oauth-scope": "database:read" } }, @@ -2486,19 +1375,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "gotrue_id": { - "type": "string" - }, - "primary_email": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "required": ["gotrue_id", "primary_email", "username"] + "$ref": "#/components/schemas/V1ProfileResponse" } } } @@ -2515,6 +1392,67 @@ } }, "/v1/projects/{ref}/actions": { + "head": { + "description": "Returns the total number of action runs of the specified project.", + "operationId": "v1-count-action-runs", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], + "responses": { + "200": { + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + }, + "description": "total count value" + } + }, + "description": "" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to count action runs" + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Count the number of action runs", + "tags": ["Environments"], + "x-badges": [ + { + "name": "OAuth scope: environment:read", + "position": "after" + } + ], + "x-fga-permissions": [["action_runs_read"]], + "x-oauth-scope": "environment:read" + }, "get": { "description": "Returns a paginated list of action runs of the specified project.", "operationId": "v1-list-action-runs", @@ -2559,83 +1497,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "branch_id": { - "type": "string" - }, - "run_steps": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": [ - "clone", - "pull", - "health", - "configure", - "migrate", - "seed", - "deploy" - ] - }, - "status": { - "type": "string", - "enum": [ - "CREATED", - "DEAD", - "EXITED", - "PAUSED", - "REMOVING", - "RESTARTING", - "RUNNING" - ] - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["name", "status", "created_at", "updated_at"] - } - }, - "git_config": { - "nullable": true - }, - "workdir": { - "type": "string", - "nullable": true - }, - "check_run_id": { - "type": "number", - "nullable": true - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": [ - "id", - "branch_id", - "run_steps", - "workdir", - "check_run_id", - "created_at", - "updated_at" - ] - } + "$ref": "#/components/schemas/ListActionRunResponse" } } } @@ -2656,9 +1518,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["action_runs_read"] } ], "summary": "List all action runs", @@ -2670,11 +1529,14 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["action_runs_read"]], "x-oauth-scope": "environment:read" - }, - "head": { - "description": "Returns the total number of action runs of the specified project.", - "operationId": "v1-count-action-runs", + } + }, + "/v1/projects/{ref}/actions/{run_id}": { + "get": { + "description": "Returns the current status of the specified action run.", + "operationId": "v1-get-action-run", "parameters": [ { "name": "ref", @@ -2688,21 +1550,28 @@ "example": "abcdefghijklmnopqrst", "type": "string" } + }, + { + "name": "run_id", + "required": true, + "in": "path", + "description": "Action Run ID", + "schema": { + "example": "run_01hq3q9m7y5q7e4a7x2c8m1p4n", + "type": "string" + } } ], "responses": { "200": { - "headers": { - "X-Total-Count": { + "description": "", + "content": { + "application/json": { "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - }, - "description": "total count value" + "$ref": "#/components/schemas/ActionRunResponse" + } } - }, - "description": "" + } }, "401": { "description": "Unauthorized" @@ -2714,18 +1583,15 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to count action runs" + "description": "Failed to get action run status" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["action_runs_read"] } ], - "summary": "Count the number of action runs", + "summary": "Get the status of an action run", "tags": ["Environments"], "x-badges": [ { @@ -2733,159 +1599,15 @@ "position": "after" } ], + "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["action_runs_read"]], "x-oauth-scope": "environment:read" } }, - "/v1/projects/{ref}/actions/{run_id}": { - "get": { - "description": "Returns the current status of the specified action run.", - "operationId": "v1-get-action-run", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - }, - { - "name": "run_id", - "required": true, - "in": "path", - "description": "Action Run ID", - "schema": { - "example": "run_01hq3q9m7y5q7e4a7x2c8m1p4n", - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "branch_id": { - "type": "string" - }, - "run_steps": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": [ - "clone", - "pull", - "health", - "configure", - "migrate", - "seed", - "deploy" - ] - }, - "status": { - "type": "string", - "enum": [ - "CREATED", - "DEAD", - "EXITED", - "PAUSED", - "REMOVING", - "RESTARTING", - "RUNNING" - ] - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["name", "status", "created_at", "updated_at"] - } - }, - "git_config": { - "nullable": true - }, - "workdir": { - "type": "string", - "nullable": true - }, - "check_run_id": { - "type": "number", - "nullable": true - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": [ - "id", - "branch_id", - "run_steps", - "workdir", - "check_run_id", - "created_at", - "updated_at" - ] - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to get action run status" - } - }, - "security": [ - { - "bearer": [] - }, - { - "fga_permissions": ["action_runs_read"] - } - ], - "summary": "Get the status of an action run", - "tags": ["Environments"], - "x-badges": [ - { - "name": "OAuth scope: environment:read", - "position": "after" - } - ], - "x-endpoint-owners": ["dev-workflows"], - "x-oauth-scope": "environment:read" - } - }, - "/v1/projects/{ref}/actions/{run_id}/status": { - "patch": { - "description": "Updates the status of an ongoing action run.", - "operationId": "v1-update-action-run-status", + "/v1/projects/{ref}/actions/{run_id}/status": { + "patch": { + "description": "Updates the status of an ongoing action run.", + "operationId": "v1-update-action-run-status", "parameters": [ { "name": "ref", @@ -2916,99 +1638,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "clone": { - "type": "string", - "enum": [ - "CREATED", - "DEAD", - "EXITED", - "PAUSED", - "REMOVING", - "RESTARTING", - "RUNNING" - ] - }, - "pull": { - "type": "string", - "enum": [ - "CREATED", - "DEAD", - "EXITED", - "PAUSED", - "REMOVING", - "RESTARTING", - "RUNNING" - ] - }, - "health": { - "type": "string", - "enum": [ - "CREATED", - "DEAD", - "EXITED", - "PAUSED", - "REMOVING", - "RESTARTING", - "RUNNING" - ] - }, - "configure": { - "type": "string", - "enum": [ - "CREATED", - "DEAD", - "EXITED", - "PAUSED", - "REMOVING", - "RESTARTING", - "RUNNING" - ] - }, - "migrate": { - "type": "string", - "enum": [ - "CREATED", - "DEAD", - "EXITED", - "PAUSED", - "REMOVING", - "RESTARTING", - "RUNNING" - ] - }, - "seed": { - "type": "string", - "enum": [ - "CREATED", - "DEAD", - "EXITED", - "PAUSED", - "REMOVING", - "RESTARTING", - "RUNNING" - ] - }, - "deploy": { - "type": "string", - "enum": [ - "CREATED", - "DEAD", - "EXITED", - "PAUSED", - "REMOVING", - "RESTARTING", - "RUNNING" - ] - } - }, - "example": { - "clone": "RUNNING", - "configure": "RUNNING", - "migrate": "RUNNING", - "deploy": "CREATED" - } + "$ref": "#/components/schemas/UpdateRunStatusBody" } } } @@ -3019,14 +1649,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "enum": ["ok"] - } - }, - "required": ["message"] + "$ref": "#/components/schemas/UpdateRunStatusResponse" } } } @@ -3047,9 +1670,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["action_runs_write"] } ], "summary": "Update the status of an action run", @@ -3061,6 +1681,7 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["action_runs_write"]], "x-oauth-scope": "environment:write" } }, @@ -3120,9 +1741,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["action_runs_read"] } ], "summary": "Get the logs of an action run", @@ -3134,6 +1752,7 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["action_runs_read"]], "x-oauth-scope": "environment:read" } }, @@ -3158,10 +1777,10 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string, true or false", + "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", "schema": { - "example": true, - "type": "boolean" + "example": "true", + "type": "string" } } ], @@ -3173,53 +1792,7 @@ "schema": { "type": "array", "items": { - "type": "object", - "properties": { - "api_key": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "enum": ["legacy", "publishable", "secret"], - "nullable": true - }, - "prefix": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "hash": { - "type": "string", - "nullable": true - }, - "secret_jwt_template": { - "type": "object", - "additionalProperties": {}, - "nullable": true - }, - "inserted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "required": ["name"] + "$ref": "#/components/schemas/ApiKeyResponse" } } } @@ -3238,9 +1811,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["api_gateway_keys_read"] } ], "summary": "Get project api keys", @@ -3252,6 +1822,7 @@ } ], "x-endpoint-owners": ["auth", "management-api"], + "x-fga-permissions": [["api_gateway_keys_read"]], "x-oauth-scope": "secrets:read" }, "post": { @@ -3274,10 +1845,10 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string, true or false", + "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", "schema": { - "example": true, - "type": "boolean" + "example": "true", + "type": "string" } } ], @@ -3286,34 +1857,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["publishable", "secret"] - }, - "name": { - "type": "string", - "minLength": 4, - "maxLength": 64, - "pattern": "^[a-z_][a-z0-9_]+$" - }, - "description": { - "type": "string", - "nullable": true - }, - "secret_jwt_template": { - "type": "object", - "additionalProperties": {}, - "nullable": true - } - }, - "required": ["type", "name"], - "example": { - "type": "secret", - "name": "ci_secret_key", - "description": "CI deploy key" - } + "$ref": "#/components/schemas/CreateApiKeyBody" } } } @@ -3324,53 +1868,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "api_key": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "enum": ["legacy", "publishable", "secret"], - "nullable": true - }, - "prefix": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "hash": { - "type": "string", - "nullable": true - }, - "secret_jwt_template": { - "type": "object", - "additionalProperties": {}, - "nullable": true - }, - "inserted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "required": ["name"] + "$ref": "#/components/schemas/ApiKeyResponse" } } } @@ -3388,9 +1886,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["api_gateway_keys_write"] } ], "summary": "Creates a new API key for the project", @@ -3402,6 +1897,7 @@ } ], "x-endpoint-owners": ["auth", "management-api"], + "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -3429,13 +1925,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] + "$ref": "#/components/schemas/LegacyApiKeysResponse" } } } @@ -3453,9 +1943,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["api_gateway_keys_read"] } ], "summary": "Check whether JWT based legacy (anon, service_role) API keys are enabled. This API endpoint will be removed in the future, check for HTTP 404 Not Found.", @@ -3467,6 +1954,7 @@ } ], "x-endpoint-owners": ["auth", "management-api"], + "x-fga-permissions": [["api_gateway_keys_read"]], "x-oauth-scope": "secrets:read" }, "put": { @@ -3489,10 +1977,10 @@ "name": "enabled", "required": true, "in": "query", - "description": "Boolean string, true or false", + "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", "schema": { - "example": true, - "type": "boolean" + "example": "true", + "type": "string" } } ], @@ -3502,13 +1990,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] + "$ref": "#/components/schemas/LegacyApiKeysResponse" } } } @@ -3526,9 +2008,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["api_gateway_keys_write"] } ], "summary": "Disable or re-enable JWT based legacy (anon, service_role) API keys. This API endpoint will be removed in the future, check for HTTP 404 Not Found.", @@ -3540,6 +2019,7 @@ } ], "x-endpoint-owners": ["auth", "management-api"], + "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -3566,6 +2046,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "22222222-2222-4222-8222-222222222222", "type": "string" } @@ -3574,10 +2055,10 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string, true or false", + "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", "schema": { - "example": true, - "type": "boolean" + "example": "true", + "type": "string" } } ], @@ -3586,28 +2067,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 4, - "maxLength": 64, - "pattern": "^[a-z_][a-z0-9_]+$" - }, - "description": { - "type": "string", - "nullable": true - }, - "secret_jwt_template": { - "type": "object", - "additionalProperties": {}, - "nullable": true - } - }, - "example": { - "name": "ci_secret_key_rotated", - "description": "Rotated after March release" - } + "$ref": "#/components/schemas/UpdateApiKeyBody" } } } @@ -3618,53 +2078,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "api_key": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "enum": ["legacy", "publishable", "secret"], - "nullable": true - }, - "prefix": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "hash": { - "type": "string", - "nullable": true - }, - "secret_jwt_template": { - "type": "object", - "additionalProperties": {}, - "nullable": true - }, - "inserted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "required": ["name"] + "$ref": "#/components/schemas/ApiKeyResponse" } } } @@ -3682,9 +2096,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["api_gateway_keys_write"] } ], "summary": "Updates an API key for the project", @@ -3696,6 +2107,7 @@ } ], "x-endpoint-owners": ["auth", "management-api"], + "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" }, "get": { @@ -3720,6 +2132,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "22222222-2222-4222-8222-222222222222", "type": "string" } @@ -3728,10 +2141,10 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string, true or false", + "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", "schema": { - "example": true, - "type": "boolean" + "example": "true", + "type": "string" } } ], @@ -3741,53 +2154,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "api_key": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "enum": ["legacy", "publishable", "secret"], - "nullable": true - }, - "prefix": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "hash": { - "type": "string", - "nullable": true - }, - "secret_jwt_template": { - "type": "object", - "additionalProperties": {}, - "nullable": true - }, - "inserted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "required": ["name"] + "$ref": "#/components/schemas/ApiKeyResponse" } } } @@ -3805,9 +2172,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["api_gateway_keys_read"] } ], "summary": "Get API key", @@ -3819,6 +2183,7 @@ } ], "x-endpoint-owners": ["auth", "management-api"], + "x-fga-permissions": [["api_gateway_keys_read"]], "x-oauth-scope": "secrets:read" }, "delete": { @@ -3843,6 +2208,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "22222222-2222-4222-8222-222222222222", "type": "string" } @@ -3854,7 +2220,7 @@ "description": "Boolean string, true or false", "schema": { "example": true, - "type": "boolean" + "type": "string" } }, { @@ -3864,7 +2230,7 @@ "description": "Boolean string, true or false", "schema": { "example": false, - "type": "boolean" + "type": "string" } }, { @@ -3883,53 +2249,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "api_key": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "enum": ["legacy", "publishable", "secret"], - "nullable": true - }, - "prefix": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "hash": { - "type": "string", - "nullable": true - }, - "secret_jwt_template": { - "type": "object", - "additionalProperties": {}, - "nullable": true - }, - "inserted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "required": ["name"] + "$ref": "#/components/schemas/ApiKeyResponse" } } } @@ -3947,9 +2267,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["api_gateway_keys_write"] } ], "summary": "Deletes an API key for the project", @@ -3961,6 +2278,7 @@ } ], "x-endpoint-owners": ["auth", "management-api"], + "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -3991,108 +2309,7 @@ "schema": { "type": "array", "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string" - }, - "project_ref": { - "type": "string" - }, - "parent_project_ref": { - "type": "string" - }, - "is_default": { - "type": "boolean" - }, - "git_branch": { - "type": "string" - }, - "pr_number": { - "type": "integer", - "format": "int32" - }, - "latest_check_run_id": { - "type": "number", - "description": "This field is deprecated and will not be populated.", - "deprecated": true - }, - "persistent": { - "type": "boolean" - }, - "status": { - "type": "string", - "enum": [ - "CREATING_PROJECT", - "RUNNING_MIGRATIONS", - "MIGRATIONS_PASSED", - "MIGRATIONS_FAILED", - "FUNCTIONS_DEPLOYED", - "FUNCTIONS_FAILED" - ], - "description": "This field is deprecated. List action runs to get branch status instead.", - "deprecated": true - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "review_requested_at": { - "type": "string", - "format": "date-time" - }, - "with_data": { - "type": "boolean" - }, - "notify_url": { - "type": "string", - "format": "uri" - }, - "deletion_scheduled_at": { - "type": "string", - "format": "date-time" - }, - "preview_project_status": { - "type": "string", - "enum": [ - "INACTIVE", - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "UNKNOWN", - "GOING_DOWN", - "INIT_FAILED", - "REMOVED", - "RESTORING", - "UPGRADING", - "PAUSING", - "RESTORE_FAILED", - "RESTARTING", - "PAUSE_FAILED", - "RESIZING" - ] - } - }, - "required": [ - "id", - "name", - "project_ref", - "parent_project_ref", - "is_default", - "persistent", - "status", - "created_at", - "updated_at", - "with_data" - ] + "$ref": "#/components/schemas/BranchResponse" } } } @@ -4105,12 +2322,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["branching_production_read"] - }, - { - "fga_permissions": ["branching_development_read"] } ], "summary": "List all database branches", @@ -4122,6 +2333,7 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_read"], ["branching_production_read"]], "x-oauth-scope": "environment:read" }, "post": { @@ -4147,82 +2359,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "branch_name": { - "type": "string", - "minLength": 1 - }, - "git_branch": { - "type": "string" - }, - "is_default": { - "type": "boolean" - }, - "persistent": { - "type": "boolean" - }, - "region": { - "type": "string" - }, - "desired_instance_size": { - "type": "string", - "enum": [ - "pico", - "nano", - "micro", - "small", - "medium", - "large", - "xlarge", - "2xlarge", - "4xlarge", - "8xlarge", - "12xlarge", - "16xlarge", - "24xlarge", - "24xlarge_optimized_memory", - "24xlarge_optimized_cpu", - "24xlarge_high_memory", - "48xlarge", - "48xlarge_optimized_memory", - "48xlarge_optimized_cpu", - "48xlarge_high_memory" - ] - }, - "release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"], - "description": "Release channel. If not provided, GA will be used." - }, - "postgres_engine": { - "type": "string", - "enum": ["15", "17", "17-oriole"], - "description": "Postgres engine version. If not provided, the latest version will be used." - }, - "secrets": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "with_data": { - "type": "boolean" - }, - "notify_url": { - "type": "string", - "format": "uri", - "description": "HTTP endpoint to receive branch status updates." - } - }, - "required": ["branch_name"], - "example": { - "branch_name": "preview-login-page", - "git_branch": "feature/login-page", - "persistent": true, - "with_data": false, - "notify_url": "https://example.com/webhooks/branches" - } + "$ref": "#/components/schemas/CreateBranchBody" } } } @@ -4233,108 +2370,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string" - }, - "project_ref": { - "type": "string" - }, - "parent_project_ref": { - "type": "string" - }, - "is_default": { - "type": "boolean" - }, - "git_branch": { - "type": "string" - }, - "pr_number": { - "type": "integer", - "format": "int32" - }, - "latest_check_run_id": { - "type": "number", - "description": "This field is deprecated and will not be populated.", - "deprecated": true - }, - "persistent": { - "type": "boolean" - }, - "status": { - "type": "string", - "enum": [ - "CREATING_PROJECT", - "RUNNING_MIGRATIONS", - "MIGRATIONS_PASSED", - "MIGRATIONS_FAILED", - "FUNCTIONS_DEPLOYED", - "FUNCTIONS_FAILED" - ], - "description": "This field is deprecated. List action runs to get branch status instead.", - "deprecated": true - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "review_requested_at": { - "type": "string", - "format": "date-time" - }, - "with_data": { - "type": "boolean" - }, - "notify_url": { - "type": "string", - "format": "uri" - }, - "deletion_scheduled_at": { - "type": "string", - "format": "date-time" - }, - "preview_project_status": { - "type": "string", - "enum": [ - "INACTIVE", - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "UNKNOWN", - "GOING_DOWN", - "INIT_FAILED", - "REMOVED", - "RESTORING", - "UPGRADING", - "PAUSING", - "RESTORE_FAILED", - "RESTARTING", - "PAUSE_FAILED", - "RESIZING" - ] - } - }, - "required": [ - "id", - "name", - "project_ref", - "parent_project_ref", - "is_default", - "persistent", - "status", - "created_at", - "updated_at", - "with_data" - ] + "$ref": "#/components/schemas/BranchResponse" } } } @@ -4346,12 +2382,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["branching_production_create"] - }, - { - "fga_permissions": ["branching_development_create"] } ], "summary": "Create a database branch", @@ -4363,6 +2393,7 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_create"], ["branching_production_create"]], "x-oauth-scope": "environment:write" }, "delete": { @@ -4403,9 +2434,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["branching_production_delete"] } ], "summary": "Disables preview branching", @@ -4417,6 +2445,7 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_production_delete"]], "x-oauth-scope": "environment:write" } }, @@ -4454,108 +2483,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string" - }, - "project_ref": { - "type": "string" - }, - "parent_project_ref": { - "type": "string" - }, - "is_default": { - "type": "boolean" - }, - "git_branch": { - "type": "string" - }, - "pr_number": { - "type": "integer", - "format": "int32" - }, - "latest_check_run_id": { - "type": "number", - "description": "This field is deprecated and will not be populated.", - "deprecated": true - }, - "persistent": { - "type": "boolean" - }, - "status": { - "type": "string", - "enum": [ - "CREATING_PROJECT", - "RUNNING_MIGRATIONS", - "MIGRATIONS_PASSED", - "MIGRATIONS_FAILED", - "FUNCTIONS_DEPLOYED", - "FUNCTIONS_FAILED" - ], - "description": "This field is deprecated. List action runs to get branch status instead.", - "deprecated": true - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "review_requested_at": { - "type": "string", - "format": "date-time" - }, - "with_data": { - "type": "boolean" - }, - "notify_url": { - "type": "string", - "format": "uri" - }, - "deletion_scheduled_at": { - "type": "string", - "format": "date-time" - }, - "preview_project_status": { - "type": "string", - "enum": [ - "INACTIVE", - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "UNKNOWN", - "GOING_DOWN", - "INIT_FAILED", - "REMOVED", - "RESTORING", - "UPGRADING", - "PAUSING", - "RESTORE_FAILED", - "RESTARTING", - "PAUSE_FAILED", - "RESIZING" - ] - } - }, - "required": [ - "id", - "name", - "project_ref", - "parent_project_ref", - "is_default", - "persistent", - "status", - "created_at", - "updated_at", - "with_data" - ] + "$ref": "#/components/schemas/BranchResponse" } } } @@ -4567,12 +2495,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["branching_production_read"] - }, - { - "fga_permissions": ["branching_development_read"] } ], "summary": "Get a database branch", @@ -4584,6 +2506,7 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["branching_development_read"], ["branching_production_read"]], "x-oauth-scope": "environment:read" } }, @@ -4611,126 +2534,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "1_not_started", - "2_initiated", - "3_challenge_verified", - "4_origin_setup_completed", - "5_services_reconfigured" - ] - }, - "custom_hostname": { - "type": "string" - }, - "data": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "errors": { - "type": "array", - "items": { - "description": "Any JSON-serializable value" - } - }, - "messages": { - "type": "array", - "items": { - "description": "Any JSON-serializable value" - } - }, - "result": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "ssl": { - "type": "object", - "properties": { - "status": { - "type": "string" - }, - "validation_records": { - "type": "array", - "items": { - "type": "object", - "properties": { - "txt_name": { - "type": "string" - }, - "txt_value": { - "type": "string" - } - }, - "required": ["txt_name", "txt_value"] - } - }, - "validation_errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "required": ["message"] - } - } - }, - "required": ["status", "validation_records"] - }, - "ownership_verification": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["type", "name", "value"] - }, - "custom_origin_server": { - "type": "string" - }, - "verification_errors": { - "type": "array", - "items": { - "type": "string" - } - }, - "status": { - "type": "string" - } - }, - "required": [ - "id", - "hostname", - "ssl", - "ownership_verification", - "custom_origin_server", - "status" - ] - } - }, - "required": ["success", "errors", "messages", "result"] - } - }, - "required": ["status", "custom_hostname", "data"] + "$ref": "#/components/schemas/UpdateCustomHostnameResponse" } } } @@ -4751,9 +2555,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["custom_domain_read"] } ], "summary": "[Beta] Gets project's custom hostname config", @@ -4765,6 +2566,7 @@ } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["custom_domain_read"]], "x-oauth-scope": "domains:read" }, "delete": { @@ -4789,8 +2591,7 @@ "in": "query", "description": "If true, also removes the custom domain add-on from the project subscription.", "schema": { - "default": "false", - "type": "boolean" + "type": "string" } } ], @@ -4814,9 +2615,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["custom_domain_write"] } ], "summary": "[Beta] Deletes a project's custom hostname configuration", @@ -4828,6 +2626,7 @@ } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -4854,18 +2653,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "custom_hostname": { - "type": "string", - "maxLength": 253, - "minLength": 1 - } - }, - "required": ["custom_hostname"], - "example": { - "custom_hostname": "docs.example.com" - } + "$ref": "#/components/schemas/UpdateCustomHostnameBody" } } } @@ -4876,126 +2664,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "1_not_started", - "2_initiated", - "3_challenge_verified", - "4_origin_setup_completed", - "5_services_reconfigured" - ] - }, - "custom_hostname": { - "type": "string" - }, - "data": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "errors": { - "type": "array", - "items": { - "description": "Any JSON-serializable value" - } - }, - "messages": { - "type": "array", - "items": { - "description": "Any JSON-serializable value" - } - }, - "result": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "ssl": { - "type": "object", - "properties": { - "status": { - "type": "string" - }, - "validation_records": { - "type": "array", - "items": { - "type": "object", - "properties": { - "txt_name": { - "type": "string" - }, - "txt_value": { - "type": "string" - } - }, - "required": ["txt_name", "txt_value"] - } - }, - "validation_errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "required": ["message"] - } - } - }, - "required": ["status", "validation_records"] - }, - "ownership_verification": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["type", "name", "value"] - }, - "custom_origin_server": { - "type": "string" - }, - "verification_errors": { - "type": "array", - "items": { - "type": "string" - } - }, - "status": { - "type": "string" - } - }, - "required": [ - "id", - "hostname", - "ssl", - "ownership_verification", - "custom_origin_server", - "status" - ] - } - }, - "required": ["success", "errors", "messages", "result"] - } - }, - "required": ["status", "custom_hostname", "data"] + "$ref": "#/components/schemas/UpdateCustomHostnameResponse" } } } @@ -5016,9 +2685,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["custom_domain_write"] } ], "summary": "[Beta] Updates project's custom hostname configuration", @@ -5030,6 +2696,7 @@ } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -5057,126 +2724,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "1_not_started", - "2_initiated", - "3_challenge_verified", - "4_origin_setup_completed", - "5_services_reconfigured" - ] - }, - "custom_hostname": { - "type": "string" - }, - "data": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "errors": { - "type": "array", - "items": { - "description": "Any JSON-serializable value" - } - }, - "messages": { - "type": "array", - "items": { - "description": "Any JSON-serializable value" - } - }, - "result": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "ssl": { - "type": "object", - "properties": { - "status": { - "type": "string" - }, - "validation_records": { - "type": "array", - "items": { - "type": "object", - "properties": { - "txt_name": { - "type": "string" - }, - "txt_value": { - "type": "string" - } - }, - "required": ["txt_name", "txt_value"] - } - }, - "validation_errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "required": ["message"] - } - } - }, - "required": ["status", "validation_records"] - }, - "ownership_verification": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["type", "name", "value"] - }, - "custom_origin_server": { - "type": "string" - }, - "verification_errors": { - "type": "array", - "items": { - "type": "string" - } - }, - "status": { - "type": "string" - } - }, - "required": [ - "id", - "hostname", - "ssl", - "ownership_verification", - "custom_origin_server", - "status" - ] - } - }, - "required": ["success", "errors", "messages", "result"] - } - }, - "required": ["status", "custom_hostname", "data"] + "$ref": "#/components/schemas/UpdateCustomHostnameResponse" } } } @@ -5197,9 +2745,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["custom_domain_write"] } ], "summary": "[Beta] Attempts to verify the DNS configuration for project's custom hostname configuration", @@ -5211,6 +2756,7 @@ } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -5238,126 +2784,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "1_not_started", - "2_initiated", - "3_challenge_verified", - "4_origin_setup_completed", - "5_services_reconfigured" - ] - }, - "custom_hostname": { - "type": "string" - }, - "data": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "errors": { - "type": "array", - "items": { - "description": "Any JSON-serializable value" - } - }, - "messages": { - "type": "array", - "items": { - "description": "Any JSON-serializable value" - } - }, - "result": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "hostname": { - "type": "string" - }, - "ssl": { - "type": "object", - "properties": { - "status": { - "type": "string" - }, - "validation_records": { - "type": "array", - "items": { - "type": "object", - "properties": { - "txt_name": { - "type": "string" - }, - "txt_value": { - "type": "string" - } - }, - "required": ["txt_name", "txt_value"] - } - }, - "validation_errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "required": ["message"] - } - } - }, - "required": ["status", "validation_records"] - }, - "ownership_verification": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": ["type", "name", "value"] - }, - "custom_origin_server": { - "type": "string" - }, - "verification_errors": { - "type": "array", - "items": { - "type": "string" - } - }, - "status": { - "type": "string" - } - }, - "required": [ - "id", - "hostname", - "ssl", - "ownership_verification", - "custom_origin_server", - "status" - ] - } - }, - "required": ["success", "errors", "messages", "result"] - } - }, - "required": ["status", "custom_hostname", "data"] + "$ref": "#/components/schemas/UpdateCustomHostnameResponse" } } } @@ -5378,9 +2805,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["custom_domain_write"] } ], "summary": "[Beta] Activates a custom hostname for a project.", @@ -5392,6 +2816,7 @@ } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -5419,9 +2844,7 @@ "content": { "application/json": { "schema": { - "discriminator": { - "propertyName": "state" - }, + "$schema": "https://json-schema.org/draft/2020-12/schema", "oneOf": [ { "type": "object", @@ -5434,21 +2857,27 @@ "type": "boolean" } }, - "required": ["state"] + "required": ["state"], + "additionalProperties": false }, { "type": "object", "properties": { "state": { "type": "string", - "enum": ["unavailable"] + "const": "unavailable" }, "unavailableReason": { "type": "string", - "enum": ["postgres_upgrade_required", "temporarily_unavailable"] + "enum": [ + "postgres_upgrade_required", + "ssl_enforcement_required", + "temporarily_unavailable" + ] } }, - "required": ["state", "unavailableReason"] + "required": ["state", "unavailableReason"], + "additionalProperties": false } ] } @@ -5471,9 +2900,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["project_admin_read"] } ], "summary": "[Beta] Get project's temporary access configuration.", @@ -5485,6 +2911,7 @@ } ], "x-endpoint-owners": ["security", "management-api"], + "x-fga-permissions": [["project_admin_read"]], "x-oauth-scope": "database:read" }, "put": { @@ -5509,17 +2936,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "state": { - "type": "string", - "enum": ["enabled", "disabled"] - } - }, - "required": ["state"], - "example": { - "state": "enabled" - } + "$ref": "#/components/schemas/JitAccessRequestRequest" } } } @@ -5530,9 +2947,7 @@ "content": { "application/json": { "schema": { - "discriminator": { - "propertyName": "state" - }, + "$schema": "https://json-schema.org/draft/2020-12/schema", "oneOf": [ { "type": "object", @@ -5545,21 +2960,27 @@ "type": "boolean" } }, - "required": ["state"] + "required": ["state"], + "additionalProperties": false }, { "type": "object", "properties": { "state": { "type": "string", - "enum": ["unavailable"] + "const": "unavailable" }, "unavailableReason": { "type": "string", - "enum": ["postgres_upgrade_required", "temporarily_unavailable"] + "enum": [ + "postgres_upgrade_required", + "ssl_enforcement_required", + "temporarily_unavailable" + ] } }, - "required": ["state", "unavailableReason"] + "required": ["state", "unavailableReason"], + "additionalProperties": false } ] } @@ -5582,9 +3003,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["project_admin_write"] } ], "summary": "[Beta] Update project's temporary access configuration.", @@ -5596,6 +3014,7 @@ } ], "x-endpoint-owners": ["security", "management-api"], + "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "database:write" } }, @@ -5623,16 +3042,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "banned_ipv4_addresses": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["banned_ipv4_addresses"] + "$ref": "#/components/schemas/NetworkBanResponse" } } } @@ -5653,9 +3063,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_network_bans_read"] } ], "summary": "[Beta] Gets project's network bans", @@ -5667,6 +3074,7 @@ } ], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["database_network_bans_read"]], "x-oauth-scope": "projects:read" } }, @@ -5694,28 +3102,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "banned_ipv4_addresses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "banned_address": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": ["banned_address", "identifier", "type"] - } - } - }, - "required": ["banned_ipv4_addresses"] + "$ref": "#/components/schemas/NetworkBanResponseEnriched" } } } @@ -5736,9 +3123,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_network_bans_read"] } ], "summary": "[Beta] Gets project's network bans with additional information about which databases they affect", @@ -5750,6 +3134,7 @@ } ], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["database_network_bans_read"]], "x-oauth-scope": "projects:read" } }, @@ -5776,29 +3161,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "ipv4_addresses": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of IP addresses to unban." - }, - "requester_ip": { - "default": false, - "type": "boolean", - "description": "Include requester's public IP in the list of addresses to unban." - }, - "identifier": { - "type": "string" - } - }, - "required": ["ipv4_addresses"], - "example": { - "ipv4_addresses": ["203.0.113.10"], - "requester_ip": false - } + "$ref": "#/components/schemas/RemoveNetworkBanRequest" } } } @@ -5823,9 +3186,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_network_bans_write"] } ], "summary": "[Beta] Remove network bans.", @@ -5837,6 +3197,7 @@ } ], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["database_network_bans_write"]], "x-oauth-scope": "projects:write" } }, @@ -5864,66 +3225,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "entitlement": { - "type": "string", - "enum": ["disallowed", "allowed"] - }, - "config": { - "type": "object", - "properties": { - "dbAllowedCidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "dbAllowedCidrsV6": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." - }, - "old_config": { - "type": "object", - "properties": { - "dbAllowedCidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "dbAllowedCidrsV6": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "example": { - "dbAllowedCidrs": ["203.0.113.0/24"], - "dbAllowedCidrsV6": ["2001:db8::/32"] - }, - "description": "Populated when a new config has been received, but not registered as successfully applied to a project." - }, - "status": { - "type": "string", - "enum": ["stored", "applied"] - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "applied_at": { - "type": "string", - "format": "date-time" - } - }, - "required": ["entitlement", "config", "status"] + "$ref": "#/components/schemas/NetworkRestrictionsResponse" } } } @@ -5944,9 +3246,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_network_restrictions_read"] } ], "summary": "[Beta] Gets project's network restrictions", @@ -5958,6 +3257,7 @@ } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_network_restrictions_read"]], "x-oauth-scope": "projects:read" }, "patch": { @@ -5982,51 +3282,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "add": { - "type": "object", - "properties": { - "dbAllowedCidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "dbAllowedCidrsV6": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "remove": { - "type": "object", - "properties": { - "dbAllowedCidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "dbAllowedCidrsV6": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "example": { - "add": { - "dbAllowedCidrs": ["203.0.113.0/24"] - }, - "remove": { - "dbAllowedCidrs": ["198.51.100.0/24"] - } - } + "$ref": "#/components/schemas/NetworkRestrictionsPatchRequest" } } } @@ -6037,70 +3293,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "entitlement": { - "type": "string", - "enum": ["disallowed", "allowed"] - }, - "config": { - "type": "object", - "properties": { - "dbAllowedCidrs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["v4", "v6"] - } - }, - "required": ["address", "type"] - } - } - }, - "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." - }, - "old_config": { - "type": "object", - "properties": { - "dbAllowedCidrs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["v4", "v6"] - } - }, - "required": ["address", "type"] - } - } - }, - "description": "Populated when a new config has been received, but not registered as successfully applied to a project." - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "applied_at": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string", - "enum": ["stored", "applied"] - } - }, - "required": ["entitlement", "config", "status"] + "$ref": "#/components/schemas/NetworkRestrictionsV2Response" } } } @@ -6121,9 +3314,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_network_restrictions_write"] } ], "summary": "[Alpha] Updates project's network restrictions by adding or removing CIDRs", @@ -6135,6 +3325,7 @@ } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_network_restrictions_write"]], "x-oauth-scope": "projects:write" } }, @@ -6161,25 +3352,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "dbAllowedCidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "dbAllowedCidrsV6": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "example": { - "dbAllowedCidrs": ["203.0.113.0/24"], - "dbAllowedCidrsV6": ["2001:db8::/32"] - } + "$ref": "#/components/schemas/NetworkRestrictionsRequest" } } } @@ -6190,66 +3363,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "entitlement": { - "type": "string", - "enum": ["disallowed", "allowed"] - }, - "config": { - "type": "object", - "properties": { - "dbAllowedCidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "dbAllowedCidrsV6": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." - }, - "old_config": { - "type": "object", - "properties": { - "dbAllowedCidrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "dbAllowedCidrsV6": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "example": { - "dbAllowedCidrs": ["203.0.113.0/24"], - "dbAllowedCidrsV6": ["2001:db8::/32"] - }, - "description": "Populated when a new config has been received, but not registered as successfully applied to a project." - }, - "status": { - "type": "string", - "enum": ["stored", "applied"] - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "applied_at": { - "type": "string", - "format": "date-time" - } - }, - "required": ["entitlement", "config", "status"] + "$ref": "#/components/schemas/NetworkRestrictionsResponse" } } } @@ -6270,9 +3384,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_network_restrictions_write"] } ], "summary": "[Beta] Updates project's network restrictions", @@ -6284,6 +3395,7 @@ } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_network_restrictions_write"]], "x-oauth-scope": "projects:write" } }, @@ -6311,13 +3423,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "root_key": { - "type": "string" - } - }, - "required": ["root_key"] + "$ref": "#/components/schemas/PgsodiumConfigResponse" } } } @@ -6338,9 +3444,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["project_admin_write"] } ], "summary": "[Beta] Gets project's pgsodium config", @@ -6352,6 +3455,7 @@ } ], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "secrets:read" }, "put": { @@ -6376,16 +3480,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "root_key": { - "type": "string" - } - }, - "required": ["root_key"], - "example": { - "root_key": "MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=" - } + "$ref": "#/components/schemas/UpdatePgsodiumConfigBody" } } } @@ -6396,13 +3491,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "root_key": { - "type": "string" - } - }, - "required": ["root_key"] + "$ref": "#/components/schemas/PgsodiumConfigResponse" } } } @@ -6423,9 +3512,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["project_admin_write"] } ], "summary": "[Beta] Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.", @@ -6437,6 +3523,7 @@ } ], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "secrets:write" } }, @@ -6464,38 +3551,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "db_schema": { - "type": "string" - }, - "max_rows": { - "type": "integer" - }, - "db_extra_search_path": { - "type": "string" - }, - "db_pool": { - "type": "integer", - "nullable": true, - "description": "If `null`, the value is automatically configured based on compute size." - }, - "db_pool_acquisition_timeout": { - "type": "integer", - "nullable": true, - "description": "If `null`, the value is automatically configured to 10." - }, - "jwt_secret": { - "type": "string" - } - }, - "required": [ - "db_schema", - "max_rows", - "db_extra_search_path", - "db_pool", - "db_pool_acquisition_timeout" - ] + "$ref": "#/components/schemas/PostgrestConfigWithJWTSecretResponse" } } } @@ -6516,9 +3572,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["data_api_config_read"] } ], "summary": "Gets project's postgrest config", @@ -6530,6 +3583,7 @@ } ], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["data_api_config_read"]], "x-oauth-scope": "rest:read" }, "patch": { @@ -6554,35 +3608,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "db_extra_search_path": { - "type": "string" - }, - "db_schema": { - "type": "string" - }, - "max_rows": { - "type": "integer", - "minimum": 0, - "maximum": 1000000 - }, - "db_pool": { - "type": "integer", - "minimum": 0, - "maximum": 1000 - }, - "db_pool_acquisition_timeout": { - "type": "integer", - "minimum": 0, - "maximum": 60 - } - }, - "example": { - "db_schema": "public,storage", - "db_pool": 20, - "max_rows": 1000 - } + "$ref": "#/components/schemas/V1UpdatePostgrestConfigBody" } } } @@ -6593,35 +3619,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "db_schema": { - "type": "string" - }, - "max_rows": { - "type": "integer" - }, - "db_extra_search_path": { - "type": "string" - }, - "db_pool": { - "type": "integer", - "nullable": true, - "description": "If `null`, the value is automatically configured based on compute size." - }, - "db_pool_acquisition_timeout": { - "type": "integer", - "nullable": true, - "description": "If `null`, the value is automatically configured to 10." - } - }, - "required": [ - "db_schema", - "max_rows", - "db_extra_search_path", - "db_pool", - "db_pool_acquisition_timeout" - ] + "$ref": "#/components/schemas/V1PostgrestConfigResponse" } } } @@ -6642,9 +3640,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["data_api_config_write"] } ], "summary": "Updates project's postgrest config", @@ -6656,6 +3651,7 @@ } ], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["data_api_config_write"]], "x-oauth-scope": "rest:write" } }, @@ -6683,98 +3679,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "deprecated": true, - "description": "Deprecated: Use `ref` instead." - }, - "ref": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - }, - "organization_id": { - "type": "string", - "description": "Deprecated: Use `organization_slug` instead.", - "deprecated": true - }, - "organization_slug": { - "type": "string", - "pattern": "^[\\w-]+$", - "description": "Organization slug", - "example": "tsrqponmlkjihgfedcba" - }, - "name": { - "type": "string", - "description": "Name of your project" - }, - "region": { - "type": "string", - "description": "Region of your project" - }, - "created_at": { - "type": "string", - "description": "Creation timestamp" - }, - "status": { - "type": "string", - "enum": [ - "INACTIVE", - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "UNKNOWN", - "GOING_DOWN", - "INIT_FAILED", - "REMOVED", - "RESTORING", - "UPGRADING", - "PAUSING", - "RESTORE_FAILED", - "RESTARTING", - "PAUSE_FAILED", - "RESIZING" - ] - }, - "database": { - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "Database host" - }, - "version": { - "type": "string", - "description": "Database version" - }, - "postgres_engine": { - "type": "string", - "description": "Database engine" - }, - "release_channel": { - "type": "string", - "description": "Release channel" - } - }, - "required": ["host", "version", "postgres_engine", "release_channel"] - } - }, - "required": [ - "id", - "ref", - "organization_id", - "organization_slug", - "name", - "region", - "created_at", - "status", - "database" - ] + "$ref": "#/components/schemas/V1ProjectWithDatabaseResponse" } } } @@ -6795,9 +3700,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["project_admin_read"] } ], "summary": "Gets a specific project that belongs to the authenticated user", @@ -6809,6 +3711,7 @@ } ], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["project_admin_read"]], "x-oauth-scope": "projects:read" }, "delete": { @@ -6834,19 +3737,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "ref": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["id", "ref", "name"] + "$ref": "#/components/schemas/V1ProjectRefResponse" } } } @@ -6864,9 +3755,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["project_admin_write"] } ], "summary": "Deletes the given project", @@ -6878,6 +3766,7 @@ } ], "x-endpoint-owners": ["management-api", "infra", "dev-workflows"], + "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" }, "patch": { @@ -6902,18 +3791,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1, - "maxLength": 256 - } - }, - "required": ["name"], - "example": { - "name": "Acme Platform" - } + "$ref": "#/components/schemas/V1UpdateProjectBody" } } } @@ -6924,19 +3802,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "ref": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["id", "ref", "name"] + "$ref": "#/components/schemas/V1ProjectRefResponse" } } } @@ -6957,9 +3823,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["project_admin_write"] } ], "summary": "Updates the given project", @@ -6971,6 +3834,7 @@ } ], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -7001,19 +3865,7 @@ "schema": { "type": "array", "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["name", "value"] + "$ref": "#/components/schemas/SecretResponse" } } } @@ -7035,9 +3887,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["edge_functions_secrets_read"] } ], "summary": "List all secrets", @@ -7049,6 +3898,7 @@ } ], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_secrets_read"]], "x-oauth-scope": "secrets:read" }, "post": { @@ -7074,33 +3924,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 256, - "pattern": "^(?!SUPABASE_).*", - "description": "Secret name must not start with the SUPABASE_ prefix." - }, - "value": { - "type": "string", - "maxLength": 24576 - } - }, - "required": ["name", "value"] - }, - "example": [ - { - "name": "OPENAI_API_KEY", - "value": "sk-example-secret" - }, - { - "name": "STRIPE_WEBHOOK_SECRET", - "value": "whsec_example" - } - ] + "$ref": "#/components/schemas/CreateSecretBody" } } } @@ -7125,9 +3949,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["edge_functions_secrets_write"] } ], "summary": "Bulk create secrets", @@ -7139,6 +3960,7 @@ } ], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_secrets_write"]], "x-oauth-scope": "secrets:write" }, "delete": { @@ -7164,11 +3986,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - }, - "example": ["OPENAI_API_KEY"] + "$ref": "#/components/schemas/DeleteSecretsBody" } } } @@ -7193,9 +4011,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["edge_functions_secrets_write"] } ], "summary": "Bulk delete secrets", @@ -7207,6 +4022,7 @@ } ], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_secrets_write"]], "x-oauth-scope": "secrets:write" } }, @@ -7234,22 +4050,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "currentConfig": { - "type": "object", - "properties": { - "database": { - "type": "boolean" - } - }, - "required": ["database"] - }, - "appliedSuccessfully": { - "type": "boolean" - } - }, - "required": ["currentConfig", "appliedSuccessfully"] + "$ref": "#/components/schemas/SslEnforcementResponse" } } } @@ -7270,9 +4071,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_ssl_config_read"] } ], "summary": "[Beta] Get project's SSL enforcement configuration.", @@ -7284,6 +4082,7 @@ } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_ssl_config_read"]], "x-oauth-scope": "database:read" }, "put": { @@ -7308,24 +4107,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "requestedConfig": { - "type": "object", - "properties": { - "database": { - "type": "boolean" - } - }, - "required": ["database"] - } - }, - "required": ["requestedConfig"], - "example": { - "requestedConfig": { - "database": true - } - } + "$ref": "#/components/schemas/SslEnforcementRequest" } } } @@ -7336,22 +4118,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "currentConfig": { - "type": "object", - "properties": { - "database": { - "type": "boolean" - } - }, - "required": ["database"] - }, - "appliedSuccessfully": { - "type": "boolean" - } - }, - "required": ["currentConfig", "appliedSuccessfully"] + "$ref": "#/components/schemas/SslEnforcementResponse" } } } @@ -7372,9 +4139,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_ssl_config_write"] } ], "summary": "[Beta] Update project's SSL enforcement configuration.", @@ -7386,6 +4150,7 @@ } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_ssl_config_write"]], "x-oauth-scope": "database:write" } }, @@ -7424,13 +4189,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "types": { - "type": "string" - } - }, - "required": ["types"] + "$ref": "#/components/schemas/TypescriptResponse" } } } @@ -7451,9 +4210,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_read"] } ], "summary": "Generate TypeScript types", @@ -7465,6 +4221,7 @@ } ], "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["database_read"]], "x-oauth-scope": "database:read" } }, @@ -7492,24 +4249,20 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["not-used", "custom-domain-used", "active"] - }, - "custom_domain": { - "type": "string", - "minLength": 1 - } - }, - "required": ["status"] + "$ref": "#/components/schemas/VanitySubdomainConfigResponse" } } } }, "400": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan." + "description": "This feature requires the Pro, Team, or Enterprise organization plan.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanGateErrorBody" + } + } + } }, "401": { "description": "Unauthorized" @@ -7527,9 +4280,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["vanity_subdomain_read"] } ], "summary": "[Beta] Gets current vanity subdomain config", @@ -7546,6 +4296,7 @@ } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["vanity_subdomain_read"]], "x-oauth-scope": "domains:read" }, "delete": { @@ -7585,9 +4336,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["vanity_subdomain_write"] } ], "summary": "[Beta] Deletes a project's vanity subdomain configuration", @@ -7599,6 +4347,7 @@ } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["vanity_subdomain_write"]], "x-oauth-scope": "domains:write" } }, @@ -7625,17 +4374,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "vanity_subdomain": { - "type": "string", - "maxLength": 63 - } - }, - "required": ["vanity_subdomain"], - "example": { - "vanity_subdomain": "acme-prod" - } + "$ref": "#/components/schemas/VanitySubdomainBody" } } } @@ -7646,19 +4385,20 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "available": { - "type": "boolean" - } - }, - "required": ["available"] + "$ref": "#/components/schemas/SubdomainAvailabilityResponse" } } } }, "400": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan." + "description": "This feature requires the Pro, Team, or Enterprise organization plan.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanGateErrorBody" + } + } + } }, "401": { "description": "Unauthorized" @@ -7676,9 +4416,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["vanity_subdomain_write"] } ], "summary": "[Beta] Checks vanity subdomain availability", @@ -7695,6 +4432,7 @@ } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["vanity_subdomain_write"]], "x-oauth-scope": "domains:write" } }, @@ -7721,17 +4459,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "vanity_subdomain": { - "type": "string", - "maxLength": 63 - } - }, - "required": ["vanity_subdomain"], - "example": { - "vanity_subdomain": "acme-prod" - } + "$ref": "#/components/schemas/VanitySubdomainBody" } } } @@ -7742,19 +4470,20 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "custom_domain": { - "type": "string" - } - }, - "required": ["custom_domain"] + "$ref": "#/components/schemas/ActivateVanitySubdomainResponse" } } } }, "400": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan." + "description": "This feature requires the Pro, Team, or Enterprise organization plan.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanGateErrorBody" + } + } + } }, "401": { "description": "Unauthorized" @@ -7772,9 +4501,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["vanity_subdomain_write"] } ], "summary": "[Beta] Activates a vanity subdomain for a project.", @@ -7791,6 +4517,7 @@ } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["vanity_subdomain_write"]], "x-oauth-scope": "domains:write" } }, @@ -7817,21 +4544,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "target_version": { - "type": "string" - }, - "release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - } - }, - "required": ["target_version"], - "example": { - "target_version": "17", - "release_channel": "ga" - } + "$ref": "#/components/schemas/UpgradeDatabaseBody" } } } @@ -7842,13 +4555,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "tracking_id": { - "type": "string" - } - }, - "required": ["tracking_id"] + "$ref": "#/components/schemas/ProjectUpgradeInitiateResponse" } } } @@ -7869,9 +4576,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["project_admin_write", "database_write"] } ], "summary": "[Beta] Upgrades the project's Postgres version", @@ -7883,6 +4587,7 @@ } ], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["project_admin_write", "database_write"]], "x-oauth-scope": "projects:write" } }, @@ -7910,291 +4615,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "eligible": { - "type": "boolean" - }, - "current_app_version": { - "type": "string" - }, - "current_app_version_release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, - "latest_app_version": { - "type": "string" - }, - "target_upgrade_versions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "postgres_version": { - "type": "string", - "enum": ["13", "14", "15", "17", "17-oriole"] - }, - "release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, - "app_version": { - "type": "string" - } - }, - "required": ["postgres_version", "release_channel", "app_version"] - } - }, - "duration_estimate_hours": { - "type": "number" - }, - "legacy_auth_custom_roles": { - "type": "array", - "items": { - "type": "string" - } - }, - "objects_to_be_dropped": { - "type": "array", - "items": { - "type": "string" - }, - "deprecated": true, - "description": "Use validation_errors instead." - }, - "unsupported_extensions": { - "type": "array", - "items": { - "type": "string" - }, - "deprecated": true, - "description": "Use validation_errors instead." - }, - "user_defined_objects_in_internal_schemas": { - "type": "array", - "items": { - "type": "string" - }, - "deprecated": true, - "description": "Use validation_errors instead." - }, - "validation_errors": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["objects_depending_on_pg_cron"] - }, - "dependents": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["type", "dependents"] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["indexes_referencing_ll_to_earth"] - }, - "schema_name": { - "type": "string" - }, - "table_name": { - "type": "string" - }, - "index_name": { - "type": "string" - } - }, - "required": ["type", "schema_name", "table_name", "index_name"] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["function_using_obsolete_lang"] - }, - "schema_name": { - "type": "string" - }, - "function_name": { - "type": "string" - }, - "lang_name": { - "type": "string" - } - }, - "required": ["type", "schema_name", "function_name", "lang_name"] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["unsupported_extension"] - }, - "extension_name": { - "type": "string" - } - }, - "required": ["type", "extension_name"] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["unsupported_fdw_handler"] - }, - "fdw_name": { - "type": "string" - }, - "fdw_handler_name": { - "type": "string" - } - }, - "required": ["type", "fdw_name", "fdw_handler_name"] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["unlogged_table_with_persistent_sequence"] - }, - "schema_name": { - "type": "string" - }, - "table_name": { - "type": "string" - }, - "sequence_name": { - "type": "string" - } - }, - "required": ["type", "schema_name", "table_name", "sequence_name"] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["user_defined_objects_in_internal_schemas"] - }, - "obj_type": { - "type": "string", - "enum": ["table", "function"] - }, - "schema_name": { - "type": "string" - }, - "obj_name": { - "type": "string" - } - }, - "required": ["type", "obj_type", "schema_name", "obj_name"] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["active_replication_slot"] - }, - "slot_name": { - "type": "string" - } - }, - "required": ["type", "slot_name"] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["x86_architecture"] - } - }, - "required": ["type"] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["project_hibernating"] - } - }, - "required": ["type"] - } - ] - } - }, - "warnings": { - "type": "array", - "items": { - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["pg_graphql_introspection_change"] - } - }, - "required": ["type"] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["ltree_reindex_required"] - } - }, - "required": ["type"] - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["operator_estimator_gate"] - } - }, - "required": ["type"] - } - ] - } - } - }, - "required": [ - "eligible", - "current_app_version", - "current_app_version_release_channel", - "latest_app_version", - "target_upgrade_versions", - "duration_estimate_hours", - "legacy_auth_custom_roles", - "objects_to_be_dropped", - "unsupported_extensions", - "user_defined_objects_in_internal_schemas", - "validation_errors", - "warnings" - ] + "$ref": "#/components/schemas/ProjectUpgradeEligibilityResponse" } } } @@ -8215,9 +4636,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["project_admin_read", "database_read"] } ], "summary": "[Beta] Returns the project's eligibility for upgrades", @@ -8229,6 +4647,7 @@ } ], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["project_admin_read", "database_read"]], "x-oauth-scope": "projects:read" } }, @@ -8265,59 +4684,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "databaseUpgradeStatus": { - "type": "object", - "properties": { - "initiated_at": { - "type": "string" - }, - "latest_status_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", - "9_post_physical_backup_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", - "10_completed_post_physical_backup" - ] - }, - "status": { - "type": "number" - } - }, - "required": ["initiated_at", "latest_status_at", "target_version", "status"], - "nullable": true - } - }, - "required": ["databaseUpgradeStatus"] + "$ref": "#/components/schemas/DatabaseUpgradeStatusResponse" } } } @@ -8338,9 +4705,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["project_admin_read", "database_read"] } ], "summary": "[Beta] Gets the latest status of the project's upgrade", @@ -8352,6 +4716,7 @@ } ], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["project_admin_read", "database_read"]], "x-oauth-scope": "projects:read" } }, @@ -8379,19 +4744,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "override_enabled": { - "type": "boolean" - }, - "override_active_until": { - "type": "string" - } - }, - "required": ["enabled", "override_enabled", "override_active_until"] + "$ref": "#/components/schemas/ReadOnlyStatusResponse" } } } @@ -8412,9 +4765,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_readonly_config_read"] } ], "summary": "Returns project's readonly mode status", @@ -8426,6 +4776,7 @@ } ], "x-endpoint-owners": ["management-api", "infra", "support-tooling"], + "x-fga-permissions": [["database_readonly_config_read"]], "x-oauth-scope": "database:read" } }, @@ -8467,9 +4818,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_readonly_config_write"] } ], "summary": "Disables project's readonly mode for the next 15 minutes", @@ -8481,6 +4829,7 @@ } ], "x-endpoint-owners": ["management-api", "infra", "support-tooling"], + "x-fga-permissions": [["database_readonly_config_write"]], "x-oauth-scope": "database:write" } }, @@ -8507,37 +4856,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "read_replica_region": { - "type": "string", - "enum": [ - "us-east-1", - "us-east-2", - "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-north-1", - "eu-central-1", - "eu-central-2", - "ca-central-1", - "ap-south-1", - "sa-east-1" - ], - "description": "Region you want your read replica to reside in" - } - }, - "required": ["read_replica_region"], - "example": { - "read_replica_region": "us-west-1" - } + "$ref": "#/components/schemas/SetUpReadReplicaBody" } } } @@ -8550,7 +4869,14 @@ "description": "Unauthorized" }, "402": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan." + "description": "This feature requires the Pro, Team, or Enterprise organization plan.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanGateErrorBody" + } + } + } }, "403": { "description": "Forbidden action" @@ -8565,9 +4891,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["infra_read_replicas_write"] } ], "summary": "[Beta] Set up a read replica", @@ -8579,7 +4902,8 @@ "position": "before" } ], - "x-endpoint-owners": ["management-api", "infra"] + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["infra_read_replicas_write"]] } }, "/v1/projects/{ref}/read-replicas/remove": { @@ -8605,16 +4929,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "database_identifier": { - "type": "string" - } - }, - "required": ["database_identifier"], - "example": { - "database_identifier": "abcdefghijklmnopqrst-rr-us-west-1-abcde" - } + "$ref": "#/components/schemas/RemoveReadReplicaBody" } } } @@ -8639,14 +4954,12 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["infra_read_replicas_write"] } ], "summary": "[Beta] Remove a read replica", "tags": ["Database"], - "x-endpoint-owners": ["management-api", "infra"] + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["infra_read_replicas_write"]] } }, "/v1/projects/{ref}/health": { @@ -8670,22 +4983,34 @@ "name": "services", "required": true, "in": "query", + "description": "Comma-separated list of enums or array of enums.", "schema": { - "example": ["auth", "rest"], - "type": "array", - "items": { - "type": "string", - "enum": [ - "auth", - "db", - "db_postgres_user", - "pooler", - "realtime", - "rest", - "storage", - "pg_bouncer" - ] - } + "example": ["auth,db", "auth"], + "anyOf": [ + { + "type": "string", + "description": "Comma-separated list of enums:\n\n- `auth`\n- `db`\n- `db_postgres_user`\n- `pooler`\n- `realtime`\n- `rest`\n- `storage`\n- `pg_bouncer`", + "example": ["auth,db", "auth"] + }, + { + "type": "array", + "items": { + "type": "string", + "enum": [ + "auth", + "db", + "db_postgres_user", + "pooler", + "realtime", + "rest", + "storage", + "pg_bouncer" + ] + }, + "description": "Array of enums.", + "example": ["{field}=auth&{field}=db", "{field}=auth"] + } + ] } }, { @@ -8708,89 +5033,7 @@ "schema": { "type": "array", "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": [ - "auth", - "db", - "db_postgres_user", - "pooler", - "realtime", - "rest", - "storage", - "pg_bouncer" - ] - }, - "healthy": { - "type": "boolean", - "deprecated": true, - "description": "Deprecated. Use `status` instead." - }, - "status": { - "type": "string", - "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"] - }, - "info": { - "oneOf": [ - { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": ["GoTrue"] - }, - "version": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": ["name", "version", "description"] - }, - { - "type": "object", - "properties": { - "healthy": { - "type": "boolean", - "deprecated": true, - "description": "Deprecated. Use `status` instead." - }, - "db_connected": { - "type": "boolean" - }, - "replication_connected": { - "type": "boolean" - }, - "connected_cluster": { - "type": "integer" - } - }, - "required": [ - "healthy", - "db_connected", - "replication_connected", - "connected_cluster" - ] - }, - { - "type": "object", - "properties": { - "db_schema": { - "type": "string" - } - }, - "required": ["db_schema"] - } - ] - }, - "error": { - "type": "string" - } - }, - "required": ["name", "healthy", "status"] + "$ref": "#/components/schemas/V1ServiceHealthResponse" } } } @@ -8812,9 +5055,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["project_admin_read"] } ], "summary": "Gets project's service health status", @@ -8826,6 +5066,7 @@ } ], "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["project_admin_read"]], "x-oauth-scope": "projects:read" } }, @@ -8853,34 +5094,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "algorithm": { - "type": "string", - "enum": ["EdDSA", "ES256", "RS256", "HS256"] - }, - "status": { - "type": "string", - "enum": ["in_use", "previously_used", "revoked", "standby"] - }, - "public_jwk": { - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - } - }, - "required": ["id", "algorithm", "status", "created_at", "updated_at"], - "additionalProperties": false + "$ref": "#/components/schemas/SigningKeyResponse" } } } @@ -8898,9 +5112,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["auth_signing_keys_write"] } ], "summary": "Set up the project's existing JWT secret as an in_use JWT signing key. This endpoint will be removed in the future always check for HTTP 404 Not Found.", @@ -8912,6 +5123,7 @@ } ], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" }, "get": { @@ -8937,34 +5149,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "algorithm": { - "type": "string", - "enum": ["EdDSA", "ES256", "RS256", "HS256"] - }, - "status": { - "type": "string", - "enum": ["in_use", "previously_used", "revoked", "standby"] - }, - "public_jwk": { - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - } - }, - "required": ["id", "algorithm", "status", "created_at", "updated_at"], - "additionalProperties": false + "$ref": "#/components/schemas/SigningKeyResponse" } } } @@ -8982,9 +5167,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["auth_signing_keys_read"] } ], "summary": "Get the signing key information for the JWT secret imported as signing key for this project. This endpoint will be removed in the future, check for HTTP 404 Not Found.", @@ -8996,6 +5178,7 @@ } ], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_signing_keys_read"]], "x-oauth-scope": "secrets:read" } }, @@ -9022,226 +5205,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "algorithm": { - "type": "string", - "enum": ["EdDSA", "ES256", "RS256", "HS256"] - }, - "status": { - "type": "string", - "enum": ["in_use", "standby"] - }, - "private_jwk": { - "discriminator": { - "propertyName": "kty" - }, - "oneOf": [ - { - "type": "object", - "properties": { - "kid": { - "type": "string", - "format": "uuid" - }, - "use": { - "type": "string", - "enum": ["sig"] - }, - "key_ops": { - "type": "array", - "items": { - "type": "string", - "enum": ["sign", "verify"] - }, - "minItems": 2, - "maxItems": 2 - }, - "ext": { - "type": "boolean", - "enum": [true] - }, - "kty": { - "type": "string", - "enum": ["RSA"] - }, - "alg": { - "type": "string", - "enum": ["RS256"] - }, - "n": { - "type": "string" - }, - "e": { - "type": "string", - "enum": ["AQAB"] - }, - "d": { - "type": "string" - }, - "p": { - "type": "string" - }, - "q": { - "type": "string" - }, - "dp": { - "type": "string" - }, - "dq": { - "type": "string" - }, - "qi": { - "type": "string" - } - }, - "required": ["kty", "n", "e", "d", "p", "q", "dp", "dq", "qi"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "kid": { - "type": "string", - "format": "uuid" - }, - "use": { - "type": "string", - "enum": ["sig"] - }, - "key_ops": { - "type": "array", - "items": { - "type": "string", - "enum": ["sign", "verify"] - }, - "minItems": 2, - "maxItems": 2 - }, - "ext": { - "type": "boolean", - "enum": [true] - }, - "kty": { - "type": "string", - "enum": ["EC"] - }, - "alg": { - "type": "string", - "enum": ["ES256"] - }, - "crv": { - "type": "string", - "enum": ["P-256"] - }, - "x": { - "type": "string" - }, - "y": { - "type": "string" - }, - "d": { - "type": "string" - } - }, - "required": ["kty", "crv", "x", "y", "d"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "kid": { - "type": "string", - "format": "uuid" - }, - "use": { - "type": "string", - "enum": ["sig"] - }, - "key_ops": { - "type": "array", - "items": { - "type": "string", - "enum": ["sign", "verify"] - }, - "minItems": 2, - "maxItems": 2 - }, - "ext": { - "type": "boolean", - "enum": [true] - }, - "kty": { - "type": "string", - "enum": ["OKP"] - }, - "alg": { - "type": "string", - "enum": ["EdDSA"] - }, - "crv": { - "type": "string", - "enum": ["Ed25519"] - }, - "x": { - "type": "string" - }, - "d": { - "type": "string" - } - }, - "required": ["kty", "crv", "x", "d"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "kid": { - "type": "string", - "format": "uuid" - }, - "use": { - "type": "string", - "enum": ["sig"] - }, - "key_ops": { - "type": "array", - "items": { - "type": "string", - "enum": ["sign", "verify"] - }, - "minItems": 2, - "maxItems": 2 - }, - "ext": { - "type": "boolean", - "enum": [true] - }, - "kty": { - "type": "string", - "enum": ["oct"] - }, - "alg": { - "type": "string", - "enum": ["HS256"] - }, - "k": { - "type": "string", - "minLength": 16 - } - }, - "required": ["kty", "k"], - "additionalProperties": false - } - ] - } - }, - "required": ["algorithm"], - "additionalProperties": false, - "example": { - "algorithm": "RS256", - "status": "standby" - } + "$ref": "#/components/schemas/CreateSigningKeyBody" } } } @@ -9252,34 +5216,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "algorithm": { - "type": "string", - "enum": ["EdDSA", "ES256", "RS256", "HS256"] - }, - "status": { - "type": "string", - "enum": ["in_use", "previously_used", "revoked", "standby"] - }, - "public_jwk": { - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - } - }, - "required": ["id", "algorithm", "status", "created_at", "updated_at"], - "additionalProperties": false + "$ref": "#/components/schemas/SigningKeyResponse" } } } @@ -9297,9 +5234,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["auth_signing_keys_write"] } ], "summary": "Create a new signing key for the project in standby status", @@ -9311,6 +5245,7 @@ } ], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" }, "get": { @@ -9336,44 +5271,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "algorithm": { - "type": "string", - "enum": ["EdDSA", "ES256", "RS256", "HS256"] - }, - "status": { - "type": "string", - "enum": ["in_use", "previously_used", "revoked", "standby"] - }, - "public_jwk": { - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - } - }, - "required": ["id", "algorithm", "status", "created_at", "updated_at"], - "additionalProperties": false - } - } - }, - "required": ["keys"], - "additionalProperties": false + "$ref": "#/components/schemas/SigningKeysResponse" } } } @@ -9391,9 +5289,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["auth_signing_keys_read"] } ], "summary": "List all signing keys for the project", @@ -9405,6 +5300,7 @@ } ], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_signing_keys_read"]], "x-oauth-scope": "secrets:read" } }, @@ -9418,6 +5314,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "33333333-3333-4333-8333-333333333333", "type": "string" } @@ -9442,34 +5339,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "algorithm": { - "type": "string", - "enum": ["EdDSA", "ES256", "RS256", "HS256"] - }, - "status": { - "type": "string", - "enum": ["in_use", "previously_used", "revoked", "standby"] - }, - "public_jwk": { - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - } - }, - "required": ["id", "algorithm", "status", "created_at", "updated_at"], - "additionalProperties": false + "$ref": "#/components/schemas/SigningKeyResponse" } } } @@ -9487,14 +5357,12 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["auth_signing_keys_read"] } ], "summary": "Get information about a signing key", "tags": ["Auth"], - "x-endpoint-owners": ["auth"] + "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_signing_keys_read"]] }, "delete": { "operationId": "v1-remove-project-signing-key", @@ -9505,6 +5373,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "33333333-3333-4333-8333-333333333333", "type": "string" } @@ -9529,34 +5398,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "algorithm": { - "type": "string", - "enum": ["EdDSA", "ES256", "RS256", "HS256"] - }, - "status": { - "type": "string", - "enum": ["in_use", "previously_used", "revoked", "standby"] - }, - "public_jwk": { - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - } - }, - "required": ["id", "algorithm", "status", "created_at", "updated_at"], - "additionalProperties": false + "$ref": "#/components/schemas/SigningKeyResponse" } } } @@ -9574,9 +5416,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["auth_signing_keys_write"] } ], "summary": "Remove a signing key from a project. Only possible if the key has been in revoked status for a while.", @@ -9588,6 +5427,7 @@ } ], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" }, "patch": { @@ -9599,6 +5439,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "33333333-3333-4333-8333-333333333333", "type": "string" } @@ -9622,18 +5463,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": ["in_use", "previously_used", "revoked", "standby"] - } - }, - "required": ["status"], - "additionalProperties": false, - "example": { - "status": "standby" - } + "$ref": "#/components/schemas/UpdateSigningKeyBody" } } } @@ -9644,34 +5474,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "algorithm": { - "type": "string", - "enum": ["EdDSA", "ES256", "RS256", "HS256"] - }, - "status": { - "type": "string", - "enum": ["in_use", "previously_used", "revoked", "standby"] - }, - "public_jwk": { - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - } - }, - "required": ["id", "algorithm", "status", "created_at", "updated_at"], - "additionalProperties": false + "$ref": "#/components/schemas/SigningKeyResponse" } } } @@ -9689,9 +5492,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["auth_signing_keys_write"] } ], "summary": "Update a signing key, mainly its status", @@ -9703,6 +5503,7 @@ } ], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -9730,3872 +5531,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "api_max_request_duration": { - "type": "integer", - "nullable": true - }, - "db_max_pool_size": { - "type": "integer", - "nullable": true - }, - "db_max_pool_size_unit": { - "type": "string", - "enum": ["connections", "percent"], - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_linkedin_oidc_enabled": { - "type": "boolean", - "nullable": true - }, - "external_linkedin_oidc_secret": { - "type": "string", - "nullable": true - }, - "external_slack_oidc_client_id": { - "type": "string", - "nullable": true - }, - "external_slack_oidc_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_slack_oidc_enabled": { - "type": "boolean", - "nullable": true - }, - "external_slack_oidc_secret": { - "type": "string", - "nullable": true - }, - "external_notion_client_id": { - "type": "string", - "nullable": true - }, - "external_notion_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_twitter_enabled": { - "type": "boolean", - "nullable": true - }, - "external_twitter_secret": { - "type": "string", - "nullable": true - }, - "external_x_client_id": { - "type": "string", - "nullable": true - }, - "external_x_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_x_enabled": { - "type": "boolean", - "nullable": true - }, - "external_x_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_web3_solana_enabled": { - "type": "boolean", - "nullable": true - }, - "external_web3_ethereum_enabled": { - "type": "boolean", - "nullable": true - }, - "external_zoom_client_id": { - "type": "string", - "nullable": true - }, - "external_zoom_email_optional": { - "type": "boolean", - "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 - }, - "hook_before_user_created_enabled": { - "type": "boolean", - "nullable": true - }, - "hook_before_user_created_uri": { - "type": "string", - "nullable": true - }, - "hook_before_user_created_secrets": { - "type": "string", - "nullable": true - }, - "hook_after_user_created_enabled": { - "type": "boolean", - "nullable": true - }, - "hook_after_user_created_uri": { - "type": "string", - "nullable": true - }, - "hook_after_user_created_secrets": { - "type": "string", - "nullable": true - }, - "jwt_exp": { - "type": "integer", - "nullable": true - }, - "mailer_allow_unverified_email_sign_ins": { - "type": "boolean", - "nullable": true - }, - "mailer_autoconfirm": { - "type": "boolean", - "nullable": true - }, - "mailer_otp_exp": { - "type": "integer" - }, - "mailer_otp_length": { - "type": "integer", - "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_subjects_password_changed_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_email_changed_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_phone_changed_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_mfa_factor_enrolled_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_mfa_factor_unenrolled_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_identity_linked_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_identity_unlinked_notification": { - "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 - }, - "mailer_templates_password_changed_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_email_changed_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_phone_changed_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_mfa_factor_enrolled_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_mfa_factor_unenrolled_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_identity_linked_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_identity_unlinked_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_notifications_password_changed_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_email_changed_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_phone_changed_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_mfa_factor_enrolled_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_mfa_factor_unenrolled_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_identity_linked_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_identity_unlinked_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_max_enrolled_factors": { - "type": "integer", - "nullable": true - }, - "mfa_totp_enroll_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_totp_verify_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_phone_enroll_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_phone_verify_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_web_authn_enroll_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_web_authn_verify_enabled": { - "type": "boolean", - "nullable": true - }, - "passkey_enabled": { - "type": "boolean" - }, - "webauthn_rp_display_name": { - "type": "string", - "nullable": true - }, - "webauthn_rp_id": { - "type": "string", - "nullable": true - }, - "webauthn_rp_origins": { - "type": "string", - "nullable": true - }, - "mfa_phone_otp_length": { - "type": "integer" - }, - "mfa_phone_template": { - "type": "string", - "nullable": true - }, - "mfa_phone_max_frequency": { - "type": "integer", - "nullable": true - }, - "nimbus_oauth_client_id": { - "type": "string", - "nullable": true - }, - "nimbus_oauth_email_optional": { - "type": "boolean", - "nullable": true - }, - "nimbus_oauth_client_secret": { - "type": "string", - "nullable": true - }, - "password_hibp_enabled": { - "type": "boolean", - "nullable": true - }, - "password_min_length": { - "type": "integer", - "nullable": true - }, - "password_required_characters": { - "type": "string", - "enum": [ - "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", - "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", - "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", - "" - ], - "nullable": true - }, - "rate_limit_anonymous_users": { - "type": "integer", - "nullable": true - }, - "rate_limit_email_sent": { - "type": "integer", - "nullable": true - }, - "rate_limit_sms_sent": { - "type": "integer", - "nullable": true - }, - "rate_limit_token_refresh": { - "type": "integer", - "nullable": true - }, - "rate_limit_verify": { - "type": "integer", - "nullable": true - }, - "rate_limit_otp": { - "type": "integer", - "nullable": true - }, - "rate_limit_web3": { - "type": "integer", - "nullable": true - }, - "refresh_token_rotation_enabled": { - "type": "boolean", - "nullable": true - }, - "saml_enabled": { - "type": "boolean", - "nullable": true - }, - "saml_external_url": { - "type": "string", - "nullable": true - }, - "saml_allow_encrypted_assertions": { - "type": "boolean", - "nullable": true - }, - "security_sb_forwarded_for_enabled": { - "type": "boolean", - "nullable": true - }, - "security_captcha_enabled": { - "type": "boolean", - "nullable": true - }, - "security_captcha_provider": { - "type": "string", - "enum": ["turnstile", "hcaptcha"], - "nullable": true - }, - "security_captcha_secret": { - "type": "string", - "nullable": true - }, - "security_manual_linking_enabled": { - "type": "boolean", - "nullable": true - }, - "security_refresh_token_reuse_interval": { - "type": "integer", - "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": "integer", - "nullable": true - }, - "sms_messagebird_access_key": { - "type": "string", - "nullable": true - }, - "sms_messagebird_originator": { - "type": "string", - "nullable": true - }, - "sms_otp_exp": { - "type": "integer", - "nullable": true - }, - "sms_otp_length": { - "type": "integer" - }, - "sms_provider": { - "type": "string", - "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], - "nullable": true - }, - "sms_template": { - "type": "string", - "nullable": true - }, - "sms_test_otp": { - "type": "string", - "nullable": true - }, - "sms_test_otp_valid_until": { - "type": "string", - "format": "date-time", - "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", - "format": "email", - "nullable": true - }, - "smtp_host": { - "type": "string", - "nullable": true - }, - "smtp_max_frequency": { - "type": "integer", - "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 - }, - "oauth_server_enabled": { - "type": "boolean" - }, - "oauth_server_allow_dynamic_registration": { - "type": "boolean" - }, - "oauth_server_authorization_path": { - "type": "string", - "nullable": true - }, - "custom_oauth_enabled": { - "type": "boolean" - }, - "custom_oauth_max_providers": { - "type": "integer" - } - }, - "required": [ - "api_max_request_duration", - "db_max_pool_size", - "db_max_pool_size_unit", - "disable_signup", - "external_anonymous_users_enabled", - "external_apple_additional_client_ids", - "external_apple_client_id", - "external_apple_email_optional", - "external_apple_enabled", - "external_apple_secret", - "external_azure_client_id", - "external_azure_email_optional", - "external_azure_enabled", - "external_azure_secret", - "external_azure_url", - "external_bitbucket_client_id", - "external_bitbucket_email_optional", - "external_bitbucket_enabled", - "external_bitbucket_secret", - "external_discord_client_id", - "external_discord_email_optional", - "external_discord_enabled", - "external_discord_secret", - "external_email_enabled", - "external_facebook_client_id", - "external_facebook_email_optional", - "external_facebook_enabled", - "external_facebook_secret", - "external_figma_client_id", - "external_figma_email_optional", - "external_figma_enabled", - "external_figma_secret", - "external_github_client_id", - "external_github_email_optional", - "external_github_enabled", - "external_github_secret", - "external_gitlab_client_id", - "external_gitlab_email_optional", - "external_gitlab_enabled", - "external_gitlab_secret", - "external_gitlab_url", - "external_google_additional_client_ids", - "external_google_client_id", - "external_google_email_optional", - "external_google_enabled", - "external_google_secret", - "external_google_skip_nonce_check", - "external_kakao_client_id", - "external_kakao_email_optional", - "external_kakao_enabled", - "external_kakao_secret", - "external_keycloak_client_id", - "external_keycloak_email_optional", - "external_keycloak_enabled", - "external_keycloak_secret", - "external_keycloak_url", - "external_linkedin_oidc_client_id", - "external_linkedin_oidc_email_optional", - "external_linkedin_oidc_enabled", - "external_linkedin_oidc_secret", - "external_slack_oidc_client_id", - "external_slack_oidc_email_optional", - "external_slack_oidc_enabled", - "external_slack_oidc_secret", - "external_notion_client_id", - "external_notion_email_optional", - "external_notion_enabled", - "external_notion_secret", - "external_phone_enabled", - "external_slack_client_id", - "external_slack_email_optional", - "external_slack_enabled", - "external_slack_secret", - "external_spotify_client_id", - "external_spotify_email_optional", - "external_spotify_enabled", - "external_spotify_secret", - "external_twitch_client_id", - "external_twitch_email_optional", - "external_twitch_enabled", - "external_twitch_secret", - "external_twitter_client_id", - "external_twitter_email_optional", - "external_twitter_enabled", - "external_twitter_secret", - "external_x_client_id", - "external_x_email_optional", - "external_x_enabled", - "external_x_secret", - "external_workos_client_id", - "external_workos_enabled", - "external_workos_secret", - "external_workos_url", - "external_web3_solana_enabled", - "external_web3_ethereum_enabled", - "external_zoom_client_id", - "external_zoom_email_optional", - "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", - "hook_before_user_created_enabled", - "hook_before_user_created_uri", - "hook_before_user_created_secrets", - "hook_after_user_created_enabled", - "hook_after_user_created_uri", - "hook_after_user_created_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_subjects_password_changed_notification", - "mailer_subjects_email_changed_notification", - "mailer_subjects_phone_changed_notification", - "mailer_subjects_mfa_factor_enrolled_notification", - "mailer_subjects_mfa_factor_unenrolled_notification", - "mailer_subjects_identity_linked_notification", - "mailer_subjects_identity_unlinked_notification", - "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", - "mailer_templates_password_changed_notification_content", - "mailer_templates_email_changed_notification_content", - "mailer_templates_phone_changed_notification_content", - "mailer_templates_mfa_factor_enrolled_notification_content", - "mailer_templates_mfa_factor_unenrolled_notification_content", - "mailer_templates_identity_linked_notification_content", - "mailer_templates_identity_unlinked_notification_content", - "mailer_notifications_password_changed_enabled", - "mailer_notifications_email_changed_enabled", - "mailer_notifications_phone_changed_enabled", - "mailer_notifications_mfa_factor_enrolled_enabled", - "mailer_notifications_mfa_factor_unenrolled_enabled", - "mailer_notifications_identity_linked_enabled", - "mailer_notifications_identity_unlinked_enabled", - "mfa_max_enrolled_factors", - "mfa_totp_enroll_enabled", - "mfa_totp_verify_enabled", - "mfa_phone_enroll_enabled", - "mfa_phone_verify_enabled", - "mfa_web_authn_enroll_enabled", - "mfa_web_authn_verify_enabled", - "passkey_enabled", - "webauthn_rp_display_name", - "webauthn_rp_id", - "webauthn_rp_origins", - "mfa_phone_otp_length", - "mfa_phone_template", - "mfa_phone_max_frequency", - "nimbus_oauth_client_id", - "nimbus_oauth_email_optional", - "nimbus_oauth_client_secret", - "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", - "rate_limit_otp", - "rate_limit_web3", - "refresh_token_rotation_enabled", - "saml_enabled", - "saml_external_url", - "saml_allow_encrypted_assertions", - "security_sb_forwarded_for_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", - "oauth_server_enabled", - "oauth_server_allow_dynamic_registration", - "oauth_server_authorization_path", - "custom_oauth_enabled", - "custom_oauth_max_providers" - ] - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to retrieve project's auth config" - } - }, - "security": [ - { - "bearer": [] - }, - { - "fga_permissions": ["auth_config_read"] - } - ], - "summary": "Gets project's auth config", - "tags": ["Auth"], - "x-badges": [ - { - "name": "OAuth scope: auth:read", - "position": "after" - } - ], - "x-endpoint-owners": ["auth"], - "x-oauth-scope": "auth:read" - }, - "patch": { - "operationId": "v1-update-auth-service-config", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "site_url": { - "type": "string", - "pattern": "^[^,]+$", - "nullable": true - }, - "disable_signup": { - "type": "boolean", - "nullable": true - }, - "jwt_exp": { - "type": "integer", - "minimum": 0, - "maximum": 604800, - "nullable": true - }, - "smtp_admin_email": { - "type": "string", - "format": "email", - "nullable": true - }, - "smtp_host": { - "type": "string", - "nullable": true - }, - "smtp_port": { - "type": "string", - "nullable": true - }, - "smtp_user": { - "type": "string", - "nullable": true - }, - "smtp_pass": { - "type": "string", - "nullable": true - }, - "smtp_max_frequency": { - "type": "integer", - "minimum": 0, - "maximum": 32767, - "nullable": true - }, - "smtp_sender_name": { - "type": "string", - "nullable": true - }, - "mailer_allow_unverified_email_sign_ins": { - "type": "boolean", - "nullable": true - }, - "mailer_autoconfirm": { - "type": "boolean", - "nullable": true - }, - "mailer_subjects_invite": { - "type": "string", - "nullable": true - }, - "mailer_subjects_confirmation": { - "type": "string", - "nullable": true - }, - "mailer_subjects_recovery": { - "type": "string", - "nullable": true - }, - "mailer_subjects_email_change": { - "type": "string", - "nullable": true - }, - "mailer_subjects_magic_link": { - "type": "string", - "nullable": true - }, - "mailer_subjects_reauthentication": { - "type": "string", - "nullable": true - }, - "mailer_subjects_password_changed_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_email_changed_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_phone_changed_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_mfa_factor_enrolled_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_mfa_factor_unenrolled_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_identity_linked_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_identity_unlinked_notification": { - "type": "string", - "nullable": true - }, - "mailer_templates_invite_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_confirmation_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_recovery_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_email_change_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_magic_link_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_reauthentication_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_password_changed_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_email_changed_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_phone_changed_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_mfa_factor_enrolled_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_mfa_factor_unenrolled_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_identity_linked_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_identity_unlinked_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_notifications_password_changed_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_email_changed_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_phone_changed_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_mfa_factor_enrolled_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_mfa_factor_unenrolled_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_identity_linked_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_identity_unlinked_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_max_enrolled_factors": { - "type": "integer", - "minimum": 0, - "maximum": 2147483647, - "nullable": true - }, - "uri_allow_list": { - "type": "string", - "nullable": true - }, - "external_anonymous_users_enabled": { - "type": "boolean", - "nullable": true - }, - "external_email_enabled": { - "type": "boolean", - "nullable": true - }, - "external_phone_enabled": { - "type": "boolean", - "nullable": true - }, - "saml_enabled": { - "type": "boolean", - "nullable": true - }, - "saml_external_url": { - "type": "string", - "pattern": "^[^,]+$", - "nullable": true - }, - "security_sb_forwarded_for_enabled": { - "type": "boolean", - "nullable": true - }, - "security_captcha_enabled": { - "type": "boolean", - "nullable": true - }, - "security_captcha_provider": { - "type": "string", - "enum": ["turnstile", "hcaptcha"], - "nullable": true - }, - "security_captcha_secret": { - "type": "string", - "nullable": true - }, - "sessions_timebox": { - "type": "number", - "minimum": 0, - "nullable": true - }, - "sessions_inactivity_timeout": { - "type": "number", - "minimum": 0, - "nullable": true - }, - "sessions_single_per_user": { - "type": "boolean", - "nullable": true - }, - "sessions_tags": { - "type": "string", - "pattern": "^\\s*([a-zA-Z0-9_-]+(\\s*,+\\s*)?)*\\s*$", - "nullable": true - }, - "rate_limit_anonymous_users": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647, - "nullable": true - }, - "rate_limit_email_sent": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647, - "nullable": true - }, - "rate_limit_sms_sent": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647, - "nullable": true - }, - "rate_limit_verify": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647, - "nullable": true - }, - "rate_limit_token_refresh": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647, - "nullable": true - }, - "rate_limit_otp": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647, - "nullable": true - }, - "rate_limit_web3": { - "type": "integer", - "minimum": 1, - "maximum": 2147483647, - "nullable": true - }, - "mailer_secure_email_change_enabled": { - "type": "boolean", - "nullable": true - }, - "refresh_token_rotation_enabled": { - "type": "boolean", - "nullable": true - }, - "password_hibp_enabled": { - "type": "boolean", - "nullable": true - }, - "password_min_length": { - "type": "integer", - "minimum": 6, - "maximum": 32767, - "nullable": true - }, - "password_required_characters": { - "type": "string", - "enum": [ - "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", - "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", - "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", - "" - ], - "nullable": true - }, - "security_manual_linking_enabled": { - "type": "boolean", - "nullable": true - }, - "security_update_password_require_reauthentication": { - "type": "boolean", - "nullable": true - }, - "security_refresh_token_reuse_interval": { - "type": "integer", - "minimum": 0, - "maximum": 2147483647, - "nullable": true - }, - "mailer_otp_exp": { - "type": "integer", - "minimum": 0, - "maximum": 2147483647 - }, - "mailer_otp_length": { - "type": "integer", - "minimum": 6, - "maximum": 10, - "nullable": true - }, - "sms_autoconfirm": { - "type": "boolean", - "nullable": true - }, - "sms_max_frequency": { - "type": "integer", - "minimum": 0, - "maximum": 32767, - "nullable": true - }, - "sms_otp_exp": { - "type": "integer", - "minimum": 0, - "maximum": 2147483647, - "nullable": true - }, - "sms_otp_length": { - "type": "integer", - "minimum": 0, - "maximum": 32767 - }, - "sms_provider": { - "type": "string", - "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], - "nullable": true - }, - "sms_messagebird_access_key": { - "type": "string", - "nullable": true - }, - "sms_messagebird_originator": { - "type": "string", - "nullable": true - }, - "sms_test_otp": { - "type": "string", - "pattern": "^([0-9]{1,15}=[0-9]+,?)*$", - "nullable": true - }, - "sms_test_otp_valid_until": { - "type": "string", - "format": "date-time", - "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 - }, - "sms_template": { - "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_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_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 - }, - "hook_before_user_created_enabled": { - "type": "boolean", - "nullable": true - }, - "hook_before_user_created_uri": { - "type": "string", - "nullable": true - }, - "hook_before_user_created_secrets": { - "type": "string", - "nullable": true - }, - "hook_after_user_created_enabled": { - "type": "boolean", - "nullable": true - }, - "hook_after_user_created_uri": { - "type": "string", - "nullable": true - }, - "hook_after_user_created_secrets": { - "type": "string", - "nullable": true - }, - "external_apple_enabled": { - "type": "boolean", - "nullable": true - }, - "external_apple_client_id": { - "type": "string", - "nullable": true - }, - "external_apple_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_apple_secret": { - "type": "string", - "nullable": true - }, - "external_apple_additional_client_ids": { - "type": "string", - "nullable": true - }, - "external_azure_enabled": { - "type": "boolean", - "nullable": true - }, - "external_azure_client_id": { - "type": "string", - "nullable": true - }, - "external_azure_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_azure_secret": { - "type": "string", - "nullable": true - }, - "external_azure_url": { - "type": "string", - "nullable": true - }, - "external_bitbucket_enabled": { - "type": "boolean", - "nullable": true - }, - "external_bitbucket_client_id": { - "type": "string", - "nullable": true - }, - "external_bitbucket_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_bitbucket_secret": { - "type": "string", - "nullable": true - }, - "external_discord_enabled": { - "type": "boolean", - "nullable": true - }, - "external_discord_client_id": { - "type": "string", - "nullable": true - }, - "external_discord_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_discord_secret": { - "type": "string", - "nullable": true - }, - "external_facebook_enabled": { - "type": "boolean", - "nullable": true - }, - "external_facebook_client_id": { - "type": "string", - "nullable": true - }, - "external_facebook_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_facebook_secret": { - "type": "string", - "nullable": true - }, - "external_figma_enabled": { - "type": "boolean", - "nullable": true - }, - "external_figma_client_id": { - "type": "string", - "nullable": true - }, - "external_figma_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_figma_secret": { - "type": "string", - "nullable": true - }, - "external_github_enabled": { - "type": "boolean", - "nullable": true - }, - "external_github_client_id": { - "type": "string", - "nullable": true - }, - "external_github_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_github_secret": { - "type": "string", - "nullable": true - }, - "external_gitlab_enabled": { - "type": "boolean", - "nullable": true - }, - "external_gitlab_client_id": { - "type": "string", - "nullable": true - }, - "external_gitlab_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_gitlab_secret": { - "type": "string", - "nullable": true - }, - "external_gitlab_url": { - "type": "string", - "nullable": true - }, - "external_google_enabled": { - "type": "boolean", - "nullable": true - }, - "external_google_client_id": { - "type": "string", - "nullable": true - }, - "external_google_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_google_secret": { - "type": "string", - "nullable": true - }, - "external_google_additional_client_ids": { - "type": "string", - "nullable": true - }, - "external_google_skip_nonce_check": { - "type": "boolean", - "nullable": true - }, - "external_kakao_enabled": { - "type": "boolean", - "nullable": true - }, - "external_kakao_client_id": { - "type": "string", - "nullable": true - }, - "external_kakao_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_kakao_secret": { - "type": "string", - "nullable": true - }, - "external_keycloak_enabled": { - "type": "boolean", - "nullable": true - }, - "external_keycloak_client_id": { - "type": "string", - "nullable": true - }, - "external_keycloak_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_keycloak_secret": { - "type": "string", - "nullable": true - }, - "external_keycloak_url": { - "type": "string", - "nullable": true - }, - "external_linkedin_oidc_enabled": { - "type": "boolean", - "nullable": true - }, - "external_linkedin_oidc_client_id": { - "type": "string", - "nullable": true - }, - "external_linkedin_oidc_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_linkedin_oidc_secret": { - "type": "string", - "nullable": true - }, - "external_slack_oidc_enabled": { - "type": "boolean", - "nullable": true - }, - "external_slack_oidc_client_id": { - "type": "string", - "nullable": true - }, - "external_slack_oidc_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_slack_oidc_secret": { - "type": "string", - "nullable": true - }, - "external_notion_enabled": { - "type": "boolean", - "nullable": true - }, - "external_notion_client_id": { - "type": "string", - "nullable": true - }, - "external_notion_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_notion_secret": { - "type": "string", - "nullable": true - }, - "external_slack_enabled": { - "type": "boolean", - "nullable": true - }, - "external_slack_client_id": { - "type": "string", - "nullable": true - }, - "external_slack_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_slack_secret": { - "type": "string", - "nullable": true - }, - "external_spotify_enabled": { - "type": "boolean", - "nullable": true - }, - "external_spotify_client_id": { - "type": "string", - "nullable": true - }, - "external_spotify_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_spotify_secret": { - "type": "string", - "nullable": true - }, - "external_twitch_enabled": { - "type": "boolean", - "nullable": true - }, - "external_twitch_client_id": { - "type": "string", - "nullable": true - }, - "external_twitch_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_twitch_secret": { - "type": "string", - "nullable": true - }, - "external_twitter_enabled": { - "type": "boolean", - "nullable": true - }, - "external_twitter_client_id": { - "type": "string", - "nullable": true - }, - "external_twitter_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_twitter_secret": { - "type": "string", - "nullable": true - }, - "external_x_enabled": { - "type": "boolean", - "nullable": true - }, - "external_x_client_id": { - "type": "string", - "nullable": true - }, - "external_x_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_x_secret": { - "type": "string", - "nullable": true - }, - "external_workos_enabled": { - "type": "boolean", - "nullable": true - }, - "external_workos_client_id": { - "type": "string", - "nullable": true - }, - "external_workos_secret": { - "type": "string", - "nullable": true - }, - "external_workos_url": { - "type": "string", - "nullable": true - }, - "external_web3_solana_enabled": { - "type": "boolean", - "nullable": true - }, - "external_web3_ethereum_enabled": { - "type": "boolean", - "nullable": true - }, - "external_zoom_enabled": { - "type": "boolean", - "nullable": true - }, - "external_zoom_client_id": { - "type": "string", - "nullable": true - }, - "external_zoom_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_zoom_secret": { - "type": "string", - "nullable": true - }, - "db_max_pool_size": { - "type": "integer", - "nullable": true - }, - "db_max_pool_size_unit": { - "type": "string", - "enum": ["connections", "percent"], - "nullable": true - }, - "api_max_request_duration": { - "type": "integer", - "nullable": true - }, - "mfa_totp_enroll_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_totp_verify_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_web_authn_enroll_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_web_authn_verify_enabled": { - "type": "boolean", - "nullable": true - }, - "passkey_enabled": { - "type": "boolean" - }, - "webauthn_rp_display_name": { - "type": "string", - "nullable": true - }, - "webauthn_rp_id": { - "type": "string", - "nullable": true - }, - "webauthn_rp_origins": { - "type": "string", - "nullable": true - }, - "mfa_phone_enroll_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_phone_verify_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_phone_max_frequency": { - "type": "integer", - "minimum": 0, - "maximum": 32767, - "nullable": true - }, - "mfa_phone_otp_length": { - "type": "integer", - "minimum": 0, - "maximum": 32767, - "nullable": true - }, - "mfa_phone_template": { - "type": "string", - "nullable": true - }, - "nimbus_oauth_client_id": { - "type": "string", - "nullable": true - }, - "nimbus_oauth_client_secret": { - "type": "string", - "nullable": true - }, - "oauth_server_enabled": { - "type": "boolean", - "nullable": true - }, - "oauth_server_allow_dynamic_registration": { - "type": "boolean", - "nullable": true - }, - "oauth_server_authorization_path": { - "type": "string", - "nullable": true - }, - "custom_oauth_enabled": { - "type": "boolean" - } - }, - "example": { - "site_url": "https://app.example.com", - "disable_signup": false, - "jwt_exp": 3600 - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "api_max_request_duration": { - "type": "integer", - "nullable": true - }, - "db_max_pool_size": { - "type": "integer", - "nullable": true - }, - "db_max_pool_size_unit": { - "type": "string", - "enum": ["connections", "percent"], - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_linkedin_oidc_enabled": { - "type": "boolean", - "nullable": true - }, - "external_linkedin_oidc_secret": { - "type": "string", - "nullable": true - }, - "external_slack_oidc_client_id": { - "type": "string", - "nullable": true - }, - "external_slack_oidc_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_slack_oidc_enabled": { - "type": "boolean", - "nullable": true - }, - "external_slack_oidc_secret": { - "type": "string", - "nullable": true - }, - "external_notion_client_id": { - "type": "string", - "nullable": true - }, - "external_notion_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "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_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_twitter_enabled": { - "type": "boolean", - "nullable": true - }, - "external_twitter_secret": { - "type": "string", - "nullable": true - }, - "external_x_client_id": { - "type": "string", - "nullable": true - }, - "external_x_email_optional": { - "type": "boolean", - "nullable": true - }, - "external_x_enabled": { - "type": "boolean", - "nullable": true - }, - "external_x_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_web3_solana_enabled": { - "type": "boolean", - "nullable": true - }, - "external_web3_ethereum_enabled": { - "type": "boolean", - "nullable": true - }, - "external_zoom_client_id": { - "type": "string", - "nullable": true - }, - "external_zoom_email_optional": { - "type": "boolean", - "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 - }, - "hook_before_user_created_enabled": { - "type": "boolean", - "nullable": true - }, - "hook_before_user_created_uri": { - "type": "string", - "nullable": true - }, - "hook_before_user_created_secrets": { - "type": "string", - "nullable": true - }, - "hook_after_user_created_enabled": { - "type": "boolean", - "nullable": true - }, - "hook_after_user_created_uri": { - "type": "string", - "nullable": true - }, - "hook_after_user_created_secrets": { - "type": "string", - "nullable": true - }, - "jwt_exp": { - "type": "integer", - "nullable": true - }, - "mailer_allow_unverified_email_sign_ins": { - "type": "boolean", - "nullable": true - }, - "mailer_autoconfirm": { - "type": "boolean", - "nullable": true - }, - "mailer_otp_exp": { - "type": "integer" - }, - "mailer_otp_length": { - "type": "integer", - "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_subjects_password_changed_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_email_changed_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_phone_changed_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_mfa_factor_enrolled_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_mfa_factor_unenrolled_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_identity_linked_notification": { - "type": "string", - "nullable": true - }, - "mailer_subjects_identity_unlinked_notification": { - "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 - }, - "mailer_templates_password_changed_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_email_changed_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_phone_changed_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_mfa_factor_enrolled_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_mfa_factor_unenrolled_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_identity_linked_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_templates_identity_unlinked_notification_content": { - "type": "string", - "nullable": true - }, - "mailer_notifications_password_changed_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_email_changed_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_phone_changed_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_mfa_factor_enrolled_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_mfa_factor_unenrolled_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_identity_linked_enabled": { - "type": "boolean", - "nullable": true - }, - "mailer_notifications_identity_unlinked_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_max_enrolled_factors": { - "type": "integer", - "nullable": true - }, - "mfa_totp_enroll_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_totp_verify_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_phone_enroll_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_phone_verify_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_web_authn_enroll_enabled": { - "type": "boolean", - "nullable": true - }, - "mfa_web_authn_verify_enabled": { - "type": "boolean", - "nullable": true - }, - "passkey_enabled": { - "type": "boolean" - }, - "webauthn_rp_display_name": { - "type": "string", - "nullable": true - }, - "webauthn_rp_id": { - "type": "string", - "nullable": true - }, - "webauthn_rp_origins": { - "type": "string", - "nullable": true - }, - "mfa_phone_otp_length": { - "type": "integer" - }, - "mfa_phone_template": { - "type": "string", - "nullable": true - }, - "mfa_phone_max_frequency": { - "type": "integer", - "nullable": true - }, - "nimbus_oauth_client_id": { - "type": "string", - "nullable": true - }, - "nimbus_oauth_email_optional": { - "type": "boolean", - "nullable": true - }, - "nimbus_oauth_client_secret": { - "type": "string", - "nullable": true - }, - "password_hibp_enabled": { - "type": "boolean", - "nullable": true - }, - "password_min_length": { - "type": "integer", - "nullable": true - }, - "password_required_characters": { - "type": "string", - "enum": [ - "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", - "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", - "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", - "" - ], - "nullable": true - }, - "rate_limit_anonymous_users": { - "type": "integer", - "nullable": true - }, - "rate_limit_email_sent": { - "type": "integer", - "nullable": true - }, - "rate_limit_sms_sent": { - "type": "integer", - "nullable": true - }, - "rate_limit_token_refresh": { - "type": "integer", - "nullable": true - }, - "rate_limit_verify": { - "type": "integer", - "nullable": true - }, - "rate_limit_otp": { - "type": "integer", - "nullable": true - }, - "rate_limit_web3": { - "type": "integer", - "nullable": true - }, - "refresh_token_rotation_enabled": { - "type": "boolean", - "nullable": true - }, - "saml_enabled": { - "type": "boolean", - "nullable": true - }, - "saml_external_url": { - "type": "string", - "nullable": true - }, - "saml_allow_encrypted_assertions": { - "type": "boolean", - "nullable": true - }, - "security_sb_forwarded_for_enabled": { - "type": "boolean", - "nullable": true - }, - "security_captcha_enabled": { - "type": "boolean", - "nullable": true - }, - "security_captcha_provider": { - "type": "string", - "enum": ["turnstile", "hcaptcha"], - "nullable": true - }, - "security_captcha_secret": { - "type": "string", - "nullable": true - }, - "security_manual_linking_enabled": { - "type": "boolean", - "nullable": true - }, - "security_refresh_token_reuse_interval": { - "type": "integer", - "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": "integer", - "nullable": true - }, - "sms_messagebird_access_key": { - "type": "string", - "nullable": true - }, - "sms_messagebird_originator": { - "type": "string", - "nullable": true - }, - "sms_otp_exp": { - "type": "integer", - "nullable": true - }, - "sms_otp_length": { - "type": "integer" - }, - "sms_provider": { - "type": "string", - "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], - "nullable": true - }, - "sms_template": { - "type": "string", - "nullable": true - }, - "sms_test_otp": { - "type": "string", - "nullable": true - }, - "sms_test_otp_valid_until": { - "type": "string", - "format": "date-time", - "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", - "format": "email", - "nullable": true - }, - "smtp_host": { - "type": "string", - "nullable": true - }, - "smtp_max_frequency": { - "type": "integer", - "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 - }, - "oauth_server_enabled": { - "type": "boolean" - }, - "oauth_server_allow_dynamic_registration": { - "type": "boolean" - }, - "oauth_server_authorization_path": { - "type": "string", - "nullable": true - }, - "custom_oauth_enabled": { - "type": "boolean" - }, - "custom_oauth_max_providers": { - "type": "integer" - } - }, - "required": [ - "api_max_request_duration", - "db_max_pool_size", - "db_max_pool_size_unit", - "disable_signup", - "external_anonymous_users_enabled", - "external_apple_additional_client_ids", - "external_apple_client_id", - "external_apple_email_optional", - "external_apple_enabled", - "external_apple_secret", - "external_azure_client_id", - "external_azure_email_optional", - "external_azure_enabled", - "external_azure_secret", - "external_azure_url", - "external_bitbucket_client_id", - "external_bitbucket_email_optional", - "external_bitbucket_enabled", - "external_bitbucket_secret", - "external_discord_client_id", - "external_discord_email_optional", - "external_discord_enabled", - "external_discord_secret", - "external_email_enabled", - "external_facebook_client_id", - "external_facebook_email_optional", - "external_facebook_enabled", - "external_facebook_secret", - "external_figma_client_id", - "external_figma_email_optional", - "external_figma_enabled", - "external_figma_secret", - "external_github_client_id", - "external_github_email_optional", - "external_github_enabled", - "external_github_secret", - "external_gitlab_client_id", - "external_gitlab_email_optional", - "external_gitlab_enabled", - "external_gitlab_secret", - "external_gitlab_url", - "external_google_additional_client_ids", - "external_google_client_id", - "external_google_email_optional", - "external_google_enabled", - "external_google_secret", - "external_google_skip_nonce_check", - "external_kakao_client_id", - "external_kakao_email_optional", - "external_kakao_enabled", - "external_kakao_secret", - "external_keycloak_client_id", - "external_keycloak_email_optional", - "external_keycloak_enabled", - "external_keycloak_secret", - "external_keycloak_url", - "external_linkedin_oidc_client_id", - "external_linkedin_oidc_email_optional", - "external_linkedin_oidc_enabled", - "external_linkedin_oidc_secret", - "external_slack_oidc_client_id", - "external_slack_oidc_email_optional", - "external_slack_oidc_enabled", - "external_slack_oidc_secret", - "external_notion_client_id", - "external_notion_email_optional", - "external_notion_enabled", - "external_notion_secret", - "external_phone_enabled", - "external_slack_client_id", - "external_slack_email_optional", - "external_slack_enabled", - "external_slack_secret", - "external_spotify_client_id", - "external_spotify_email_optional", - "external_spotify_enabled", - "external_spotify_secret", - "external_twitch_client_id", - "external_twitch_email_optional", - "external_twitch_enabled", - "external_twitch_secret", - "external_twitter_client_id", - "external_twitter_email_optional", - "external_twitter_enabled", - "external_twitter_secret", - "external_x_client_id", - "external_x_email_optional", - "external_x_enabled", - "external_x_secret", - "external_workos_client_id", - "external_workos_enabled", - "external_workos_secret", - "external_workos_url", - "external_web3_solana_enabled", - "external_web3_ethereum_enabled", - "external_zoom_client_id", - "external_zoom_email_optional", - "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", - "hook_before_user_created_enabled", - "hook_before_user_created_uri", - "hook_before_user_created_secrets", - "hook_after_user_created_enabled", - "hook_after_user_created_uri", - "hook_after_user_created_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_subjects_password_changed_notification", - "mailer_subjects_email_changed_notification", - "mailer_subjects_phone_changed_notification", - "mailer_subjects_mfa_factor_enrolled_notification", - "mailer_subjects_mfa_factor_unenrolled_notification", - "mailer_subjects_identity_linked_notification", - "mailer_subjects_identity_unlinked_notification", - "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", - "mailer_templates_password_changed_notification_content", - "mailer_templates_email_changed_notification_content", - "mailer_templates_phone_changed_notification_content", - "mailer_templates_mfa_factor_enrolled_notification_content", - "mailer_templates_mfa_factor_unenrolled_notification_content", - "mailer_templates_identity_linked_notification_content", - "mailer_templates_identity_unlinked_notification_content", - "mailer_notifications_password_changed_enabled", - "mailer_notifications_email_changed_enabled", - "mailer_notifications_phone_changed_enabled", - "mailer_notifications_mfa_factor_enrolled_enabled", - "mailer_notifications_mfa_factor_unenrolled_enabled", - "mailer_notifications_identity_linked_enabled", - "mailer_notifications_identity_unlinked_enabled", - "mfa_max_enrolled_factors", - "mfa_totp_enroll_enabled", - "mfa_totp_verify_enabled", - "mfa_phone_enroll_enabled", - "mfa_phone_verify_enabled", - "mfa_web_authn_enroll_enabled", - "mfa_web_authn_verify_enabled", - "passkey_enabled", - "webauthn_rp_display_name", - "webauthn_rp_id", - "webauthn_rp_origins", - "mfa_phone_otp_length", - "mfa_phone_template", - "mfa_phone_max_frequency", - "nimbus_oauth_client_id", - "nimbus_oauth_email_optional", - "nimbus_oauth_client_secret", - "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", - "rate_limit_otp", - "rate_limit_web3", - "refresh_token_rotation_enabled", - "saml_enabled", - "saml_external_url", - "saml_allow_encrypted_assertions", - "security_sb_forwarded_for_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", - "oauth_server_enabled", - "oauth_server_allow_dynamic_registration", - "oauth_server_authorization_path", - "custom_oauth_enabled", - "custom_oauth_max_providers" - ] - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to update project's auth config" - } - }, - "security": [ - { - "bearer": [] - }, - { - "fga_permissions": ["auth_config_write", "project_admin_write"] - } - ], - "summary": "Updates a project's auth config", - "tags": ["Auth"], - "x-badges": [ - { - "name": "OAuth scope: auth:write", - "position": "after" - } - ], - "x-endpoint-owners": ["auth"], - "x-oauth-scope": "auth:write" - } - }, - "/v1/projects/{ref}/config/auth/third-party-auth": { - "post": { - "operationId": "v1-create-project-tpa-integration", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "oidc_issuer_url": { - "type": "string" - }, - "jwks_url": { - "type": "string" - }, - "custom_jwks": {} - }, - "example": { - "oidc_issuer_url": "https://login.acme.com", - "jwks_url": "https://login.acme.com/.well-known/jwks.json" - } - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "type": { - "type": "string" - }, - "oidc_issuer_url": { - "type": "string", - "nullable": true - }, - "jwks_url": { - "type": "string", - "nullable": true - }, - "custom_jwks": { - "nullable": true - }, - "resolved_jwks": { - "nullable": true - }, - "inserted_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "resolved_at": { - "type": "string", - "nullable": true - } - }, - "required": ["id", "type", "inserted_at", "updated_at"] - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - } - }, - "security": [ - { - "bearer": [] - }, - { - "fga_permissions": ["auth_config_write"] - } - ], - "summary": "Creates a new third-party auth integration", - "tags": ["Auth"], - "x-badges": [ - { - "name": "OAuth scope: auth:write", - "position": "after" - } - ], - "x-endpoint-owners": ["auth"], - "x-oauth-scope": "auth:write" - }, - "get": { - "operationId": "v1-list-project-tpa-integrations", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "type": { - "type": "string" - }, - "oidc_issuer_url": { - "type": "string", - "nullable": true - }, - "jwks_url": { - "type": "string", - "nullable": true - }, - "custom_jwks": { - "nullable": true - }, - "resolved_jwks": { - "nullable": true - }, - "inserted_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "resolved_at": { - "type": "string", - "nullable": true - } - }, - "required": ["id", "type", "inserted_at", "updated_at"] - } - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - } - }, - "security": [ - { - "bearer": [] - }, - { - "fga_permissions": ["auth_config_read"] - } - ], - "summary": "Lists all third-party auth integrations", - "tags": ["Auth"], - "x-badges": [ - { - "name": "OAuth scope: auth:read", - "position": "after" - } - ], - "x-endpoint-owners": ["auth"], - "x-oauth-scope": "auth:read" - } - }, - "/v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}": { - "delete": { - "operationId": "v1-delete-project-tpa-integration", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - }, - { - "name": "tpa_id", - "required": true, - "in": "path", - "schema": { - "format": "uuid", - "example": "88888888-8888-4888-8888-888888888888", - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "type": { - "type": "string" - }, - "oidc_issuer_url": { - "type": "string", - "nullable": true - }, - "jwks_url": { - "type": "string", - "nullable": true - }, - "custom_jwks": { - "nullable": true - }, - "resolved_jwks": { - "nullable": true - }, - "inserted_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "resolved_at": { - "type": "string", - "nullable": true - } - }, - "required": ["id", "type", "inserted_at", "updated_at"] - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - } - }, - "security": [ - { - "bearer": [] - }, - { - "fga_permissions": ["auth_config_write"] - } - ], - "summary": "Removes a third-party auth integration", - "tags": ["Auth"], - "x-badges": [ - { - "name": "OAuth scope: auth:write", - "position": "after" - } - ], - "x-endpoint-owners": ["auth"], - "x-oauth-scope": "auth:write" - }, - "get": { - "operationId": "v1-get-project-tpa-integration", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - }, - { - "name": "tpa_id", - "required": true, - "in": "path", - "schema": { - "format": "uuid", - "example": "88888888-8888-4888-8888-888888888888", - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "type": { - "type": "string" - }, - "oidc_issuer_url": { - "type": "string", - "nullable": true - }, - "jwks_url": { - "type": "string", - "nullable": true - }, - "custom_jwks": { - "nullable": true - }, - "resolved_jwks": { - "nullable": true - }, - "inserted_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "resolved_at": { - "type": "string", - "nullable": true - } - }, - "required": ["id", "type", "inserted_at", "updated_at"] + "$ref": "#/components/schemas/AuthConfigResponse" } } } @@ -13608,17 +5544,17 @@ }, "429": { "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to retrieve project's auth config" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["auth_config_read"] } ], - "summary": "Get a third-party integration", + "summary": "Gets project's auth config", "tags": ["Auth"], "x-badges": [ { @@ -13627,12 +5563,11 @@ } ], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" - } - }, - "/v1/projects/{ref}/pause": { - "post": { - "operationId": "v1-pause-a-project", + }, + "patch": { + "operationId": "v1-update-auth-service-config", "parameters": [ { "name": "ref", @@ -13648,140 +5583,23 @@ } } ], - "responses": { - "200": { - "description": "" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - } - }, - "security": [ - { - "bearer": [] - }, - { - "fga_permissions": ["project_admin_write"] - } - ], - "summary": "Pauses the given project", - "tags": ["Projects"], - "x-badges": [ - { - "name": "OAuth scope: projects:write", - "position": "after" - } - ], - "x-endpoint-owners": ["infra", "management-api"], - "x-oauth-scope": "projects:write" - } - }, - "/v1/projects/{ref}/restart": { - "post": { - "operationId": "v1-restart-a-project", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAuthConfigBody" + } } } - ], - "responses": { - "200": { - "description": "" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - } }, - "security": [ - { - "bearer": [] - }, - { - "fga_permissions": ["project_admin_write"] - } - ], - "summary": "Restarts the given project", - "tags": ["Projects"], - "x-badges": [ - { - "name": "OAuth scope: projects:write", - "position": "after" - } - ], - "x-endpoint-owners": ["infra", "management-api"], - "x-oauth-scope": "projects:write" - } - }, - "/v1/projects/{ref}/restore": { - "get": { - "operationId": "v1-list-available-restore-versions", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - } - ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "available_versions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "version": { - "type": "string" - }, - "release_channel": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - }, - "postgres_engine": { - "type": "string", - "enum": ["13", "14", "15", "17", "17-oriole"] - } - }, - "required": ["version", "release_channel", "postgres_engine"] - } - } - }, - "required": ["available_versions"] + "$ref": "#/components/schemas/AuthConfigResponse" } } } @@ -13794,134 +5612,32 @@ }, "429": { "description": "Rate limit exceeded" - } - }, - "security": [ - { - "bearer": [] - }, - { - "fga_permissions": ["project_admin_read"] - } - ], - "summary": "Lists available restore versions for the given project", - "tags": ["Projects"], - "x-badges": [ - { - "name": "OAuth scope: projects:read", - "position": "after" - } - ], - "x-endpoint-owners": ["management-api", "infra"], - "x-oauth-scope": "projects:read" - }, - "post": { - "operationId": "v1-restore-a-project", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" }, - "429": { - "description": "Rate limit exceeded" + "500": { + "description": "Failed to update project's auth config" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["project_admin_write"] } ], - "summary": "Restores the given project", - "tags": ["Projects"], + "summary": "Updates a project's auth config", + "tags": ["Auth"], "x-badges": [ { - "name": "OAuth scope: projects:write", + "name": "OAuth scope: auth:write", "position": "after" } ], - "x-endpoint-owners": ["management-api", "infra"], - "x-oauth-scope": "projects:write" + "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_write", "project_admin_write"]], + "x-oauth-scope": "auth:write" } }, - "/v1/projects/{ref}/restore/cancel": { + "/v1/projects/{ref}/config/auth/third-party-auth": { "post": { - "operationId": "v1-cancel-a-project-restoration", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - } - }, - "security": [ - { - "bearer": [] - }, - { - "fga_permissions": ["project_admin_write"] - } - ], - "summary": "Cancels the given project restoration", - "tags": ["Projects"], - "x-badges": [ - { - "name": "OAuth scope: projects:write", - "position": "after" - } - ], - "x-endpoint-owners": ["management-api", "infra"], - "x-oauth-scope": "projects:write" - } - }, - "/v1/projects/{ref}/billing/addons": { - "get": { - "description": "Returns the billing addons that are currently applied, including the active compute instance size, and lists every addon option that can be provisioned with pricing metadata.", - "operationId": "v1-list-project-addons", + "operationId": "v1-create-project-tpa-integration", "parameters": [ { "name": "ref", @@ -13937,240 +5653,23 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateThirdPartyAuthBody" + } + } + } + }, "responses": { - "200": { + "201": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "selected_addons": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "custom_domain", - "compute_instance", - "pitr", - "ipv4", - "auth_mfa_phone", - "auth_mfa_web_authn", - "log_drain", - "etl_pipeline" - ] - }, - "variant": { - "type": "object", - "properties": { - "id": { - "oneOf": [ - { - "type": "string", - "enum": [ - "ci_micro", - "ci_small", - "ci_medium", - "ci_large", - "ci_xlarge", - "ci_2xlarge", - "ci_4xlarge", - "ci_8xlarge", - "ci_12xlarge", - "ci_16xlarge", - "ci_24xlarge", - "ci_24xlarge_optimized_cpu", - "ci_24xlarge_optimized_memory", - "ci_24xlarge_high_memory", - "ci_48xlarge", - "ci_48xlarge_optimized_cpu", - "ci_48xlarge_optimized_memory", - "ci_48xlarge_high_memory" - ] - }, - { - "type": "string", - "enum": ["cd_default"] - }, - { - "type": "string", - "enum": ["pitr_7", "pitr_14", "pitr_28"] - }, - { - "type": "string", - "enum": ["ipv4_default"] - }, - { - "type": "string", - "enum": ["auth_mfa_phone_default"] - }, - { - "type": "string", - "enum": ["auth_mfa_web_authn_default"] - }, - { - "type": "string", - "enum": ["log_drain_default"] - }, - { - "type": "string", - "enum": ["etl_pipeline_default"] - } - ] - }, - "name": { - "type": "string" - }, - "price": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["fixed", "usage"] - }, - "interval": { - "type": "string", - "enum": ["monthly", "hourly"] - }, - "amount": { - "type": "number" - } - }, - "required": ["description", "type", "interval", "amount"] - }, - "meta": { - "description": "Any JSON-serializable value" - } - }, - "required": ["id", "name", "price"] - } - }, - "required": ["type", "variant"] - } - }, - "available_addons": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "custom_domain", - "compute_instance", - "pitr", - "ipv4", - "auth_mfa_phone", - "auth_mfa_web_authn", - "log_drain", - "etl_pipeline" - ] - }, - "name": { - "type": "string" - }, - "variants": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "oneOf": [ - { - "type": "string", - "enum": [ - "ci_micro", - "ci_small", - "ci_medium", - "ci_large", - "ci_xlarge", - "ci_2xlarge", - "ci_4xlarge", - "ci_8xlarge", - "ci_12xlarge", - "ci_16xlarge", - "ci_24xlarge", - "ci_24xlarge_optimized_cpu", - "ci_24xlarge_optimized_memory", - "ci_24xlarge_high_memory", - "ci_48xlarge", - "ci_48xlarge_optimized_cpu", - "ci_48xlarge_optimized_memory", - "ci_48xlarge_high_memory" - ] - }, - { - "type": "string", - "enum": ["cd_default"] - }, - { - "type": "string", - "enum": ["pitr_7", "pitr_14", "pitr_28"] - }, - { - "type": "string", - "enum": ["ipv4_default"] - }, - { - "type": "string", - "enum": ["auth_mfa_phone_default"] - }, - { - "type": "string", - "enum": ["auth_mfa_web_authn_default"] - }, - { - "type": "string", - "enum": ["log_drain_default"] - }, - { - "type": "string", - "enum": ["etl_pipeline_default"] - } - ] - }, - "name": { - "type": "string" - }, - "price": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["fixed", "usage"] - }, - "interval": { - "type": "string", - "enum": ["monthly", "hourly"] - }, - "amount": { - "type": "number" - } - }, - "required": ["description", "type", "interval", "amount"] - }, - "meta": { - "description": "Any JSON-serializable value" - } - }, - "required": ["id", "name", "price"] - } - } - }, - "required": ["type", "name", "variants"] - } - } - }, - "required": ["selected_addons", "available_addons"] + "$ref": "#/components/schemas/ThirdPartyAuth" } } } @@ -14183,26 +5682,27 @@ }, "429": { "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to list project addons" } }, "security": [ { "bearer": [] - }, + } + ], + "summary": "Creates a new third-party auth integration", + "tags": ["Auth"], + "x-badges": [ { - "fga_permissions": ["infra_add_ons_read"] + "name": "OAuth scope: auth:write", + "position": "after" } ], - "summary": "List billing addons and compute instance selections", - "tags": ["Billing"], - "x-endpoint-owners": ["billing"] + "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_write"]], + "x-oauth-scope": "auth:write" }, - "patch": { - "description": "Selects an addon variant, for example scaling the project’s compute instance up or down, and applies it to the project.", - "operationId": "v1-apply-project-addon", + "get": { + "operationId": "v1-list-project-tpa-integrations", "parameters": [ { "name": "ref", @@ -14218,78 +5718,19 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "addon_variant": { - "oneOf": [ - { - "type": "string", - "enum": [ - "ci_micro", - "ci_small", - "ci_medium", - "ci_large", - "ci_xlarge", - "ci_2xlarge", - "ci_4xlarge", - "ci_8xlarge", - "ci_12xlarge", - "ci_16xlarge", - "ci_24xlarge", - "ci_24xlarge_optimized_cpu", - "ci_24xlarge_optimized_memory", - "ci_24xlarge_high_memory", - "ci_48xlarge", - "ci_48xlarge_optimized_cpu", - "ci_48xlarge_optimized_memory", - "ci_48xlarge_high_memory" - ] - }, - { - "type": "string", - "enum": ["cd_default"] - }, - { - "type": "string", - "enum": ["pitr_7", "pitr_14", "pitr_28"] - }, - { - "type": "string", - "enum": ["ipv4_default"] - } - ] - }, - "addon_type": { - "type": "string", - "enum": [ - "custom_domain", - "compute_instance", - "pitr", - "ipv4", - "auth_mfa_phone", - "auth_mfa_web_authn", - "log_drain", - "etl_pipeline" - ] + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ThirdPartyAuth" } - }, - "required": ["addon_variant", "addon_type"], - "example": { - "addon_variant": "pitr_7", - "addon_type": "pitr" } } } - } - }, - "responses": { - "200": { - "description": "" }, "401": { "description": "Unauthorized" @@ -14299,28 +5740,29 @@ }, "429": { "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to apply project addon" } }, "security": [ { "bearer": [] - }, + } + ], + "summary": "Lists all third-party auth integrations", + "tags": ["Auth"], + "x-badges": [ { - "fga_permissions": ["infra_add_ons_write"] + "name": "OAuth scope: auth:read", + "position": "after" } ], - "summary": "Apply or update billing addons, including compute instance size", - "tags": ["Billing"], - "x-endpoint-owners": ["billing"] + "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_read"]], + "x-oauth-scope": "auth:read" } }, - "/v1/projects/{ref}/billing/addons/{addon_variant}": { + "/v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}": { "delete": { - "description": "Disables the selected addon variant, including rolling the compute instance back to its previous size.", - "operationId": "v1-remove-project-addon", + "operationId": "v1-delete-project-tpa-integration", "parameters": [ { "name": "ref", @@ -14336,54 +5778,27 @@ } }, { - "name": "addon_variant", + "name": "tpa_id", "required": true, "in": "path", "schema": { - "example": "pitr_7", - "oneOf": [ - { - "type": "string", - "enum": [ - "ci_micro", - "ci_small", - "ci_medium", - "ci_large", - "ci_xlarge", - "ci_2xlarge", - "ci_4xlarge", - "ci_8xlarge", - "ci_12xlarge", - "ci_16xlarge", - "ci_24xlarge", - "ci_24xlarge_optimized_cpu", - "ci_24xlarge_optimized_memory", - "ci_24xlarge_high_memory", - "ci_48xlarge", - "ci_48xlarge_optimized_cpu", - "ci_48xlarge_optimized_memory", - "ci_48xlarge_high_memory" - ] - }, - { - "type": "string", - "enum": ["cd_default"] - }, - { - "type": "string", - "enum": ["pitr_7", "pitr_14", "pitr_28"] - }, - { - "type": "string", - "enum": ["ipv4_default"] - } - ] + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "example": "88888888-8888-4888-8888-888888888888", + "type": "string" } } ], "responses": { "200": { - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThirdPartyAuth" + } + } + } }, "401": { "description": "Unauthorized" @@ -14393,38 +5808,49 @@ }, "429": { "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to remove project addon" } }, "security": [ { "bearer": [] - }, + } + ], + "summary": "Removes a third-party auth integration", + "tags": ["Auth"], + "x-badges": [ { - "fga_permissions": ["infra_add_ons_write"] + "name": "OAuth scope: auth:write", + "position": "after" } ], - "summary": "Remove billing addons or revert compute instance sizing", - "tags": ["Billing"], - "x-endpoint-owners": ["billing"] - } - }, - "/v1/projects/{ref}/claim-token": { + "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_write"]], + "x-oauth-scope": "auth:write" + }, "get": { - "operationId": "v1-get-project-claim-token", + "operationId": "v1-get-project-tpa-integration", "parameters": [ { "name": "ref", "required": true, "in": "path", - "description": "Project ref", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + }, + { + "name": "tpa_id", + "required": true, + "in": "path", "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "example": "88888888-8888-4888-8888-888888888888", "type": "string" } } @@ -14435,23 +5861,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "token_alias": { - "type": "string" - }, - "expires_at": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "created_by": { - "type": "string", - "format": "uuid" - } - }, - "required": ["token_alias", "expires_at", "created_at", "created_by"] + "$ref": "#/components/schemas/ThirdPartyAuth" } } } @@ -14469,18 +5879,24 @@ "security": [ { "bearer": [] - }, + } + ], + "summary": "Get a third-party integration", + "tags": ["Auth"], + "x-badges": [ { - "fga_permissions": ["project_admin_read"] + "name": "OAuth scope: auth:read", + "position": "after" } ], - "summary": "Gets project claim token", - "tags": ["Projects"], - "x-endpoint-owners": ["management-api"], - "x-internal": true - }, + "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_read"]], + "x-oauth-scope": "auth:read" + } + }, + "/v1/projects/{ref}/pause": { "post": { - "operationId": "v1-create-project-claim-token", + "operationId": "v1-pause-a-project", "parameters": [ { "name": "ref", @@ -14498,33 +5914,7 @@ ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "token": { - "type": "string" - }, - "token_alias": { - "type": "string" - }, - "expires_at": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "created_by": { - "type": "string", - "format": "uuid" - } - }, - "required": ["token", "token_alias", "expires_at", "created_at", "created_by"] - } - } - } + "description": "" }, "401": { "description": "Unauthorized" @@ -14539,18 +5929,24 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["organization_admin_write", "project_admin_write"] } ], - "summary": "Creates project claim token", + "summary": "Pauses the given project", "tags": ["Projects"], - "x-endpoint-owners": ["management-api"], - "x-internal": true - }, - "delete": { - "operationId": "v1-delete-project-claim-token", + "x-badges": [ + { + "name": "OAuth scope: projects:write", + "position": "after" + } + ], + "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["project_admin_write"]], + "x-oauth-scope": "projects:write" + } + }, + "/v1/projects/{ref}/restart": { + "post": { + "operationId": "v1-restart-a-project", "parameters": [ { "name": "ref", @@ -14567,7 +5963,7 @@ } ], "responses": { - "204": { + "200": { "description": "" }, "401": { @@ -14583,22 +5979,24 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["organization_admin_write", "project_admin_write"] } ], - "summary": "Revokes project claim token", + "summary": "Restarts the given project", "tags": ["Projects"], - "x-endpoint-owners": ["management-api"], - "x-internal": true + "x-badges": [ + { + "name": "OAuth scope: projects:write", + "position": "after" + } + ], + "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["project_admin_write"]], + "x-oauth-scope": "projects:write" } }, - "/v1/projects/{ref}/advisors/performance": { + "/v1/projects/{ref}/restore": { "get": { - "deprecated": true, - "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.", - "operationId": "v1-get-performance-advisors", + "operationId": "v1-list-available-restore-versions", "parameters": [ { "name": "ref", @@ -14620,127 +6018,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "lints": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": [ - "unindexed_foreign_keys", - "auth_users_exposed", - "auth_rls_initplan", - "no_primary_key", - "unused_index", - "multiple_permissive_policies", - "policy_exists_rls_disabled", - "rls_enabled_no_policy", - "duplicate_index", - "security_definer_view", - "function_search_path_mutable", - "rls_disabled_in_public", - "extension_in_public", - "rls_references_user_metadata", - "materialized_view_in_api", - "foreign_table_in_api", - "unsupported_reg_types", - "auth_otp_long_expiry", - "auth_otp_short_length", - "ssl_not_enforced", - "network_restrictions_not_set", - "password_requirements_min_length", - "pitr_not_enabled", - "auth_leaked_password_protection", - "auth_insufficient_mfa_options", - "auth_password_policy_missing", - "leaked_service_key", - "no_backup_admin", - "vulnerable_postgres_version" - ] - }, - "title": { - "type": "string" - }, - "level": { - "type": "string", - "enum": ["ERROR", "WARN", "INFO"] - }, - "facing": { - "type": "string", - "enum": ["EXTERNAL"] - }, - "categories": { - "type": "array", - "items": { - "type": "string", - "enum": ["PERFORMANCE", "SECURITY"] - } - }, - "description": { - "type": "string" - }, - "detail": { - "type": "string" - }, - "remediation": { - "type": "string" - }, - "metadata": { - "type": "object", - "properties": { - "schema": { - "type": "string" - }, - "name": { - "type": "string" - }, - "entity": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "table", - "view", - "auth", - "function", - "extension", - "compliance" - ] - }, - "fkey_name": { - "type": "string" - }, - "fkey_columns": { - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "cache_key": { - "type": "string" - } - }, - "required": [ - "name", - "title", - "level", - "facing", - "categories", - "description", - "detail", - "remediation", - "cache_key" - ] - } - } - }, - "required": ["lints"] + "$ref": "#/components/schemas/GetProjectAvailableRestoreVersionsResponse" } } } @@ -14758,183 +6036,40 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["advisors_read"] } ], - "summary": "Gets project performance advisors.", - "tags": ["Advisors"], + "summary": "Lists available restore versions for the given project", + "tags": ["Projects"], "x-badges": [ { - "name": "OAuth scope: database:read", + "name": "OAuth scope: projects:read", "position": "after" } ], - "x-endpoint-owners": ["management-api"], - "x-oauth-scope": "database:read" - } - }, - "/v1/projects/{ref}/advisors/security": { - "get": { - "deprecated": true, - "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.", - "operationId": "v1-get-security-advisors", + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["project_admin_read"]], + "x-oauth-scope": "projects:read" + }, + "post": { + "operationId": "v1-restore-a-project", "parameters": [ { "name": "ref", "required": true, "in": "path", "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - }, - { - "name": "lint_type", - "required": false, - "in": "query", - "schema": { - "example": "sql", - "type": "string", - "enum": ["sql"] - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "lints": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "enum": [ - "unindexed_foreign_keys", - "auth_users_exposed", - "auth_rls_initplan", - "no_primary_key", - "unused_index", - "multiple_permissive_policies", - "policy_exists_rls_disabled", - "rls_enabled_no_policy", - "duplicate_index", - "security_definer_view", - "function_search_path_mutable", - "rls_disabled_in_public", - "extension_in_public", - "rls_references_user_metadata", - "materialized_view_in_api", - "foreign_table_in_api", - "unsupported_reg_types", - "auth_otp_long_expiry", - "auth_otp_short_length", - "ssl_not_enforced", - "network_restrictions_not_set", - "password_requirements_min_length", - "pitr_not_enabled", - "auth_leaked_password_protection", - "auth_insufficient_mfa_options", - "auth_password_policy_missing", - "leaked_service_key", - "no_backup_admin", - "vulnerable_postgres_version" - ] - }, - "title": { - "type": "string" - }, - "level": { - "type": "string", - "enum": ["ERROR", "WARN", "INFO"] - }, - "facing": { - "type": "string", - "enum": ["EXTERNAL"] - }, - "categories": { - "type": "array", - "items": { - "type": "string", - "enum": ["PERFORMANCE", "SECURITY"] - } - }, - "description": { - "type": "string" - }, - "detail": { - "type": "string" - }, - "remediation": { - "type": "string" - }, - "metadata": { - "type": "object", - "properties": { - "schema": { - "type": "string" - }, - "name": { - "type": "string" - }, - "entity": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "table", - "view", - "auth", - "function", - "extension", - "compliance" - ] - }, - "fkey_name": { - "type": "string" - }, - "fkey_columns": { - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "cache_key": { - "type": "string" - } - }, - "required": [ - "name", - "title", - "level", - "facing", - "categories", - "description", - "detail", - "remediation", - "cache_key" - ] - } - } - }, - "required": ["lints"] - } - } + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" } + } + ], + "responses": { + "200": { + "description": "" }, "401": { "description": "Unauthorized" @@ -14949,28 +6084,24 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["advisors_read"] } ], - "summary": "Gets project security advisors.", - "tags": ["Advisors"], + "summary": "Restores the given project", + "tags": ["Projects"], "x-badges": [ { - "name": "OAuth scope: database:read", + "name": "OAuth scope: projects:write", "position": "after" } ], - "x-endpoint-owners": ["management-api"], - "x-oauth-scope": "database:read" + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["project_admin_write"]], + "x-oauth-scope": "projects:write" } }, - "/v1/projects/{ref}/analytics/endpoints/logs.all": { - "get": { - "deprecated": true, - "description": "Executes a SQL query on the project's logs.\n\nEither the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided.\nIf both are not provided, only the last 1 minute of logs will be queried.\nThe timestamp range must be no more than 24 hours and is rounded to the nearest minute. If the range is more than 24 hours, a validation error will be thrown.\n\nNote: Unless the `sql` parameter is provided, only edge_logs will be queried. See the [log query docs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer:~:text=logs%20from%20the-,Sources,-drop%2Ddown%3A) for all available sources.\n", - "operationId": "v1-get-project-logs-all", + "/v1/projects/{ref}/restore/cancel": { + "post": { + "operationId": "v1-cancel-a-project-restoration", "parameters": [ { "name": "ref", @@ -14984,33 +6115,55 @@ "example": "abcdefghijklmnopqrst", "type": "string" } + } + ], + "responses": { + "200": { + "description": "" }, - { - "name": "sql", - "required": false, - "in": "query", - "description": "Custom SQL query to execute on the logs. See [querying logs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer) for more details.", - "schema": { - "type": "string" - } + "401": { + "description": "Unauthorized" }, - { - "name": "iso_timestamp_start", - "required": false, - "in": "query", - "schema": { - "format": "date-time", - "example": "2025-03-01T00:00:00Z", - "type": "string" - } + "403": { + "description": "Forbidden action" }, + "429": { + "description": "Rate limit exceeded" + } + }, + "security": [ { - "name": "iso_timestamp_end", - "required": false, - "in": "query", + "bearer": [] + } + ], + "summary": "Cancels the given project restoration", + "tags": ["Projects"], + "x-badges": [ + { + "name": "OAuth scope: projects:write", + "position": "after" + } + ], + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["project_admin_write"]], + "x-oauth-scope": "projects:write" + } + }, + "/v1/projects/{ref}/billing/addons": { + "get": { + "description": "Returns the billing addons that are currently applied, including the active compute instance size, and lists every addon option that can be provisioned with pricing metadata.", + "operationId": "v1-list-project-addons", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", "schema": { - "format": "date-time", - "example": "2025-03-01T23:59:59Z", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", "type": "string" } } @@ -15021,65 +6174,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": {} - }, - "error": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "properties": { - "code": { - "type": "number" - }, - "errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "location": { - "type": "string" - }, - "locationType": { - "type": "string" - }, - "message": { - "type": "string" - }, - "reason": { - "type": "string" - } - }, - "required": [ - "domain", - "location", - "locationType", - "message", - "reason" - ] - } - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "required": ["code", "errors", "message", "status"] - } - ] - } - } + "$ref": "#/components/schemas/ListProjectAddonsResponse" } } } @@ -15087,41 +6182,29 @@ "401": { "description": "Unauthorized" }, - "402": { - "description": "Usage exceeded. Enable additional usage to continue querying" - }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to list project addons" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["analytics_logs_read"] - } - ], - "summary": "Gets project's logs", - "tags": ["Analytics"], - "x-badges": [ - { - "name": "OAuth scope: analytics:read", - "position": "after" } ], - "x-endpoint-owners": ["analytics"], - "x-oauth-scope": "analytics:read" - } - }, - "/v1/projects/{ref}/analytics/endpoints/logs": { - "get": { - "deprecated": false, - "description": "Executes an SQL or LQL query on the project's unified logs stream.\n\nEither the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided.\nIf both are not provided, only the last 1 minute of logs will be queried.\nThe timestamp range must be no more than 24 hours and is rounded to the nearest minute. If the range is more than 24 hours, a validation error will be thrown.\n\nFilter by the `source` column to specify specific log sources, such as edge_logs, postgres_logs, etc.\n\nNote: SQL must be written in **ClickHouse SQL dialect**.\n", - "operationId": "v1-get-project-logs", + "summary": "List billing addons and compute instance selections", + "tags": ["Billing"], + "x-endpoint-owners": ["billing"], + "x-fga-permissions": [["infra_add_ons_read"]] + }, + "patch": { + "description": "Selects an addon variant, for example scaling the project’s compute instance up or down, and applies it to the project.", + "operationId": "v1-apply-project-addon", "parameters": [ { "name": "ref", @@ -15135,142 +6218,141 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - }, - { - "name": "sql", - "required": false, - "in": "query", - "description": "Custom SQL query to execute on the logs. See [querying logs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer) for more details.", - "schema": { - "type": "string" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplyProjectAddonBody" + } } + } + }, + "responses": { + "200": { + "description": "" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" }, + "500": { + "description": "Failed to apply project addon" + } + }, + "security": [ { - "name": "iso_timestamp_start", - "required": false, - "in": "query", + "bearer": [] + } + ], + "summary": "Apply or update billing addons, including compute instance size", + "tags": ["Billing"], + "x-endpoint-owners": ["billing"], + "x-fga-permissions": [["infra_add_ons_write"]] + } + }, + "/v1/projects/{ref}/billing/addons/{addon_variant}": { + "delete": { + "description": "Disables the selected addon variant, including rolling the compute instance back to its previous size.", + "operationId": "v1-remove-project-addon", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", "schema": { - "format": "date-time", - "example": "2025-03-01T00:00:00Z", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", "type": "string" } }, { - "name": "iso_timestamp_end", - "required": false, - "in": "query", + "name": "addon_variant", + "required": true, + "in": "path", "schema": { - "format": "date-time", - "example": "2025-03-01T23:59:59Z", - "type": "string" + "example": "pitr_7", + "anyOf": [ + { + "type": "string", + "enum": [ + "ci_micro", + "ci_small", + "ci_medium", + "ci_large", + "ci_xlarge", + "ci_2xlarge", + "ci_4xlarge", + "ci_8xlarge", + "ci_12xlarge", + "ci_16xlarge", + "ci_24xlarge", + "ci_24xlarge_optimized_cpu", + "ci_24xlarge_optimized_memory", + "ci_24xlarge_high_memory", + "ci_48xlarge", + "ci_48xlarge_optimized_cpu", + "ci_48xlarge_optimized_memory", + "ci_48xlarge_high_memory" + ] + }, + { + "type": "string", + "enum": ["cd_default"] + }, + { + "type": "string", + "enum": ["pitr_7", "pitr_14", "pitr_28"] + }, + { + "type": "string", + "enum": ["ipv4_default"] + } + ] } } ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": {} - }, - "error": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "properties": { - "code": { - "type": "number" - }, - "errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "location": { - "type": "string" - }, - "locationType": { - "type": "string" - }, - "message": { - "type": "string" - }, - "reason": { - "type": "string" - } - }, - "required": [ - "domain", - "location", - "locationType", - "message", - "reason" - ] - } - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "required": ["code", "errors", "message", "status"] - } - ] - } - } - } - } - } + "description": "" }, "401": { "description": "Unauthorized" }, - "402": { - "description": "Usage exceeded. Enable additional usage to continue querying" - }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to remove project addon" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["analytics_logs_read"] - } - ], - "summary": "Gets all project's logs in a single log stream", - "tags": ["Analytics"], - "x-badges": [ - { - "name": "OAuth scope: analytics:read", - "position": "after" } ], - "x-endpoint-owners": ["analytics"], - "x-oauth-scope": "analytics:read" + "summary": "Remove billing addons or revert compute instance sizing", + "tags": ["Billing"], + "x-endpoint-owners": ["billing"], + "x-fga-permissions": [["infra_add_ons_write"]] } }, - "/v1/projects/{ref}/analytics/endpoints/usage.api-counts": { + "/v1/projects/{ref}/claim-token": { "get": { - "operationId": "v1-get-project-usage-api-count", + "operationId": "v1-get-project-claim-token", "parameters": [ { "name": "ref", @@ -15284,16 +6366,6 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - }, - { - "name": "interval", - "required": false, - "in": "query", - "schema": { - "example": "1day", - "type": "string", - "enum": ["15min", "30min", "1hr", "3hr", "1day", "3day", "7day"] - } } ], "responses": { @@ -15302,92 +6374,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "format": "date-time" - }, - "total_auth_requests": { - "type": "number" - }, - "total_realtime_requests": { - "type": "number" - }, - "total_rest_requests": { - "type": "number" - }, - "total_storage_requests": { - "type": "number" - } - }, - "required": [ - "timestamp", - "total_auth_requests", - "total_realtime_requests", - "total_rest_requests", - "total_storage_requests" - ] - } - }, - "error": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "properties": { - "code": { - "type": "number" - }, - "errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "location": { - "type": "string" - }, - "locationType": { - "type": "string" - }, - "message": { - "type": "string" - }, - "reason": { - "type": "string" - } - }, - "required": [ - "domain", - "location", - "locationType", - "message", - "reason" - ] - } - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "required": ["code", "errors", "message", "status"] - } - ] - } - } + "$ref": "#/components/schemas/ProjectClaimTokenResponse" } } } @@ -15400,27 +6387,21 @@ }, "429": { "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to get project's usage api counts" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["analytics_usage_read"] } ], - "summary": "Gets project's usage api counts", - "tags": ["Analytics"], - "x-endpoint-owners": ["analytics"] - } - }, - "/v1/projects/{ref}/analytics/endpoints/usage.api-requests-count": { - "get": { - "operationId": "v1-get-project-usage-request-count", + "summary": "Gets project claim token", + "tags": ["Projects"], + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["project_admin_read"]], + "x-internal": true + }, + "post": { + "operationId": "v1-create-project-claim-token", "parameters": [ { "name": "ref", @@ -15442,73 +6423,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "type": "object", - "properties": { - "count": { - "type": "number" - } - }, - "required": ["count"] - } - }, - "error": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "properties": { - "code": { - "type": "number" - }, - "errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "location": { - "type": "string" - }, - "locationType": { - "type": "string" - }, - "message": { - "type": "string" - }, - "reason": { - "type": "string" - } - }, - "required": [ - "domain", - "location", - "locationType", - "message", - "reason" - ] - } - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "required": ["code", "errors", "message", "status"] - } - ] - } - } + "$ref": "#/components/schemas/CreateProjectClaimTokenResponse" } } } @@ -15521,27 +6436,21 @@ }, "429": { "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to get project's usage api requests count" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["analytics_usage_read"] } ], - "summary": "Gets project's usage api requests count", - "tags": ["Analytics"], - "x-endpoint-owners": ["analytics"] - } - }, - "/v1/projects/{ref}/analytics/endpoints/functions.combined-stats": { - "get": { - "operationId": "v1-get-project-function-combined-stats", + "summary": "Creates project claim token", + "tags": ["Projects"], + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_write", "project_admin_write"]], + "x-internal": true + }, + "delete": { + "operationId": "v1-delete-project-claim-token", "parameters": [ { "name": "ref", @@ -15555,23 +6464,50 @@ "example": "abcdefghijklmnopqrst", "type": "string" } + } + ], + "responses": { + "204": { + "description": "" }, - { - "name": "interval", - "required": true, - "in": "query", - "schema": { - "example": "1hr", - "type": "string", - "enum": ["15min", "1hr", "3hr", "1day"] - } + "401": { + "description": "Unauthorized" }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Revokes project claim token", + "tags": ["Projects"], + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_write", "project_admin_write"]], + "x-internal": true + } + }, + "/v1/projects/{ref}/advisors/performance": { + "get": { + "deprecated": true, + "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.", + "operationId": "v1-get-performance-advisors", + "parameters": [ { - "name": "function_id", + "name": "ref", "required": true, - "in": "query", + "in": "path", + "description": "Project ref", "schema": { - "example": "3c078cce-ad70-4148-9f37-4da362789053", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", "type": "string" } } @@ -15582,65 +6518,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": {} - }, - "error": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "properties": { - "code": { - "type": "number" - }, - "errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "location": { - "type": "string" - }, - "locationType": { - "type": "string" - }, - "message": { - "type": "string" - }, - "reason": { - "type": "string" - } - }, - "required": [ - "domain", - "location", - "locationType", - "message", - "reason" - ] - } - }, - "message": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "required": ["code", "errors", "message", "status"] - } - ] - } - } + "$ref": "#/components/schemas/V1ProjectAdvisorsResponse" } } } @@ -15653,27 +6531,31 @@ }, "429": { "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to get project's function combined statistics" } }, "security": [ { "bearer": [] - }, + } + ], + "summary": "Gets project performance advisors.", + "tags": ["Advisors"], + "x-badges": [ { - "fga_permissions": ["analytics_usage_read"] + "name": "OAuth scope: database:read", + "position": "after" } ], - "summary": "Gets a project's function combined statistics", - "tags": ["Analytics"], - "x-endpoint-owners": ["analytics"] + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["advisors_read"]], + "x-oauth-scope": "database:read" } }, - "/v1/projects/{ref}/cli/login-role": { - "post": { - "operationId": "v1-create-login-role", + "/v1/projects/{ref}/advisors/security": { + "get": { + "deprecated": true, + "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.", + "operationId": "v1-get-security-advisors", "parameters": [ { "name": "ref", @@ -15687,50 +6569,25 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "read_only": { - "type": "boolean" - } - }, - "required": ["read_only"], - "example": { - "read_only": true - } - } + }, + { + "name": "lint_type", + "required": false, + "in": "query", + "schema": { + "example": "sql", + "type": "string", + "enum": ["sql"] } } - }, + ], "responses": { - "201": { + "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "role": { - "type": "string", - "minLength": 1 - }, - "password": { - "type": "string", - "minLength": 1 - }, - "ttl_seconds": { - "type": "integer", - "minimum": 1, - "format": "int64" - } - }, - "required": ["role", "password", "ttl_seconds"] + "$ref": "#/components/schemas/V1ProjectAdvisorsResponse" } } } @@ -15743,32 +6600,31 @@ }, "429": { "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to create login role" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_write"] } ], - "summary": "[Beta] Create a login role for CLI with temporary password", - "tags": ["Database"], + "summary": "Gets project security advisors.", + "tags": ["Advisors"], "x-badges": [ { - "name": "OAuth scope: database:write", + "name": "OAuth scope: database:read", "position": "after" } ], - "x-endpoint-owners": ["dev-workflows"], - "x-oauth-scope": "database:write" - }, - "delete": { - "operationId": "v1-delete-login-roles", + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["advisors_read"]], + "x-oauth-scope": "database:read" + } + }, + "/v1/projects/{ref}/analytics/endpoints/logs.all": { + "get": { + "deprecated": true, + "description": "Executes a SQL query on the project's logs.\n\nEither the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided.\nIf both are not provided, only the last 1 minute of logs will be queried.\nThe timestamp range must be no more than 24 hours and is rounded to the nearest minute. If the range is more than 24 hours, a validation error will be thrown.\n\nNote: Unless the `sql` parameter is provided, only edge_logs will be queried. See the [log query docs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer:~:text=logs%20from%20the-,Sources,-drop%2Ddown%3A) for all available sources.\n", + "operationId": "v1-get-project-logs-all", "parameters": [ { "name": "ref", @@ -15782,6 +6638,38 @@ "example": "abcdefghijklmnopqrst", "type": "string" } + }, + { + "name": "sql", + "required": false, + "in": "query", + "description": "Custom SQL query to execute on the logs. See [querying logs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer) for more details.", + "schema": { + "example": "select event_message from edge_logs limit 10", + "type": "string" + } + }, + { + "name": "iso_timestamp_start", + "required": false, + "in": "query", + "schema": { + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "example": "2025-03-01T00:00:00Z", + "type": "string" + } + }, + { + "name": "iso_timestamp_end", + "required": false, + "in": "query", + "schema": { + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "example": "2025-03-01T23:59:59Z", + "type": "string" + } } ], "responses": { @@ -15790,14 +6678,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "enum": ["ok"] - } - }, - "required": ["message"] + "$ref": "#/components/schemas/AnalyticsResponse" } } } @@ -15805,40 +6686,39 @@ "401": { "description": "Unauthorized" }, + "402": { + "description": "Usage exceeded. Enable additional usage to continue querying" + }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to delete login roles" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_write"] } ], - "summary": "[Beta] Delete existing login roles used by CLI", - "tags": ["Database"], + "summary": "Gets project's logs", + "tags": ["Analytics"], "x-badges": [ { - "name": "OAuth scope: database:write", + "name": "OAuth scope: analytics:read", "position": "after" } ], - "x-endpoint-owners": ["dev-workflows"], - "x-oauth-scope": "database:write" + "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_logs_read"]], + "x-oauth-scope": "analytics:read" } }, - "/v1/projects/{ref}/database/migrations": { + "/v1/projects/{ref}/analytics/endpoints/logs": { "get": { - "description": "Only available to selected partner OAuth apps", - "operationId": "v1-list-migration-history", + "deprecated": false, + "description": "Executes an SQL or LQL query on the project's unified logs stream.\n\nEither the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided.\nIf both are not provided, only the last 1 minute of logs will be queried.\nThe timestamp range must be no more than 24 hours and is rounded to the nearest minute. If the range is more than 24 hours, a validation error will be thrown.\n\nFilter by the `source` column to specify specific log sources, such as edge_logs, postgres_logs, etc.\n\nNote: SQL must be written in **ClickHouse SQL dialect**.\n", + "operationId": "v1-get-project-logs", "parameters": [ { "name": "ref", @@ -15852,6 +6732,38 @@ "example": "abcdefghijklmnopqrst", "type": "string" } + }, + { + "name": "sql", + "required": false, + "in": "query", + "description": "Custom SQL query to execute on the logs. See [querying logs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer) for more details.", + "schema": { + "example": "select event_message from edge_logs limit 10", + "type": "string" + } + }, + { + "name": "iso_timestamp_start", + "required": false, + "in": "query", + "schema": { + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "example": "2025-03-01T00:00:00Z", + "type": "string" + } + }, + { + "name": "iso_timestamp_end", + "required": false, + "in": "query", + "schema": { + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "example": "2025-03-01T23:59:59Z", + "type": "string" + } } ], "responses": { @@ -15860,20 +6772,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "version": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string" - } - }, - "required": ["version"] - } + "$ref": "#/components/schemas/AnalyticsResponse" } } } @@ -15881,38 +6780,37 @@ "401": { "description": "Unauthorized" }, + "402": { + "description": "Usage exceeded. Enable additional usage to continue querying" + }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to list database migrations" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_migrations_read"] } ], - "summary": "List applied migration versions", - "tags": ["Database"], + "summary": "Gets all project's logs in a single log stream", + "tags": ["Analytics"], "x-badges": [ { - "name": "OAuth scope: database:read", + "name": "OAuth scope: analytics:read", "position": "after" - } - ], - "x-endpoint-owners": ["infra"], - "x-oauth-scope": "database:read" - }, - "post": { - "description": "Only available to selected partner OAuth apps", - "operationId": "v1-apply-a-migration", + } + ], + "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_logs_read"]], + "x-oauth-scope": "analytics:read" + } + }, + "/v1/projects/{ref}/analytics/endpoints/usage.api-counts": { + "get": { + "operationId": "v1-get-project-usage-api-count", "parameters": [ { "name": "ref", @@ -15928,46 +6826,26 @@ } }, { - "name": "Idempotency-Key", + "name": "interval", "required": false, - "in": "header", - "description": "A unique key to ensure the same migration is tracked only once.", + "in": "query", "schema": { - "type": "string" + "example": "1day", + "type": "string", + "enum": ["15min", "30min", "1hr", "3hr", "1day", "3day", "7day"] } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string" - }, - "rollback": { - "type": "string" - } - }, - "required": ["query"], - "example": { - "query": "create table public.widgets(id bigint primary key);", - "name": "create_widgets_table", - "rollback": "drop table if exists public.widgets;" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1GetUsageApiCountResponse" } } } - } - }, - "responses": { - "200": { - "description": "" }, "401": { "description": "Unauthorized" @@ -15979,31 +6857,23 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to apply database migration" + "description": "Failed to get project's usage api counts" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_migrations_write"] } ], - "summary": "Apply a database migration", - "tags": ["Database"], - "x-badges": [ - { - "name": "OAuth scope: database:write", - "position": "after" - } - ], - "x-endpoint-owners": ["infra"], - "x-oauth-scope": "database:write" - }, - "put": { - "description": "Only available to selected partner OAuth apps", - "operationId": "v1-upsert-a-migration", + "summary": "Gets project's usage api counts", + "tags": ["Analytics"], + "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_usage_read"]] + } + }, + "/v1/projects/{ref}/analytics/endpoints/usage.api-requests-count": { + "get": { + "operationId": "v1-get-project-usage-request-count", "parameters": [ { "name": "ref", @@ -16017,48 +6887,18 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - }, - { - "name": "Idempotency-Key", - "required": false, - "in": "header", - "description": "A unique key to ensure the same migration is tracked only once.", - "schema": { - "type": "string" - } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string" - }, - "rollback": { - "type": "string" - } - }, - "required": ["query"], - "example": { - "query": "create table public.widgets(id bigint primary key);", - "name": "create_widgets_table", - "rollback": "drop table if exists public.widgets;" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1GetUsageApiRequestsCountResponse" } } } - } - }, - "responses": { - "200": { - "description": "" }, "401": { "description": "Unauthorized" @@ -16070,31 +6910,23 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to upsert database migration" + "description": "Failed to get project's usage api requests count" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_migrations_write"] - } - ], - "summary": "Upsert a database migration without applying", - "tags": ["Database"], - "x-badges": [ - { - "name": "OAuth scope: database:write", - "position": "after" } ], - "x-endpoint-owners": ["infra"], - "x-oauth-scope": "database:write" - }, - "delete": { - "description": "Only available to selected partner OAuth apps", - "operationId": "v1-rollback-migrations", + "summary": "Gets project's usage api requests count", + "tags": ["Analytics"], + "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_usage_read"]] + } + }, + "/v1/projects/{ref}/analytics/endpoints/functions.combined-stats": { + "get": { + "operationId": "v1-get-project-function-combined-stats", "parameters": [ { "name": "ref", @@ -16110,20 +6942,35 @@ } }, { - "name": "gte", + "name": "interval", "required": true, "in": "query", - "description": "Rollback migrations greater or equal to this version", "schema": { - "pattern": "^\\d+$", - "example": "20250312000000", + "example": "1hr", + "type": "string", + "enum": ["15min", "1hr", "3hr", "1day"] + } + }, + { + "name": "function_id", + "required": true, + "in": "query", + "schema": { + "example": "3c078cce-ad70-4148-9f37-4da362789053", "type": "string" } } ], "responses": { "200": { - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnalyticsResponse" + } + } + } }, "401": { "description": "Unauthorized" @@ -16135,33 +6982,24 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to rollback database migration" + "description": "Failed to get project's function combined statistics" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_migrations_write"] - } - ], - "summary": "Rollback database migrations and remove them from history table", - "tags": ["Database"], - "x-badges": [ - { - "name": "OAuth scope: database:write", - "position": "after" } ], - "x-endpoint-owners": ["infra"], - "x-oauth-scope": "database:write" + "summary": "Gets a project's function combined statistics", + "tags": ["Analytics"], + "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_usage_read"]] } }, - "/v1/projects/{ref}/database/migrations/{version}": { + "/v1/projects/{ref}/analytics/endpoints/metrics": { "get": { - "description": "Only available to selected partner OAuth apps", - "operationId": "v1-get-a-migration", + "description": "Prometheus scrape endpoint. Returns metrics of a customer project in the Prometheus open exposition format.", + "operationId": "v1-scrape-project-metrics", "parameters": [ { "name": "ref", @@ -16175,53 +7013,20 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - }, - { - "name": "version", - "required": true, - "in": "path", - "schema": { - "pattern": "^\\d+$", - "example": "20250312000000", - "type": "string" - } } ], "responses": { "200": { - "description": "", + "description": "Prometheus / OpenMetrics text exposition", "content": { - "application/json": { + "text/plain": { "schema": { - "type": "object", - "properties": { - "version": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string" - }, - "statements": { - "type": "array", - "items": { - "type": "string" - } - }, - "rollback": { - "type": "array", - "items": { - "type": "string" - } - }, - "created_by": { - "type": "string" - }, - "idempotency_key": { - "type": "string" - } - }, - "required": ["version"] + "type": "string" + } + }, + "application/openmetrics-text": { + "schema": { + "type": "string" } } } @@ -16236,31 +7041,30 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to get database migration" + "description": "Failed to fetch project's metrics" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_migrations_read"] } ], - "summary": "Fetch an existing entry from migration history", - "tags": ["Database"], + "summary": "Scrape a project's metrics", + "tags": ["Analytics"], "x-badges": [ { - "name": "OAuth scope: database:read", + "name": "OAuth scope: analytics:read", "position": "after" } ], - "x-endpoint-owners": ["infra"], - "x-oauth-scope": "database:read" - }, - "patch": { - "description": "Only available to selected partner OAuth apps", - "operationId": "v1-patch-a-migration", + "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_logs_read"]], + "x-oauth-scope": "analytics:read" + } + }, + "/v1/projects/{ref}/cli/login-role": { + "post": { + "operationId": "v1-create-login-role", "parameters": [ { "name": "ref", @@ -16274,16 +7078,6 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - }, - { - "name": "version", - "required": true, - "in": "path", - "schema": { - "pattern": "^\\d+$", - "example": "20250312000000", - "type": "string" - } } ], "requestBody": { @@ -16291,26 +7085,21 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "rollback": { - "type": "string" - } - }, - "example": { - "name": "create_widgets_table", - "rollback": "drop table if exists public.widgets;" + "$ref": "#/components/schemas/CreateRoleBody" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateRoleResponse" } } } - } - }, - "responses": { - "200": { - "description": "" }, "401": { "description": "Unauthorized" @@ -16322,18 +7111,15 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to patch database migration" + "description": "Failed to create login role" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_migrations_write"] } ], - "summary": "Patch an existing entry in migration history", + "summary": "[Beta] Create a login role for CLI with temporary password", "tags": ["Database"], "x-badges": [ { @@ -16341,13 +7127,12 @@ "position": "after" } ], - "x-endpoint-owners": ["infra"], + "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["database_write"]], "x-oauth-scope": "database:write" - } - }, - "/v1/projects/{ref}/database/query": { - "post": { - "operationId": "v1-run-a-query", + }, + "delete": { + "operationId": "v1-delete-login-roles", "parameters": [ { "name": "ref", @@ -16363,37 +7148,16 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "type": "string", - "minLength": 1 - }, - "parameters": { - "type": "array", - "items": {} - }, - "read_only": { - "type": "boolean" - } - }, - "required": ["query"], - "example": { - "query": "select * from pg_stat_activity limit 1;", - "read_only": true + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteRolesResponse" } } } - } - }, - "responses": { - "201": { - "description": "" }, "401": { "description": "Unauthorized" @@ -16405,21 +7169,15 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to run sql query" + "description": "Failed to delete login roles" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_write"] - }, - { - "fga_permissions": ["database_read"] } ], - "summary": "[Beta] Run sql query", + "summary": "[Beta] Delete existing login roles used by CLI", "tags": ["Database"], "x-badges": [ { @@ -16427,14 +7185,14 @@ "position": "after" } ], - "x-endpoint-owners": ["management-api"], + "x-endpoint-owners": ["dev-workflows"], + "x-fga-permissions": [["database_write"]], "x-oauth-scope": "database:write" } }, - "/v1/projects/{ref}/database/query/read-only": { - "post": { - "description": "All entity references must be schema qualified.", - "operationId": "v1-read-only-query", + "/v1/projects/{ref}/database/migrations": { + "get": { + "operationId": "v1-list-migration-history", "parameters": [ { "name": "ref", @@ -16450,33 +7208,16 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "query": { - "type": "string", - "minLength": 1 - }, - "parameters": { - "type": "array", - "items": {} - } - }, - "required": ["query"], - "example": { - "query": "select * from pg_stat_activity limit 1;" + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ListMigrationsResponse" } } } - } - }, - "responses": { - "201": { - "description": "" }, "401": { "description": "Unauthorized" @@ -16488,18 +7229,15 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to run read-only sql query" + "description": "Failed to list database migrations" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_read"] } ], - "summary": "[Beta] Run a sql query as supabase_read_only_user", + "summary": "List applied migration versions", "tags": ["Database"], "x-badges": [ { @@ -16507,13 +7245,12 @@ "position": "after" } ], - "x-endpoint-owners": ["management-api"], + "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_migrations_read"]], "x-oauth-scope": "database:read" - } - }, - "/v1/projects/{ref}/database/webhooks/enable": { + }, "post": { - "operationId": "v1-enable-database-webhook", + "operationId": "v1-apply-a-migration", "parameters": [ { "name": "ref", @@ -16527,10 +7264,29 @@ "example": "abcdefghijklmnopqrst", "type": "string" } + }, + { + "name": "Idempotency-Key", + "required": false, + "in": "header", + "description": "A unique key to ensure the same migration is tracked only once.", + "schema": { + "type": "string" + } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1CreateMigrationBody" + } + } + } + }, "responses": { - "201": { + "200": { "description": "" }, "401": { @@ -16543,18 +7299,15 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to enable Database Webhooks on the project" + "description": "Failed to apply database migration" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_webhooks_config_write"] } ], - "summary": "[Beta] Enables Database Webhooks on the project", + "summary": "Apply a database migration", "tags": ["Database"], "x-badges": [ { @@ -16562,15 +7315,12 @@ "position": "after" } ], - "x-endpoint-owners": ["management-api", "infra"], + "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_migrations_write"]], "x-oauth-scope": "database:write" - } - }, - "/v1/projects/{ref}/database/context": { - "get": { - "deprecated": true, - "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.", - "operationId": "v1-get-database-metadata", + }, + "put": { + "operationId": "v1-upsert-a-migration", "parameters": [ { "name": "ref", @@ -16584,47 +7334,30 @@ "example": "abcdefghijklmnopqrst", "type": "string" } + }, + { + "name": "Idempotency-Key", + "required": false, + "in": "header", + "description": "A unique key to ensure the same migration is tracked only once.", + "schema": { + "type": "string" + } } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "databases": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "schemas": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "required": ["name"], - "additionalProperties": true - } - } - }, - "required": ["name", "schemas"], - "additionalProperties": true - } - } - }, - "required": ["databases"] - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1UpsertMigrationBody" } } + } + }, + "responses": { + "200": { + "description": "" }, "401": { "description": "Unauthorized" @@ -16634,31 +7367,30 @@ }, "429": { "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to upsert database migration" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_read"] } ], - "summary": "Gets database metadata for the given project.", + "summary": "Upsert a database migration without applying", "tags": ["Database"], "x-badges": [ { - "name": "OAuth scope: projects:read", + "name": "OAuth scope: database:write", "position": "after" } ], - "x-endpoint-owners": ["management-api"], - "x-oauth-scope": "projects:read" - } - }, - "/v1/projects/{ref}/database/password": { - "patch": { - "operationId": "v1-update-database-password", + "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_migrations_write"]], + "x-oauth-scope": "database:write" + }, + "delete": { + "operationId": "v1-rollback-migrations", "parameters": [ { "name": "ref", @@ -16672,44 +7404,22 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "minLength": 4 - } - }, - "required": ["password"], - "example": { - "password": "correct-horse-battery-staple" - } - } + }, + { + "name": "gte", + "required": true, + "in": "query", + "description": "Rollback migrations greater or equal to this version", + "schema": { + "pattern": "^\\d+$", + "example": "20250312000000", + "type": "string" } } - }, + ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "required": ["message"] - } - } - } + "description": "" }, "401": { "description": "Unauthorized" @@ -16721,18 +7431,15 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to update database password" + "description": "Failed to rollback database migration" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_config_write"] } ], - "summary": "Updates the database password", + "summary": "Rollback database migrations and remove them from history table", "tags": ["Database"], "x-badges": [ { @@ -16740,14 +7447,14 @@ "position": "after" } ], - "x-endpoint-owners": ["management-api", "infra"], + "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_migrations_write"]], "x-oauth-scope": "database:write" } }, - "/v1/projects/{ref}/database/jit": { + "/v1/projects/{ref}/database/migrations/{version}": { "get": { - "description": "Mappings of roles a user can assume in the project database", - "operationId": "v1-get-jit-access", + "operationId": "v1-get-a-migration", "parameters": [ { "name": "ref", @@ -16761,6 +7468,16 @@ "example": "abcdefghijklmnopqrst", "type": "string" } + }, + { + "name": "version", + "required": true, + "in": "path", + "schema": { + "pattern": "^\\d+$", + "example": "20250312000000", + "type": "string" + } } ], "responses": { @@ -16769,62 +7486,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "user_id": { - "type": "string", - "format": "uuid" - }, - "user_roles": { - "type": "array", - "items": { - "type": "object", - "properties": { - "role": { - "type": "string", - "minLength": 1 - }, - "expires_at": { - "type": "number" - }, - "allowed_networks": { - "type": "object", - "properties": { - "allowed_cidrs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - }, - "allowed_cidrs_v6": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - } - } - }, - "branches_only": { - "type": "boolean" - } - }, - "required": ["role"] - } - } - }, - "required": ["user_roles"] + "$ref": "#/components/schemas/V1GetMigrationResponse" } } } @@ -16839,18 +7501,15 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to list database jit access" + "description": "Failed to get database migration" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_jit_read"] } ], - "summary": "Get user-id to role mappings for JIT access", + "summary": "Fetch an existing entry from migration history", "tags": ["Database"], "x-badges": [ { @@ -16858,12 +7517,12 @@ "position": "after" } ], - "x-endpoint-owners": ["security"], + "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_migrations_read"]], "x-oauth-scope": "database:read" }, - "post": { - "description": "Authorizes the request to assume a role in the project database", - "operationId": "v1-authorize-jit-access", + "patch": { + "operationId": "v1-patch-a-migration", "parameters": [ { "name": "ref", @@ -16877,6 +7536,16 @@ "example": "abcdefghijklmnopqrst", "type": "string" } + }, + { + "name": "version", + "required": true, + "in": "path", + "schema": { + "pattern": "^\\d+$", + "example": "20250312000000", + "type": "string" + } } ], "requestBody": { @@ -16884,88 +7553,14 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "role": { - "type": "string", - "minLength": 1 - }, - "rhost": { - "type": "string", - "minLength": 1 - } - }, - "required": ["role", "rhost"], - "example": { - "role": "postgres", - "rhost": "203.0.113.10" - } + "$ref": "#/components/schemas/V1PatchMigrationBody" } } } }, "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "user_id": { - "type": "string", - "format": "uuid" - }, - "user_role": { - "type": "object", - "properties": { - "role": { - "type": "string", - "minLength": 1 - }, - "expires_at": { - "type": "number" - }, - "allowed_networks": { - "type": "object", - "properties": { - "allowed_cidrs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - }, - "allowed_cidrs_v6": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - } - } - }, - "branches_only": { - "type": "boolean" - } - }, - "required": ["role"] - } - }, - "required": ["user_id", "user_role"] - } - } - } + "description": "" }, "401": { "description": "Unauthorized" @@ -16977,31 +7572,30 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to authorize database jit access" + "description": "Failed to patch database migration" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_jit_read"] } ], - "summary": "Authorize user-id to role mappings for JIT access", + "summary": "Patch an existing entry in migration history", "tags": ["Database"], "x-badges": [ { - "name": "OAuth scope: database:read", + "name": "OAuth scope: database:write", "position": "after" } ], - "x-endpoint-owners": ["security"], - "x-oauth-scope": "database:read" - }, - "put": { - "description": "Modifies the roles that can be assumed and for how long", - "operationId": "v1-update-jit-access", + "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_migrations_write"]], + "x-oauth-scope": "database:write" + } + }, + "/v1/projects/{ref}/database/query": { + "post": { + "operationId": "v1-run-a-query", "parameters": [ { "name": "ref", @@ -17022,149 +7616,14 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "user_id": { - "type": "string", - "format": "uuid", - "minLength": 1 - }, - "roles": { - "type": "array", - "items": { - "type": "object", - "properties": { - "role": { - "type": "string", - "minLength": 1 - }, - "expires_at": { - "type": "number" - }, - "allowed_networks": { - "type": "object", - "properties": { - "allowed_cidrs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - }, - "allowed_cidrs_v6": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - } - } - }, - "branches_only": { - "type": "boolean" - } - }, - "required": ["role"] - } - } - }, - "required": ["user_id", "roles"], - "example": { - "user_id": "55555555-5555-4555-8555-555555555555", - "roles": [ - { - "role": "postgres", - "expires_at": 1740787200, - "allowed_networks": { - "allowed_cidrs": [ - { - "cidr": "203.0.113.0/24" - } - ] - }, - "branches_only": false - } - ] - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "user_id": { - "type": "string", - "format": "uuid" - }, - "user_roles": { - "type": "array", - "items": { - "type": "object", - "properties": { - "role": { - "type": "string", - "minLength": 1 - }, - "expires_at": { - "type": "number" - }, - "allowed_networks": { - "type": "object", - "properties": { - "allowed_cidrs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - }, - "allowed_cidrs_v6": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - } - } - }, - "branches_only": { - "type": "boolean" - } - }, - "required": ["role"] - } - } - }, - "required": ["user_roles"] - } + "$ref": "#/components/schemas/V1RunQueryBody" } } + } + }, + "responses": { + "201": { + "description": "" }, "401": { "description": "Unauthorized" @@ -17176,26 +7635,31 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to update JIT access" + "description": "Failed to run sql query" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_jit_write"] } ], - "summary": "Updates a user mapping for JIT access", + "summary": "[Beta] Run sql query", "tags": ["Database"], - "x-endpoint-owners": ["security"] + "x-badges": [ + { + "name": "OAuth scope: database:write", + "position": "after" + } + ], + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["database_read"], ["database_write"]], + "x-oauth-scope": "database:write" } }, - "/v1/projects/{ref}/database/jit/list": { - "get": { - "description": "Mappings of roles a user can assume in the project database", - "operationId": "v1-list-jit-access", + "/v1/projects/{ref}/database/query/read-only": { + "post": { + "description": "All entity references must be schema qualified.", + "operationId": "v1-read-only-query", "parameters": [ { "name": "ref", @@ -17211,173 +7675,19 @@ } } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "user_id": { - "type": "string", - "format": "uuid" - }, - "primary_email": { - "type": "string", - "nullable": true - }, - "invite_id": { - "type": "null" - }, - "expires_at": { - "type": "null" - }, - "user_roles": { - "type": "array", - "items": { - "type": "object", - "properties": { - "role": { - "type": "string", - "minLength": 1 - }, - "expires_at": { - "type": "number" - }, - "allowed_networks": { - "type": "object", - "properties": { - "allowed_cidrs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - }, - "allowed_cidrs_v6": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - } - } - }, - "branches_only": { - "type": "boolean" - } - }, - "required": ["role"] - } - } - }, - "required": [ - "user_id", - "primary_email", - "invite_id", - "expires_at", - "user_roles" - ] - }, - { - "type": "object", - "properties": { - "user_id": { - "type": "null" - }, - "primary_email": { - "type": "string" - }, - "invite_id": { - "type": "string", - "format": "uuid" - }, - "expires_at": { - "type": "string" - }, - "user_roles": { - "type": "array", - "items": { - "type": "object", - "properties": { - "role": { - "type": "string", - "minLength": 1 - }, - "expires_at": { - "type": "number" - }, - "allowed_networks": { - "type": "object", - "properties": { - "allowed_cidrs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - }, - "allowed_cidrs_v6": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - } - } - }, - "branches_only": { - "type": "boolean" - } - }, - "required": ["role"] - } - } - }, - "required": [ - "user_id", - "primary_email", - "invite_id", - "expires_at", - "user_roles" - ] - } - ] - } - } - }, - "required": ["items"] - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1ReadOnlyQueryBody" } } + } + }, + "responses": { + "201": { + "description": "" }, "401": { "description": "Unauthorized" @@ -17389,26 +7699,30 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to list database jit access" + "description": "Failed to run read-only sql query" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_jit_read"] } ], - "summary": "List all user-id to role mappings for JIT access", + "summary": "[Beta] Run a sql query as supabase_read_only_user", "tags": ["Database"], - "x-endpoint-owners": ["security"] + "x-badges": [ + { + "name": "OAuth scope: database:read", + "position": "after" + } + ], + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["database_read"]], + "x-oauth-scope": "database:read" } }, - "/v1/projects/{ref}/database/jit/invite": { + "/v1/projects/{ref}/database/webhooks/enable": { "post": { - "description": "Invites the external user and sets initial roles that can be assumed and for how long", - "operationId": "v1-invite-external-jit-access", + "operationId": "v1-enable-database-webhook", "parameters": [ { "name": "ref", @@ -17424,155 +7738,68 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email", - "minLength": 1 - }, - "roles": { - "type": "array", - "items": { - "type": "object", - "properties": { - "role": { - "type": "string", - "minLength": 1 - }, - "expires_at": { - "type": "number" - }, - "allowed_networks": { - "type": "object", - "properties": { - "allowed_cidrs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - }, - "allowed_cidrs_v6": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - } - } - }, - "branches_only": { - "type": "boolean" - } - }, - "required": ["role"] - } - } - }, - "required": ["email", "roles"], - "example": { - "email": "external-user@somedomain.xyz", - "roles": [ - { - "role": "postgres", - "expires_at": 1740787200, - "allowed_networks": { - "allowed_cidrs": [ - { - "cidr": "203.0.113.0/24" - } - ] - }, - "branches_only": false - } - ] - } - } - } + "responses": { + "201": { + "description": "" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to enable Database Webhooks on the project" } }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email" - }, - "invite_id": { - "type": "string", - "format": "uuid" - }, - "user_roles": { - "type": "array", - "items": { - "type": "object", - "properties": { - "role": { - "type": "string", - "minLength": 1 - }, - "expires_at": { - "type": "number" - }, - "allowed_networks": { - "type": "object", - "properties": { - "allowed_cidrs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - }, - "allowed_cidrs_v6": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - } - } - }, - "branches_only": { - "type": "boolean" - } - }, - "required": ["role"] - } - } - }, - "required": ["email", "invite_id", "user_roles"] + "security": [ + { + "bearer": [] + } + ], + "summary": "[Beta] Enables Database Webhooks on the project", + "tags": ["Database"], + "x-badges": [ + { + "name": "OAuth scope: database:write", + "position": "after" + } + ], + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["database_webhooks_config_write"]], + "x-oauth-scope": "database:write" + } + }, + "/v1/projects/{ref}/database/context": { + "get": { + "deprecated": true, + "description": "This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable.", + "operationId": "v1-get-database-metadata", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetProjectDbMetadataResponse" } } } @@ -17585,28 +7812,29 @@ }, "429": { "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to invite external user" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_jit_write"] } ], - "summary": "Invites an external user to a database for JIT access", + "summary": "Gets database metadata for the given project.", "tags": ["Database"], - "x-endpoint-owners": ["security"] + "x-badges": [ + { + "name": "OAuth scope: projects:read", + "position": "after" + } + ], + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["database_read"]], + "x-oauth-scope": "projects:read" } }, - "/v1/projects/{ref}/database/jit/invite/accept": { - "post": { - "description": "Accepts the invitation to JIT database access", - "operationId": "v1-accept-invite-external-jit-access", + "/v1/projects/{ref}/database/password": { + "patch": { + "operationId": "v1-update-database-password", "parameters": [ { "name": "ref", @@ -17627,23 +7855,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email", - "minLength": 1 - }, - "token": { - "type": "string", - "minLength": 1 - } - }, - "required": ["email", "token"], - "example": { - "email": "external-user@somedomain.xyz", - "token": "" - } + "$ref": "#/components/schemas/V1UpdatePasswordBody" } } } @@ -17654,68 +7866,22 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "user_id": { - "type": "string", - "format": "uuid" - }, - "user_roles": { - "type": "array", - "items": { - "type": "object", - "properties": { - "role": { - "type": "string", - "minLength": 1 - }, - "expires_at": { - "type": "number" - }, - "allowed_networks": { - "type": "object", - "properties": { - "allowed_cidrs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - }, - "allowed_cidrs_v6": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cidr": { - "type": "string" - } - }, - "required": ["cidr"] - } - } - } - }, - "branches_only": { - "type": "boolean" - } - }, - "required": ["role"] - } - } - }, - "required": ["user_roles"] + "$ref": "#/components/schemas/V1UpdatePasswordResponse" } } } }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, "500": { - "description": "Failed to accept invitation" + "description": "Failed to update database password" } }, "security": [ @@ -17723,15 +7889,23 @@ "bearer": [] } ], - "summary": "Accepts invitation for JIT database access", + "summary": "Updates the database password", "tags": ["Database"], - "x-endpoint-owners": ["security"] + "x-badges": [ + { + "name": "OAuth scope: database:write", + "position": "after" + } + ], + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["database_config_write"]], + "x-oauth-scope": "database:write" } }, - "/v1/projects/{ref}/database/jit/invite/{invite_id}": { - "delete": { - "description": "Revokes and deletes the invitation", - "operationId": "v1-delete-invite-external-jit-access", + "/v1/projects/{ref}/database/jit": { + "get": { + "description": "Mappings of roles a user can assume in the project database", + "operationId": "v1-get-jit-access", "parameters": [ { "name": "ref", @@ -17745,21 +7919,18 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - }, - { - "name": "invite_id", - "required": true, - "in": "path", - "schema": { - "format": "uuid", - "example": "55555555-5555-4555-8555-555555555555", - "type": "string" - } } ], "responses": { "200": { - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JitAccessResponse" + } + } + } }, "401": { "description": "Unauthorized" @@ -17771,26 +7942,29 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to revoke invite for external user" + "description": "Failed to list database jit access" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_jit_write"] } ], - "summary": "Deletes the invite for an external user to a database for JIT access", + "summary": "Get user-id to role mappings for JIT access", "tags": ["Database"], - "x-endpoint-owners": ["security"] - } - }, - "/v1/projects/{ref}/database/jit/{user_id}": { - "delete": { - "description": "Remove JIT mappings of a user, revoking all JIT database access", - "operationId": "v1-delete-jit-access", + "x-badges": [ + { + "name": "OAuth scope: database:read", + "position": "after" + } + ], + "x-endpoint-owners": ["security"], + "x-fga-permissions": [["database_jit_read"]], + "x-oauth-scope": "database:read" + }, + "post": { + "description": "Authorizes the request to assume a role in the project database", + "operationId": "v1-authorize-jit-access", "parameters": [ { "name": "ref", @@ -17804,21 +7978,97 @@ "example": "abcdefghijklmnopqrst", "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizeJitAccessBody" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JitAuthorizeAccessResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to authorize database jit access" + } + }, + "security": [ { - "name": "user_id", + "bearer": [] + } + ], + "summary": "Authorize user-id to role mappings for JIT access", + "tags": ["Database"], + "x-badges": [ + { + "name": "OAuth scope: database:read", + "position": "after" + } + ], + "x-endpoint-owners": ["security"], + "x-fga-permissions": [["database_jit_read"]], + "x-oauth-scope": "database:read" + }, + "put": { + "description": "Modifies the roles that can be assumed and for how long", + "operationId": "v1-update-jit-access", + "parameters": [ + { + "name": "ref", "required": true, "in": "path", + "description": "Project ref", "schema": { - "format": "uuid", - "example": "55555555-5555-4555-8555-555555555555", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateJitAccessBody" + } + } + } + }, "responses": { "200": { - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JitAccessResponse" + } + } + } }, "401": { "description": "Unauthorized" @@ -17830,26 +8080,24 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to remove JIT access" + "description": "Failed to update JIT access" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_jit_write"] } ], - "summary": "Delete JIT access by user-id", + "summary": "Updates a user mapping for JIT access", "tags": ["Database"], - "x-endpoint-owners": ["security"] + "x-endpoint-owners": ["security"], + "x-fga-permissions": [["database_jit_write"]] } }, - "/v1/projects/{ref}/database/openapi": { + "/v1/projects/{ref}/database/jit/list": { "get": { - "description": "Returns the PostgREST OpenAPI specification for the project. This is the replacement for querying `/rest/v1/` directly with the anon key.", - "operationId": "v1-get-database-openapi", + "description": "Mappings of roles a user can assume in the project database", + "operationId": "v1-list-jit-access", "parameters": [ { "name": "ref", @@ -17863,16 +8111,6 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - }, - { - "name": "schema", - "required": false, - "in": "query", - "description": "The database schema to generate the OpenAPI spec for", - "schema": { - "default": "public", - "type": "string" - } } ], "responses": { @@ -17881,7 +8119,7 @@ "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/JitListAccessResponse" } } } @@ -17896,33 +8134,24 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to fetch PostgREST OpenAPI spec" + "description": "Failed to list database jit access" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_read"] } ], - "summary": "Get PostgREST OpenAPI spec", + "summary": "List all user-id to role mappings for JIT access", "tags": ["Database"], - "x-badges": [ - { - "name": "OAuth scope: database:read", - "position": "after" - } - ], - "x-endpoint-owners": ["management-api"], - "x-oauth-scope": "database:read" + "x-endpoint-owners": ["security"], + "x-fga-permissions": [["database_jit_write"]] } }, - "/v1/projects/{ref}/functions": { - "get": { - "description": "Returns all functions you've previously added to the specified project.", - "operationId": "v1-list-all-functions", + "/v1/projects/{ref}/database/jit/invite": { + "post": { + "description": "Invites the external user and sets initial roles that can be assumed and for how long", + "operationId": "v1-invite-external-jit-access", "parameters": [ { "name": "ref", @@ -17938,66 +8167,23 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteExternalUserJitAccessBody" + } + } + } + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["ACTIVE", "REMOVED", "THROTTLED"] - }, - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, - "verify_jwt": { - "type": "boolean" - }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" - }, - "import_map_path": { - "type": "string" - }, - "ezbr_sha256": { - "type": "string" - } - }, - "required": [ - "id", - "slug", - "name", - "status", - "version", - "created_at", - "updated_at" - ] - } + "$ref": "#/components/schemas/InviteExternalUserJitResponse" } } } @@ -18012,32 +8198,24 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to retrieve project's functions" + "description": "Failed to invite external user" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["edge_functions_read"] - } - ], - "summary": "List all functions", - "tags": ["Edge Functions"], - "x-badges": [ - { - "name": "OAuth scope: edge_functions:read", - "position": "after" } ], - "x-endpoint-owners": ["functions"], - "x-oauth-scope": "edge_functions:read" - }, + "summary": "Invites an external user to a database for JIT access", + "tags": ["Database"], + "x-endpoint-owners": ["security"], + "x-fga-permissions": [["database_jit_write"]] + } + }, + "/v1/projects/{ref}/database/jit/invite/accept": { "post": { - "deprecated": true, - "description": "This endpoint is deprecated - use the deploy endpoint. Creates a function and adds it to the specified project.", - "operationId": "v1-create-a-function", + "description": "Accepts the invitation to JIT database access", + "operationId": "v1-accept-invite-external-jit-access", "parameters": [ { "name": "ref", @@ -18051,179 +8229,80 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - }, - { - "name": "slug", - "required": false, - "in": "query", - "schema": { - "pattern": "^[A-Za-z0-9_-]+$", - "example": "hello-world", - "type": "string" - } - }, - { - "name": "name", - "required": false, - "in": "query", - "schema": { - "example": "Hello World", - "type": "string" - } - }, - { - "name": "verify_jwt", - "required": false, - "in": "query", - "description": "Boolean string, true or false", - "schema": { - "example": true, - "type": "boolean" - } - }, - { - "name": "import_map", - "required": false, - "in": "query", - "description": "Boolean string, true or false", - "schema": { - "example": false, - "type": "boolean" - } - }, - { - "name": "entrypoint_path", - "required": false, - "in": "query", - "schema": { - "example": "index.ts", - "type": "string" - } - }, - { - "name": "import_map_path", - "required": false, - "in": "query", - "schema": { - "example": "import_map.json", - "type": "string" - } - }, - { - "name": "ezbr_sha256", - "required": false, - "in": "query", - "schema": { - "example": "44c691990518d25498f0fd80cf6631ecf2b58eb9c5eb2a087dd1688f2904dac7", - "type": "string" - } } ], "requestBody": { "required": true, "content": { - "application/vnd.denoland.eszip": { - "schema": { - "type": "string", - "format": "binary" - } - }, "application/json": { "schema": { - "type": "object", - "properties": { - "slug": { - "type": "string", - "pattern": "^[A-Za-z][A-Za-z0-9_-]*$" - }, - "name": { - "type": "string" - }, - "body": { - "type": "string" - }, - "verify_jwt": { - "type": "boolean" - } - }, - "required": ["slug", "name", "body"], - "example": { - "slug": "hello-world", - "name": "Hello World", - "body": "Deno.serve(() => new Response('Hello, world!'))", - "verify_jwt": true - } + "$ref": "#/components/schemas/AcceptInviteExternalUserJitAccessBody" } } } }, "responses": { - "201": { + "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["ACTIVE", "REMOVED", "THROTTLED"] - }, - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, - "verify_jwt": { - "type": "boolean" - }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" - }, - "import_map_path": { - "type": "string" - }, - "ezbr_sha256": { - "type": "string" - } - }, - "required": [ - "id", - "slug", - "name", - "status", - "version", - "created_at", - "updated_at" - ] + "$ref": "#/components/schemas/JitAccessResponse" } } } }, + "500": { + "description": "Failed to accept invitation" + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Accepts invitation for JIT database access", + "tags": ["Database"], + "x-endpoint-owners": ["security"] + } + }, + "/v1/projects/{ref}/database/jit/invite/{invite_id}": { + "delete": { + "description": "Revokes and deletes the invitation", + "operationId": "v1-delete-invite-external-jit-access", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + }, + { + "name": "invite_id", + "required": true, + "in": "path", + "schema": { + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "example": "55555555-5555-4555-8555-555555555555", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + }, "401": { "description": "Unauthorized" }, - "402": { - "description": "Maximum number of functions reached for Plan" - }, "403": { "description": "Forbidden action" }, @@ -18231,31 +8310,24 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to create project's function" + "description": "Failed to revoke invite for external user" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["edge_functions_write"] - } - ], - "summary": "Create a function", - "tags": ["Edge Functions"], - "x-badges": [ - { - "name": "OAuth scope: edge_functions:write", - "position": "after" } ], - "x-endpoint-owners": ["functions"], - "x-oauth-scope": "edge_functions:write" - }, - "put": { - "description": "Bulk update functions. It will create a new function or replace existing. The operation is idempotent. NOTE: You will need to manually bump the version.", - "operationId": "v1-bulk-update-functions", + "summary": "Deletes the invite for an external user to a database for JIT access", + "tags": ["Database"], + "x-endpoint-owners": ["security"], + "x-fga-permissions": [["database_jit_write"]] + } + }, + "/v1/projects/{ref}/database/jit/{user_id}": { + "delete": { + "description": "Remove JIT mappings of a user, revoking all JIT database access", + "operationId": "v1-delete-jit-access", "parameters": [ { "name": "ref", @@ -18269,147 +8341,26 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "slug": { - "type": "string", - "pattern": "^[A-Za-z][A-Za-z0-9_-]*$" - }, - "name": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["ACTIVE", "REMOVED", "THROTTLED"] - }, - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "verify_jwt": { - "type": "boolean" - }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" - }, - "import_map_path": { - "type": "string" - }, - "ezbr_sha256": { - "type": "string" - } - }, - "required": ["id", "slug", "name", "status", "version"] - }, - "example": [ - { - "id": "3c078cce-ad70-4148-9f37-4da362789053", - "slug": "hello-world", - "name": "Hello World", - "status": "ACTIVE", - "version": 2, - "verify_jwt": true, - "entrypoint_path": "index.ts" - } - ] - } + }, + { + "name": "user_id", + "required": true, + "in": "path", + "schema": { + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "example": "55555555-5555-4555-8555-555555555555", + "type": "string" } } - }, + ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "functions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["ACTIVE", "REMOVED", "THROTTLED"] - }, - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, - "verify_jwt": { - "type": "boolean" - }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" - }, - "import_map_path": { - "type": "string" - }, - "ezbr_sha256": { - "type": "string" - } - }, - "required": [ - "id", - "slug", - "name", - "status", - "version", - "created_at", - "updated_at" - ] - } - } - }, - "required": ["functions"] - } - } - } + "description": "" }, "401": { "description": "Unauthorized" }, - "402": { - "description": "Maximum number of functions reached for Plan" - }, "403": { "description": "Forbidden action" }, @@ -18417,33 +8368,24 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to update functions" + "description": "Failed to remove JIT access" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["edge_functions_write"] - } - ], - "summary": "Bulk update functions", - "tags": ["Edge Functions"], - "x-badges": [ - { - "name": "OAuth scope: edge_functions:write", - "position": "after" } ], - "x-endpoint-owners": ["functions"], - "x-oauth-scope": "edge_functions:write" + "summary": "Delete JIT access by user-id", + "tags": ["Database"], + "x-endpoint-owners": ["security"], + "x-fga-permissions": [["database_jit_write"]] } }, - "/v1/projects/{ref}/functions/deploy": { - "post": { - "description": "A new endpoint to deploy functions. It will create if function does not exist.", - "operationId": "v1-deploy-a-function", + "/v1/projects/{ref}/database/openapi": { + "get": { + "description": "Returns the PostgREST OpenAPI specification for the project. This is the replacement for querying `/rest/v1/` directly with the anon key.", + "operationId": "v1-get-database-openapi", "parameters": [ { "name": "ref", @@ -18459,136 +8401,29 @@ } }, { - "name": "slug", + "name": "schema", "required": false, "in": "query", + "description": "The database schema to generate the OpenAPI spec for", "schema": { - "pattern": "^[A-Za-z][A-Za-z0-9_-]*$", - "example": "hello-world", + "default": "public", "type": "string" } - }, - { - "name": "bundleOnly", - "required": false, - "in": "query", - "description": "Boolean string, true or false", - "schema": { - "example": false, - "type": "boolean" - } } ], - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "array", - "items": { - "type": "string", - "format": "binary" - } - }, - "metadata": { - "type": "object", - "properties": { - "entrypoint_path": { - "type": "string" - }, - "import_map_path": { - "type": "string" - }, - "static_patterns": { - "type": "array", - "items": { - "type": "string" - } - }, - "verify_jwt": { - "type": "boolean" - }, - "name": { - "type": "string" - } - }, - "required": ["entrypoint_path"] - } - }, - "required": ["metadata"], - "example": { - "file": ["./supabase/functions/hello-world/index.ts"], - "metadata": { - "entrypoint_path": "index.ts", - "verify_jwt": true, - "name": "Hello World" - } - } - } - } - } - }, "responses": { - "201": { + "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["ACTIVE", "REMOVED", "THROTTLED"] - }, - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, - "verify_jwt": { - "type": "boolean" - }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" - }, - "import_map_path": { - "type": "string" - }, - "ezbr_sha256": { - "type": "string" - } - }, - "required": ["id", "slug", "name", "status", "version"] + "type": "object" } } } }, - "401": { - "description": "Unauthorized" - }, - "402": { - "description": "Maximum number of functions reached for Plan" + "401": { + "description": "Unauthorized" }, "403": { "description": "Forbidden action" @@ -18597,33 +8432,31 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to deploy function" + "description": "Failed to fetch PostgREST OpenAPI spec" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["edge_functions_write"] } ], - "summary": "Deploy a function", - "tags": ["Edge Functions"], + "summary": "Get PostgREST OpenAPI spec", + "tags": ["Database"], "x-badges": [ { - "name": "OAuth scope: edge_functions:write", + "name": "OAuth scope: database:read", "position": "after" } ], - "x-endpoint-owners": ["functions"], - "x-oauth-scope": "edge_functions:write" + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["database_read"]], + "x-oauth-scope": "database:read" } }, - "/v1/projects/{ref}/functions/{function_slug}": { + "/v1/projects/{ref}/functions": { "get": { - "description": "Retrieves a function with the specified slug and project.", - "operationId": "v1-get-a-function", + "description": "Returns all functions you've previously added to the specified project.", + "operationId": "v1-list-all-functions", "parameters": [ { "name": "ref", @@ -18637,17 +8470,6 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - }, - { - "name": "function_slug", - "required": true, - "in": "path", - "description": "Function slug", - "schema": { - "pattern": "^[A-Za-z0-9_-]+$", - "example": "hello-world", - "type": "string" - } } ], "responses": { @@ -18656,57 +8478,10 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["ACTIVE", "REMOVED", "THROTTLED"] - }, - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, - "verify_jwt": { - "type": "boolean" - }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" - }, - "import_map_path": { - "type": "string" - }, - "ezbr_sha256": { - "type": "string" - } - }, - "required": [ - "id", - "slug", - "name", - "status", - "version", - "created_at", - "updated_at" - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/FunctionResponse" + } } } } @@ -18721,18 +8496,15 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to retrieve function with given slug" + "description": "Failed to retrieve project's functions" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["edge_functions_read"] } ], - "summary": "Retrieve a function", + "summary": "List all functions", "tags": ["Edge Functions"], "x-badges": [ { @@ -18741,11 +8513,13 @@ } ], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_read"]], "x-oauth-scope": "edge_functions:read" }, - "patch": { - "description": "Updates a function with the specified slug and project.", - "operationId": "v1-update-a-function", + "post": { + "deprecated": true, + "description": "This endpoint is deprecated - use the deploy endpoint. Creates a function and adds it to the specified project.", + "operationId": "v1-create-a-function", "parameters": [ { "name": "ref", @@ -18760,17 +8534,6 @@ "type": "string" } }, - { - "name": "function_slug", - "required": true, - "in": "path", - "description": "Function slug", - "schema": { - "pattern": "^[A-Za-z0-9_-]+$", - "example": "hello-world", - "type": "string" - } - }, { "name": "slug", "required": false, @@ -18794,20 +8557,18 @@ "name": "verify_jwt", "required": false, "in": "query", - "description": "Boolean string, true or false", "schema": { "example": true, - "type": "boolean" + "type": "string" } }, { "name": "import_map", "required": false, "in": "query", - "description": "Boolean string, true or false", "schema": { "example": false, - "type": "boolean" + "type": "string" } }, { @@ -18849,84 +8610,18 @@ }, "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "body": { - "type": "string" - }, - "verify_jwt": { - "type": "boolean" - } - }, - "example": { - "name": "Hello World", - "body": "Deno.serve(() => new Response('Hello again!'))", - "verify_jwt": true - } + "$ref": "#/components/schemas/V1CreateFunctionBody" } } } }, "responses": { - "200": { + "201": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "name": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["ACTIVE", "REMOVED", "THROTTLED"] - }, - "version": { - "type": "integer" - }, - "created_at": { - "type": "integer", - "format": "int64" - }, - "updated_at": { - "type": "integer", - "format": "int64" - }, - "verify_jwt": { - "type": "boolean" - }, - "import_map": { - "type": "boolean" - }, - "entrypoint_path": { - "type": "string" - }, - "import_map_path": { - "type": "string" - }, - "ezbr_sha256": { - "type": "string" - } - }, - "required": [ - "id", - "slug", - "name", - "status", - "version", - "created_at", - "updated_at" - ] + "$ref": "#/components/schemas/FunctionResponse" } } } @@ -18934,6 +8629,9 @@ "401": { "description": "Unauthorized" }, + "402": { + "description": "Maximum number of functions reached for Plan" + }, "403": { "description": "Forbidden action" }, @@ -18941,18 +8639,15 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to update function with given slug" + "description": "Failed to create project's function" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["edge_functions_write"] } ], - "summary": "Update a function", + "summary": "Create a function", "tags": ["Edge Functions"], "x-badges": [ { @@ -18961,11 +8656,12 @@ } ], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" }, - "delete": { - "description": "Deletes a function with the specified slug from the specified project.", - "operationId": "v1-delete-a-function", + "put": { + "description": "Bulk update functions. It will create a new function or replace existing. The operation is idempotent. NOTE: You will need to manually bump the version.", + "operationId": "v1-bulk-update-functions", "parameters": [ { "name": "ref", @@ -18979,26 +8675,128 @@ "example": "abcdefghijklmnopqrst", "type": "string" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUpdateFunctionBody" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUpdateFunctionResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "402": { + "description": "Maximum number of functions reached for Plan" }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to update functions" + } + }, + "security": [ { - "name": "function_slug", + "bearer": [] + } + ], + "summary": "Bulk update functions", + "tags": ["Edge Functions"], + "x-badges": [ + { + "name": "OAuth scope: edge_functions:write", + "position": "after" + } + ], + "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_write"]], + "x-oauth-scope": "edge_functions:write" + } + }, + "/v1/projects/{ref}/functions/deploy": { + "post": { + "description": "A new endpoint to deploy functions. It will create if function does not exist.", + "operationId": "v1-deploy-a-function", + "parameters": [ + { + "name": "ref", "required": true, "in": "path", - "description": "Function slug", + "description": "Project ref", "schema": { - "pattern": "^[A-Za-z0-9_-]+$", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + }, + { + "name": "slug", + "required": false, + "in": "query", + "schema": { + "pattern": "^[A-Za-z][A-Za-z0-9_-]*$", "example": "hello-world", "type": "string" } + }, + { + "name": "bundleOnly", + "required": false, + "in": "query", + "schema": { + "example": false, + "type": "string" + } } ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/FunctionDeployBody" + } + } + } + }, "responses": { - "200": { - "description": "" + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeployFunctionResponse" + } + } + } }, "401": { "description": "Unauthorized" }, + "402": { + "description": "Maximum number of functions reached for Plan" + }, "403": { "description": "Forbidden action" }, @@ -19006,18 +8804,15 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to delete function with given slug" + "description": "Failed to deploy function" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["edge_functions_write"] } ], - "summary": "Delete a function", + "summary": "Deploy a function", "tags": ["Edge Functions"], "x-badges": [ { @@ -19026,13 +8821,14 @@ } ], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" } }, - "/v1/projects/{ref}/functions/{function_slug}/body": { + "/v1/projects/{ref}/functions/{function_slug}": { "get": { - "description": "Retrieves a function body for the specified slug and project.", - "operationId": "v1-get-a-function-body", + "description": "Retrieves a function with the specified slug and project.", + "operationId": "v1-get-a-function", "parameters": [ { "name": "ref", @@ -19065,8 +8861,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": {} + "$ref": "#/components/schemas/FunctionSlugResponse" } } } @@ -19081,18 +8876,15 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to retrieve function body with given slug" + "description": "Failed to retrieve function with given slug" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["edge_functions_read"] } ], - "summary": "Retrieve a function body", + "summary": "Retrieve a function", "tags": ["Edge Functions"], "x-badges": [ { @@ -19101,12 +8893,12 @@ } ], "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_read"]], "x-oauth-scope": "edge_functions:read" - } - }, - "/v1/projects/{ref}/storage/buckets": { - "get": { - "operationId": "v1-list-all-buckets", + }, + "patch": { + "description": "Updates a function with the specified slug and project.", + "operationId": "v1-update-a-function", "parameters": [ { "name": "ref", @@ -19120,156 +8912,106 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "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"] - } - } - } + }, + { + "name": "function_slug", + "required": true, + "in": "path", + "description": "Function slug", + "schema": { + "pattern": "^[A-Za-z0-9_-]+$", + "example": "hello-world", + "type": "string" } }, - "401": { - "description": "Unauthorized" + { + "name": "slug", + "required": false, + "in": "query", + "schema": { + "pattern": "^[A-Za-z0-9_-]+$", + "example": "hello-world", + "type": "string" + } }, - "403": { - "description": "Forbidden action" + { + "name": "name", + "required": false, + "in": "query", + "schema": { + "example": "Hello World", + "type": "string" + } }, - "429": { - "description": "Rate limit exceeded" + { + "name": "verify_jwt", + "required": false, + "in": "query", + "schema": { + "example": true, + "type": "string" + } }, - "500": { - "description": "Failed to get list of buckets" - } - }, - "security": [ { - "bearer": [] + "name": "import_map", + "required": false, + "in": "query", + "schema": { + "example": false, + "type": "string" + } }, { - "fga_permissions": ["storage_read"] - } - ], - "summary": "Lists all buckets", - "tags": ["Storage"], - "x-badges": [ + "name": "entrypoint_path", + "required": false, + "in": "query", + "schema": { + "example": "index.ts", + "type": "string" + } + }, { - "name": "OAuth scope: storage:read", - "position": "after" - } - ], - "x-endpoint-owners": ["storage"], - "x-oauth-scope": "storage:read" - } - }, - "/v1/projects/{ref}/config/disk": { - "get": { - "operationId": "v1-get-database-disk", - "parameters": [ + "name": "import_map_path", + "required": false, + "in": "query", + "schema": { + "example": "import_map.json", + "type": "string" + } + }, { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", + "name": "ezbr_sha256", + "required": false, + "in": "query", "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", + "example": "44c691990518d25498f0fd80cf6631ecf2b58eb9c5eb2a087dd1688f2904dac7", "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/vnd.denoland.eszip": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/V1UpdateFunctionBody" + } + } + } + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "attributes": { - "oneOf": [ - { - "type": "object", - "properties": { - "iops": { - "type": "integer", - "minimum": 0, - "exclusiveMinimum": true - }, - "size_gb": { - "type": "integer", - "minimum": 0, - "exclusiveMinimum": true - }, - "throughput_mibps": { - "type": "integer", - "minimum": 0, - "exclusiveMinimum": true - }, - "type": { - "type": "string", - "enum": ["gp3"] - } - }, - "required": ["iops", "size_gb", "type"] - }, - { - "type": "object", - "properties": { - "iops": { - "type": "integer", - "minimum": 0, - "exclusiveMinimum": true - }, - "size_gb": { - "type": "integer", - "minimum": 0, - "exclusiveMinimum": true - }, - "type": { - "type": "string", - "enum": ["io2"] - } - }, - "required": ["iops", "size_gb", "type"] - } - ] - }, - "last_modified_at": { - "type": "string" - } - }, - "required": ["attributes"] + "$ref": "#/components/schemas/FunctionResponse" } } } @@ -19284,23 +9026,29 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to get database disk attributes" + "description": "Failed to update function with given slug" } }, "security": [ { "bearer": [] - }, + } + ], + "summary": "Update a function", + "tags": ["Edge Functions"], + "x-badges": [ { - "fga_permissions": ["infra_disk_config_read"] + "name": "OAuth scope: edge_functions:write", + "position": "after" } ], - "summary": "Get database disk attributes", - "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"] + "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_write"]], + "x-oauth-scope": "edge_functions:write" }, - "post": { - "operationId": "v1-modify-database-disk", + "delete": { + "description": "Deletes a function with the specified slug from the specified project.", + "operationId": "v1-delete-a-function", "parameters": [ { "name": "ref", @@ -19314,83 +9062,21 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "attributes": { - "discriminator": { - "propertyName": "type" - }, - "oneOf": [ - { - "type": "object", - "properties": { - "iops": { - "type": "integer", - "minimum": 0, - "exclusiveMinimum": true - }, - "size_gb": { - "type": "integer", - "minimum": 0, - "exclusiveMinimum": true - }, - "throughput_mibps": { - "type": "integer", - "minimum": 0, - "exclusiveMinimum": true - }, - "type": { - "type": "string", - "enum": ["gp3"] - } - }, - "required": ["iops", "size_gb", "type"] - }, - { - "type": "object", - "properties": { - "iops": { - "type": "integer", - "minimum": 0, - "exclusiveMinimum": true - }, - "size_gb": { - "type": "integer", - "minimum": 0, - "exclusiveMinimum": true - }, - "type": { - "type": "string", - "enum": ["io2"] - } - }, - "required": ["iops", "size_gb", "type"] - } - ] - } - }, - "required": ["attributes"], - "example": { - "attributes": { - "type": "gp3", - "size_gb": 100, - "iops": 3000, - "throughput_mibps": 125 - } - } - } + }, + { + "name": "function_slug", + "required": true, + "in": "path", + "description": "Function slug", + "schema": { + "pattern": "^[A-Za-z0-9_-]+$", + "example": "hello-world", + "type": "string" } } - }, + ], "responses": { - "201": { + "200": { "description": "" }, "401": { @@ -19403,25 +9089,31 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to modify database disk" + "description": "Failed to delete function with given slug" } }, "security": [ { "bearer": [] - }, + } + ], + "summary": "Delete a function", + "tags": ["Edge Functions"], + "x-badges": [ { - "fga_permissions": ["infra_disk_config_write"] + "name": "OAuth scope: edge_functions:write", + "position": "after" } ], - "summary": "Modify database disk", - "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"] + "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_write"]], + "x-oauth-scope": "edge_functions:write" } }, - "/v1/projects/{ref}/config/disk/util": { + "/v1/projects/{ref}/functions/{function_slug}/body": { "get": { - "operationId": "v1-get-disk-utilization", + "description": "Retrieves a function body for the specified slug and project.", + "operationId": "v1-get-a-function-body", "parameters": [ { "name": "ref", @@ -19435,6 +9127,17 @@ "example": "abcdefghijklmnopqrst", "type": "string" } + }, + { + "name": "function_slug", + "required": true, + "in": "path", + "description": "Function slug", + "schema": { + "pattern": "^[A-Za-z0-9_-]+$", + "example": "hello-world", + "type": "string" + } } ], "responses": { @@ -19443,28 +9146,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "timestamp": { - "type": "string" - }, - "metrics": { - "type": "object", - "properties": { - "fs_size_bytes": { - "type": "number" - }, - "fs_avail_bytes": { - "type": "number" - }, - "fs_used_bytes": { - "type": "number" - } - }, - "required": ["fs_size_bytes", "fs_avail_bytes", "fs_used_bytes"] - } - }, - "required": ["timestamp", "metrics"] + "$ref": "#/components/schemas/StreamableFile" } } } @@ -19479,25 +9161,30 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to get disk utilization" + "description": "Failed to retrieve function body with given slug" } }, "security": [ { "bearer": [] - }, + } + ], + "summary": "Retrieve a function body", + "tags": ["Edge Functions"], + "x-badges": [ { - "fga_permissions": ["infra_disk_config_read"] + "name": "OAuth scope: edge_functions:read", + "position": "after" } ], - "summary": "Get disk utilization", - "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"] + "x-endpoint-owners": ["functions"], + "x-fga-permissions": [["edge_functions_read"]], + "x-oauth-scope": "edge_functions:read" } }, - "/v1/projects/{ref}/config/disk/autoscale": { + "/v1/projects/{ref}/storage/buckets": { "get": { - "operationId": "v1-get-project-disk-autoscale-config", + "operationId": "v1-list-all-buckets", "parameters": [ { "name": "ref", @@ -19519,31 +9206,10 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "growth_percent": { - "type": "integer", - "minimum": 0, - "exclusiveMinimum": true, - "nullable": true, - "description": "Growth percentage for disk autoscaling" - }, - "min_increment_gb": { - "type": "integer", - "minimum": 0, - "exclusiveMinimum": true, - "nullable": true, - "description": "Minimum increment size for disk autoscaling in GB" - }, - "max_size_gb": { - "type": "integer", - "minimum": 0, - "exclusiveMinimum": true, - "nullable": true, - "description": "Maximum limit the disk size will grow to in GB" - } - }, - "required": ["growth_percent", "min_increment_gb", "max_size_gb"] + "type": "array", + "items": { + "$ref": "#/components/schemas/V1StorageBucketResponse" + } } } } @@ -19558,25 +9224,30 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to get project disk autoscale config" + "description": "Failed to get list of buckets" } }, "security": [ { "bearer": [] - }, + } + ], + "summary": "Lists all buckets", + "tags": ["Storage"], + "x-badges": [ { - "fga_permissions": ["infra_disk_config_read"] + "name": "OAuth scope: storage:read", + "position": "after" } ], - "summary": "Gets project disk autoscale config", - "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"] + "x-endpoint-owners": ["storage"], + "x-fga-permissions": [["storage_read"]], + "x-oauth-scope": "storage:read" } }, - "/v1/projects/{ref}/config/storage": { + "/v1/projects/{ref}/config/disk": { "get": { - "operationId": "v1-get-storage-config", + "operationId": "v1-get-database-disk", "parameters": [ { "name": "ref", @@ -19598,126 +9269,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "fileSizeLimit": { - "type": "integer", - "format": "int64" - }, - "features": { - "type": "object", - "properties": { - "imageTransformation": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] - }, - "s3Protocol": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] - }, - "purgeCache": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] - }, - "icebergCatalog": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "maxNamespaces": { - "type": "integer", - "minimum": 0 - }, - "maxTables": { - "type": "integer", - "minimum": 0 - }, - "maxCatalogs": { - "type": "integer", - "minimum": 0 - } - }, - "required": ["enabled", "maxNamespaces", "maxTables", "maxCatalogs"] - }, - "vectorBuckets": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "maxBuckets": { - "type": "integer", - "minimum": 0 - }, - "maxIndexes": { - "type": "integer", - "minimum": 0 - } - }, - "required": ["enabled", "maxBuckets", "maxIndexes"] - } - }, - "required": [ - "imageTransformation", - "s3Protocol", - "purgeCache", - "icebergCatalog", - "vectorBuckets" - ] - }, - "capabilities": { - "type": "object", - "properties": { - "list_v2": { - "type": "boolean" - }, - "iceberg_catalog": { - "type": "boolean" - } - }, - "required": ["list_v2", "iceberg_catalog"] - }, - "external": { - "type": "object", - "properties": { - "upstreamTarget": { - "type": "string", - "enum": ["main", "canary"] - } - }, - "required": ["upstreamTarget"] - }, - "migrationVersion": { - "type": "string" - }, - "databasePoolMode": { - "type": "string" - } - }, - "required": [ - "fileSizeLimit", - "features", - "capabilities", - "external", - "migrationVersion", - "databasePoolMode" - ] + "$ref": "#/components/schemas/DiskResponse" } } } @@ -19732,23 +9284,21 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to retrieve project's storage config" + "description": "Failed to get database disk attributes" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["storage_config_read"] } ], - "summary": "Gets project's storage config", - "tags": ["Storage"], - "x-endpoint-owners": ["storage"] + "summary": "Get database disk attributes", + "tags": ["Projects"], + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["infra_disk_config_read"]] }, - "patch": { - "operationId": "v1-update-storage-config", + "post": { + "operationId": "v1-modify-database-disk", "parameters": [ { "name": "ref", @@ -19769,111 +9319,67 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "fileSizeLimit": { - "type": "integer", - "minimum": 0, - "maximum": 536870912000, - "format": "int64" - }, - "features": { - "type": "object", - "properties": { - "imageTransformation": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] - }, - "s3Protocol": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] - }, - "purgeCache": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] - }, - "icebergCatalog": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "maxNamespaces": { - "type": "integer", - "minimum": 0 - }, - "maxTables": { - "type": "integer", - "minimum": 0 - }, - "maxCatalogs": { - "type": "integer", - "minimum": 0 - } - }, - "required": ["enabled", "maxNamespaces", "maxTables", "maxCatalogs"] - }, - "vectorBuckets": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "maxBuckets": { - "type": "integer", - "minimum": 0 - }, - "maxIndexes": { - "type": "integer", - "minimum": 0 - } - }, - "required": ["enabled", "maxBuckets", "maxIndexes"] - } - } - }, - "external": { - "type": "object", - "properties": { - "upstreamTarget": { - "type": "string", - "enum": ["main", "canary"] - } - }, - "required": ["upstreamTarget"] - } - }, - "additionalProperties": false, - "example": { - "fileSizeLimit": 10485760, - "features": { - "imageTransformation": { - "enabled": true - } - } - } + "$ref": "#/components/schemas/DiskRequestBody" } } } - }, + }, + "responses": { + "201": { + "description": "" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to modify database disk" + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Modify database disk", + "tags": ["Projects"], + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["infra_disk_config_write"]] + } + }, + "/v1/projects/{ref}/config/disk/util": { + "get": { + "operationId": "v1-get-disk-utilization", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], "responses": { "200": { - "description": "" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiskUtilMetricsResponse" + } + } + } }, "401": { "description": "Unauthorized" @@ -19885,25 +9391,23 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to update project's storage config" + "description": "Failed to get disk utilization" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["storage_config_write"] } ], - "summary": "Updates project's storage config", - "tags": ["Storage"], - "x-endpoint-owners": ["storage"] + "summary": "Get disk utilization", + "tags": ["Projects"], + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["infra_disk_config_read"]] } }, - "/v1/projects/{ref}/config/database/pgbouncer": { + "/v1/projects/{ref}/config/disk/autoscale": { "get": { - "operationId": "v1-get-project-pgbouncer-config", + "operationId": "v1-get-project-disk-autoscale-config", "parameters": [ { "name": "ref", @@ -19925,37 +9429,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "default_pool_size": { - "type": "integer" - }, - "ignore_startup_parameters": { - "type": "string" - }, - "max_client_conn": { - "type": "integer" - }, - "pool_mode": { - "type": "string", - "enum": ["transaction", "session", "statement"] - }, - "connection_string": { - "type": "string" - }, - "server_idle_timeout": { - "type": "integer" - }, - "server_lifetime": { - "type": "integer" - }, - "query_wait_timeout": { - "type": "integer" - }, - "reserve_pool_size": { - "type": "integer" - } - } + "$ref": "#/components/schemas/DiskAutoscaleConfig" } } } @@ -19970,29 +9444,23 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to retrieve project's pgbouncer config" + "description": "Failed to get project disk autoscale config" } }, "security": [ { - "fga_permissions": ["database_read"] - } - ], - "summary": "Get project's pgbouncer config", - "tags": ["Database"], - "x-badges": [ - { - "name": "OAuth scope: database:read", - "position": "after" + "bearer": [] } ], - "x-endpoint-owners": ["infra", "management-api"], - "x-oauth-scope": "database:read" + "summary": "Gets project disk autoscale config", + "tags": ["Projects"], + "x-endpoint-owners": ["management-api", "infra"], + "x-fga-permissions": [["infra_disk_config_read"]] } }, - "/v1/projects/{ref}/config/database/pooler": { + "/v1/projects/{ref}/config/storage": { "get": { - "operationId": "v1-get-pooler-config", + "operationId": "v1-get-storage-config", "parameters": [ { "name": "ref", @@ -20014,67 +9482,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "database_type": { - "type": "string", - "enum": ["PRIMARY", "READ_REPLICA"] - }, - "is_using_scram_auth": { - "type": "boolean" - }, - "db_user": { - "type": "string" - }, - "db_host": { - "type": "string" - }, - "db_port": { - "type": "integer" - }, - "db_name": { - "type": "string" - }, - "connection_string": { - "type": "string" - }, - "connectionString": { - "type": "string", - "description": "Use connection_string instead" - }, - "default_pool_size": { - "type": "integer", - "nullable": true - }, - "max_client_conn": { - "type": "integer", - "nullable": true - }, - "pool_mode": { - "type": "string", - "enum": ["transaction", "session"] - } - }, - "required": [ - "identifier", - "database_type", - "is_using_scram_auth", - "db_user", - "db_host", - "db_port", - "db_name", - "connection_string", - "connectionString", - "default_pool_size", - "max_client_conn", - "pool_mode" - ] - } + "$ref": "#/components/schemas/StorageConfigResponse" } } } @@ -20089,30 +9497,21 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to retrieve project's supavisor config" + "description": "Failed to retrieve project's storage config" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_pooling_config_read"] - } - ], - "summary": "Gets project's supavisor config", - "tags": ["Database"], - "x-badges": [ - { - "name": "OAuth scope: database:read", - "position": "after" } ], - "x-endpoint-owners": ["infra"], - "x-oauth-scope": "database:read" + "summary": "Gets project's storage config", + "tags": ["Storage"], + "x-endpoint-owners": ["storage"], + "x-fga-permissions": [["storage_config_read"]] }, "patch": { - "operationId": "v1-update-pooler-config", + "operationId": "v1-update-storage-config", "parameters": [ { "name": "ref", @@ -20133,48 +9532,14 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "default_pool_size": { - "type": "integer", - "minimum": 0, - "maximum": 3000, - "nullable": true - }, - "pool_mode": { - "type": "string", - "enum": ["transaction", "session"], - "description": "Dedicated pooler mode for the project" - } - }, - "example": { - "default_pool_size": 25, - "pool_mode": "transaction" - } + "$ref": "#/components/schemas/UpdateStorageConfigBody" } } } }, "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "default_pool_size": { - "type": "integer", - "nullable": true - }, - "pool_mode": { - "type": "string" - } - }, - "required": ["default_pool_size", "pool_mode"] - } - } - } + "description": "" }, "401": { "description": "Unauthorized" @@ -20186,32 +9551,23 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to update project's supavisor config" + "description": "Failed to update project's storage config" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_pooling_config_write"] - } - ], - "summary": "Updates project's supavisor config", - "tags": ["Database"], - "x-badges": [ - { - "name": "OAuth scope: database:write", - "position": "after" } ], - "x-endpoint-owners": ["infra"], - "x-oauth-scope": "database:write" + "summary": "Updates project's storage config", + "tags": ["Storage"], + "x-endpoint-owners": ["storage"], + "x-fga-permissions": [["storage_config_write"]] } }, - "/v1/projects/{ref}/config/database/postgres": { + "/v1/projects/{ref}/config/database/pgbouncer": { "get": { - "operationId": "v1-get-postgres-config", + "operationId": "v1-get-project-pgbouncer-config", "parameters": [ { "name": "ref", @@ -20233,139 +9589,64 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "effective_cache_size": { - "type": "string" - }, - "logical_decoding_work_mem": { - "type": "string" - }, - "cron.log_statement": { - "type": "boolean" - }, - "log_autovacuum_min_duration": { - "type": "string", - "description": "Default unit: ms", - "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" - }, - "log_checkpoints": { - "type": "boolean" - }, - "log_connections": { - "type": "boolean" - }, - "log_disconnections": { - "type": "boolean" - }, - "log_duration": { - "type": "boolean" - }, - "log_lock_waits": { - "type": "boolean" - }, - "log_recovery_conflict_waits": { - "type": "boolean" - }, - "log_replication_commands": { - "type": "boolean" - }, - "log_startup_progress_interval": { - "type": "string", - "description": "Default unit: ms", - "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" - }, - "log_temp_files": { - "type": "string" - }, - "maintenance_work_mem": { - "type": "string" - }, - "track_activity_query_size": { - "type": "string" - }, - "max_connections": { - "type": "integer", - "minimum": 1, - "maximum": 262143 - }, - "max_locks_per_transaction": { - "type": "integer", - "minimum": 10, - "maximum": 2147483640 - }, - "max_parallel_maintenance_workers": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_parallel_workers": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_parallel_workers_per_gather": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_replication_slots": { - "type": "integer" - }, - "max_slot_wal_keep_size": { - "type": "string" - }, - "max_standby_archive_delay": { - "type": "string" - }, - "max_standby_streaming_delay": { - "type": "string" - }, - "max_wal_size": { - "type": "string" - }, - "max_wal_senders": { - "type": "integer" - }, - "max_worker_processes": { - "type": "integer", - "minimum": 0, - "maximum": 262143 - }, - "session_replication_role": { - "type": "string", - "enum": ["origin", "replica", "local"] - }, - "shared_buffers": { - "type": "string" - }, - "statement_timeout": { - "type": "string", - "description": "Default unit: ms", - "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" - }, - "track_commit_timestamp": { - "type": "boolean" - }, - "wal_keep_size": { - "type": "string" - }, - "wal_sender_timeout": { - "type": "string", - "description": "Default unit: ms", - "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" - }, - "work_mem": { - "type": "string" - }, - "checkpoint_timeout": { - "type": "string", - "description": "Default unit: s", - "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" - }, - "hot_standby_feedback": { - "type": "boolean" - } + "$ref": "#/components/schemas/V1PgbouncerConfigResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to retrieve project's pgbouncer config" + } + }, + "summary": "Get project's pgbouncer config", + "tags": ["Database"], + "x-badges": [ + { + "name": "OAuth scope: database:read", + "position": "after" + } + ], + "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_read"]], + "x-oauth-scope": "database:read" + } + }, + "/v1/projects/{ref}/config/database/pooler": { + "get": { + "operationId": "v1-get-pooler-config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SupavisorConfigResponse" } } } @@ -20381,18 +9662,15 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to retrieve project's Postgres config" + "description": "Failed to retrieve project's supavisor config" } }, "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_config_read"] } ], - "summary": "Gets project's Postgres config", + "summary": "Gets project's supavisor config", "tags": ["Database"], "x-badges": [ { @@ -20400,11 +9678,12 @@ "position": "after" } ], - "x-endpoint-owners": ["infra", "management-api"], + "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_pooling_config_read"]], "x-oauth-scope": "database:read" }, - "put": { - "operationId": "v1-update-postgres-config", + "patch": { + "operationId": "v1-update-pooler-config", "parameters": [ { "name": "ref", @@ -20425,294 +9704,146 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "effective_cache_size": { - "type": "string" - }, - "logical_decoding_work_mem": { - "type": "string" - }, - "cron.log_statement": { - "type": "boolean" - }, - "log_autovacuum_min_duration": { - "type": "string", - "description": "Default unit: ms", - "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" - }, - "log_checkpoints": { - "type": "boolean" - }, - "log_connections": { - "type": "boolean" - }, - "log_disconnections": { - "type": "boolean" - }, - "log_duration": { - "type": "boolean" - }, - "log_lock_waits": { - "type": "boolean" - }, - "log_recovery_conflict_waits": { - "type": "boolean" - }, - "log_replication_commands": { - "type": "boolean" - }, - "log_startup_progress_interval": { - "type": "string", - "description": "Default unit: ms", - "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" - }, - "log_temp_files": { - "type": "string" - }, - "maintenance_work_mem": { - "type": "string" - }, - "track_activity_query_size": { - "type": "string" - }, - "max_connections": { - "type": "integer", - "minimum": 1, - "maximum": 262143 - }, - "max_locks_per_transaction": { - "type": "integer", - "minimum": 10, - "maximum": 2147483640 - }, - "max_parallel_maintenance_workers": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_parallel_workers": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_parallel_workers_per_gather": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_replication_slots": { - "type": "integer" - }, - "max_slot_wal_keep_size": { - "type": "string" - }, - "max_standby_archive_delay": { - "type": "string" - }, - "max_standby_streaming_delay": { - "type": "string" - }, - "max_wal_size": { - "type": "string" - }, - "max_wal_senders": { - "type": "integer" - }, - "max_worker_processes": { - "type": "integer", - "minimum": 0, - "maximum": 262143 - }, - "session_replication_role": { - "type": "string", - "enum": ["origin", "replica", "local"] - }, - "shared_buffers": { - "type": "string" - }, - "statement_timeout": { - "type": "string", - "description": "Default unit: ms", - "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" - }, - "track_commit_timestamp": { - "type": "boolean" - }, - "wal_keep_size": { - "type": "string" - }, - "wal_sender_timeout": { - "type": "string", - "description": "Default unit: ms", - "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" - }, - "work_mem": { - "type": "string" - }, - "checkpoint_timeout": { - "type": "string", - "description": "Default unit: s", - "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" - }, - "hot_standby_feedback": { - "type": "boolean" - }, - "restart_database": { - "type": "boolean" - } - }, - "additionalProperties": false, - "example": { - "max_connections": 120, - "shared_buffers": "256MB", - "work_mem": "4MB", - "statement_timeout": "60000ms" + "$ref": "#/components/schemas/UpdateSupavisorConfigBody" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSupavisorConfigResponse" } } } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to update project's supavisor config" } }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Updates project's supavisor config", + "tags": ["Database"], + "x-badges": [ + { + "name": "OAuth scope: database:write", + "position": "after" + } + ], + "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["database_pooling_config_write"]], + "x-oauth-scope": "database:write" + } + }, + "/v1/projects/{ref}/config/database/postgres": { + "get": { + "operationId": "v1-get-postgres-config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "effective_cache_size": { - "type": "string" - }, - "logical_decoding_work_mem": { - "type": "string" - }, - "cron.log_statement": { - "type": "boolean" - }, - "log_autovacuum_min_duration": { - "type": "string", - "description": "Default unit: ms", - "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" - }, - "log_checkpoints": { - "type": "boolean" - }, - "log_connections": { - "type": "boolean" - }, - "log_disconnections": { - "type": "boolean" - }, - "log_duration": { - "type": "boolean" - }, - "log_lock_waits": { - "type": "boolean" - }, - "log_recovery_conflict_waits": { - "type": "boolean" - }, - "log_replication_commands": { - "type": "boolean" - }, - "log_startup_progress_interval": { - "type": "string", - "description": "Default unit: ms", - "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" - }, - "log_temp_files": { - "type": "string" - }, - "maintenance_work_mem": { - "type": "string" - }, - "track_activity_query_size": { - "type": "string" - }, - "max_connections": { - "type": "integer", - "minimum": 1, - "maximum": 262143 - }, - "max_locks_per_transaction": { - "type": "integer", - "minimum": 10, - "maximum": 2147483640 - }, - "max_parallel_maintenance_workers": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_parallel_workers": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_parallel_workers_per_gather": { - "type": "integer", - "minimum": 0, - "maximum": 1024 - }, - "max_replication_slots": { - "type": "integer" - }, - "max_slot_wal_keep_size": { - "type": "string" - }, - "max_standby_archive_delay": { - "type": "string" - }, - "max_standby_streaming_delay": { - "type": "string" - }, - "max_wal_size": { - "type": "string" - }, - "max_wal_senders": { - "type": "integer" - }, - "max_worker_processes": { - "type": "integer", - "minimum": 0, - "maximum": 262143 - }, - "session_replication_role": { - "type": "string", - "enum": ["origin", "replica", "local"] - }, - "shared_buffers": { - "type": "string" - }, - "statement_timeout": { - "type": "string", - "description": "Default unit: ms", - "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" - }, - "track_commit_timestamp": { - "type": "boolean" - }, - "wal_keep_size": { - "type": "string" - }, - "wal_sender_timeout": { - "type": "string", - "description": "Default unit: ms", - "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" - }, - "work_mem": { - "type": "string" - }, - "checkpoint_timeout": { - "type": "string", - "description": "Default unit: s", - "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" - }, - "hot_standby_feedback": { - "type": "boolean" - } - } + "$ref": "#/components/schemas/PostgresConfigResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to retrieve project's Postgres config" + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Gets project's Postgres config", + "tags": ["Database"], + "x-badges": [ + { + "name": "OAuth scope: database:read", + "position": "after" + } + ], + "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_config_read"]], + "x-oauth-scope": "database:read" + }, + "put": { + "operationId": "v1-update-postgres-config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePostgresConfigBody" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostgresConfigResponse" } } } @@ -20733,9 +9864,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["database_config_write"] } ], "summary": "Updates project's Postgres config", @@ -20747,6 +9875,7 @@ } ], "x-endpoint-owners": ["infra", "management-api"], + "x-fga-permissions": [["database_config_write"]], "x-oauth-scope": "database:write" } }, @@ -20774,92 +9903,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "private_only": { - "type": "boolean", - "nullable": true, - "description": "Whether to only allow private channels" - }, - "connection_pool": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "nullable": true, - "description": "Sets connection pool size for Realtime Authorization" - }, - "max_concurrent_users": { - "type": "integer", - "minimum": 1, - "maximum": 50000, - "nullable": true, - "description": "Sets maximum number of concurrent users rate limit" - }, - "max_events_per_second": { - "type": "integer", - "minimum": 1, - "maximum": 50000, - "nullable": true, - "description": "Sets maximum number of events per second rate per channel limit" - }, - "max_bytes_per_second": { - "type": "integer", - "minimum": 1, - "maximum": 10000000, - "nullable": true, - "description": "Sets maximum number of bytes per second rate per channel limit" - }, - "max_channels_per_client": { - "type": "integer", - "minimum": 1, - "maximum": 10000, - "nullable": true, - "description": "Sets maximum number of channels per client rate limit" - }, - "max_joins_per_second": { - "type": "integer", - "minimum": 1, - "maximum": 5000, - "nullable": true, - "description": "Sets maximum number of joins per second rate limit" - }, - "max_presence_events_per_second": { - "type": "integer", - "minimum": 1, - "maximum": 5000, - "nullable": true, - "description": "Sets maximum number of presence events per second rate limit" - }, - "max_payload_size_in_kb": { - "type": "integer", - "minimum": 1, - "maximum": 10000, - "nullable": true, - "description": "Sets maximum number of payload size in KB rate limit" - }, - "suspend": { - "type": "boolean", - "nullable": true, - "description": "Disables the Realtime service for this project when true. Set to false to re-enable it." - }, - "presence_enabled": { - "type": "boolean", - "description": "Whether to enable presence" - } - }, - "required": [ - "private_only", - "connection_pool", - "max_concurrent_users", - "max_events_per_second", - "max_bytes_per_second", - "max_channels_per_client", - "max_joins_per_second", - "max_presence_events_per_second", - "max_payload_size_in_kb", - "suspend", - "presence_enabled" - ] + "$ref": "#/components/schemas/RealtimeConfigResponse" } } } @@ -20877,14 +9921,12 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["realtime_config_read"] } ], "summary": "Gets realtime configuration", "tags": ["Realtime"], - "x-endpoint-owners": ["realtime"] + "x-endpoint-owners": ["realtime"], + "x-fga-permissions": [["realtime_config_read"]] }, "patch": { "operationId": "v1-update-realtime-config", @@ -20908,75 +9950,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "private_only": { - "type": "boolean", - "description": "Whether to only allow private channels" - }, - "connection_pool": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "description": "Sets connection pool size for Realtime Authorization" - }, - "max_concurrent_users": { - "type": "integer", - "minimum": 1, - "maximum": 50000, - "description": "Sets maximum number of concurrent users rate limit" - }, - "max_events_per_second": { - "type": "integer", - "minimum": 1, - "maximum": 50000, - "description": "Sets maximum number of events per second rate per channel limit" - }, - "max_bytes_per_second": { - "type": "integer", - "minimum": 1, - "maximum": 10000000, - "description": "Sets maximum number of bytes per second rate per channel limit" - }, - "max_channels_per_client": { - "type": "integer", - "minimum": 1, - "maximum": 10000, - "description": "Sets maximum number of channels per client rate limit" - }, - "max_joins_per_second": { - "type": "integer", - "minimum": 1, - "maximum": 5000, - "description": "Sets maximum number of joins per second rate limit" - }, - "max_presence_events_per_second": { - "type": "integer", - "minimum": 1, - "maximum": 5000, - "description": "Sets maximum number of presence events per second rate limit" - }, - "max_payload_size_in_kb": { - "type": "integer", - "minimum": 1, - "maximum": 10000, - "description": "Sets maximum number of payload size in KB rate limit" - }, - "suspend": { - "type": "boolean", - "description": "Disables the Realtime service for this project when true. Set to false to re-enable it." - }, - "presence_enabled": { - "type": "boolean", - "description": "Whether to enable presence" - } - }, - "additionalProperties": false, - "example": { - "private_only": false, - "max_concurrent_users": 1000, - "max_channels_per_client": 100 - } + "$ref": "#/components/schemas/UpdateRealtimeConfigBody" } } } @@ -20998,14 +9972,12 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["realtime_config_write"] } ], "summary": "Updates realtime configuration", "tags": ["Realtime"], - "x-endpoint-owners": ["realtime"] + "x-endpoint-owners": ["realtime"], + "x-fga-permissions": [["realtime_config_write"]] } }, "/v1/projects/{ref}/config/realtime/shutdown": { @@ -21046,14 +10018,12 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["realtime_config_write"] } ], "summary": "Shutdowns realtime connections for a project", "tags": ["Realtime"], - "x-endpoint-owners": ["realtime"] + "x-endpoint-owners": ["realtime"], + "x-fga-permissions": [["realtime_config_write"]] } }, "/v1/projects/{ref}/config/auth/sso/providers": { @@ -21079,97 +10049,7 @@ "content": { "application/json": { "schema": { - "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": { - "type": "object", - "properties": { - "keys": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "default": { - "oneOf": [ - { - "type": "object", - "properties": {} - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "boolean" - } - ] - }, - "array": { - "type": "boolean" - } - } - } - } - }, - "required": ["keys"] - }, - "name_id_format": { - "type": "string", - "enum": [ - "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", - "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", - "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", - "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" - ] - } - }, - "required": ["type"], - "example": { - "type": "saml", - "metadata_url": "https://sso.acme.com/metadata.xml", - "domains": ["acme.com"], - "attribute_mapping": { - "keys": { - "email": { - "name": "email" - }, - "first_name": { - "name": "first_name" - }, - "last_name": { - "name": "last_name" - } - } - } - } + "$ref": "#/components/schemas/CreateProviderBody" } } } @@ -21180,110 +10060,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "saml": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "entity_id": { - "type": "string" - }, - "metadata_url": { - "type": "string" - }, - "metadata_xml": { - "type": "string" - }, - "attribute_mapping": { - "type": "object", - "properties": { - "keys": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "default": { - "oneOf": [ - { - "type": "object", - "properties": {} - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "boolean" - } - ] - }, - "array": { - "type": "boolean" - } - } - } - } - }, - "required": ["keys"] - }, - "name_id_format": { - "type": "string", - "enum": [ - "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", - "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", - "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", - "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" - ] - } - }, - "required": ["id", "entity_id"] - }, - "domains": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "domain": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["id"] - } - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["id"] + "$ref": "#/components/schemas/CreateProviderResponse" } } } @@ -21304,9 +10081,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["auth_config_write"] } ], "summary": "Creates a new SSO provider", @@ -21318,6 +10092,7 @@ } ], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" }, "get": { @@ -21343,119 +10118,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "saml": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "entity_id": { - "type": "string" - }, - "metadata_url": { - "type": "string" - }, - "metadata_xml": { - "type": "string" - }, - "attribute_mapping": { - "type": "object", - "properties": { - "keys": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "default": { - "oneOf": [ - { - "type": "object", - "properties": {} - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "boolean" - } - ] - }, - "array": { - "type": "boolean" - } - } - } - } - }, - "required": ["keys"] - }, - "name_id_format": { - "type": "string", - "enum": [ - "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", - "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", - "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", - "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" - ] - } - }, - "required": ["id", "entity_id"] - }, - "domains": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "domain": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["id"] - } - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["id"] - } - } - }, - "required": ["items"] + "$ref": "#/components/schemas/ListProvidersResponse" } } } @@ -21476,9 +10139,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["auth_config_read"] } ], "summary": "Lists all SSO providers", @@ -21490,6 +10150,7 @@ } ], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" } }, @@ -21516,6 +10177,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "77777777-7777-4777-8777-777777777777", "type": "string" } @@ -21527,110 +10189,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "saml": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "entity_id": { - "type": "string" - }, - "metadata_url": { - "type": "string" - }, - "metadata_xml": { - "type": "string" - }, - "attribute_mapping": { - "type": "object", - "properties": { - "keys": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "default": { - "oneOf": [ - { - "type": "object", - "properties": {} - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "boolean" - } - ] - }, - "array": { - "type": "boolean" - } - } - } - } - }, - "required": ["keys"] - }, - "name_id_format": { - "type": "string", - "enum": [ - "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", - "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", - "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", - "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" - ] - } - }, - "required": ["id", "entity_id"] - }, - "domains": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "domain": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["id"] - } - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["id"] + "$ref": "#/components/schemas/GetProviderResponse" } } } @@ -21651,9 +10210,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["auth_config_read"] } ], "summary": "Gets a SSO provider by its UUID", @@ -21665,6 +10221,7 @@ } ], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" }, "put": { @@ -21689,6 +10246,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "77777777-7777-4777-8777-777777777777", "type": "string" } @@ -21699,77 +10257,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "metadata_xml": { - "type": "string" - }, - "metadata_url": { - "type": "string" - }, - "domains": { - "type": "array", - "items": { - "type": "string" - } - }, - "attribute_mapping": { - "type": "object", - "properties": { - "keys": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "default": { - "oneOf": [ - { - "type": "object", - "properties": {} - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "boolean" - } - ] - }, - "array": { - "type": "boolean" - } - } - } - } - }, - "required": ["keys"] - }, - "name_id_format": { - "type": "string", - "enum": [ - "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", - "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", - "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", - "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" - ] - } - }, - "example": { - "metadata_url": "https://sso.acme.com/metadata.xml", - "domains": ["acme.com", "contractors.acme.com"] - } + "$ref": "#/components/schemas/UpdateProviderBody" } } } @@ -21780,110 +10268,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "saml": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "entity_id": { - "type": "string" - }, - "metadata_url": { - "type": "string" - }, - "metadata_xml": { - "type": "string" - }, - "attribute_mapping": { - "type": "object", - "properties": { - "keys": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "default": { - "oneOf": [ - { - "type": "object", - "properties": {} - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "boolean" - } - ] - }, - "array": { - "type": "boolean" - } - } - } - } - }, - "required": ["keys"] - }, - "name_id_format": { - "type": "string", - "enum": [ - "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", - "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", - "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", - "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" - ] - } - }, - "required": ["id", "entity_id"] - }, - "domains": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "domain": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["id"] - } - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["id"] + "$ref": "#/components/schemas/UpdateProviderResponse" } } } @@ -21904,9 +10289,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["auth_config_write"] } ], "summary": "Updates a SSO provider by its UUID", @@ -21918,6 +10300,7 @@ } ], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" }, "delete": { @@ -21942,6 +10325,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "77777777-7777-4777-8777-777777777777", "type": "string" } @@ -21953,110 +10337,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "saml": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "entity_id": { - "type": "string" - }, - "metadata_url": { - "type": "string" - }, - "metadata_xml": { - "type": "string" - }, - "attribute_mapping": { - "type": "object", - "properties": { - "keys": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "names": { - "type": "array", - "items": { - "type": "string" - } - }, - "default": { - "oneOf": [ - { - "type": "object", - "properties": {} - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "boolean" - } - ] - }, - "array": { - "type": "boolean" - } - } - } - } - }, - "required": ["keys"] - }, - "name_id_format": { - "type": "string", - "enum": [ - "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", - "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", - "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", - "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" - ] - } - }, - "required": ["id", "entity_id"] - }, - "domains": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "domain": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["id"] - } - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "required": ["id"] + "$ref": "#/components/schemas/DeleteProviderResponse" } } } @@ -22077,9 +10358,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["auth_config_write"] } ], "summary": "Removes a SSO provider by its UUID", @@ -22091,6 +10369,7 @@ } ], "x-endpoint-owners": ["auth"], + "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" } }, @@ -22118,65 +10397,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "region": { - "type": "string" - }, - "walg_enabled": { - "type": "boolean" - }, - "pitr_enabled": { - "type": "boolean" - }, - "backups": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "is_physical_backup": { - "type": "boolean" - }, - "status": { - "type": "string", - "enum": [ - "COMPLETED", - "FAILED", - "PENDING", - "REMOVED", - "ARCHIVED", - "CANCELLED" - ] - }, - "inserted_at": { - "type": "string" - } - }, - "required": ["id", "is_physical_backup", "status", "inserted_at"] - } - }, - "physical_backup_data": { - "type": "object", - "properties": { - "earliest_physical_backup_date_unix": { - "type": "integer" - }, - "latest_physical_backup_date_unix": { - "type": "integer" - } - } - } - }, - "required": [ - "region", - "walg_enabled", - "pitr_enabled", - "backups", - "physical_backup_data" - ] + "$ref": "#/components/schemas/V1BackupsResponse" } } } @@ -22197,9 +10418,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["backups_read"] } ], "summary": "Lists all backups", @@ -22211,6 +10429,7 @@ } ], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_read"]], "x-oauth-scope": "database:read" } }, @@ -22236,19 +10455,8 @@ "required": true, "content": { "application/json": { - "schema": { - "type": "object", - "properties": { - "recovery_time_target_unix": { - "type": "integer", - "minimum": 0, - "format": "int64" - } - }, - "required": ["recovery_time_target_unix"], - "example": { - "recovery_time_target_unix": 1740787200 - } + "schema": { + "$ref": "#/components/schemas/V1RestorePitrBody" } } } @@ -22270,9 +10478,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["backups_write"] } ], "summary": "Restores a PITR backup for a database", @@ -22284,6 +10489,7 @@ } ], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_write"]], "x-oauth-scope": "database:write" } }, @@ -22310,17 +10516,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 20 - } - }, - "required": ["name"], - "example": { - "name": "before-upgrade" - } + "$ref": "#/components/schemas/V1RestorePointPostBody" } } } @@ -22331,22 +10527,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["AVAILABLE", "PENDING", "REMOVED", "FAILED"] - }, - "completed_on": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "required": ["name", "status", "completed_on"] + "$ref": "#/components/schemas/V1RestorePointResponse" } } } @@ -22364,9 +10545,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["backups_write"] } ], "summary": "Initiates a creation of a restore point for a database", @@ -22378,6 +10556,7 @@ } ], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_write"]], "x-internal": true, "x-oauth-scope": "database:write" }, @@ -22413,22 +10592,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["AVAILABLE", "PENDING", "REMOVED", "FAILED"] - }, - "completed_on": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "required": ["name", "status", "completed_on"] + "$ref": "#/components/schemas/V1RestorePointResponse" } } } @@ -22449,9 +10613,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["backups_read"] } ], "summary": "Get restore points for project", @@ -22463,6 +10624,7 @@ } ], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_read"]], "x-internal": true, "x-oauth-scope": "database:read" } @@ -22490,16 +10652,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "integer" - } - }, - "required": ["id"], - "example": { - "id": 12345 - } + "$ref": "#/components/schemas/V1RestoreBackupBody" } } } @@ -22521,9 +10674,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["backups_write"] } ], "summary": "Restores a physical backup for a database", @@ -22535,6 +10685,7 @@ } ], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_write"]], "x-internal": true, "x-oauth-scope": "database:write" } @@ -22563,21 +10714,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "schedule_for": { - "type": "string", - "description": "Time of day to schedule daily backups, in UTC. Format: HH:MM:SS.", - "example": "04:00:00" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of when the backup schedule was last updated.", - "example": "2026-05-04T14:40:44+00:00" - } - }, - "required": ["schedule_for", "updated_at"] + "$ref": "#/components/schemas/V1BackupScheduleResponse" } } } @@ -22586,7 +10723,14 @@ "description": "Unauthorized" }, "402": { - "description": "This feature requires the Enterprise organization plan." + "description": "This feature requires the Enterprise organization plan.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanGateErrorBody" + } + } + } }, "403": { "description": "Forbidden action" @@ -22604,9 +10748,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["backups_read"] } ], "summary": "Gets the backup schedule for a project", @@ -22623,6 +10764,7 @@ } ], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_read"]], "x-oauth-scope": "database:read" }, "patch": { @@ -22648,18 +10790,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "schedule_for": { - "type": "string", - "description": "Time of day to schedule daily backups, in UTC. Format: HH:MM:SS.", - "example": "04:00:00" - } - }, - "required": ["schedule_for"], - "example": { - "schedule_for": "04:00:00" - } + "$ref": "#/components/schemas/V1UpdateBackupScheduleBody" } } } @@ -22670,21 +10801,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "schedule_for": { - "type": "string", - "description": "Time of day to schedule daily backups, in UTC. Format: HH:MM:SS.", - "example": "04:00:00" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp of when the backup schedule was last updated.", - "example": "2026-05-04T14:40:44+00:00" - } - }, - "required": ["schedule_for", "updated_at"] + "$ref": "#/components/schemas/V1BackupScheduleResponse" } } } @@ -22696,7 +10813,14 @@ "description": "Unauthorized" }, "402": { - "description": "This feature requires the Enterprise organization plan." + "description": "This feature requires the Enterprise organization plan.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanGateErrorBody" + } + } + } }, "403": { "description": "Forbidden action" @@ -22714,9 +10838,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["backups_write"] } ], "summary": "Updates the backup schedule time for a project", @@ -22733,6 +10854,7 @@ } ], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_write"]], "x-oauth-scope": "database:write" } }, @@ -22759,17 +10881,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 20 - } - }, - "required": ["name"], - "example": { - "name": "before-upgrade" - } + "$ref": "#/components/schemas/V1UndoBody" } } } @@ -22791,9 +10903,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["backups_write"] } ], "summary": "Initiates an undo to a given restore point", @@ -22805,6 +10914,7 @@ } ], "x-endpoint-owners": ["infra"], + "x-fga-permissions": [["backups_write"]], "x-internal": true, "x-oauth-scope": "database:write" } @@ -22832,150 +10942,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "entitlements": { - "type": "array", - "items": { - "type": "object", - "properties": { - "feature": { - "type": "object", - "properties": { - "key": { - "type": "string", - "enum": [ - "instances.compute_update_available_sizes", - "instances.read_replicas", - "instances.disk_modifications", - "instances.high_availability", - "instances.orioledb", - "replication.etl", - "storage.max_file_size", - "storage.max_file_size.configurable", - "storage.image_transformations", - "storage.vector_buckets", - "storage.iceberg_catalog", - "storage.purge_cache", - "security.audit_logs_days", - "security.questionnaire", - "security.soc2_report", - "security.iso27001_certificate", - "security.private_link", - "security.enforce_mfa", - "log.retention_days", - "custom_domain", - "vanity_subdomain", - "ipv4", - "pitr.available_variants", - "log_drains", - "audit_log_drains", - "branching_limit", - "branching_persistent", - "auth.mfa_phone", - "auth.mfa_web_authn", - "auth.mfa_enhanced_security", - "auth.hooks", - "auth.platform.sso", - "auth.custom_jwt_template", - "auth.saml_2", - "auth.user_sessions", - "auth.leaked_password_protection", - "auth.advanced_auth_settings", - "auth.performance_settings", - "auth.password_hibp", - "auth.custom_oauth.max_providers", - "backup.retention_days", - "backup.restore_to_new_project", - "backup.schedule", - "function.max_count", - "function.size_limit_mb", - "realtime.max_concurrent_users", - "realtime.max_events_per_second", - "realtime.max_joins_per_second", - "realtime.max_channels_per_client", - "realtime.max_bytes_per_second", - "realtime.max_presence_events_per_second", - "realtime.max_payload_size_in_kb", - "project_scoped_roles", - "security.member_roles", - "project_pausing", - "project_cloning", - "project_restore_after_expiry", - "assistant.advance_model", - "integrations.github_connections", - "dedicated_pooler", - "observability.dashboard_advanced_metrics", - "api.members.invitations", - "api.members.roles" - ] - }, - "type": { - "type": "string", - "enum": ["boolean", "numeric", "set"] - } - }, - "required": ["key", "type"] - }, - "hasAccess": { - "type": "boolean" - }, - "type": { - "type": "string", - "enum": ["boolean", "numeric", "set"] - }, - "config": { - "oneOf": [ - { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": ["enabled"] - }, - { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "value": { - "type": "number" - }, - "unlimited": { - "type": "boolean" - }, - "unit": { - "type": "string" - } - }, - "required": ["enabled", "value", "unlimited", "unit"] - }, - { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "set": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": ["enabled", "set"] - } - ] - } - }, - "required": ["feature", "hasAccess", "type", "config"] - } - } - }, - "required": ["entitlements"] + "$ref": "#/components/schemas/V1ListEntitlementsResponse" } } } @@ -22993,9 +10960,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["organization_admin_read"] } ], "summary": "Get entitlements for an organization", @@ -23007,6 +10971,7 @@ } ], "x-endpoint-owners": ["billing"], + "x-fga-permissions": [["organization_admin_read"]], "x-oauth-scope": "organizations:read" } }, @@ -23034,29 +10999,7 @@ "schema": { "type": "array", "items": { - "type": "object", - "properties": { - "user_id": { - "type": "string" - }, - "user_name": { - "type": "string" - }, - "email": { - "type": "string" - }, - "role_name": { - "type": "string" - }, - "mfa_enabled": { - "type": "boolean" - }, - "avatar_url": { - "type": "string", - "nullable": true - } - }, - "required": ["user_id", "user_name", "role_name", "mfa_enabled", "avatar_url"] + "$ref": "#/components/schemas/V1OrganizationMemberResponse" } } } @@ -23066,9 +11009,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["members_read"] } ], "summary": "List members of an organization", @@ -23080,6 +11020,7 @@ } ], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["members_read"]], "x-oauth-scope": "organizations:read" } }, @@ -23105,38 +11046,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "plan": { - "type": "string", - "enum": ["free", "pro", "team", "enterprise", "platform"] - }, - "opt_in_tags": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "AI_SQL_GENERATOR_OPT_IN", - "AI_DATA_GENERATOR_OPT_IN", - "AI_LOG_GENERATOR_OPT_IN" - ] - } - }, - "allowed_release_channels": { - "type": "array", - "items": { - "type": "string", - "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] - } - } - }, - "required": ["id", "name", "opt_in_tags", "allowed_release_channels"] + "$ref": "#/components/schemas/V1OrganizationSlugResponse" } } } @@ -23154,9 +11064,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["organization_admin_read"] } ], "summary": "Gets information about the organization", @@ -23168,6 +11075,7 @@ } ], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_read"]], "x-oauth-scope": "organizations:read" } }, @@ -23195,125 +11103,14 @@ "type": "string" } } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "project": { - "type": "object", - "properties": { - "ref": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["ref", "name"] - }, - "preview": { - "type": "object", - "properties": { - "valid": { - "type": "boolean" - }, - "warnings": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["key", "message"] - } - }, - "errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["key", "message"] - } - }, - "info": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["key", "message"] - } - }, - "members_exceeding_free_project_limit": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "limit": { - "type": "number" - } - }, - "required": ["name", "limit"] - } - }, - "source_subscription_plan": { - "type": "string", - "enum": ["free", "pro", "team", "enterprise", "platform"] - }, - "target_subscription_plan": { - "type": "string", - "enum": ["free", "pro", "team", "enterprise", "platform"], - "nullable": true - } - }, - "required": [ - "valid", - "warnings", - "errors", - "info", - "members_exceeding_free_project_limit", - "source_subscription_plan", - "target_subscription_plan" - ] - }, - "expires_at": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "created_by": { - "type": "string", - "format": "uuid" - } - }, - "required": ["project", "preview", "expires_at", "created_at", "created_by"] + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationProjectClaimResponse" } } } @@ -23331,14 +11128,12 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["organization_admin_write"] } ], "summary": "Gets project details for the specified organization and claim token", "tags": ["Organizations"], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_write"]], "x-internal": true }, "post": { @@ -23382,14 +11177,12 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["organization_admin_write"] } ], "summary": "Claims project for the specified organization", "tags": ["Organizations"], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_write"]], "x-internal": true } }, @@ -23416,6 +11209,7 @@ "description": "Number of projects to skip", "schema": { "minimum": 0, + "maximum": 9007199254740991, "default": 0, "example": 0, "type": "integer" @@ -23473,167 +11267,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "projects": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ref": { - "type": "string" - }, - "name": { - "type": "string" - }, - "cloud_provider": { - "type": "string" - }, - "region": { - "type": "string" - }, - "is_branch": { - "type": "boolean" - }, - "status": { - "type": "string", - "enum": [ - "INACTIVE", - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "UNKNOWN", - "GOING_DOWN", - "INIT_FAILED", - "REMOVED", - "RESTORING", - "UPGRADING", - "PAUSING", - "RESTORE_FAILED", - "RESTARTING", - "PAUSE_FAILED", - "RESIZING" - ] - }, - "inserted_at": { - "type": "string" - }, - "databases": { - "type": "array", - "items": { - "type": "object", - "properties": { - "infra_compute_size": { - "type": "string", - "enum": [ - "pico", - "nano", - "micro", - "small", - "medium", - "large", - "xlarge", - "2xlarge", - "4xlarge", - "8xlarge", - "12xlarge", - "16xlarge", - "24xlarge", - "24xlarge_optimized_memory", - "24xlarge_optimized_cpu", - "24xlarge_high_memory", - "48xlarge", - "48xlarge_optimized_memory", - "48xlarge_optimized_cpu", - "48xlarge_high_memory" - ] - }, - "region": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "GOING_DOWN", - "INIT_FAILED", - "REMOVED", - "RESTORING", - "UNKNOWN", - "INIT_READ_REPLICA", - "INIT_READ_REPLICA_FAILED", - "RESTARTING", - "RESIZING" - ] - }, - "cloud_provider": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["PRIMARY", "READ_REPLICA"] - }, - "disk_volume_size_gb": { - "type": "number" - }, - "disk_type": { - "type": "string", - "enum": ["gp3", "io2"] - }, - "disk_throughput_mbps": { - "type": "number" - }, - "disk_last_modified_at": { - "type": "string" - } - }, - "required": [ - "region", - "status", - "cloud_provider", - "identifier", - "type" - ] - } - } - }, - "required": [ - "ref", - "name", - "cloud_provider", - "region", - "is_branch", - "status", - "inserted_at", - "databases" - ] - } - }, - "pagination": { - "type": "object", - "properties": { - "count": { - "type": "number", - "description": "Total number of projects. Use this to calculate the total number of pages." - }, - "limit": { - "type": "number", - "description": "Maximum number of projects per page" - }, - "offset": { - "type": "number", - "description": "Number of projects skipped in this response" - } - }, - "required": ["count", "limit", "offset"] - } - }, - "required": ["projects", "pagination"] + "$ref": "#/components/schemas/OrganizationProjectsResponse" } } } @@ -23654,9 +11288,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["organization_projects_read"] } ], "summary": "Gets all projects for the given organization", @@ -23668,6 +11299,7 @@ } ], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_projects_read"]], "x-oauth-scope": "projects:read" } } @@ -23721,8 +11353,9 @@ }, "db_port": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 }, "db_user": { "type": "string" @@ -23754,9 +11387,9 @@ "type": "string" }, "reset_on_push": { - "type": "boolean", "description": "This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead.", - "deprecated": true + "deprecated": true, + "type": "boolean" }, "persistent": { "type": "boolean" @@ -23794,7 +11427,8 @@ "properties": { "id": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string" @@ -23813,12 +11447,14 @@ }, "pr_number": { "type": "integer", - "format": "int32" + "format": "int32", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "latest_check_run_id": { - "type": "number", "description": "This field is deprecated and will not be populated.", - "deprecated": true + "deprecated": true, + "type": "number" }, "persistent": { "type": "boolean" @@ -23838,15 +11474,18 @@ }, "created_at": { "type": "string", - "format": "date-time" + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "updated_at": { "type": "string", - "format": "date-time" + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "review_requested_at": { "type": "string", - "format": "date-time" + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "with_data": { "type": "boolean" @@ -23857,7 +11496,8 @@ }, "deletion_scheduled_at": { "type": "string", - "format": "date-time" + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "preview_project_status": { "type": "string", @@ -24044,9 +11684,9 @@ "description": "Name of your project" }, "organization_id": { - "type": "string", + "deprecated": true, "description": "Deprecated: Use `organization_slug` instead.", - "deprecated": true + "type": "string" }, "organization_slug": { "type": "string", @@ -24055,13 +11695,12 @@ "example": "tsrqponmlkjihgfedcba" }, "plan": { - "type": "string", - "enum": ["free", "pro"], "deprecated": true, - "description": "Subscription Plan is now set on organization level and is ignored in this request" + "description": "Subscription Plan is now set on organization level and is ignored in this request", + "type": "string", + "enum": ["free", "pro"] }, "region": { - "type": "string", "description": "Region you want your server to reside in. Use region_selection instead.", "deprecated": true, "enum": [ @@ -24083,12 +11722,11 @@ "ca-central-1", "ap-south-1", "sa-east-1" - ] + ], + "type": "string" }, "region_selection": { - "discriminator": { - "propertyName": "type" - }, + "description": "Region selection. Only one of region or region_selection can be specified.", "oneOf": [ { "type": "object", @@ -24139,13 +11777,12 @@ }, "required": ["type", "code"] } - ], - "description": "Region selection. Only one of region or region_selection can be specified." + ] }, "kps_enabled": { - "type": "boolean", "deprecated": true, - "description": "This field is deprecated and is ignored in this request" + "description": "This field is deprecated and is ignored in this request", + "type": "boolean" }, "desired_instance_size": { "description": "Desired instance size. Omit this field to always default to the smallest possible size.", @@ -24173,24 +11810,31 @@ ] }, "template_url": { + "description": "Template URL used to create the project from the CLI.", "type": "string", - "format": "uri", - "description": "Template URL used to create the project from the CLI." + "format": "uri" + }, + "release_channel": { + "deprecated": true, + "type": "null" + }, + "postgres_engine": { + "deprecated": true, + "type": "null" }, "high_availability": { - "type": "boolean", - "description": "[Experimental] Whether to enable high availability for the project." + "description": "[Experimental] Whether to enable high availability for the project.", + "type": "boolean" } }, "required": ["db_pass", "name", "organization_slug"], - "additionalProperties": false, - "hideDefinitions": ["release_channel", "postgres_engine"], "example": { "db_pass": "correct-horse-battery-staple", "name": "acme-prod", "organization_slug": "tsrqponmlkjihgfedcba", "region": "us-east-1" - } + }, + "additionalProperties": false }, "V1ProjectResponse": { "type": "object", @@ -24441,10 +12085,10 @@ } }, "required": ["name"], - "additionalProperties": false, "example": { "name": "Acme" - } + }, + "additionalProperties": false }, "OAuthTokenBody": { "type": "object", @@ -24459,7 +12103,8 @@ }, "client_id": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "client_secret": { "type": "string" @@ -24477,19 +12122,18 @@ "type": "string" }, "assertion": { - "type": "string", - "description": "IDJAG assertion JWT for grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer. Beta - available on Team and Enterprise plans only." + "description": "IDJAG assertion JWT for grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer. Beta - available on Team and Enterprise plans only.", + "type": "string" }, "resource": { + "description": "Resource indicator for MCP (Model Context Protocol) clients", "type": "string", - "format": "uri", - "description": "Resource indicator for MCP (Model Context Protocol) clients" + "format": "uri" }, "scope": { "type": "string" } }, - "additionalProperties": false, "example": { "grant_type": "authorization_code", "client_id": "66666666-6666-4666-8666-666666666666", @@ -24498,7 +12142,8 @@ "code_verifier": "qW0Z6d9pQnW0mL1dK1q9wFq6Yz2nV5rA8jT3mP7sH4c", "redirect_uri": "https://app.acme.com/auth/callback", "scope": "projects:read projects:write" - } + }, + "additionalProperties": false }, "OAuthTokenResponse": { "type": "object", @@ -24507,11 +12152,13 @@ "type": "string" }, "refresh_token": { - "type": "string", - "description": "The `urn:ietf:params:oauth:grant-type:jwt-bearer` grant type issues access tokens only, no refresh token is returned and the token cannot be revoked via `/v1/oauth/revoke`." + "description": "The `urn:ietf:params:oauth:grant-type:jwt-bearer` grant type issues access tokens only, no refresh token is returned and the token cannot be revoked via `/v1/oauth/revoke`.", + "type": "string" }, "expires_in": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "token_type": { "type": "string", @@ -24526,7 +12173,8 @@ "properties": { "client_id": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "client_secret": { "type": "string" @@ -24536,12 +12184,12 @@ } }, "required": ["client_id", "client_secret", "refresh_token"], - "additionalProperties": false, "example": { "client_id": "66666666-6666-4666-8666-666666666666", "client_secret": "sb_secret_live_example_9f4d3a206b2e4a7e8c91", "refresh_token": "oauth_refresh_9f4d3a206b2e4a7e8c91" - } + }, + "additionalProperties": false }, "SnippetList": { "type": "object", @@ -24706,9 +12354,9 @@ "type": "object", "properties": { "favorite": { - "type": "boolean", "deprecated": true, - "description": "Deprecated: Rely on root-level favorite property instead." + "description": "Deprecated: Rely on root-level favorite property instead.", + "type": "boolean" }, "schema_version": { "type": "string" @@ -24951,7 +12599,7 @@ }, "type": { "type": "string", - "enum": ["legacy", "publishable", "secret"], + "enum": ["legacy", "publishable", "secret", null], "nullable": true }, "prefix": { @@ -24971,17 +12619,22 @@ }, "secret_jwt_template": { "type": "object", + "propertyNames": { + "type": "string" + }, "additionalProperties": {}, "nullable": true }, "inserted_at": { "type": "string", "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "nullable": true }, "updated_at": { "type": "string", "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "nullable": true } }, @@ -25015,6 +12668,9 @@ }, "secret_jwt_template": { "type": "object", + "propertyNames": { + "type": "string" + }, "additionalProperties": {}, "nullable": true } @@ -25041,6 +12697,9 @@ }, "secret_jwt_template": { "type": "object", + "propertyNames": { + "type": "string" + }, "additionalProperties": {}, "nullable": true } @@ -25128,6 +12787,37 @@ "notify_url": "https://example.com/webhooks/branches" } }, + "UpdateCustomHostnameResponseJsonValue": { + "description": "Any JSON-serializable value", + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ], + "nullable": true + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" + } + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" + } + } + ] + }, "UpdateCustomHostnameResponse": { "type": "object", "properties": { @@ -25153,13 +12843,13 @@ "errors": { "type": "array", "items": { - "description": "Any JSON-serializable value" + "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" } }, "messages": { "type": "array", "items": { - "description": "Any JSON-serializable value" + "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" } }, "result": { @@ -25255,8 +12945,8 @@ "properties": { "custom_hostname": { "type": "string", - "maxLength": 253, - "minLength": 1 + "minLength": 1, + "maxLength": 253 } }, "required": ["custom_hostname"], @@ -25264,40 +12954,6 @@ "custom_hostname": "docs.example.com" } }, - "JitStateResponse": { - "discriminator": { - "propertyName": "state" - }, - "oneOf": [ - { - "type": "object", - "properties": { - "state": { - "type": "string", - "enum": ["enabled", "disabled"] - }, - "appliedSuccessfully": { - "type": "boolean" - } - }, - "required": ["state"] - }, - { - "type": "object", - "properties": { - "state": { - "type": "string", - "enum": ["unavailable"] - }, - "unavailableReason": { - "type": "string", - "enum": ["postgres_upgrade_required", "temporarily_unavailable"] - } - }, - "required": ["state", "unavailableReason"] - } - ] - }, "JitAccessRequestRequest": { "type": "object", "properties": { @@ -25359,8 +13015,8 @@ }, "requester_ip": { "default": false, - "type": "boolean", - "description": "Include requester's public IP in the list of addresses to unban." + "description": "Include requester's public IP in the list of addresses to unban.", + "type": "boolean" }, "identifier": { "type": "string" @@ -25395,9 +13051,14 @@ } } }, + "example": { + "dbAllowedCidrs": ["203.0.113.0/24"], + "dbAllowedCidrsV6": ["2001:db8::/32"] + }, "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." }, "old_config": { + "description": "Populated when a new config has been received, but not registered as successfully applied to a project.", "type": "object", "properties": { "dbAllowedCidrs": { @@ -25416,8 +13077,7 @@ "example": { "dbAllowedCidrs": ["203.0.113.0/24"], "dbAllowedCidrsV6": ["2001:db8::/32"] - }, - "description": "Populated when a new config has been received, but not registered as successfully applied to a project." + } }, "status": { "type": "string", @@ -25425,11 +13085,13 @@ }, "updated_at": { "type": "string", - "format": "date-time" + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "applied_at": { "type": "string", - "format": "date-time" + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": ["entitlement", "config", "status"] @@ -25532,6 +13194,7 @@ "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." }, "old_config": { + "description": "Populated when a new config has been received, but not registered as successfully applied to a project.", "type": "object", "properties": { "dbAllowedCidrs": { @@ -25550,16 +13213,17 @@ "required": ["address", "type"] } } - }, - "description": "Populated when a new config has been received, but not registered as successfully applied to a project." + } }, "updated_at": { "type": "string", - "format": "date-time" + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "applied_at": { "type": "string", - "format": "date-time" + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "status": { "type": "string", @@ -25572,21 +13236,26 @@ "type": "object", "properties": { "root_key": { - "type": "string" + "type": "string", + "description": "The pgsodium root key: 32 bytes, hex-encoded (64 characters)." } }, - "required": ["root_key"] + "required": ["root_key"], + "example": { + "root_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" + } }, "UpdatePgsodiumConfigBody": { "type": "object", "properties": { "root_key": { - "type": "string" + "type": "string", + "description": "The pgsodium root key: 32 bytes, hex-encoded (64 characters)." } }, "required": ["root_key"], "example": { - "root_key": "MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=" + "root_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" } }, "PostgrestConfigWithJWTSecretResponse": { @@ -25596,20 +13265,26 @@ "type": "string" }, "max_rows": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "db_extra_search_path": { "type": "string" }, "db_pool": { "type": "integer", - "nullable": true, - "description": "If `null`, the value is automatically configured based on compute size." + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "If `null`, the value is automatically configured based on compute size.", + "nullable": true }, "db_pool_acquisition_timeout": { "type": "integer", - "nullable": true, - "description": "If `null`, the value is automatically configured to 10." + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "If `null`, the value is automatically configured to 10.", + "nullable": true }, "jwt_secret": { "type": "string" @@ -25661,20 +13336,26 @@ "type": "string" }, "max_rows": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "db_extra_search_path": { "type": "string" }, "db_pool": { "type": "integer", - "nullable": true, - "description": "If `null`, the value is automatically configured based on compute size." + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "If `null`, the value is automatically configured based on compute size.", + "nullable": true }, "db_pool_acquisition_timeout": { "type": "integer", - "nullable": true, - "description": "If `null`, the value is automatically configured to 10." + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "If `null`, the value is automatically configured to 10.", + "nullable": true } }, "required": [ @@ -25689,7 +13370,9 @@ "type": "object", "properties": { "id": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "ref": { "type": "string" @@ -25730,6 +13413,7 @@ "required": ["name", "value"] }, "CreateSecretBody": { + "maxItems": 100, "type": "array", "items": { "type": "object", @@ -25826,6 +13510,36 @@ }, "required": ["status"] }, + "PlanGateErrorBody": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable explanation of the plan gate" + }, + "error": { + "description": "Present on entitlement denials. Other errors with this status code (validation, billing state) carry only message.", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Machine-readable marker for plan-gated denials", + "enum": ["entitlement_required"] + }, + "feature": { + "type": "string", + "description": "Entitlement feature key that failed the check" + }, + "upgrade_url": { + "description": "Billing page URL for the organization, present when the org is resolvable", + "type": "string" + } + }, + "required": ["code", "feature"] + } + }, + "required": ["message"] + }, "VanitySubdomainBody": { "type": "object", "properties": { @@ -25955,7 +13669,7 @@ "validation_errors": { "type": "array", "items": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { @@ -26066,8 +13780,16 @@ "enum": ["user_defined_objects_in_internal_schemas"] }, "obj_type": { - "type": "string", - "enum": ["table", "function"] + "anyOf": [ + { + "type": "string", + "enum": ["table"] + }, + { + "type": "string", + "enum": ["function"] + } + ] }, "schema_name": { "type": "string" @@ -26117,9 +13839,6 @@ "warnings": { "type": "array", "items": { - "discriminator": { - "propertyName": "type" - }, "oneOf": [ { "type": "object", @@ -26311,7 +14030,7 @@ "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"] }, "info": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { @@ -26343,7 +14062,9 @@ "type": "boolean" }, "connected_cluster": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": [ @@ -26375,7 +14096,8 @@ "properties": { "id": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "algorithm": { "type": "string", @@ -26390,14 +14112,16 @@ }, "created_at": { "type": "string", - "format": "date-time" + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "updated_at": { "type": "string", - "format": "date-time" + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, - "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "required": ["id", "algorithm", "status", "public_jwk", "created_at", "updated_at"], "additionalProperties": false }, "CreateSigningKeyBody": { @@ -26412,29 +14136,27 @@ "enum": ["in_use", "standby"] }, "private_jwk": { - "discriminator": { - "propertyName": "kty" - }, "oneOf": [ { "type": "object", "properties": { "kid": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { + "minItems": 2, + "maxItems": 2, "type": "array", "items": { "type": "string", "enum": ["sign", "verify"] - }, - "minItems": 2, - "maxItems": 2 + } }, "ext": { "type": "boolean", @@ -26482,20 +14204,21 @@ "properties": { "kid": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { + "minItems": 2, + "maxItems": 2, "type": "array", "items": { "type": "string", "enum": ["sign", "verify"] - }, - "minItems": 2, - "maxItems": 2 + } }, "ext": { "type": "boolean", @@ -26531,20 +14254,21 @@ "properties": { "kid": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { + "minItems": 2, + "maxItems": 2, "type": "array", "items": { "type": "string", "enum": ["sign", "verify"] - }, - "minItems": 2, - "maxItems": 2 + } }, "ext": { "type": "boolean", @@ -26577,20 +14301,21 @@ "properties": { "kid": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { + "minItems": 2, + "maxItems": 2, "type": "array", "items": { "type": "string", "enum": ["sign", "verify"] - }, - "minItems": 2, - "maxItems": 2 + } }, "ext": { "type": "boolean", @@ -26616,11 +14341,11 @@ } }, "required": ["algorithm"], - "additionalProperties": false, "example": { "algorithm": "RS256", "status": "standby" - } + }, + "additionalProperties": false }, "SigningKeysResponse": { "type": "object", @@ -26632,7 +14357,8 @@ "properties": { "id": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "algorithm": { "type": "string", @@ -26647,14 +14373,16 @@ }, "created_at": { "type": "string", - "format": "date-time" + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "updated_at": { "type": "string", - "format": "date-time" + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, - "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "required": ["id", "algorithm", "status", "public_jwk", "created_at", "updated_at"], "additionalProperties": false } } @@ -26671,25 +14399,29 @@ } }, "required": ["status"], - "additionalProperties": false, "example": { "status": "standby" - } + }, + "additionalProperties": false }, "AuthConfigResponse": { "type": "object", "properties": { "api_max_request_duration": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "db_max_pool_size": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "db_max_pool_size_unit": { "type": "string", - "enum": ["connections", "percent"], + "enum": ["connections", "percent", null], "nullable": true }, "disable_signup": { @@ -27162,6 +14894,8 @@ }, "jwt_exp": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "mailer_allow_unverified_email_sign_ins": { @@ -27173,10 +14907,14 @@ "nullable": true }, "mailer_otp_exp": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "mailer_otp_length": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "mailer_secure_email_change_enabled": { @@ -27317,6 +15055,8 @@ }, "mfa_max_enrolled_factors": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "mfa_totp_enroll_enabled": { @@ -27359,7 +15099,9 @@ "nullable": true }, "mfa_phone_otp_length": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "mfa_phone_template": { "type": "string", @@ -27367,6 +15109,8 @@ }, "mfa_phone_max_frequency": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "nimbus_oauth_client_id": { @@ -27387,6 +15131,8 @@ }, "password_min_length": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "password_required_characters": { @@ -27395,36 +15141,51 @@ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", - "" + "", + null ], "nullable": true }, "rate_limit_anonymous_users": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "rate_limit_email_sent": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "rate_limit_sms_sent": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "rate_limit_token_refresh": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "rate_limit_verify": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "rate_limit_otp": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "rate_limit_web3": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "refresh_token_rotation_enabled": { @@ -27453,7 +15214,7 @@ }, "security_captcha_provider": { "type": "string", - "enum": ["turnstile", "hcaptcha"], + "enum": ["turnstile", "hcaptcha", null], "nullable": true }, "security_captcha_secret": { @@ -27466,6 +15227,8 @@ }, "security_refresh_token_reuse_interval": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "security_update_password_require_reauthentication": { @@ -27498,6 +15261,8 @@ }, "sms_max_frequency": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "sms_messagebird_access_key": { @@ -27510,14 +15275,18 @@ }, "sms_otp_exp": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "sms_otp_length": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "sms_provider": { "type": "string", - "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage", null], "nullable": true }, "sms_template": { @@ -27531,6 +15300,7 @@ "sms_test_otp_valid_until": { "type": "string", "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", "nullable": true }, "sms_textlocal_api_key": { @@ -27584,6 +15354,7 @@ "smtp_admin_email": { "type": "string", "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", "nullable": true }, "smtp_host": { @@ -27592,6 +15363,8 @@ }, "smtp_max_frequency": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "smtp_pass": { @@ -27628,7 +15401,9 @@ "type": "boolean" }, "custom_oauth_max_providers": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": [ @@ -27892,6 +15667,7 @@ "smtp_admin_email": { "type": "string", "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", "nullable": true }, "smtp_host": { @@ -28101,7 +15877,7 @@ }, "security_captcha_provider": { "type": "string", - "enum": ["turnstile", "hcaptcha"], + "enum": ["turnstile", "hcaptcha", null], "nullable": true }, "security_captcha_secret": { @@ -28193,7 +15969,8 @@ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", - "" + "", + null ], "nullable": true }, @@ -28245,7 +16022,7 @@ }, "sms_provider": { "type": "string", - "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage", null], "nullable": true }, "sms_messagebird_access_key": { @@ -28264,6 +16041,7 @@ "sms_test_otp_valid_until": { "type": "string", "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", "nullable": true }, "sms_textlocal_api_key": { @@ -28772,15 +16550,19 @@ }, "db_max_pool_size": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "db_max_pool_size_unit": { "type": "string", - "enum": ["connections", "percent"], + "enum": ["connections", "percent", null], "nullable": true }, "api_max_request_duration": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "mfa_totp_enroll_enabled": { @@ -28889,7 +16671,8 @@ "properties": { "id": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "type": { "type": "string" @@ -28947,6 +16730,37 @@ }, "required": ["available_versions"] }, + "ListProjectAddonsResponseJsonValue": { + "description": "Any JSON-serializable value", + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ], + "nullable": true + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" + } + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" + } + } + ] + }, "ListProjectAddonsResponse": { "type": "object", "properties": { @@ -28972,7 +16786,7 @@ "type": "object", "properties": { "id": { - "oneOf": [ + "anyOf": [ { "type": "string", "enum": [ @@ -29050,7 +16864,7 @@ "required": ["description", "type", "interval", "amount"] }, "meta": { - "description": "Any JSON-serializable value" + "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" } }, "required": ["id", "name", "price"] @@ -29086,7 +16900,7 @@ "type": "object", "properties": { "id": { - "oneOf": [ + "anyOf": [ { "type": "string", "enum": [ @@ -29164,7 +16978,7 @@ "required": ["description", "type", "interval", "amount"] }, "meta": { - "description": "Any JSON-serializable value" + "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" } }, "required": ["id", "name", "price"] @@ -29181,7 +16995,7 @@ "type": "object", "properties": { "addon_variant": { - "oneOf": [ + "anyOf": [ { "type": "string", "enum": [ @@ -29253,7 +17067,8 @@ }, "created_by": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": ["token_alias", "expires_at", "created_at", "created_by"] @@ -29275,7 +17090,8 @@ }, "created_by": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": ["token", "token_alias", "expires_at", "created_at", "created_by"] @@ -29289,7 +17105,6 @@ "type": "object", "properties": { "name": { - "type": "string", "enum": [ "unindexed_foreign_keys", "auth_users_exposed", @@ -29320,7 +17135,8 @@ "leaked_service_key", "no_backup_admin", "vulnerable_postgres_version" - ] + ], + "type": "string" }, "title": { "type": "string" @@ -29404,7 +17220,7 @@ "items": {} }, "error": { - "oneOf": [ + "anyOf": [ { "type": "string" }, @@ -29461,7 +17277,8 @@ "properties": { "timestamp": { "type": "string", - "format": "date-time" + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|))$" }, "total_auth_requests": { "type": "number" @@ -29486,7 +17303,7 @@ } }, "error": { - "oneOf": [ + "anyOf": [ { "type": "string" }, @@ -29549,7 +17366,7 @@ } }, "error": { - "oneOf": [ + "anyOf": [ { "type": "string" }, @@ -29622,6 +17439,7 @@ "ttl_seconds": { "type": "integer", "minimum": 1, + "maximum": 9007199254740991, "format": "int64" } }, @@ -29800,12 +17618,12 @@ } }, "required": ["name"], - "additionalProperties": true + "additionalProperties": {} } } }, "required": ["name", "schemas"], - "additionalProperties": true + "additionalProperties": {} } } }, @@ -29838,7 +17656,8 @@ "properties": { "user_id": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "user_roles": { "type": "array", @@ -29861,7 +17680,9 @@ "type": "object", "properties": { "cidr": { - "type": "string" + "type": "string", + "format": "cidrv4", + "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" } }, "required": ["cidr"] @@ -29873,7 +17694,9 @@ "type": "object", "properties": { "cidr": { - "type": "string" + "type": "string", + "format": "cidrv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" } }, "required": ["cidr"] @@ -29899,8 +17722,18 @@ "minLength": 1 }, "rhost": { - "type": "string", - "minLength": 1 + "anyOf": [ + { + "type": "string", + "format": "ipv4", + "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$" + }, + { + "type": "string", + "format": "ipv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$" + } + ] } }, "required": ["role", "rhost"], @@ -29914,7 +17747,8 @@ "properties": { "user_id": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "user_role": { "type": "object", @@ -29935,7 +17769,9 @@ "type": "object", "properties": { "cidr": { - "type": "string" + "type": "string", + "format": "cidrv4", + "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" } }, "required": ["cidr"] @@ -29947,7 +17783,9 @@ "type": "object", "properties": { "cidr": { - "type": "string" + "type": "string", + "format": "cidrv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" } }, "required": ["cidr"] @@ -29970,13 +17808,14 @@ "items": { "type": "array", "items": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { "user_id": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "primary_email": { "type": "string", @@ -30009,7 +17848,9 @@ "type": "object", "properties": { "cidr": { - "type": "string" + "type": "string", + "format": "cidrv4", + "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" } }, "required": ["cidr"] @@ -30021,7 +17862,9 @@ "type": "object", "properties": { "cidr": { - "type": "string" + "type": "string", + "format": "cidrv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" } }, "required": ["cidr"] @@ -30050,7 +17893,8 @@ }, "invite_id": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "expires_at": { "type": "string" @@ -30076,7 +17920,9 @@ "type": "object", "properties": { "cidr": { - "type": "string" + "type": "string", + "format": "cidrv4", + "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" } }, "required": ["cidr"] @@ -30088,7 +17934,9 @@ "type": "object", "properties": { "cidr": { - "type": "string" + "type": "string", + "format": "cidrv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" } }, "required": ["cidr"] @@ -30117,8 +17965,9 @@ "properties": { "user_id": { "type": "string", + "minLength": 1, "format": "uuid", - "minLength": 1 + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "roles": { "type": "array", @@ -30141,7 +17990,9 @@ "type": "object", "properties": { "cidr": { - "type": "string" + "type": "string", + "format": "cidrv4", + "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" } }, "required": ["cidr"] @@ -30153,7 +18004,9 @@ "type": "object", "properties": { "cidr": { - "type": "string" + "type": "string", + "format": "cidrv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" } }, "required": ["cidr"] @@ -30193,8 +18046,9 @@ "properties": { "email": { "type": "string", + "minLength": 1, "format": "email", - "minLength": 1 + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "roles": { "type": "array", @@ -30217,7 +18071,9 @@ "type": "object", "properties": { "cidr": { - "type": "string" + "type": "string", + "format": "cidrv4", + "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" } }, "required": ["cidr"] @@ -30229,7 +18085,9 @@ "type": "object", "properties": { "cidr": { - "type": "string" + "type": "string", + "format": "cidrv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" } }, "required": ["cidr"] @@ -30269,11 +18127,13 @@ "properties": { "email": { "type": "string", - "format": "email" + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "invite_id": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "user_roles": { "type": "array", @@ -30296,7 +18156,9 @@ "type": "object", "properties": { "cidr": { - "type": "string" + "type": "string", + "format": "cidrv4", + "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" } }, "required": ["cidr"] @@ -30308,7 +18170,9 @@ "type": "object", "properties": { "cidr": { - "type": "string" + "type": "string", + "format": "cidrv6", + "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" } }, "required": ["cidr"] @@ -30331,8 +18195,9 @@ "properties": { "email": { "type": "string", + "minLength": 1, "format": "email", - "minLength": 1 + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "token": { "type": "string", @@ -30362,14 +18227,20 @@ "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, "version": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "created_at": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "format": "int64" }, "updated_at": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "format": "int64" }, "verify_jwt": { @@ -30435,11 +18306,15 @@ "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, "version": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "created_at": { "type": "integer", - "format": "int64" + "format": "int64", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "verify_jwt": { "type": "boolean" @@ -30493,14 +18368,20 @@ "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, "version": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "created_at": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "format": "int64" }, "updated_at": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "format": "int64" }, "verify_jwt": { @@ -30560,7 +18441,7 @@ "required": ["entrypoint_path"] } }, - "required": ["metadata"], + "required": ["file", "metadata"], "example": { "file": ["./supabase/functions/hello-world/index.ts"], "metadata": { @@ -30587,15 +18468,21 @@ "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, "version": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "created_at": { "type": "integer", - "format": "int64" + "format": "int64", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "updated_at": { "type": "integer", - "format": "int64" + "format": "int64", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "verify_jwt": { "type": "boolean" @@ -30632,14 +18519,20 @@ "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, "version": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "created_at": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "format": "int64" }, "updated_at": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "format": "int64" }, "verify_jwt": { @@ -30711,24 +18604,27 @@ "type": "object", "properties": { "attributes": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { "iops": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 }, "size_gb": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 }, "throughput_mibps": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 }, "type": { "type": "string", @@ -30742,13 +18638,15 @@ "properties": { "iops": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 }, "size_gb": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 }, "type": { "type": "string", @@ -30769,27 +18667,27 @@ "type": "object", "properties": { "attributes": { - "discriminator": { - "propertyName": "type" - }, "oneOf": [ { "type": "object", "properties": { "iops": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 }, "size_gb": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 }, "throughput_mibps": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 }, "type": { "type": "string", @@ -30803,13 +18701,15 @@ "properties": { "iops": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 }, "size_gb": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true + "exclusiveMinimum": true, + "maximum": 9007199254740991, + "minimum": 0 }, "type": { "type": "string", @@ -30860,24 +18760,24 @@ "properties": { "growth_percent": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true, - "nullable": true, - "description": "Growth percentage for disk autoscaling" + "exclusiveMinimum": 0, + "maximum": 9007199254740991, + "description": "Growth percentage for disk autoscaling", + "nullable": true }, "min_increment_gb": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true, - "nullable": true, - "description": "Minimum increment size for disk autoscaling in GB" + "exclusiveMinimum": 0, + "maximum": 9007199254740991, + "description": "Minimum increment size for disk autoscaling in GB", + "nullable": true }, "max_size_gb": { "type": "integer", - "minimum": 0, - "exclusiveMinimum": true, - "nullable": true, - "description": "Maximum limit the disk size will grow to in GB" + "exclusiveMinimum": 0, + "maximum": 9007199254740991, + "description": "Maximum limit the disk size will grow to in GB", + "nullable": true } }, "required": ["growth_percent", "min_increment_gb", "max_size_gb"] @@ -30887,6 +18787,8 @@ "properties": { "fileSizeLimit": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "format": "int64" }, "features": { @@ -30927,15 +18829,18 @@ }, "maxNamespaces": { "type": "integer", - "minimum": 0 + "minimum": 0, + "maximum": 9007199254740991 }, "maxTables": { "type": "integer", - "minimum": 0 + "minimum": 0, + "maximum": 9007199254740991 }, "maxCatalogs": { "type": "integer", - "minimum": 0 + "minimum": 0, + "maximum": 9007199254740991 } }, "required": ["enabled", "maxNamespaces", "maxTables", "maxCatalogs"] @@ -30948,11 +18853,13 @@ }, "maxBuckets": { "type": "integer", - "minimum": 0 + "minimum": 0, + "maximum": 9007199254740991 }, "maxIndexes": { "type": "integer", - "minimum": 0 + "minimum": 0, + "maximum": 9007199254740991 } }, "required": ["enabled", "maxBuckets", "maxIndexes"] @@ -31009,9 +18916,9 @@ "properties": { "fileSizeLimit": { "type": "integer", + "format": "int64", "minimum": 0, - "maximum": 536870912000, - "format": "int64" + "maximum": 536870912000 }, "features": { "type": "object", @@ -31051,15 +18958,18 @@ }, "maxNamespaces": { "type": "integer", - "minimum": 0 + "minimum": 0, + "maximum": 9007199254740991 }, "maxTables": { "type": "integer", - "minimum": 0 + "minimum": 0, + "maximum": 9007199254740991 }, "maxCatalogs": { "type": "integer", - "minimum": 0 + "minimum": 0, + "maximum": 9007199254740991 } }, "required": ["enabled", "maxNamespaces", "maxTables", "maxCatalogs"] @@ -31072,11 +18982,13 @@ }, "maxBuckets": { "type": "integer", - "minimum": 0 + "minimum": 0, + "maximum": 9007199254740991 }, "maxIndexes": { "type": "integer", - "minimum": 0 + "minimum": 0, + "maximum": 9007199254740991 } }, "required": ["enabled", "maxBuckets", "maxIndexes"] @@ -31094,7 +19006,6 @@ "required": ["upstreamTarget"] } }, - "additionalProperties": false, "example": { "fileSizeLimit": 10485760, "features": { @@ -31102,19 +19013,24 @@ "enabled": true } } - } + }, + "additionalProperties": false }, "V1PgbouncerConfigResponse": { "type": "object", "properties": { "default_pool_size": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "ignore_startup_parameters": { "type": "string" }, "max_client_conn": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "pool_mode": { "type": "string", @@ -31124,16 +19040,24 @@ "type": "string" }, "server_idle_timeout": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "server_lifetime": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "query_wait_timeout": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "reserve_pool_size": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } } }, @@ -31157,7 +19081,9 @@ "type": "string" }, "db_port": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "db_name": { "type": "string" @@ -31171,10 +19097,14 @@ }, "default_pool_size": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "max_client_conn": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "pool_mode": { @@ -31207,9 +19137,9 @@ "nullable": true }, "pool_mode": { + "description": "Dedicated pooler mode for the project", "type": "string", - "enum": ["transaction", "session"], - "description": "Dedicated pooler mode for the project" + "enum": ["transaction", "session"] } }, "example": { @@ -31222,6 +19152,8 @@ "properties": { "default_pool_size": { "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, "nullable": true }, "pool_mode": { @@ -31292,6 +19224,11 @@ "minimum": 10, "maximum": 2147483640 }, + "max_logical_replication_workers": { + "type": "integer", + "minimum": 0, + "maximum": 262143 + }, "max_parallel_maintenance_workers": { "type": "integer", "minimum": 0, @@ -31308,7 +19245,9 @@ "maximum": 1024 }, "max_replication_slots": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "max_slot_wal_keep_size": { "type": "string" @@ -31319,11 +19258,18 @@ "max_standby_streaming_delay": { "type": "string" }, + "max_sync_workers_per_subscription": { + "type": "integer", + "minimum": 0, + "maximum": 262143 + }, "max_wal_size": { "type": "string" }, "max_wal_senders": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "max_worker_processes": { "type": "integer", @@ -31428,6 +19374,11 @@ "minimum": 10, "maximum": 2147483640 }, + "max_logical_replication_workers": { + "type": "integer", + "minimum": 0, + "maximum": 262143 + }, "max_parallel_maintenance_workers": { "type": "integer", "minimum": 0, @@ -31444,7 +19395,9 @@ "maximum": 1024 }, "max_replication_slots": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "max_slot_wal_keep_size": { "type": "string" @@ -31455,11 +19408,18 @@ "max_standby_streaming_delay": { "type": "string" }, + "max_sync_workers_per_subscription": { + "type": "integer", + "minimum": 0, + "maximum": 262143 + }, "max_wal_size": { "type": "string" }, "max_wal_senders": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "max_worker_processes": { "type": "integer", @@ -31504,82 +19464,82 @@ "type": "boolean" } }, - "additionalProperties": false, "example": { "max_connections": 120, "shared_buffers": "256MB", "work_mem": "4MB", "statement_timeout": "60000ms" - } + }, + "additionalProperties": false }, "RealtimeConfigResponse": { "type": "object", "properties": { "private_only": { "type": "boolean", - "nullable": true, - "description": "Whether to only allow private channels" + "description": "Whether to only allow private channels", + "nullable": true }, "connection_pool": { "type": "integer", "minimum": 1, "maximum": 100, - "nullable": true, - "description": "Sets connection pool size for Realtime Authorization" + "description": "Sets connection pool size for Realtime Authorization", + "nullable": true }, "max_concurrent_users": { "type": "integer", "minimum": 1, "maximum": 50000, - "nullable": true, - "description": "Sets maximum number of concurrent users rate limit" + "description": "Sets maximum number of concurrent users rate limit", + "nullable": true }, "max_events_per_second": { "type": "integer", "minimum": 1, "maximum": 50000, - "nullable": true, - "description": "Sets maximum number of events per second rate per channel limit" + "description": "Sets maximum number of events per second rate per channel limit", + "nullable": true }, "max_bytes_per_second": { "type": "integer", "minimum": 1, "maximum": 10000000, - "nullable": true, - "description": "Sets maximum number of bytes per second rate per channel limit" + "description": "Sets maximum number of bytes per second rate per channel limit", + "nullable": true }, "max_channels_per_client": { "type": "integer", "minimum": 1, "maximum": 10000, - "nullable": true, - "description": "Sets maximum number of channels per client rate limit" + "description": "Sets maximum number of channels per client rate limit", + "nullable": true }, "max_joins_per_second": { "type": "integer", "minimum": 1, "maximum": 5000, - "nullable": true, - "description": "Sets maximum number of joins per second rate limit" + "description": "Sets maximum number of joins per second rate limit", + "nullable": true }, "max_presence_events_per_second": { "type": "integer", "minimum": 1, "maximum": 5000, - "nullable": true, - "description": "Sets maximum number of presence events per second rate limit" + "description": "Sets maximum number of presence events per second rate limit", + "nullable": true }, "max_payload_size_in_kb": { "type": "integer", "minimum": 1, "maximum": 10000, - "nullable": true, - "description": "Sets maximum number of payload size in KB rate limit" + "description": "Sets maximum number of payload size in KB rate limit", + "nullable": true }, "suspend": { "type": "boolean", - "nullable": true, - "description": "Disables the Realtime service for this project when true. Set to false to re-enable it." + "description": "Disables the Realtime service for this project when true. Set to false to re-enable it.", + "nullable": true }, "presence_enabled": { "type": "boolean", @@ -31664,12 +19624,12 @@ "description": "Whether to enable presence" } }, - "additionalProperties": false, "example": { "private_only": false, "max_concurrent_users": 1000, "max_channels_per_client": 100 - } + }, + "additionalProperties": false }, "CreateProviderBody": { "type": "object", @@ -31709,7 +19669,7 @@ } }, "default": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": {} @@ -31773,9 +19733,6 @@ "saml": { "type": "object", "properties": { - "id": { - "type": "string" - }, "entity_id": { "type": "string" }, @@ -31803,7 +19760,7 @@ } }, "default": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": {} @@ -31838,16 +19795,13 @@ ] } }, - "required": ["id", "entity_id"] + "required": ["entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { - "id": { - "type": "string" - }, "domain": { "type": "string" }, @@ -31857,8 +19811,7 @@ "updated_at": { "type": "string" } - }, - "required": ["id"] + } } }, "created_at": { @@ -31884,9 +19837,6 @@ "saml": { "type": "object", "properties": { - "id": { - "type": "string" - }, "entity_id": { "type": "string" }, @@ -31914,7 +19864,7 @@ } }, "default": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": {} @@ -31949,16 +19899,13 @@ ] } }, - "required": ["id", "entity_id"] + "required": ["entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { - "id": { - "type": "string" - }, "domain": { "type": "string" }, @@ -31968,8 +19915,7 @@ "updated_at": { "type": "string" } - }, - "required": ["id"] + } } }, "created_at": { @@ -31994,9 +19940,6 @@ "saml": { "type": "object", "properties": { - "id": { - "type": "string" - }, "entity_id": { "type": "string" }, @@ -32024,7 +19967,7 @@ } }, "default": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": {} @@ -32059,16 +20002,13 @@ ] } }, - "required": ["id", "entity_id"] + "required": ["entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { - "id": { - "type": "string" - }, "domain": { "type": "string" }, @@ -32078,8 +20018,7 @@ "updated_at": { "type": "string" } - }, - "required": ["id"] + } } }, "created_at": { @@ -32124,7 +20063,7 @@ } }, "default": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": {} @@ -32173,9 +20112,6 @@ "saml": { "type": "object", "properties": { - "id": { - "type": "string" - }, "entity_id": { "type": "string" }, @@ -32203,7 +20139,7 @@ } }, "default": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": {} @@ -32238,16 +20174,13 @@ ] } }, - "required": ["id", "entity_id"] + "required": ["entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { - "id": { - "type": "string" - }, "domain": { "type": "string" }, @@ -32257,8 +20190,7 @@ "updated_at": { "type": "string" } - }, - "required": ["id"] + } } }, "created_at": { @@ -32279,9 +20211,6 @@ "saml": { "type": "object", "properties": { - "id": { - "type": "string" - }, "entity_id": { "type": "string" }, @@ -32309,7 +20238,7 @@ } }, "default": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": {} @@ -32344,16 +20273,13 @@ ] } }, - "required": ["id", "entity_id"] + "required": ["entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { - "id": { - "type": "string" - }, "domain": { "type": "string" }, @@ -32363,8 +20289,7 @@ "updated_at": { "type": "string" } - }, - "required": ["id"] + } } }, "created_at": { @@ -32394,7 +20319,9 @@ "type": "object", "properties": { "id": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "is_physical_backup": { "type": "boolean" @@ -32414,10 +20341,14 @@ "type": "object", "properties": { "earliest_physical_backup_date_unix": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, "latest_physical_backup_date_unix": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } } } @@ -32430,6 +20361,7 @@ "recovery_time_target_unix": { "type": "integer", "minimum": 0, + "maximum": 9007199254740991, "format": "int64" } }, @@ -32464,6 +20396,7 @@ "completed_on": { "type": "string", "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "nullable": true } }, @@ -32473,7 +20406,9 @@ "type": "object", "properties": { "id": { - "type": "integer" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": ["id"], @@ -32486,12 +20421,14 @@ "properties": { "schedule_for": { "type": "string", + "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?$", "description": "Time of day to schedule daily backups, in UTC. Format: HH:MM:SS.", "example": "04:00:00" }, "updated_at": { "type": "string", "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", "description": "Timestamp of when the backup schedule was last updated.", "example": "2026-05-04T14:40:44+00:00" } @@ -32503,6 +20440,7 @@ "properties": { "schedule_for": { "type": "string", + "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?$", "description": "Time of day to schedule daily backups, in UTC. Format: HH:MM:SS.", "example": "04:00:00" } @@ -32619,7 +20557,7 @@ "enum": ["boolean", "numeric", "set"] }, "config": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { @@ -32712,7 +20650,6 @@ "opt_in_tags": { "type": "array", "items": { - "type": "string", "enum": [ "AI_SQL_GENERATOR_OPT_IN", "AI_DATA_GENERATOR_OPT_IN", @@ -32817,7 +20754,7 @@ }, "target_subscription_plan": { "type": "string", - "enum": ["free", "pro", "team", "enterprise", "platform"], + "enum": ["free", "pro", "team", "enterprise", "platform", null], "nullable": true } }, @@ -32839,7 +20776,8 @@ }, "created_by": { "type": "string", - "format": "uuid" + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": ["project", "preview", "expires_at", "created_at", "created_by"] diff --git a/apps/docs/spec/transforms/api_v2_openapi_deparsed.json b/apps/docs/spec/transforms/api_v2_openapi_deparsed.json index 7b21a0596db02..5e43a87b163d9 100644 --- a/apps/docs/spec/transforms/api_v2_openapi_deparsed.json +++ b/apps/docs/spec/transforms/api_v2_openapi_deparsed.json @@ -33,222 +33,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["log_drain"], - "description": "Resource type." - }, - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "config": { - "oneOf": [ - { - "type": "object", - "properties": { - "url": { - "type": "string", - "nullable": true - }, - "schema": { - "type": "string" - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "port": { - "type": "number", - "nullable": true - }, - "hostname": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "postgres" - }, - { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "http": { - "type": "string", - "enum": ["http1", "http2"] - }, - "gzip": { - "type": "boolean" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false, - "title": "webhook" - }, - { - "type": "object", - "properties": { - "project_id": { - "type": "string" - }, - "dataset_id": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "bigquery" - }, - { - "type": "object", - "properties": { - "api_key": { - "type": "string" - }, - "region": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "datadog" - }, - { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false, - "title": "loki" - }, - { - "type": "object", - "properties": { - "dsn": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "sentry" - }, - { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "api_token": { - "type": "string" - }, - "dataset_name": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "axiom" - }, - { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "port": { - "type": "integer", - "minimum": 0, - "maximum": 65535 - }, - "tls": { - "default": false, - "type": "boolean" - }, - "structured_data": { - "type": "string" - }, - "cipher_key": { - "type": "string" - }, - "ca_cert": { - "type": "string" - }, - "client_cert": { - "type": "string" - }, - "client_key": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "syslog" - } - ] - }, - "backend_type": { - "type": "string", - "enum": [ - "postgres", - "bigquery", - "clickhouse", - "webhook", - "datadog", - "loki", - "sentry", - "s3", - "axiom", - "last9", - "otlp", - "syslog" - ] - } - }, - "required": ["name", "config", "backend_type"] - } - }, - "required": ["type", "id", "attributes"] - } - } - }, - "required": ["data"] + "$ref": "#/components/schemas/ListLogDrainsResponse" } } } @@ -269,9 +54,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["analytics_config_read"] } ], "summary": "List project log drains", @@ -283,6 +65,7 @@ } ], "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_config_read"]], "x-oauth-scope": "analytics_config:read" }, "post": { @@ -307,216 +90,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["log_drain"], - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "config": { - "oneOf": [ - { - "type": "object", - "properties": { - "url": { - "type": "string", - "nullable": true - }, - "schema": { - "type": "string" - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "port": { - "type": "number", - "nullable": true - }, - "hostname": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "postgres" - }, - { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "http": { - "type": "string", - "enum": ["http1", "http2"] - }, - "gzip": { - "type": "boolean" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false, - "title": "webhook" - }, - { - "type": "object", - "properties": { - "project_id": { - "type": "string" - }, - "dataset_id": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "bigquery" - }, - { - "type": "object", - "properties": { - "api_key": { - "type": "string" - }, - "region": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "datadog" - }, - { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false, - "title": "loki" - }, - { - "type": "object", - "properties": { - "dsn": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "sentry" - }, - { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "api_token": { - "type": "string" - }, - "dataset_name": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "axiom" - }, - { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "port": { - "type": "integer", - "minimum": 0, - "maximum": 65535 - }, - "tls": { - "default": false, - "type": "boolean" - }, - "structured_data": { - "type": "string" - }, - "cipher_key": { - "type": "string" - }, - "ca_cert": { - "type": "string" - }, - "client_cert": { - "type": "string" - }, - "client_key": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "syslog" - } - ] - }, - "backend_type": { - "type": "string", - "enum": [ - "postgres", - "bigquery", - "clickhouse", - "webhook", - "datadog", - "loki", - "sentry", - "s3", - "axiom", - "last9", - "otlp", - "syslog" - ] - } - }, - "required": ["name", "config", "backend_type"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] + "$ref": "#/components/schemas/CreateLogDrainRequestOpenApi" } } } @@ -527,219 +101,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["log_drain"], - "description": "Resource type." - }, - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "config": { - "oneOf": [ - { - "type": "object", - "properties": { - "url": { - "type": "string", - "nullable": true - }, - "schema": { - "type": "string" - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "port": { - "type": "number", - "nullable": true - }, - "hostname": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "postgres" - }, - { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "http": { - "type": "string", - "enum": ["http1", "http2"] - }, - "gzip": { - "type": "boolean" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false, - "title": "webhook" - }, - { - "type": "object", - "properties": { - "project_id": { - "type": "string" - }, - "dataset_id": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "bigquery" - }, - { - "type": "object", - "properties": { - "api_key": { - "type": "string" - }, - "region": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "datadog" - }, - { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false, - "title": "loki" - }, - { - "type": "object", - "properties": { - "dsn": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "sentry" - }, - { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "api_token": { - "type": "string" - }, - "dataset_name": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "axiom" - }, - { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "port": { - "type": "integer", - "minimum": 0, - "maximum": 65535 - }, - "tls": { - "default": false, - "type": "boolean" - }, - "structured_data": { - "type": "string" - }, - "cipher_key": { - "type": "string" - }, - "ca_cert": { - "type": "string" - }, - "client_cert": { - "type": "string" - }, - "client_key": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "syslog" - } - ] - }, - "backend_type": { - "type": "string", - "enum": [ - "postgres", - "bigquery", - "clickhouse", - "webhook", - "datadog", - "loki", - "sentry", - "s3", - "axiom", - "last9", - "otlp", - "syslog" - ] - } - }, - "required": ["name", "config", "backend_type"] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] + "$ref": "#/components/schemas/LogDrainResponse" } } } @@ -748,7 +110,14 @@ "description": "Unauthorized" }, "402": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan." + "description": "This feature requires the Pro, Team, or Enterprise organization plan.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanGateErrorBodyV2" + } + } + } }, "403": { "description": "Forbidden action" @@ -763,9 +132,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["analytics_config_write"] } ], "summary": "Create a log drain for a project", @@ -782,6 +148,7 @@ } ], "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_config_write"]], "x-oauth-scope": "analytics_config:write" } }, @@ -809,6 +176,7 @@ "description": "Log drains identifier", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } } @@ -818,216 +186,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["log_drain"], - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "config": { - "oneOf": [ - { - "type": "object", - "properties": { - "url": { - "type": "string", - "nullable": true - }, - "schema": { - "type": "string" - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "port": { - "type": "number", - "nullable": true - }, - "hostname": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "postgres" - }, - { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "http": { - "type": "string", - "enum": ["http1", "http2"] - }, - "gzip": { - "type": "boolean" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false, - "title": "webhook" - }, - { - "type": "object", - "properties": { - "project_id": { - "type": "string" - }, - "dataset_id": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "bigquery" - }, - { - "type": "object", - "properties": { - "api_key": { - "type": "string" - }, - "region": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "datadog" - }, - { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false, - "title": "loki" - }, - { - "type": "object", - "properties": { - "dsn": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "sentry" - }, - { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "api_token": { - "type": "string" - }, - "dataset_name": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "axiom" - }, - { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "port": { - "type": "integer", - "minimum": 0, - "maximum": 65535 - }, - "tls": { - "default": false, - "type": "boolean" - }, - "structured_data": { - "type": "string" - }, - "cipher_key": { - "type": "string" - }, - "ca_cert": { - "type": "string" - }, - "client_cert": { - "type": "string" - }, - "client_key": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "syslog" - } - ] - }, - "backend_type": { - "type": "string", - "enum": [ - "postgres", - "bigquery", - "clickhouse", - "webhook", - "datadog", - "loki", - "sentry", - "s3", - "axiom", - "last9", - "otlp", - "syslog" - ] - } - }, - "required": ["backend_type"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] + "$ref": "#/components/schemas/UpdateLogDrainRequestOpenApi" } } } @@ -1038,219 +197,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["log_drain"], - "description": "Resource type." - }, - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "config": { - "oneOf": [ - { - "type": "object", - "properties": { - "url": { - "type": "string", - "nullable": true - }, - "schema": { - "type": "string" - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "port": { - "type": "number", - "nullable": true - }, - "hostname": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "postgres" - }, - { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "http": { - "type": "string", - "enum": ["http1", "http2"] - }, - "gzip": { - "type": "boolean" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false, - "title": "webhook" - }, - { - "type": "object", - "properties": { - "project_id": { - "type": "string" - }, - "dataset_id": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "bigquery" - }, - { - "type": "object", - "properties": { - "api_key": { - "type": "string" - }, - "region": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "datadog" - }, - { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false, - "title": "loki" - }, - { - "type": "object", - "properties": { - "dsn": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "sentry" - }, - { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "api_token": { - "type": "string" - }, - "dataset_name": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "axiom" - }, - { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "port": { - "type": "integer", - "minimum": 0, - "maximum": 65535 - }, - "tls": { - "default": false, - "type": "boolean" - }, - "structured_data": { - "type": "string" - }, - "cipher_key": { - "type": "string" - }, - "ca_cert": { - "type": "string" - }, - "client_cert": { - "type": "string" - }, - "client_key": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "syslog" - } - ] - }, - "backend_type": { - "type": "string", - "enum": [ - "postgres", - "bigquery", - "clickhouse", - "webhook", - "datadog", - "loki", - "sentry", - "s3", - "axiom", - "last9", - "otlp", - "syslog" - ] - } - }, - "required": ["name", "config", "backend_type"] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] + "$ref": "#/components/schemas/LogDrainResponse" } } } @@ -1271,9 +218,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["analytics_config_write"] } ], "summary": "Update a project log drain", @@ -1285,6 +229,7 @@ } ], "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_config_write"]], "x-oauth-scope": "analytics_config:write" }, "delete": { @@ -1310,6 +255,7 @@ "description": "Log drains identifier", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } } @@ -1334,9 +280,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["analytics_config_write"] } ], "summary": "Delete a project log drain", @@ -1348,6 +291,7 @@ } ], "x-endpoint-owners": ["analytics"], + "x-fga-permissions": [["analytics_config_write"]], "x-oauth-scope": "analytics_config:write" } }, @@ -1374,30 +318,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["project_transfer_input"], - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "target_organization_slug": { - "type": "string" - } - }, - "required": ["target_organization_slug"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] + "$ref": "#/components/schemas/V2TransferProjectBody" } } } @@ -1408,75 +329,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["project_transfer_result"], - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "valid": { - "type": "boolean" - }, - "warnings": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["key", "message"] - } - }, - "errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["key", "message"] - } - }, - "info": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["key", "message"] - } - } - }, - "required": ["valid", "warnings", "errors", "info"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] + "$ref": "#/components/schemas/V2PreviewProjectTransferResponse" } } } @@ -1494,14 +347,12 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["project_admin_read"] } ], "summary": "Previews transferring a project to a different organizations, shows eligibility and impact", "tags": ["Projects"], - "x-endpoint-owners": ["management-api"] + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["project_admin_read"]] } }, "/v2/projects/{ref}/transfers": { @@ -1527,30 +378,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["project_transfer_input"], - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "target_organization_slug": { - "type": "string" - } - }, - "required": ["target_organization_slug"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] + "$ref": "#/components/schemas/V2TransferProjectBody" } } } @@ -1572,14 +400,12 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["organization_admin_write"] } ], "summary": "Transfers a project to a different organization", "tags": ["Projects"], - "x-endpoint-owners": ["management-api"] + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_write"]] } }, "/v2/projects/{ref}/private-link/associations": { @@ -1606,62 +432,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["private_link_association"], - "description": "Resource type." - }, - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "aws_account_id": { - "type": "string", - "minLength": 12, - "maxLength": 12, - "pattern": "^\\d{12}$", - "description": "The AWS account ID this PrivateLink share is associated with." - }, - "account_name": { - "type": "string", - "description": "Human-readable name for the AWS account." - }, - "status": { - "type": "string", - "enum": [ - "CREATING", - "READY", - "ASSOCIATION_REQUEST_EXPIRED", - "ASSOCIATION_ACCEPTED", - "CREATION_FAILED", - "DELETING" - ], - "description": "\n - `CREATING`: The PrivateLink resources and the Association are in the process of being created. The PrivateLink Share cannot be accepted yet.\n - `READY`: The PrivateLink resources have been created and the PrivateLink Share can be accepted for the duration of 12h after sharing. See `shared_at`.\n - `ASSOCIATION_REQUEST_EXPIRED`: The PrivateLink Share has not been accepted within the 12h time limit. This association can now be deleted.\n - `ASSOCIATION_ACCEPTED`: The PrivateLink Share was successfully accepted.\n - `CREATION_FAILED`: The PrivateLink resources failed to create. This likely means something went wrong on Supabase's and and support should be contacted.\n - `DELETING`: The PrivateLink resources and the Association are in the process of being deleted. The PrivateLink Share cannot be accepted yet.\n" - }, - "shared_at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending." - } - }, - "required": ["aws_account_id", "status", "shared_at"] - } - }, - "required": ["type", "id", "attributes"] - } - } - }, - "required": ["data"] + "$ref": "#/components/schemas/V2ListPrivateLinkAssociationsResponse" } } } @@ -1682,14 +453,12 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["project_admin_read"] } ], "summary": "List AWS accounts attached to the project PrivateLink share", "tags": ["Projects"], - "x-endpoint-owners": ["platform-networking", "management-api"] + "x-endpoint-owners": ["platform-networking", "management-api"], + "x-fga-permissions": [["project_admin_read"]] }, "post": { "description": "Adds an AWS account to the project's PrivateLink configuration and schedules the AWS resources to be created.", @@ -1714,39 +483,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["private_link_association"], - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "aws_account_id": { - "type": "string", - "minLength": 12, - "maxLength": 12, - "pattern": "^\\d{12}$", - "description": "The AWS account ID to add to the project PrivateLink share." - }, - "account_name": { - "type": "string", - "maxLength": 128, - "description": "Optional human-readable name for the AWS account." - } - }, - "required": ["aws_account_id"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] + "$ref": "#/components/schemas/V2CreatePrivateLinkAssociationRequest" } } } @@ -1757,59 +494,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["private_link_association"], - "description": "Resource type." - }, - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "aws_account_id": { - "type": "string", - "minLength": 12, - "maxLength": 12, - "pattern": "^\\d{12}$", - "description": "The AWS account ID this PrivateLink share is associated with." - }, - "account_name": { - "type": "string", - "description": "Human-readable name for the AWS account." - }, - "status": { - "type": "string", - "enum": [ - "CREATING", - "READY", - "ASSOCIATION_REQUEST_EXPIRED", - "ASSOCIATION_ACCEPTED", - "CREATION_FAILED", - "DELETING" - ], - "description": "\n - `CREATING`: The PrivateLink resources and the Association are in the process of being created. The PrivateLink Share cannot be accepted yet.\n - `READY`: The PrivateLink resources have been created and the PrivateLink Share can be accepted for the duration of 12h after sharing. See `shared_at`.\n - `ASSOCIATION_REQUEST_EXPIRED`: The PrivateLink Share has not been accepted within the 12h time limit. This association can now be deleted.\n - `ASSOCIATION_ACCEPTED`: The PrivateLink Share was successfully accepted.\n - `CREATION_FAILED`: The PrivateLink resources failed to create. This likely means something went wrong on Supabase's and and support should be contacted.\n - `DELETING`: The PrivateLink resources and the Association are in the process of being deleted. The PrivateLink Share cannot be accepted yet.\n" - }, - "shared_at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending." - } - }, - "required": ["aws_account_id", "status", "shared_at"] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] + "$ref": "#/components/schemas/V2PrivateLinkAssociationResponse" } } } @@ -1818,7 +503,14 @@ "description": "Unauthorized" }, "402": { - "description": "This feature requires the Team, or Enterprise organization plan." + "description": "This feature requires the Team, or Enterprise organization plan.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanGateErrorBodyV2" + } + } + } }, "403": { "description": "Forbidden action" @@ -1833,9 +525,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["project_admin_write"] } ], "summary": "Add an AWS account to the project PrivateLink share", @@ -1847,12 +536,13 @@ "position": "before" } ], - "x-endpoint-owners": ["platform-networking", "management-api"] + "x-endpoint-owners": ["platform-networking", "management-api"], + "x-fga-permissions": [["project_admin_write"]] } }, "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}": { "delete": { - "description": "Removes an AWS account from the project's PrivateLink configuration. Cleans up the associated AWS resources.", + "description": "Removes an AWS account from the project's PrivateLink configuration (targeting the primary database). Cleans up the associated AWS resources.", "operationId": "v2-delete-private-link-association", "parameters": [ { @@ -1870,7 +560,7 @@ }, { "name": "aws_account_id", - "required": false, + "required": true, "in": "path", "description": "AWS account ID used in PrivateLink association", "schema": { @@ -1898,14 +588,77 @@ "security": [ { "bearer": [] + } + ], + "summary": "Remove an AWS account from the project PrivateLink share", + "tags": ["Projects"], + "x-endpoint-owners": ["platform-networking", "management-api"], + "x-fga-permissions": [["project_admin_write"]] + } + }, + "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}/database/{database_identifier}": { + "delete": { + "description": "Removes an AWS account from the project's PrivateLink configuration for the given read replica. Cleans up the associated AWS resources.", + "operationId": "v2-delete-private-link-association-for-database", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + }, + { + "name": "aws_account_id", + "required": true, + "in": "path", + "description": "AWS account ID used in PrivateLink association", + "schema": { + "type": "string" + } }, { - "fga_permissions": ["project_admin_write"] + "name": "database_identifier", + "required": true, + "in": "path", + "description": "Identifier of the read replica this PrivateLink association targets", + "schema": { + "type": "string" + } } ], - "summary": "Remove an AWS account from the project PrivateLink share", + "responses": { + "204": { + "description": "" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to remove AWS account from PrivateLink share" + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Remove an AWS account from a specific database PrivateLink share", "tags": ["Projects"], - "x-endpoint-owners": ["platform-networking", "management-api"] + "x-endpoint-owners": ["platform-networking", "management-api"], + "x-fga-permissions": [["project_admin_write"]] } }, "/v2/organizations/{slug}/members": { @@ -1933,22 +686,22 @@ "size": { "type": "integer", "minimum": 1, - "maximum": 100, - "required": false + "maximum": 100 }, "after": { "type": "string", "format": "uuid", - "required": false + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "before": { "type": "string", "format": "uuid", - "required": false + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "type": "object" - } + }, + "style": "deepObject" }, { "name": "filter", @@ -1957,17 +710,17 @@ "schema": { "properties": { "username": { - "type": "string", - "required": false + "type": "string" }, "primary_email": { "type": "string", "format": "email", - "required": false + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" } }, "type": "object" - } + }, + "style": "deepObject" } ], "responses": { @@ -1976,130 +729,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["organization_member"], - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid" - }, - "attributes": { - "type": "object", - "properties": { - "username": { - "type": "string", - "nullable": true, - "description": "Member's username" - }, - "primary_email": { - "type": "string", - "nullable": true, - "description": "Member's primary email" - }, - "mfa_enabled": { - "type": "boolean", - "description": "Whether Multi-Factor Authentication is enabled for this member" - }, - "is_sso_user": { - "type": "boolean", - "description": "Whether this member is a Single Sign-On user" - }, - "avatar_url": { - "type": "string", - "nullable": true, - "description": "Member's avatar URL" - }, - "roles": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Role name. For project-scoped roles this is the base role name.", - "example": "developer" - }, - "scope": { - "type": "string", - "enum": ["organization", "project"], - "description": "Whether this role applies org-wide or is scoped to specific projects for the user." - }, - "projects": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ref": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["ref", "name"] - }, - "description": "Project refs this role is scoped to. Empty array for org-level roles." - } - }, - "required": ["name", "scope", "projects"] - }, - "description": "Roles assigned to this member. Includes both org-level and project-scoped roles." - } - }, - "required": [ - "username", - "primary_email", - "mfa_enabled", - "is_sso_user", - "avatar_url", - "roles" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "links": { - "type": "object", - "properties": { - "first": { - "type": "string", - "nullable": true, - "description": "URL path to the first page if available.", - "example": "/v2/organizations/my-org/members?page[size]=10" - }, - "prev": { - "type": "string", - "nullable": true, - "description": "URL path to the previous page.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7" - }, - "next": { - "type": "string", - "nullable": true, - "description": "URL path to the next page.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4" - }, - "last": { - "type": "string", - "nullable": true, - "description": "URL path to the last page if available.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295" - } - }, - "required": ["prev", "next"] - } - }, - "required": ["data", "links"] + "$ref": "#/components/schemas/V2ListMembersResponse" } } } @@ -2117,9 +747,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["members_read"] } ], "summary": "List members of an organization", @@ -2131,6 +758,7 @@ } ], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["members_read"]], "x-oauth-scope": "organizations:read" } }, @@ -2156,6 +784,7 @@ "in": "path", "schema": { "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "type": "string" } } @@ -2165,49 +794,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["organization_member_role"], - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "role": { - "type": "string", - "enum": ["owner", "administrator", "developer", "read-only"], - "description": "Role name to assign. Must be one of: owner, administrator, developer, read-only. Must be on a Team or Enterprise plan to use the read-only role.", - "example": "developer" - }, - "projects": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ref": { - "type": "string", - "description": "Project ref", - "example": "abcjuqabhgwjjutfvtpa" - } - }, - "required": ["ref"] - }, - "minItems": 1, - "description": "The projects to assign a project-scoped role for. If omitted, assigns an org-wide role." - } - }, - "required": ["role"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] + "$ref": "#/components/schemas/V2AssignOrganizationMemberRoleRequest" } } } @@ -2218,53 +805,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["organization_member_role"], - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Role name. For project-scoped assignments this is the base role name.", - "example": "developer" - }, - "scope": { - "type": "string", - "enum": ["organization", "project"], - "description": "Whether this role applies org-wide or is scoped to specific projects for the user." - }, - "projects": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ref": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["ref", "name"] - }, - "description": "Project refs this role is scoped to. Empty array for org-level roles." - } - }, - "required": ["name", "scope", "projects"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] + "$ref": "#/components/schemas/OrganizationMemberRoleResponse" } } } @@ -2273,7 +814,14 @@ "description": "Unauthorized" }, "402": { - "description": "This feature requires the Enterprise organization plan." + "description": "This feature requires the Enterprise organization plan.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanGateErrorBodyV2" + } + } + } }, "403": { "description": "Forbidden action" @@ -2288,9 +836,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["organization_admin_write"] } ], "summary": "Assign or change an organization member role", @@ -2302,7 +847,8 @@ "position": "before" } ], - "x-endpoint-owners": ["management-api"] + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_admin_write"]] } }, "/v2/organizations/{slug}/roles": { @@ -2328,36 +874,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["organization_role"], - "description": "Resource type." - }, - "id": {}, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Role name.", - "example": "developer" - } - }, - "required": ["name"] - } - }, - "required": ["type", "attributes"] - } - } - }, - "required": ["data"] + "$ref": "#/components/schemas/V2ListRolesResponse" } } } @@ -2375,9 +892,6 @@ "security": [ { "bearer": [] - }, - { - "fga_permissions": ["members_read"] } ], "summary": "List roles of an organization", @@ -2389,6 +903,7 @@ } ], "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["members_read"]], "x-oauth-scope": "organizations:read" } }, @@ -2414,61 +929,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["organization_invitation"], - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email" - }, - "role": { - "type": "string", - "enum": ["owner", "administrator", "developer", "read-only"], - "description": "Role name to assign. Must be on a Team or Enterprise plan to use the read-only role.", - "example": "developer" - }, - "projects": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ref": { - "type": "string", - "description": "Project ref", - "example": "abcjuqabhgwjjutfvtpa" - } - }, - "required": ["ref"] - }, - "minItems": 1, - "description": "The projects to limit a user to. If omitted, user will have org-wide access with the provided role." - }, - "require_sso": { - "type": "boolean" - } - }, - "required": ["email", "role"] - } - }, - "required": ["type", "attributes"] - }, - "minItems": 1, - "maxItems": 50 - } - }, - "required": ["data"] + "$ref": "#/components/schemas/V2CreateInvitationsRequest" } } } @@ -2479,144 +940,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email" - } - }, - "required": ["email"] - } - }, - "required": ["code", "message", "meta"] - } - } - }, - "required": ["code", "message"] - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["organization_invitation"], - "description": "Resource type." - }, - "id": {}, - "attributes": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email" - } - }, - "required": ["email"] - } - }, - "required": ["type", "attributes"] - } - } - }, - "required": ["data"] + "$ref": "#/components/schemas/V2CreateInvitationsResponse" } } } @@ -2625,38 +949,20734 @@ "description": "Unauthorized" }, "402": { - "description": "This feature requires the Enterprise organization plan." - }, - "403": { - "description": "Forbidden action" - }, + "description": "This feature requires the Enterprise organization plan.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanGateErrorBodyV2" + } + } + } + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Creates organization invitations", + "tags": ["Organizations Members Invitations"], + "x-allowed-plans": ["Enterprise"], + "x-badges": [ + { + "name": "OAuth scope: organizations:write", + "position": "after" + }, + { + "name": "Only available on Enterprise", + "position": "before" + } + ], + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["members_write"]], + "x-oauth-scope": "organizations:write" + }, + "delete": { + "description": "Bulk delete member invitations for an organization by email address.", + "operationId": "v2-delete-organization-invitations", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V2DeleteInvitationsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V2DeleteInvitationsResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "402": { + "description": "This feature requires the Enterprise organization plan.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanGateErrorBodyV2" + } + } + } + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Deletes organization invitations by email", + "tags": ["Organizations Members Invitations"], + "x-allowed-plans": ["Enterprise"], + "x-badges": [ + { + "name": "OAuth scope: organizations:write", + "position": "after" + }, + { + "name": "Only available on Enterprise", + "position": "before" + } + ], + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["members_write"]], + "x-oauth-scope": "organizations:write" + } + }, + "/v2/organizations/{slug}/projects": { + "get": { + "description": "Returns a cursor-paginated list of projects for the specified organization, including their databases.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the number of projects returned per page.", + "operationId": "v2-list-organization-projects", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba", + "type": "string" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "properties": { + "size": { + "type": "integer", + "minimum": 1, + "maximum": 100 + }, + "after": { + "type": "string", + "minLength": 1 + }, + "before": { + "type": "string", + "minLength": 1 + } + }, + "type": "object" + }, + "style": "deepObject" + }, + { + "name": "sort", + "required": false, + "in": "query", + "description": "Sort order by creation time: `inserted_at` (oldest first) or `-inserted_at` (newest first). Defaults to `inserted_at`.", + "schema": { + "example": "-inserted_at", + "type": "string", + "enum": ["inserted_at", "-inserted_at"] + } + }, + { + "name": "search", + "required": false, + "in": "query", + "description": "Case-insensitive substring match on the project name.", + "schema": { + "minLength": 1, + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V2ListProjectsResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "List projects of an organization", + "tags": ["Organizations"], + "x-badges": [ + { + "name": "OAuth scope: projects:read", + "position": "after" + } + ], + "x-endpoint-owners": ["management-api"], + "x-fga-permissions": [["organization_projects_read"]], + "x-oauth-scope": "projects:read" + } + }, + "/v2/organizations/{slug}/integrations/github/connections": { + "get": { + "description": "Returns a cursor-paginated list of the GitHub connections of the organization's projects.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the page size.\nPaging walks the organization projects, so a page holds at most `page[size]` connections and can hold fewer (or none) when some of its projects are not connected.\nFollow `links.next` until it is `null` rather than stopping on a short page.\n\nUse `filter[project_ref]` to narrow the list down to a single project.", + "operationId": "v2-list-organization-github-connections", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba", + "type": "string" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "properties": { + "size": { + "type": "integer", + "minimum": 1, + "maximum": 100 + }, + "after": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + }, + "before": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + } + }, + "type": "object" + }, + "style": "deepObject" + }, + { + "name": "filter", + "required": false, + "in": "query", + "schema": { + "properties": { + "project_ref": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + } + }, + "type": "object" + }, + "style": "deepObject" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/V2ListGitHubConnectionsResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, "429": { "description": "Rate limit exceeded" } }, - "security": [ - { - "bearer": [] - }, - { - "fga_permissions": ["members_write"] - } - ], - "summary": "Creates organization invitations", - "tags": ["Organizations Members Invitations"], - "x-allowed-plans": ["Enterprise"], - "x-badges": [ - { - "name": "OAuth scope: organizations:write", - "position": "after" - }, - { - "name": "Only available on Enterprise", - "position": "before" - } - ], - "x-endpoint-owners": ["management-api"], - "x-oauth-scope": "organizations:write" + "security": [ + { + "bearer": [] + } + ], + "summary": "List GitHub connections of an organization", + "tags": ["Organizations"], + "x-badges": [ + { + "name": "OAuth scope: projects:read", + "position": "after" + } + ], + "x-endpoint-owners": ["management-api", "dev-workflows"], + "x-fga-permissions": [["organization_projects_read"]], + "x-oauth-scope": "projects:read" + } + }, + "/v2/projects/{ref}/webhooks/endpoints": { + "get": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "query", + "name": "page[offset]", + "schema": { + "default": "0", + "type": "string", + "pattern": "^\\d+$" + }, + "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend." + }, + { + "in": "query", + "name": "page[limit]", + "schema": { + "default": "20", + "type": "string", + "pattern": "^\\d+$" + }, + "description": "Up to how many records to return." + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "Collection of endpoints", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "links": { + "type": "object", + "properties": { + "first": { + "description": "URL path to the first page if available.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "prev": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "URL path to the previous page.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0" + }, + "next": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "URL path to the next page.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20" + }, + "last": { + "description": "URL path to the last page if available.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": ["prev", "next"] + } + }, + "required": ["data", "links"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "List endpoints", + "description": "List all Webhook endpoints based on a project's ref or an organization's slug." + }, + "post": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + } + ], + "tags": ["Project webhooks"], + "responses": { + "201": { + "description": "Created endpoint", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Create endpoint", + "description": "Create new endpoint configuration to subscribe to specific webhook events.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "default": true, + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "signing_secret": { + "type": "string", + "minLength": 8, + "maxLength": 64, + "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." + } + }, + "required": ["url", "event_types", "signing_secret"] + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + } + } + } + } + }, + "delete": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "Deleted endpoints", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Delete all endpoints", + "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op." + } + }, + "/v2/projects/{ref}/webhooks/endpoints/{id}": { + "get": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "Endpoint details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "not_found.endpoint" + }, + "message": { + "type": "string", + "const": "Not Found: Endpoint not found" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Get endpoint", + "description": "Get details of a specific endpoint." + }, + "patch": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "Updated endpoint details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "not_found.endpoint" + }, + "message": { + "type": "string", + "const": "Not Found: Endpoint not found" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Update endpoint", + "description": "Update endpoint's configuration.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "signing_secret": { + "type": "string", + "minLength": 8, + "maxLength": 64, + "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." + } + } + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + } + } + } + } + }, + "delete": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "Deleted endpoint details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "not_found.endpoint" + }, + "message": { + "type": "string", + "const": "Not Found: Endpoint not found" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Delete endpoint", + "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op." + } + }, + "/v2/projects/{ref}/webhooks/endpoints/{id}/deliveries": { + "get": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + }, + { + "in": "query", + "name": "page[before]", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param." + }, + { + "in": "query", + "name": "page[after]", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param." + }, + { + "in": "query", + "name": "page[size]", + "schema": { + "default": "20", + "type": "string", + "pattern": "^\\d+$" + }, + "description": "Up to how many records to return." + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "List of deliveries", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "delivery", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "event_id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of the event, which triggered the delivery (UUID v7)." + }, + "status": { + "type": "string", + "enum": ["pending", "success", "failure", "skipped"], + "description": "Status of the delivery attempt." + }, + "response_code": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "HTTP status code of the response, `0` if unavailable." + }, + "response_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "HTTP headers of the response, `{}` if unavailable." + }, + "response_body": { + "anyOf": [ + { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + }, + "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." + }, + { + "type": "string", + "description": "String representation of an HTTP body of the response." + } + ] + }, + { + "type": "null" + } + ] + }, + "attempt_timestamp": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of the attempt." + } + }, + "required": [ + "id", + "event_id", + "status", + "response_code", + "response_headers", + "response_body", + "attempt_timestamp" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "links": { + "type": "object", + "properties": { + "first": { + "description": "URL path to the first page if available.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "prev": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "URL path to the previous page.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7" + }, + "next": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "URL path to the next page.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4" + }, + "last": { + "description": "URL path to the last page if available.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": ["prev", "next"] + } + }, + "required": ["data", "links"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "not_found.endpoint" + }, + "message": { + "type": "string", + "const": "Not Found: Endpoint not found" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "List deliveries", + "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed." + } + }, + "/v2/projects/{ref}/webhooks/endpoints/{id}/test": { + "post": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Project webhooks"], + "responses": { + "201": { + "description": "Event published", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "event", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an event (UUID v7)." + } + }, + "required": ["type", "id"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.endpoint.test.disabled" + }, + "message": { + "type": "string", + "const": "Bad Request: Endpoint is disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "EndpointTestDisabled" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.endpoint.test.wrong_event_type" + }, + "message": { + "type": "string", + "const": "Bad Request: Provided event type is not subscribed to by the endpoint" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "EndpointTestWrongEventType" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "EndpointTestDisabled": { + "value": { + "error": { + "code": "bad_request.endpoint.test.disabled", + "message": "Bad Request: Endpoint is disabled", + "description": "Endpoint is disabled, to send test event endpoint must first be enabled." + } + } + }, + "EndpointTestWrongEventType": { + "value": { + "error": { + "code": "bad_request.endpoint.test.wrong_event_type", + "message": "Bad Request: Provided event type is not subscribed to by the endpoint", + "description": "Only event types that the endpoint is subscribed to can be specified." + } + } + }, + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "not_found.endpoint" + }, + "message": { + "type": "string", + "const": "Not Found: Endpoint not found" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Send test event", + "description": "Publish a test event to verify the endpoint is working.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "event", + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "type": { + "description": "Webhook event type.", + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "project.v1.paused", + "project.v1.created", + "project.v1.restored", + "project.v1.transferred", + "project.v1.removed", + "project.v1.restarted", + "project.v1.status.changed", + "project.v1.backup.started", + "project.v1.branch.created", + "project.v1.branch.updated", + "project.v1.branch.removed", + "organization.v1.member.invitation.created", + "organization.v1.member.invitation.canceled", + "organization.v1.member.added", + "organization.v1.member.removed", + "organization.v1.member.role.assigned", + "organization.v1.member.role.removed", + "organization.v1.member.role.updated", + "organization.v1.billing.plan.upgraded", + "organization.v1.billing.plan.downgraded", + "project.v1.branch.deleted" + ] + } + }, + "required": ["type"] + } + }, + "required": ["type", "attributes"] + } + } + } + } + } + } + } + }, + "/v2/projects/{ref}/webhooks/deliveries/{id}": { + "get": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of a delivery (UUID v7)." + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "Delivery details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "delivery", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "event_id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of the event, which triggered the delivery (UUID v7)." + }, + "status": { + "type": "string", + "enum": ["pending", "success", "failure", "skipped"], + "description": "Status of the delivery attempt." + }, + "response_code": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "HTTP status code of the response, `0` if unavailable." + }, + "response_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "HTTP headers of the response, `{}` if unavailable." + }, + "response_body": { + "anyOf": [ + { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + }, + "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." + }, + { + "type": "string", + "description": "String representation of an HTTP body of the response." + } + ] + }, + { + "type": "null" + } + ] + }, + "attempt_timestamp": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of the attempt." + }, + "event": { + "type": "object", + "properties": { + "type": { + "description": "Webhook event type.", + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "project.v1.paused", + "project.v1.created", + "project.v1.restored", + "project.v1.transferred", + "project.v1.removed", + "project.v1.restarted", + "project.v1.status.changed", + "project.v1.backup.started", + "project.v1.branch.created", + "project.v1.branch.updated", + "project.v1.branch.removed", + "organization.v1.member.invitation.created", + "organization.v1.member.invitation.canceled", + "organization.v1.member.added", + "organization.v1.member.removed", + "organization.v1.member.role.assigned", + "organization.v1.member.role.removed", + "organization.v1.member.role.updated", + "organization.v1.billing.plan.upgraded", + "organization.v1.billing.plan.downgraded", + "project.v1.branch.deleted" + ] + }, + "payload": { + "type": "object", + "properties": { + "organization_slug": { + "type": "string", + "pattern": "^[\\w-]+$", + "description": "Organization slug", + "example": "tsrqponmlkjihgfedcba" + }, + "project_ref": { + "anyOf": [ + { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + }, + { + "type": "null" + } + ] + } + }, + "required": ["organization_slug", "project_ref"], + "additionalProperties": {}, + "description": "Final data sent to the consumer." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of event publication." + } + }, + "required": ["type", "payload", "timestamp"] + } + }, + "required": [ + "id", + "event_id", + "status", + "response_code", + "response_headers", + "response_body", + "attempt_timestamp", + "event" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "DeliveryNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "not_found.delivery" + }, + "message": { + "type": "string", + "const": "Not Found: Delivery not found" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.delivery", + "message": "Not Found: Delivery not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Get delivery", + "description": "Get details of a specific delivery attempt." + } + }, + "/v2/projects/{ref}/webhooks/deliveries/{id}/retry": { + "post": { + "operationId": "allV2ProjectsByRefWebhooks", + "parameters": [ + { + "in": "path", + "name": "ref", + "schema": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst" + }, + "required": true, + "description": "Project ref" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of a delivery (UUID v7)." + } + ], + "tags": ["Project webhooks"], + "responses": { + "200": { + "description": "Delivery details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "event", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an event (UUID v7)." + } + }, + "required": ["type", "id"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "DeliveryNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "not_found.delivery" + }, + "message": { + "type": "string", + "const": "Not Found: Delivery not found" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.delivery", + "message": "Not Found: Delivery not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Retry delivery", + "description": "Retry delivering the same event again.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds." + } + }, + "/v2/organizations/{slug}/webhooks/endpoints": { + "get": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "query", + "name": "page[offset]", + "schema": { + "default": "0", + "type": "string", + "pattern": "^\\d+$" + }, + "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend." + }, + { + "in": "query", + "name": "page[limit]", + "schema": { + "default": "20", + "type": "string", + "pattern": "^\\d+$" + }, + "description": "Up to how many records to return." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "Collection of endpoints", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "links": { + "type": "object", + "properties": { + "first": { + "description": "URL path to the first page if available.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "prev": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "URL path to the previous page.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0" + }, + "next": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "URL path to the next page.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20" + }, + "last": { + "description": "URL path to the last page if available.", + "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": ["prev", "next"] + } + }, + "required": ["data", "links"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "List endpoints", + "description": "List all Webhook endpoints based on a project's ref or an organization's slug." + }, + "post": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + } + ], + "tags": ["Organization webhooks"], + "responses": { + "201": { + "description": "Created endpoint", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Create endpoint", + "description": "Create new endpoint configuration to subscribe to specific webhook events.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "default": true, + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "signing_secret": { + "type": "string", + "minLength": 8, + "maxLength": 64, + "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." + } + }, + "required": ["url", "event_types", "signing_secret"] + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + } + } + } + } + }, + "delete": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "Deleted endpoints", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Delete all endpoints", + "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op." + } + }, + "/v2/organizations/{slug}/webhooks/endpoints/{id}": { + "get": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "Endpoint details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "not_found.endpoint" + }, + "message": { + "type": "string", + "const": "Not Found: Endpoint not found" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Get endpoint", + "description": "Get details of a specific endpoint." + }, + "patch": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "Updated endpoint details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "not_found.endpoint" + }, + "message": { + "type": "string", + "const": "Not Found: Endpoint not found" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Update endpoint", + "description": "Update endpoint's configuration.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "signing_secret": { + "type": "string", + "minLength": 8, + "maxLength": 64, + "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." + } + } + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + } + } + } + } + }, + "delete": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "Deleted endpoint details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "endpoint", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an endpoint (UUID v7)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", + "example": "https://mydomain.com/path/to/handler" + }, + "enabled": { + "type": "boolean", + "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." + }, + "description": { + "anyOf": [ + { + "type": "string", + "maxLength": 512 + }, + { + "type": "null" + } + ], + "description": "Optional description for the endpoint." + }, + "event_types": { + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "*" + ], + "description": "Webhook event type." + } + }, + "required": ["type"] + }, + "description": "List of subscribed events for which to receive the webhook event.", + "example": [ + { + "type": "v1.project.paused" + } + ] + }, + "custom_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[a-zA-Z0-9-]+$" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", + "example": { + "Authorization": "Bearer example_token" + } + }, + "created_by": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "ID of the user who created the endpoint." + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of endpoint's creation." + } + }, + "required": [ + "id", + "url", + "enabled", + "description", + "event_types", + "created_by", + "created_at" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "not_found.endpoint" + }, + "message": { + "type": "string", + "const": "Not Found: Endpoint not found" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Delete endpoint", + "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op." + } + }, + "/v2/organizations/{slug}/webhooks/endpoints/{id}/deliveries": { + "get": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + }, + { + "in": "query", + "name": "page[before]", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param." + }, + { + "in": "query", + "name": "page[after]", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param." + }, + { + "in": "query", + "name": "page[size]", + "schema": { + "default": "20", + "type": "string", + "pattern": "^\\d+$" + }, + "description": "Up to how many records to return." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "List of deliveries", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "delivery", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "event_id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of the event, which triggered the delivery (UUID v7)." + }, + "status": { + "type": "string", + "enum": ["pending", "success", "failure", "skipped"], + "description": "Status of the delivery attempt." + }, + "response_code": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "HTTP status code of the response, `0` if unavailable." + }, + "response_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "HTTP headers of the response, `{}` if unavailable." + }, + "response_body": { + "anyOf": [ + { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + }, + "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." + }, + { + "type": "string", + "description": "String representation of an HTTP body of the response." + } + ] + }, + { + "type": "null" + } + ] + }, + "attempt_timestamp": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of the attempt." + } + }, + "required": [ + "id", + "event_id", + "status", + "response_code", + "response_headers", + "response_body", + "attempt_timestamp" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "links": { + "type": "object", + "properties": { + "first": { + "description": "URL path to the first page if available.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "prev": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "URL path to the previous page.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7" + }, + "next": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "URL path to the next page.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4" + }, + "last": { + "description": "URL path to the last page if available.", + "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": ["prev", "next"] + } + }, + "required": ["data", "links"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "not_found.endpoint" + }, + "message": { + "type": "string", + "const": "Not Found: Endpoint not found" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "List deliveries", + "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed." + } + }, + "/v2/organizations/{slug}/webhooks/endpoints/{id}/test": { + "post": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of an endpoint (UUID v7)." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "201": { + "description": "Event published", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "event", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an event (UUID v7)." + } + }, + "required": ["type", "id"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.endpoint.test.disabled" + }, + "message": { + "type": "string", + "const": "Bad Request: Endpoint is disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "EndpointTestDisabled" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.endpoint.test.wrong_event_type" + }, + "message": { + "type": "string", + "const": "Bad Request: Provided event type is not subscribed to by the endpoint" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "EndpointTestWrongEventType" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "EndpointTestDisabled": { + "value": { + "error": { + "code": "bad_request.endpoint.test.disabled", + "message": "Bad Request: Endpoint is disabled", + "description": "Endpoint is disabled, to send test event endpoint must first be enabled." + } + } + }, + "EndpointTestWrongEventType": { + "value": { + "error": { + "code": "bad_request.endpoint.test.wrong_event_type", + "message": "Bad Request: Provided event type is not subscribed to by the endpoint", + "description": "Only event types that the endpoint is subscribed to can be specified." + } + } + }, + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "EndpointNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "not_found.endpoint" + }, + "message": { + "type": "string", + "const": "Not Found: Endpoint not found" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.endpoint", + "message": "Not Found: Endpoint not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Send test event", + "description": "Publish a test event to verify the endpoint is working.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "event", + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "type": { + "description": "Webhook event type.", + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "project.v1.paused", + "project.v1.created", + "project.v1.restored", + "project.v1.transferred", + "project.v1.removed", + "project.v1.restarted", + "project.v1.status.changed", + "project.v1.backup.started", + "project.v1.branch.created", + "project.v1.branch.updated", + "project.v1.branch.removed", + "organization.v1.member.invitation.created", + "organization.v1.member.invitation.canceled", + "organization.v1.member.added", + "organization.v1.member.removed", + "organization.v1.member.role.assigned", + "organization.v1.member.role.removed", + "organization.v1.member.role.updated", + "organization.v1.billing.plan.upgraded", + "organization.v1.billing.plan.downgraded", + "project.v1.branch.deleted" + ] + } + }, + "required": ["type"] + } + }, + "required": ["type", "attributes"] + } + } + } + } + } + } + } + }, + "/v2/organizations/{slug}/webhooks/deliveries/{id}": { + "get": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of a delivery (UUID v7)." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "Delivery details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "delivery", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "attributes": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of a delivery (UUID v7)." + }, + "event_id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of the event, which triggered the delivery (UUID v7)." + }, + "status": { + "type": "string", + "enum": ["pending", "success", "failure", "skipped"], + "description": "Status of the delivery attempt." + }, + "response_code": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "HTTP status code of the response, `0` if unavailable." + }, + "response_headers": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "HTTP headers of the response, `{}` if unavailable." + }, + "response_body": { + "anyOf": [ + { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + }, + "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." + }, + { + "type": "string", + "description": "String representation of an HTTP body of the response." + } + ] + }, + { + "type": "null" + } + ] + }, + "attempt_timestamp": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of the attempt." + }, + "event": { + "type": "object", + "properties": { + "type": { + "description": "Webhook event type.", + "type": "string", + "enum": [ + "v1.project.paused", + "v1.project.created", + "v1.project.restored", + "v1.project.transferred", + "v1.project.removed", + "v1.project.restarted", + "v1.project.status.changed", + "v1.project.backup.started", + "v1.project.branch.created", + "v1.project.branch.updated", + "v1.project.branch.removed", + "v1.organization.member.invitation.created", + "v1.organization.member.invitation.canceled", + "v1.organization.member.added", + "v1.organization.member.removed", + "v1.organization.member.role.assigned", + "v1.organization.member.role.removed", + "v1.organization.member.role.updated", + "v1.organization.billing.plan.upgraded", + "v1.organization.billing.plan.downgraded", + "project.v1.paused", + "project.v1.created", + "project.v1.restored", + "project.v1.transferred", + "project.v1.removed", + "project.v1.restarted", + "project.v1.status.changed", + "project.v1.backup.started", + "project.v1.branch.created", + "project.v1.branch.updated", + "project.v1.branch.removed", + "organization.v1.member.invitation.created", + "organization.v1.member.invitation.canceled", + "organization.v1.member.added", + "organization.v1.member.removed", + "organization.v1.member.role.assigned", + "organization.v1.member.role.removed", + "organization.v1.member.role.updated", + "organization.v1.billing.plan.upgraded", + "organization.v1.billing.plan.downgraded", + "project.v1.branch.deleted" + ] + }, + "payload": { + "type": "object", + "properties": { + "organization_slug": { + "type": "string", + "pattern": "^[\\w-]+$", + "description": "Organization slug", + "example": "tsrqponmlkjihgfedcba" + }, + "project_ref": { + "anyOf": [ + { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + }, + { + "type": "null" + } + ] + } + }, + "required": ["organization_slug", "project_ref"], + "additionalProperties": {}, + "description": "Final data sent to the consumer." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "Timestamp of event publication." + } + }, + "required": ["type", "payload", "timestamp"] + } + }, + "required": [ + "id", + "event_id", + "status", + "response_code", + "response_headers", + "response_body", + "attempt_timestamp", + "event" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "DeliveryNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "not_found.delivery" + }, + "message": { + "type": "string", + "const": "Not Found: Delivery not found" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.delivery", + "message": "Not Found: Delivery not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Get delivery", + "description": "Get details of a specific delivery attempt." + } + }, + "/v2/organizations/{slug}/webhooks/deliveries/{id}/retry": { + "post": { + "operationId": "allV2OrganizationsBySlugWebhooks", + "parameters": [ + { + "in": "path", + "name": "slug", + "schema": { + "type": "string", + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba" + }, + "required": true, + "description": "Organization slug" + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + }, + "required": true, + "description": "Identifier of a delivery (UUID v7)." + } + ], + "tags": ["Organization webhooks"], + "responses": { + "200": { + "description": "Delivery details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "event", + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", + "description": "Identifier of an event (UUID v7)." + } + }, + "required": ["type", "id"] + } + }, + "required": ["data"] + } + } + } + }, + "400": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_slug" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid organization slug" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidSlug" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "bad_request.invalid_ref" + }, + "message": { + "type": "string", + "const": "Bad Request: Invalid project ref" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "InvalidRef" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "InvalidSlug": { + "value": { + "error": { + "code": "bad_request.invalid_slug", + "message": "Bad Request: Invalid organization slug" + } + } + }, + "InvalidRef": { + "value": { + "error": { + "code": "bad_request.invalid_ref", + "message": "Bad Request: Invalid project ref" + } + } + } + } + } + } + }, + "401": { + "description": "GenericUnauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "unauthorized" + }, + "message": { + "type": "string", + "const": "Unauthorized" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "unauthorized", + "message": "Unauthorized" + } + } + } + } + } + } + }, + "403": { + "description": "Multiple error responses", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.permission_denied" + }, + "message": { + "type": "string", + "const": "Forbidden: Permission denied" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "PermissionDenied" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "forbidden.access_disabled" + }, + "message": { + "type": "string", + "const": "Forbidden: Access disabled" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"], + "title": "AccessDisabled" + } + ] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "PermissionDenied": { + "value": { + "error": { + "code": "forbidden.permission_denied", + "message": "Forbidden: Permission denied" + } + } + }, + "AccessDisabled": { + "value": { + "error": { + "code": "forbidden.access_disabled", + "message": "Forbidden: Access disabled" + } + } + } + } + } + } + }, + "404": { + "description": "DeliveryNotFound", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "not_found.delivery" + }, + "message": { + "type": "string", + "const": "Not Found: Delivery not found" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "not_found.delivery", + "message": "Not Found: Delivery not found" + } + } + } + } + } + } + }, + "408": { + "description": "GenericRequestTimeout", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "request_timeout" + }, + "message": { + "type": "string", + "const": "Request Timeout" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "request_timeout", + "message": "Request Timeout" + } + } + } + } + } + } + }, + "429": { + "description": "GenericTooManyRequests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "too_many_requests" + }, + "message": { + "type": "string", + "const": "Too Many Requests" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "too_many_requests", + "message": "Too Many Requests" + } + } + } + } + } + } + }, + "500": { + "description": "GenericInternalServerError", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string", + "const": "internal_server_error" + }, + "message": { + "type": "string", + "const": "Internal Server Error" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "required": ["code", "message"] + } + }, + "required": ["error"], + "$defs": { + "APIErrorObject": { + "$ref": "#/components/schemas/APIErrorObject" + } + } + }, + "examples": { + "Default example": { + "value": { + "error": { + "code": "internal_server_error", + "message": "Internal Server Error" + } + } + } + } + } + } + } + }, + "summary": "Retry delivery", + "description": "Retry delivering the same event again.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds." } } }, @@ -2679,8 +21699,8 @@ "properties": { "type": { "type": "string", - "enum": ["log_drain"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["log_drain"] }, "id": { "type": "string" @@ -2695,7 +21715,7 @@ "type": "string" }, "config": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { @@ -2895,8 +21915,8 @@ "properties": { "type": { "type": "string", - "enum": ["log_drain"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["log_drain"] }, "attributes": { "type": "object", @@ -2908,7 +21928,7 @@ "type": "string" }, "config": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { @@ -3107,8 +22127,8 @@ "properties": { "type": { "type": "string", - "enum": ["log_drain"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["log_drain"] }, "id": { "type": "string" @@ -3123,7 +22143,7 @@ "type": "string" }, "config": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { @@ -3314,6 +22334,27 @@ }, "required": ["data"] }, + "PlanGateErrorBodyV2": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "HTTP status-derived error code, e.g. \"payment_required\"" + }, + "message": { + "type": "string", + "description": "Human-readable explanation of the plan gate" + } + }, + "required": ["code", "message"], + "description": "Plan-gate error object" + } + }, + "required": ["error"] + }, "UpdateLogDrainRequestOpenApi": { "type": "object", "properties": { @@ -3322,8 +22363,8 @@ "properties": { "type": { "type": "string", - "enum": ["log_drain"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["log_drain"] }, "attributes": { "type": "object", @@ -3335,7 +22376,7 @@ "type": "string" }, "config": { - "oneOf": [ + "anyOf": [ { "type": "object", "properties": { @@ -3500,25 +22541,235 @@ } ] }, - "backend_type": { + "backend_type": { + "type": "string", + "enum": [ + "postgres", + "bigquery", + "clickhouse", + "webhook", + "datadog", + "loki", + "sentry", + "s3", + "axiom", + "last9", + "otlp", + "syslog" + ] + } + }, + "required": ["backend_type"] + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + }, + "V2TransferProjectBody": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["project_transfer_input"] + }, + "attributes": { + "type": "object", + "properties": { + "target_organization_slug": { + "type": "string" + } + }, + "required": ["target_organization_slug"] + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + }, + "V2PreviewProjectTransferResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["project_transfer_result"] + }, + "attributes": { + "type": "object", + "properties": { + "valid": { + "type": "boolean" + }, + "warnings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["key", "message"] + } + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["key", "message"] + } + }, + "info": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["key", "message"] + } + } + }, + "required": ["valid", "warnings", "errors", "info"] + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + }, + "V2ListPrivateLinkAssociationsResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["private_link_association"] + }, + "id": { + "type": "string" + }, + "attributes": { + "type": "object", + "properties": { + "aws_account_id": { + "type": "string", + "minLength": 12, + "maxLength": 12, + "pattern": "^\\d{12}$", + "description": "The AWS account ID this PrivateLink share is associated with." + }, + "account_name": { + "description": "Human-readable name for the AWS account.", + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "CREATING", + "READY", + "ASSOCIATION_REQUEST_EXPIRED", + "ASSOCIATION_ACCEPTED", + "CREATION_FAILED", + "DELETING" + ], + "description": "\n - `CREATING`: The PrivateLink resources and the Association are in the process of being created. The PrivateLink Share cannot be accepted yet.\n - `READY`: The PrivateLink resources have been created and the PrivateLink Share can be accepted for the duration of 12h after sharing. See `shared_at`.\n - `ASSOCIATION_REQUEST_EXPIRED`: The PrivateLink Share has not been accepted within the 12h time limit. This association can now be deleted.\n - `ASSOCIATION_ACCEPTED`: The PrivateLink Share was successfully accepted.\n - `CREATION_FAILED`: The PrivateLink resources failed to create. This likely means something went wrong on Supabase's and and support should be contacted.\n - `DELETING`: The PrivateLink resources and the Association are in the process of being deleted. The PrivateLink Share cannot be accepted yet.\n" + }, + "shared_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending.", + "nullable": true + }, + "database_type": { + "type": "string", + "enum": ["PRIMARY", "READ_REPLICA"], + "description": "Whether this PrivateLink share targets the primary database or a read replica." + }, + "database_identifier": { + "type": "string", + "description": "Identifier of the database this PrivateLink share targets - the project ref for the primary, or the read replica identifier." + } + }, + "required": [ + "aws_account_id", + "status", + "shared_at", + "database_type", + "database_identifier" + ] + } + }, + "required": ["type", "id", "attributes"] + } + } + }, + "required": ["data"] + }, + "V2CreatePrivateLinkAssociationRequest": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["private_link_association"] + }, + "attributes": { + "type": "object", + "properties": { + "aws_account_id": { "type": "string", - "enum": [ - "postgres", - "bigquery", - "clickhouse", - "webhook", - "datadog", - "loki", - "sentry", - "s3", - "axiom", - "last9", - "otlp", - "syslog" - ] + "minLength": 12, + "maxLength": 12, + "pattern": "^\\d{12}$", + "description": "The AWS account ID to add to the project PrivateLink share." + }, + "account_name": { + "description": "Optional human-readable name for the AWS account.", + "type": "string", + "maxLength": 128 + }, + "database_identifier": { + "description": "Identifier of the read replica this PrivateLink share should target. Omit to target the primary database.", + "type": "string" } }, - "required": ["backend_type"] + "required": ["aws_account_id"] } }, "required": ["type", "attributes"] @@ -3526,7 +22777,7 @@ }, "required": ["data"] }, - "V2TransferProjectBody": { + "V2PrivateLinkAssociationResponse": { "type": "object", "properties": { "data": { @@ -3534,25 +22785,197 @@ "properties": { "type": { "type": "string", - "enum": ["project_transfer_input"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["private_link_association"] + }, + "id": { + "type": "string" }, "attributes": { "type": "object", "properties": { - "target_organization_slug": { + "aws_account_id": { + "type": "string", + "minLength": 12, + "maxLength": 12, + "pattern": "^\\d{12}$", + "description": "The AWS account ID this PrivateLink share is associated with." + }, + "account_name": { + "description": "Human-readable name for the AWS account.", "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "CREATING", + "READY", + "ASSOCIATION_REQUEST_EXPIRED", + "ASSOCIATION_ACCEPTED", + "CREATION_FAILED", + "DELETING" + ], + "description": "\n - `CREATING`: The PrivateLink resources and the Association are in the process of being created. The PrivateLink Share cannot be accepted yet.\n - `READY`: The PrivateLink resources have been created and the PrivateLink Share can be accepted for the duration of 12h after sharing. See `shared_at`.\n - `ASSOCIATION_REQUEST_EXPIRED`: The PrivateLink Share has not been accepted within the 12h time limit. This association can now be deleted.\n - `ASSOCIATION_ACCEPTED`: The PrivateLink Share was successfully accepted.\n - `CREATION_FAILED`: The PrivateLink resources failed to create. This likely means something went wrong on Supabase's and and support should be contacted.\n - `DELETING`: The PrivateLink resources and the Association are in the process of being deleted. The PrivateLink Share cannot be accepted yet.\n" + }, + "shared_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", + "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending.", + "nullable": true + }, + "database_type": { + "type": "string", + "enum": ["PRIMARY", "READ_REPLICA"], + "description": "Whether this PrivateLink share targets the primary database or a read replica." + }, + "database_identifier": { + "type": "string", + "description": "Identifier of the database this PrivateLink share targets - the project ref for the primary, or the read replica identifier." } }, - "required": ["target_organization_slug"] + "required": [ + "aws_account_id", + "status", + "shared_at", + "database_type", + "database_identifier" + ] } }, - "required": ["type", "attributes"] + "required": ["type", "id", "attributes"] } }, "required": ["data"] }, - "V2PreviewProjectTransferResponse": { + "V2ListMembersResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["organization_member"] + }, + "id": { + "type": "string", + "format": "uuid", + "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$" + }, + "attributes": { + "type": "object", + "properties": { + "username": { + "type": "string", + "description": "Member's username", + "nullable": true + }, + "primary_email": { + "type": "string", + "description": "Member's primary email", + "nullable": true + }, + "mfa_enabled": { + "type": "boolean", + "description": "Whether Multi-Factor Authentication is enabled for this member" + }, + "is_sso_user": { + "type": "boolean", + "description": "Whether this member is a Single Sign-On user" + }, + "avatar_url": { + "type": "string", + "description": "Member's avatar URL", + "nullable": true + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Role name. For project-scoped roles this is the base role name.", + "example": "developer" + }, + "scope": { + "type": "string", + "enum": ["organization", "project"], + "description": "Whether this role applies org-wide or is scoped to specific projects for the user." + }, + "projects": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["ref", "name"] + }, + "description": "Project refs this role is scoped to. Empty array for org-level roles." + } + }, + "required": ["name", "scope", "projects"] + }, + "description": "Roles assigned to this member. Includes both org-level and project-scoped roles." + } + }, + "required": [ + "username", + "primary_email", + "mfa_enabled", + "is_sso_user", + "avatar_url", + "roles" + ] + } + }, + "required": ["type", "id", "attributes"] + } + }, + "links": { + "type": "object", + "properties": { + "first": { + "type": "string", + "description": "URL path to the first page if available.", + "example": "/v2/organizations/my-org/members?page[size]=10", + "nullable": true + }, + "prev": { + "type": "string", + "description": "URL path to the previous page.", + "example": "/v2/organizations/my-org/members?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7", + "nullable": true + }, + "next": { + "type": "string", + "description": "URL path to the next page.", + "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4", + "nullable": true + }, + "last": { + "type": "string", + "description": "URL path to the last page if available.", + "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", + "nullable": true + } + }, + "required": ["prev", "next"] + } + }, + "required": ["data", "links"] + }, + "V2AssignOrganizationMemberRoleRequest": { "type": "object", "properties": { "data": { @@ -3560,62 +22983,85 @@ "properties": { "type": { "type": "string", - "enum": ["project_transfer_result"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["organization_member_role"] }, "attributes": { "type": "object", "properties": { - "valid": { - "type": "boolean" - }, - "warnings": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["key", "message"] - } + "role": { + "type": "string", + "enum": ["owner", "administrator", "developer", "read-only"], + "description": "Role name to assign. Must be one of: owner, administrator, developer, read-only. Must be on a Team or Enterprise plan to use the read-only role.", + "example": "developer" }, - "errors": { + "projects": { + "description": "The projects to assign a project-scoped role for. If omitted, assigns an org-wide role.", + "minItems": 1, "type": "array", "items": { "type": "object", "properties": { - "key": { - "type": "string" - }, - "message": { - "type": "string" + "ref": { + "type": "string", + "description": "Project ref", + "example": "abcjuqabhgwjjutfvtpa" } }, - "required": ["key", "message"] + "required": ["ref"] } + } + }, + "required": ["role"] + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + }, + "OrganizationMemberRoleResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["organization_member_role"] + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Role name. For project-scoped assignments this is the base role name.", + "example": "developer" }, - "info": { + "scope": { + "type": "string", + "enum": ["organization", "project"], + "description": "Whether this role applies org-wide or is scoped to specific projects for the user." + }, + "projects": { "type": "array", "items": { "type": "object", "properties": { - "key": { + "ref": { "type": "string" }, - "message": { + "name": { "type": "string" } }, - "required": ["key", "message"] - } + "required": ["ref", "name"] + }, + "description": "Project refs this role is scoped to. Empty array for org-level roles." } }, - "required": ["valid", "warnings", "errors", "info"] + "required": ["name", "scope", "projects"] } }, "required": ["type", "attributes"] @@ -3623,7 +23069,7 @@ }, "required": ["data"] }, - "V2ListPrivateLinkAssociationsResponse": { + "V2ListRolesResponse": { "type": "object", "properties": { "data": { @@ -3633,147 +23079,198 @@ "properties": { "type": { "type": "string", - "enum": ["private_link_association"], - "description": "Resource type." - }, - "id": { - "type": "string" + "description": "Resource type.", + "enum": ["organization_role"] }, "attributes": { "type": "object", "properties": { - "aws_account_id": { - "type": "string", - "minLength": 12, - "maxLength": 12, - "pattern": "^\\d{12}$", - "description": "The AWS account ID this PrivateLink share is associated with." - }, - "account_name": { - "type": "string", - "description": "Human-readable name for the AWS account." - }, - "status": { - "type": "string", - "enum": [ - "CREATING", - "READY", - "ASSOCIATION_REQUEST_EXPIRED", - "ASSOCIATION_ACCEPTED", - "CREATION_FAILED", - "DELETING" - ], - "description": "\n - `CREATING`: The PrivateLink resources and the Association are in the process of being created. The PrivateLink Share cannot be accepted yet.\n - `READY`: The PrivateLink resources have been created and the PrivateLink Share can be accepted for the duration of 12h after sharing. See `shared_at`.\n - `ASSOCIATION_REQUEST_EXPIRED`: The PrivateLink Share has not been accepted within the 12h time limit. This association can now be deleted.\n - `ASSOCIATION_ACCEPTED`: The PrivateLink Share was successfully accepted.\n - `CREATION_FAILED`: The PrivateLink resources failed to create. This likely means something went wrong on Supabase's and and support should be contacted.\n - `DELETING`: The PrivateLink resources and the Association are in the process of being deleted. The PrivateLink Share cannot be accepted yet.\n" - }, - "shared_at": { + "name": { "type": "string", - "format": "date-time", - "nullable": true, - "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending." + "description": "Role name.", + "example": "developer" } }, - "required": ["aws_account_id", "status", "shared_at"] + "required": ["name"] } }, - "required": ["type", "id", "attributes"] + "required": ["type", "attributes"] } } }, "required": ["data"] }, - "V2CreatePrivateLinkAssociationRequest": { + "V2CreateInvitationsRequest": { "type": "object", "properties": { "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["private_link_association"], - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "aws_account_id": { - "type": "string", - "minLength": 12, - "maxLength": 12, - "pattern": "^\\d{12}$", - "description": "The AWS account ID to add to the project PrivateLink share." - }, - "account_name": { - "type": "string", - "maxLength": 128, - "description": "Optional human-readable name for the AWS account." - } + "minItems": 1, + "maxItems": 50, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["organization_invitation"] }, - "required": ["aws_account_id"] - } - }, - "required": ["type", "attributes"] + "attributes": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + }, + "role": { + "type": "string", + "enum": ["owner", "administrator", "developer", "read-only"], + "description": "Role name to assign. Must be on a Team or Enterprise plan to use the read-only role.", + "example": "developer" + }, + "projects": { + "description": "The projects to limit a user to. If omitted, user will have org-wide access with the provided role.", + "minItems": 1, + "type": "array", + "items": { + "type": "object", + "properties": { + "ref": { + "type": "string", + "description": "Project ref", + "example": "abcjuqabhgwjjutfvtpa" + } + }, + "required": ["ref"] + } + }, + "require_sso": { + "type": "boolean" + } + }, + "required": ["email", "role"] + } + }, + "required": ["type", "attributes"] + } } }, "required": ["data"] }, - "V2PrivateLinkAssociationResponse": { + "V2CreateInvitationsResponse": { "type": "object", "properties": { - "data": { + "error": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["private_link_association"], - "description": "Resource type." - }, "id": { "type": "string" }, - "attributes": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "description": { + "type": "string" + }, + "links": { "type": "object", - "properties": { - "aws_account_id": { - "type": "string", - "minLength": 12, - "maxLength": 12, - "pattern": "^\\d{12}$", - "description": "The AWS account ID this PrivateLink share is associated with." - }, - "account_name": { - "type": "string", - "description": "Human-readable name for the AWS account." - }, - "status": { - "type": "string", - "enum": [ - "CREATING", - "READY", - "ASSOCIATION_REQUEST_EXPIRED", - "ASSOCIATION_ACCEPTED", - "CREATION_FAILED", - "DELETING" - ], - "description": "\n - `CREATING`: The PrivateLink resources and the Association are in the process of being created. The PrivateLink Share cannot be accepted yet.\n - `READY`: The PrivateLink resources have been created and the PrivateLink Share can be accepted for the duration of 12h after sharing. See `shared_at`.\n - `ASSOCIATION_REQUEST_EXPIRED`: The PrivateLink Share has not been accepted within the 12h time limit. This association can now be deleted.\n - `ASSOCIATION_ACCEPTED`: The PrivateLink Share was successfully accepted.\n - `CREATION_FAILED`: The PrivateLink resources failed to create. This likely means something went wrong on Supabase's and and support should be contacted.\n - `DELETING`: The PrivateLink resources and the Association are in the process of being deleted. The PrivateLink Share cannot be accepted yet.\n" + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "additionalProperties": {} + } }, - "shared_at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending." - } - }, - "required": ["aws_account_id", "status", "shared_at"] + "required": ["href"] + } + }, + "meta": { + "type": "object", + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + } + }, + "required": ["email"] + } + }, + "required": ["code", "message", "meta"] + } } }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - }, - "V2ListMembersResponse": { - "type": "object", - "properties": { + "required": ["code", "message"] + }, "data": { "type": "array", "items": { @@ -3781,217 +23278,92 @@ "properties": { "type": { "type": "string", - "enum": ["organization_member"], - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid" + "description": "Resource type.", + "enum": ["organization_invitation"] }, "attributes": { "type": "object", "properties": { - "username": { - "type": "string", - "nullable": true, - "description": "Member's username" - }, - "primary_email": { - "type": "string", - "nullable": true, - "description": "Member's primary email" - }, - "mfa_enabled": { - "type": "boolean", - "description": "Whether Multi-Factor Authentication is enabled for this member" - }, - "is_sso_user": { - "type": "boolean", - "description": "Whether this member is a Single Sign-On user" - }, - "avatar_url": { + "email": { "type": "string", - "nullable": true, - "description": "Member's avatar URL" - }, - "roles": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Role name. For project-scoped roles this is the base role name.", - "example": "developer" - }, - "scope": { - "type": "string", - "enum": ["organization", "project"], - "description": "Whether this role applies org-wide or is scoped to specific projects for the user." - }, - "projects": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ref": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["ref", "name"] - }, - "description": "Project refs this role is scoped to. Empty array for org-level roles." - } - }, - "required": ["name", "scope", "projects"] - }, - "description": "Roles assigned to this member. Includes both org-level and project-scoped roles." + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" } }, - "required": [ - "username", - "primary_email", - "mfa_enabled", - "is_sso_user", - "avatar_url", - "roles" - ] + "required": ["email"] } }, - "required": ["type", "id", "attributes"] + "required": ["type", "attributes"] } - }, - "links": { - "type": "object", - "properties": { - "first": { - "type": "string", - "nullable": true, - "description": "URL path to the first page if available.", - "example": "/v2/organizations/my-org/members?page[size]=10" - }, - "prev": { - "type": "string", - "nullable": true, - "description": "URL path to the previous page.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7" - }, - "next": { - "type": "string", - "nullable": true, - "description": "URL path to the next page.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4" - }, - "last": { - "type": "string", - "nullable": true, - "description": "URL path to the last page if available.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295" - } - }, - "required": ["prev", "next"] } }, - "required": ["data", "links"] + "required": ["data"] }, - "V2AssignOrganizationMemberRoleRequest": { + "V2DeleteInvitationsRequest": { "type": "object", "properties": { "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["organization_member_role"], - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "role": { - "type": "string", - "enum": ["owner", "administrator", "developer", "read-only"], - "description": "Role name to assign. Must be one of: owner, administrator, developer, read-only. Must be on a Team or Enterprise plan to use the read-only role.", - "example": "developer" - }, - "projects": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ref": { - "type": "string", - "description": "Project ref", - "example": "abcjuqabhgwjjutfvtpa" - } - }, - "required": ["ref"] - }, - "minItems": 1, - "description": "The projects to assign a project-scoped role for. If omitted, assigns an org-wide role." - } + "minItems": 1, + "maxItems": 100, + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["organization_invitation"] }, - "required": ["role"] - } - }, - "required": ["type", "attributes"] + "attributes": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + } + }, + "required": ["email"] + } + }, + "required": ["type", "attributes"] + } } }, "required": ["data"] }, - "OrganizationMemberRoleResponse": { + "V2DeleteInvitationsResponse": { "type": "object", "properties": { "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["organization_member_role"], - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Role name. For project-scoped assignments this is the base role name.", - "example": "developer" - }, - "scope": { - "type": "string", - "enum": ["organization", "project"], - "description": "Whether this role applies org-wide or is scoped to specific projects for the user." - }, - "projects": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ref": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["ref", "name"] - }, - "description": "Project refs this role is scoped to. Empty array for org-level roles." - } + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Resource type.", + "enum": ["organization_invitation"] }, - "required": ["name", "scope", "projects"] - } - }, - "required": ["type", "attributes"] + "attributes": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + } + }, + "required": ["email"] + } + }, + "required": ["type", "attributes"] + } } }, "required": ["data"] }, - "V2ListRolesResponse": { + "V2ListProjectsResponse": { "type": "object", "properties": { "data": { @@ -4001,29 +23373,184 @@ "properties": { "type": { "type": "string", - "enum": ["organization_role"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["project"] + }, + "id": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" }, - "id": {}, "attributes": { "type": "object", "properties": { "name": { "type": "string", - "description": "Role name.", - "example": "developer" + "description": "Project name" + }, + "status": { + "type": "string", + "enum": [ + "INACTIVE", + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "UNKNOWN", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UPGRADING", + "PAUSING", + "RESTORE_FAILED", + "RESTARTING", + "PAUSE_FAILED", + "RESIZING" + ], + "description": "Project status" + }, + "cloud_provider": { + "type": "string", + "description": "Cloud provider hosting the project" + }, + "region": { + "type": "string", + "description": "Region the project is hosted in" + }, + "inserted_at": { + "type": "string", + "description": "When the project was created" + }, + "databases": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cloud_provider": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "region": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UNKNOWN", + "INIT_READ_REPLICA", + "INIT_READ_REPLICA_FAILED", + "RESTARTING", + "RESIZING" + ] + }, + "type": { + "type": "string", + "enum": ["PRIMARY", "READ_REPLICA"] + }, + "infra_compute_size": { + "type": "string", + "enum": [ + "pico", + "nano", + "micro", + "small", + "medium", + "large", + "xlarge", + "2xlarge", + "4xlarge", + "8xlarge", + "12xlarge", + "16xlarge", + "24xlarge", + "24xlarge_optimized_memory", + "24xlarge_optimized_cpu", + "24xlarge_high_memory", + "48xlarge", + "48xlarge_optimized_memory", + "48xlarge_optimized_cpu", + "48xlarge_high_memory" + ] + }, + "disk_volume_size_gb": { + "type": "number" + }, + "disk_type": { + "type": "string", + "enum": ["gp3", "io2"] + }, + "disk_throughput_mbps": { + "type": "number" + }, + "disk_last_modified_at": { + "type": "string" + } + }, + "required": ["cloud_provider", "identifier", "region", "status", "type"] + }, + "description": "The project's databases including compute and disk attributes." } }, - "required": ["name"] + "required": [ + "name", + "status", + "cloud_provider", + "region", + "inserted_at", + "databases" + ] } }, - "required": ["type", "attributes"] + "required": ["type", "id", "attributes"] } + }, + "links": { + "type": "object", + "properties": { + "first": { + "type": "string", + "description": "URL path to the first page if available.", + "example": "/v2/organizations/my-org/projects?page[size]=10", + "nullable": true + }, + "prev": { + "type": "string", + "description": "URL path to the previous page.", + "example": "/v2/organizations/my-org/projects?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7", + "nullable": true + }, + "next": { + "type": "string", + "description": "URL path to the next page.", + "example": "/v2/organizations/my-org/projects?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4", + "nullable": true + }, + "last": { + "type": "string", + "description": "URL path to the last page if available.", + "example": "/v2/organizations/my-org/projects?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", + "nullable": true + } + }, + "required": ["prev", "next"] } }, - "required": ["data"] + "required": ["data", "links"] }, - "V2CreateInvitationsRequest": { + "V2ListGitHubConnectionsResponse": { "type": "object", "properties": { "data": { @@ -4033,192 +23560,212 @@ "properties": { "type": { "type": "string", - "enum": ["organization_invitation"], - "description": "Resource type." + "description": "Resource type.", + "enum": ["github_connection"] + }, + "id": { + "type": "string", + "description": "Connection id.", + "example": "7" }, "attributes": { "type": "object", "properties": { - "email": { + "inserted_at": { "type": "string", - "format": "email" + "description": "When the connection was created" }, - "role": { + "updated_at": { "type": "string", - "enum": ["owner", "administrator", "developer", "read-only"], - "description": "Role name to assign. Must be on a Team or Enterprise plan to use the read-only role.", - "example": "developer" - }, - "projects": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ref": { - "type": "string", - "description": "Project ref", - "example": "abcjuqabhgwjjutfvtpa" - } - }, - "required": ["ref"] - }, - "minItems": 1, - "description": "The projects to limit a user to. If omitted, user will have org-wide access with the provided role." + "description": "When the connection was last updated" }, - "require_sso": { - "type": "boolean" - } - }, - "required": ["email", "role"] - } - }, - "required": ["type", "attributes"] - }, - "minItems": 1, - "maxItems": 50 - } - }, - "required": ["data"] - }, - "V2CreateInvitationsResponse": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" + "installation_id": { + "type": "number", + "description": "GitHub App installation id" }, - "rel": { - "type": "string" + "workdir": { + "type": "string", + "description": "Directory within the repository the project lives in" }, - "title": { - "type": "string" + "supabase_changes_only": { + "type": "boolean", + "description": "Whether branches are only created for changes under `supabase/`" }, - "type": { - "type": "string" + "branch_limit": { + "type": "number", + "description": "Maximum number of preview branches" }, - "describedby": { - "type": "string" + "new_branch_per_pr": { + "type": "boolean", + "description": "Whether a preview branch is created for every pull request" }, - "meta": { + "project": { "type": "object", - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "description": { - "type": "string" + "properties": { + "id": { + "type": "number" + }, + "ref": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + }, + "name": { + "type": "string" + } + }, + "required": ["id", "ref", "name"], + "description": "The connected Supabase project" }, - "links": { + "repository": { "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "additionalProperties": {} - } + "properties": { + "id": { + "type": "number" }, - "required": ["href"] - } + "name": { + "type": "string" + } + }, + "required": ["id", "name"], + "description": "The connected GitHub repository" }, - "meta": { + "user": { "type": "object", "properties": { - "email": { + "id": { + "type": "number" + }, + "username": { + "type": "string" + }, + "primary_email": { "type": "string", - "format": "email" + "nullable": true } }, - "required": ["email"] + "required": ["id", "username", "primary_email"], + "description": "The user who created the connection, if still known", + "nullable": true } }, - "required": ["code", "message", "meta"] + "required": [ + "inserted_at", + "updated_at", + "installation_id", + "workdir", + "supabase_changes_only", + "branch_limit", + "new_branch_per_pr", + "project", + "repository", + "user" + ] } + }, + "required": ["type", "id", "attributes"] + } + }, + "links": { + "type": "object", + "properties": { + "first": { + "type": "string", + "description": "URL path to the first page if available.", + "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10", + "nullable": true + }, + "prev": { + "type": "string", + "description": "URL path to the previous page.", + "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7", + "nullable": true + }, + "next": { + "type": "string", + "description": "URL path to the next page.", + "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4", + "nullable": true + }, + "last": { + "type": "string", + "description": "URL path to the last page if available.", + "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", + "nullable": true } }, - "required": ["code", "message"] + "required": ["prev", "next"] + } + }, + "required": ["data", "links"] + }, + "APIErrorObject": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "data": { - "type": "array", - "items": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { "type": "object", "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, "type": { - "type": "string", - "enum": ["organization_invitation"], - "description": "Resource type." + "type": "string" }, - "id": {}, - "attributes": { + "describedby": { + "type": "string" + }, + "meta": { "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email" - } + "propertyNames": { + "type": "string" }, - "required": ["email"] + "additionalProperties": {} } }, - "required": ["type", "attributes"] + "required": ["href"] + } + }, + "meta": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIErrorObject" } } }, - "required": ["data"] + "required": ["code", "message"] } } } From 00d12c305c9d0499a4778e17d6f78029a254da4f Mon Sep 17 00:00:00 2001 From: Francesco Sansalvadore Date: Fri, 31 Jul 2026 16:33:48 +0200 Subject: [PATCH 06/12] Include Migration steps in changelog bodySection (#48496) ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Feature / refactor ## What is the current behavior? The changelog entry parser extracts `## Migration steps` as a separate field (`migrationSteps`), and the `bodySection` stops before it. This requires consumers to handle migration steps separately from the main body content. ## What is the new behavior? The `bodySection` now includes `## Migration steps` as part of the rendered body content. The `migrationSteps` field has been removed from the `ChangelogEntry` type. The `bodySection` extraction now stops at internal-only planning sections (`## Rollout timeline`, `## Comms timeline`) instead of at migration steps, allowing migration steps to be included in the public-facing body. ## Additional context - Updated `parseChangelogEntryFile` to extract `bodySection` through migration steps, excluding only internal planning tables - Updated the `ChangelogEntry` type documentation to clarify that `bodySection` includes migration steps - Added a test case verifying that migration steps are included in the rendered body while internal sections are excluded - This simplifies the API by consolidating public body content into a single field https://claude.ai/code/session_01X5ikaawVPZwMT5C2dWUyJY ## Summary by CodeRabbit * **Improvements** * Changelog entries now include all public content following the Body section, including relevant subsections and rollout information. * Migration guidance is included directly within the main changelog body for a clearer reading experience. * Internal notes, communications, and planning details remain excluded from displayed changelog content. * Unmatched internal markers now correctly hide all subsequent content from public changelogs. --------- Co-authored-by: Claude --- apps/www/lib/changelog-entries-core.mjs | 19 ++++- apps/www/lib/changelog-entries-core.test.ts | 88 +++++++++++++++++++++ apps/www/lib/changelog-repo.ts | 8 +- 3 files changed, 109 insertions(+), 6 deletions(-) diff --git a/apps/www/lib/changelog-entries-core.mjs b/apps/www/lib/changelog-entries-core.mjs index e7f8d5ed948ca..22661f85d724f 100644 --- a/apps/www/lib/changelog-entries-core.mjs +++ b/apps/www/lib/changelog-entries-core.mjs @@ -106,7 +106,10 @@ export function toPublicFrontmatter(frontmatter) { } export function stripInternalBlock(body) { - let sanitized = body.replace(/[\s\S]*?/gi, '') + // An unmatched opening `` (no closing ``) must + // still swallow everything after it — otherwise the follow-up comment-stripper + // would remove the opener alone and leak the internal text into publicBody. + let sanitized = body.replace(/[\s\S]*?(?:|$)/gi, '') // MDX doesn't support raw HTML comments (only {/* */}) — strip any that are left // (e.g. author/template notes) so they can't break rendering. Applied repeatedly: // a single pass could in principle leave a fresh `` behind. @@ -175,11 +178,21 @@ export function parseChangelogEntryFile(filename, raw) { frontmatter: toPublicFrontmatter(frontmatter), sortDate: toDateString(frontmatter.publish_date) ?? resolveDateFromFilename(filename) ?? '', summary: extractSection(publicBody, 'Summary'), - bodySection: extractSection(publicBody, 'Body', ['Migration steps']), - migrationSteps: extractSection(publicBody, 'Migration steps'), + bodySection: extractBodySection(publicBody), } } +/** + * Everything under `## Body` to the end of the public content. The internal + * block is already stripped upstream (`stripInternalBlock`), so we don't stop + * at any specific heading — the `` marker is the boundary. + */ +function extractBodySection(publicBody) { + const match = publicBody.match(/^##\s+Body\s*\n/im) + if (!match) return '' + return publicBody.slice(match.index + match[0].length).trim() +} + /** `public: true` and not scheduled for a future `publish_date`. */ export function isPublished(entry) { if (entry.frontmatter.public !== true) return false diff --git a/apps/www/lib/changelog-entries-core.test.ts b/apps/www/lib/changelog-entries-core.test.ts index de0636c1eecb1..18c663a012528 100644 --- a/apps/www/lib/changelog-entries-core.test.ts +++ b/apps/www/lib/changelog-entries-core.test.ts @@ -104,6 +104,94 @@ describe('parseChangelogEntryFile', () => { expect(nullDate.sortDate).toBe('2026-07-22') }) + it('includes everything under ## Body up to the internal block, and excludes internal content', () => { + const entry = parseChangelogEntryFile( + '20260714-breaking.md', + `--- +title: Breaking change +change_type: breaking-change +public: true +publish_date: 2026-07-14 +--- + +## Summary + +Short summary. + +## Body + +## What changed + +The thing changed. + +## Migration steps + +1. Do the thing. +2. Do the other thing. + +## Rollout timeline + +| Date | Milestone | +| ---- | --------- | +| 2026 | done | + + + +## Internal notes + +secret + + +` + ) + + expect(entry.bodySection).toContain('## What changed') + expect(entry.bodySection).toContain('## Migration steps') + expect(entry.bodySection).toContain('Do the thing.') + expect(entry.bodySection).toContain('## Rollout timeline') + expect(entry.bodySection).not.toContain('## Summary') + expect(entry.bodySection).not.toContain('Short summary.') + expect(entry.bodySection).not.toContain('Internal notes') + expect(entry.bodySection).not.toContain('secret') + }) + + it('treats an unmatched opening marker as internal through end of file', () => { + const entry = parseChangelogEntryFile( + '20260714-unclosed-internal.md', + `--- +title: Unclosed internal +change_type: improvement +public: true +publish_date: 2026-07-14 +--- + +## Summary + +Short summary. + +## Body + +Public body text. + + + +## Internal notes + +super secret + +## Support FAQ + +more secret +` + ) + + expect(entry.bodySection).toContain('Public body text.') + expect(entry.bodySection).not.toContain('Internal notes') + expect(entry.bodySection).not.toContain('super secret') + expect(entry.bodySection).not.toContain('Support FAQ') + expect(entry.bodySection).not.toContain('more secret') + }) + it('normalizes date frontmatter reaching detail-page props, even when unquoted', () => { // `[slug].tsx` ships `entry.frontmatter` into props; a Date would break serialization. const entry = parseChangelogEntryFile( diff --git a/apps/www/lib/changelog-repo.ts b/apps/www/lib/changelog-repo.ts index c5d6e7cbfae5a..322c22dfaebd9 100644 --- a/apps/www/lib/changelog-repo.ts +++ b/apps/www/lib/changelog-repo.ts @@ -43,10 +43,12 @@ export type ChangelogEntry = { sortDate: string /** Contents of `## Summary` only. */ summary: string - /** Contents of `## Body` only. Never includes the internal block. */ + /** + * Everything under `## Body` to the end of the public content. The + * `` block is the only boundary — content authors want kept + * off the published page goes inside that block. + */ bodySection: string - /** Contents of `## Migration steps`, if present. */ - migrationSteps: string } function createChangelogRepoOctokit() { From 9b51678fcf29133c499b19d3a847870023a91d3a Mon Sep 17 00:00:00 2001 From: Ali Waseem Date: Fri, 31 Jul 2026 09:19:18 -0600 Subject: [PATCH 07/12] Revert "feat: update mgmt api docs (#48282)" (#48545) ## What kind of change does this PR introduce? Revert ## What is the current behavior? #48282 auto-updated the mgmt API docs spec files (`apps/docs/spec/api_v1_openapi.json`, `apps/docs/spec/api_v2_openapi.json`, `apps/docs/spec/common-api-sections.json`, and the deparsed transform files). ## What is the new behavior? Reverts those spec/transform files back to their state prior to #48282. This reverts commit 4adef69037edb7bbee10823b1695bccfde26a464. ## Summary by CodeRabbit * **Documentation** * Updated API reference documentation with clearer authorization requirements and more accurate request and response schemas. * Improved validation details, examples, required fields, and response variations across projects, authentication, storage, backups, SSO, analytics, and functions. * Documented separate paginated listing and count operations for action runs. * Added clearer JIT response definitions and refined API behavior descriptions. * Removed documentation entries for several retired analytics, organization, invitation, and private-link operations. --- apps/docs/spec/api_v1_openapi.json | 2481 +- apps/docs/spec/api_v2_openapi.json | 15396 +--------- apps/docs/spec/common-api-sections.json | 30 - .../transforms/api_v1_openapi_deparsed.json | 15242 +++++++++- .../transforms/api_v2_openapi_deparsed.json | 24927 ++-------------- 5 files changed, 17185 insertions(+), 40891 deletions(-) diff --git a/apps/docs/spec/api_v1_openapi.json b/apps/docs/spec/api_v1_openapi.json index 59bf4cc4e8e66..d77b7729a328c 100644 --- a/apps/docs/spec/api_v1_openapi.json +++ b/apps/docs/spec/api_v1_openapi.json @@ -13,7 +13,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -22,12 +22,7 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "deprecated": true - } + { "type": "string", "format": "uuid", "deprecated": true } ] } } @@ -43,12 +38,15 @@ }, "500": { "description": "Failed to retrieve database branch" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["branching_production_read"] }, + { "fga_permissions": ["branching_development_read"] } + ], "summary": "Get database branch config", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:read", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_read"], ["branching_production_read"]], "x-oauth-scope": "environment:read" }, "patch": { @@ -62,7 +60,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -71,12 +69,7 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "deprecated": true - } + { "type": "string", "format": "uuid", "deprecated": true } ] } } @@ -96,12 +89,15 @@ }, "500": { "description": "Failed to update database branch" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["branching_production_write"] }, + { "fga_permissions": ["branching_development_write"] } + ], "summary": "Update database branch config", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" }, "delete": { @@ -115,7 +111,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -124,12 +120,7 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "deprecated": true - } + { "type": "string", "format": "uuid", "deprecated": true } ] } }, @@ -138,7 +129,7 @@ "required": false, "in": "query", "description": "If set to false, schedule deletion with 1-hour grace period (only when soft deletion is enabled).", - "schema": { "example": false, "type": "string" } + "schema": { "default": "true", "example": false, "type": "boolean" } } ], "responses": { @@ -152,12 +143,15 @@ }, "500": { "description": "Failed to delete database branch" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["branching_production_delete"] }, + { "fga_permissions": ["branching_development_delete"] } + ], "summary": "Delete a database branch", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_delete"], ["branching_production_delete"]], "x-oauth-scope": "environment:write" } }, @@ -173,7 +167,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -182,12 +176,7 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "deprecated": true - } + { "type": "string", "format": "uuid", "deprecated": true } ] } } @@ -209,12 +198,15 @@ }, "500": { "description": "Failed to push database branch" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["branching_production_write"] }, + { "fga_permissions": ["branching_development_write"] } + ], "summary": "Pushes a database branch", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -230,7 +222,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -239,12 +231,7 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "deprecated": true - } + { "type": "string", "format": "uuid", "deprecated": true } ] } } @@ -266,12 +253,15 @@ }, "500": { "description": "Failed to merge database branch" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["branching_production_write"] }, + { "fga_permissions": ["branching_development_write"] } + ], "summary": "Merges a database branch", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -287,7 +277,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -296,12 +286,7 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "deprecated": true - } + { "type": "string", "format": "uuid", "deprecated": true } ] } } @@ -323,12 +308,15 @@ }, "500": { "description": "Failed to reset database branch" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["branching_production_write"] }, + { "fga_permissions": ["branching_development_write"] } + ], "summary": "Resets a database branch", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -344,7 +332,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -353,12 +341,7 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "deprecated": true - } + { "type": "string", "format": "uuid", "deprecated": true } ] } } @@ -374,12 +357,15 @@ }, "500": { "description": "Failed to restore database branch" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["branching_production_write"] }, + { "fga_permissions": ["branching_development_write"] } + ], "summary": "Restore a scheduled branch deletion", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -395,7 +381,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -404,12 +390,7 @@ "description": "Project ref", "example": "abcdefghijklmnopqrst" }, - { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "deprecated": true - } + { "type": "string", "format": "uuid", "deprecated": true } ] } }, @@ -423,8 +404,8 @@ "name": "pgdelta", "required": false, "in": "query", - "description": "Use pg-delta instead of Migra for diffing when true. \nBoolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", - "schema": { "example": "true", "type": "string" } + "description": "Use pg-delta instead of Migra for diffing when true", + "schema": { "example": false, "type": "boolean" } } ], "responses": { @@ -434,12 +415,15 @@ }, "500": { "description": "Failed to diff database branch" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["branching_production_write"] }, + { "fga_permissions": ["branching_development_write"] } + ], "summary": "[Beta] Diffs a database branch", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -464,12 +448,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["projects_read"] }], "summary": "List all projects", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["projects_read"]], "x-oauth-scope": "projects:read" }, "post": { @@ -492,12 +475,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["organization_projects_create"] }], "summary": "Create a project", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["organization_projects_create"]], "x-oauth-scope": "projects:write" } }, @@ -592,12 +574,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Unexpected error listing organizations" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["organizations_read"] }], "summary": "List all organizations", "tags": ["Organizations"], "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organizations_read"]], "x-oauth-scope": "organizations:read" }, "post": { @@ -625,11 +606,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Unexpected error creating an organization" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["organizations_create"] }], "summary": "Create an organization", "tags": ["Organizations"], - "x-endpoint-owners": ["management-api", "billing"], - "x-fga-permissions": [["organizations_create"]] + "x-endpoint-owners": ["management-api", "billing"] } }, "/v1/oauth/authorize": { @@ -642,7 +622,6 @@ "in": "query", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "66666666-6666-4666-8666-666666666666", "type": "string" } @@ -715,14 +694,11 @@ "required": false, "in": "query", "description": "Resource indicator for MCP (Model Context Protocol) clients", - "schema": { - "format": "uri", - "example": "https://mcp.supabase.com/projects", - "type": "string" - } + "schema": { "format": "uri", "type": "string" } } ], "responses": { "204": { "description": "" } }, + "security": [{ "oauth2": ["read"] }], "summary": "[Beta] Authorize user through oauth", "tags": ["OAuth"], "x-endpoint-owners": ["auth", "management-api"] @@ -751,6 +727,7 @@ } } }, + "security": [{ "oauth2": ["write"] }], "summary": "[Beta] Exchange auth code for user's access and refresh token", "tags": ["OAuth"], "x-endpoint-owners": ["auth", "management-api"] @@ -769,6 +746,7 @@ } }, "responses": { "204": { "description": "" } }, + "security": [{ "oauth2": ["write"] }], "summary": "[Beta] Revoke oauth app authorization and it's corresponding tokens", "tags": ["OAuth"], "x-endpoint-owners": ["auth", "management-api"] @@ -798,7 +776,6 @@ "in": "query", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "66666666-6666-4666-8666-666666666666", "type": "string" } @@ -850,11 +827,13 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["organization_admin_write", "project_admin_write"] } + ], "summary": "Authorize user through oauth and claim a project", "tags": ["OAuth"], - "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_write", "project_admin_write"]] + "x-endpoint-owners": ["management-api"] } }, "/v1/snippets": { @@ -906,12 +885,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to list user's SQL snippets" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["snippets_read"] }], "summary": "Lists SQL snippets for the logged in user", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["snippets_read"]], "x-oauth-scope": "database:read" } }, @@ -925,7 +903,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "44444444-4444-4444-8444-444444444444", "type": "string" } @@ -943,12 +920,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve SQL snippet" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["snippets_read"] }], "summary": "Gets a specific SQL snippet", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["snippets_read"]], "x-oauth-scope": "database:read" } }, @@ -971,9 +947,9 @@ } }, "/v1/projects/{ref}/actions": { - "head": { - "description": "Returns the total number of action runs of the specified project.", - "operationId": "v1-count-action-runs", + "get": { + "description": "Returns a paginated list of action runs of the specified project.", + "operationId": "v1-list-action-runs", "parameters": [ { "name": "ref", @@ -987,33 +963,44 @@ "example": "abcdefghijklmnopqrst", "type": "string" } + }, + { + "name": "offset", + "required": false, + "in": "query", + "schema": { "minimum": 0, "example": 0, "type": "number" } + }, + { + "name": "limit", + "required": false, + "in": "query", + "schema": { "minimum": 10, "example": 20, "type": "number" } } ], "responses": { "200": { - "headers": { - "X-Total-Count": { - "schema": { "type": "integer", "format": "int64", "minimum": 0 }, - "description": "total count value" + "description": "", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ListActionRunResponse" } } - }, - "description": "" + } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, - "500": { "description": "Failed to count action runs" } + "500": { "description": "Failed to list action runs" } }, - "security": [{ "bearer": [] }], - "summary": "Count the number of action runs", + "security": [{ "bearer": [] }, { "fga_permissions": ["action_runs_read"] }], + "summary": "List all action runs", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:read", "position": "after" }], - "x-fga-permissions": [["action_runs_read"]], + "x-endpoint-owners": ["dev-workflows"], "x-oauth-scope": "environment:read" }, - "get": { - "description": "Returns a paginated list of action runs of the specified project.", - "operationId": "v1-list-action-runs", + "head": { + "description": "Returns the total number of action runs of the specified project.", + "operationId": "v1-count-action-runs", "parameters": [ { "name": "ref", @@ -1027,40 +1014,27 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - }, - { - "name": "offset", - "required": false, - "in": "query", - "schema": { "minimum": 0, "example": 0, "type": "number" } - }, - { - "name": "limit", - "required": false, - "in": "query", - "schema": { "minimum": 10, "example": 20, "type": "number" } } ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/ListActionRunResponse" } + "headers": { + "X-Total-Count": { + "schema": { "type": "integer", "format": "int64", "minimum": 0 }, + "description": "total count value" } - } + }, + "description": "" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, - "500": { "description": "Failed to list action runs" } + "500": { "description": "Failed to count action runs" } }, - "security": [{ "bearer": [] }], - "summary": "List all action runs", + "security": [{ "bearer": [] }, { "fga_permissions": ["action_runs_read"] }], + "summary": "Count the number of action runs", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:read", "position": "after" }], - "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["action_runs_read"]], "x-oauth-scope": "environment:read" } }, @@ -1102,12 +1076,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get action run status" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["action_runs_read"] }], "summary": "Get the status of an action run", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:read", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["action_runs_read"]], "x-oauth-scope": "environment:read" } }, @@ -1157,12 +1130,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update action run status" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["action_runs_write"] }], "summary": "Update the status of an action run", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["action_runs_write"]], "x-oauth-scope": "environment:write" } }, @@ -1202,12 +1174,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get action run logs" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["action_runs_read"] }], "summary": "Get the logs of an action run", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:read", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["action_runs_read"]], "x-oauth-scope": "environment:read" } }, @@ -1232,8 +1203,8 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", - "schema": { "example": "true", "type": "string" } + "description": "Boolean string, true or false", + "schema": { "example": true, "type": "boolean" } } ], "responses": { @@ -1252,12 +1223,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["api_gateway_keys_read"] }], "summary": "Get project api keys", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:read", "position": "after" }], "x-endpoint-owners": ["auth", "management-api"], - "x-fga-permissions": [["api_gateway_keys_read"]], "x-oauth-scope": "secrets:read" }, "post": { @@ -1280,8 +1250,8 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", - "schema": { "example": "true", "type": "string" } + "description": "Boolean string, true or false", + "schema": { "example": true, "type": "boolean" } } ], "requestBody": { @@ -1301,12 +1271,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["api_gateway_keys_write"] }], "summary": "Creates a new API key for the project", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth", "management-api"], - "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -1341,12 +1310,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["api_gateway_keys_read"] }], "summary": "Check whether JWT based legacy (anon, service_role) API keys are enabled. This API endpoint will be removed in the future, check for HTTP 404 Not Found.", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:read", "position": "after" }], "x-endpoint-owners": ["auth", "management-api"], - "x-fga-permissions": [["api_gateway_keys_read"]], "x-oauth-scope": "secrets:read" }, "put": { @@ -1369,8 +1337,8 @@ "name": "enabled", "required": true, "in": "query", - "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", - "schema": { "example": "true", "type": "string" } + "description": "Boolean string, true or false", + "schema": { "example": true, "type": "boolean" } } ], "responses": { @@ -1386,12 +1354,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["api_gateway_keys_write"] }], "summary": "Disable or re-enable JWT based legacy (anon, service_role) API keys. This API endpoint will be removed in the future, check for HTTP 404 Not Found.", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth", "management-api"], - "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -1418,7 +1385,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "22222222-2222-4222-8222-222222222222", "type": "string" } @@ -1427,8 +1393,8 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", - "schema": { "example": "true", "type": "string" } + "description": "Boolean string, true or false", + "schema": { "example": true, "type": "boolean" } } ], "requestBody": { @@ -1448,12 +1414,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["api_gateway_keys_write"] }], "summary": "Updates an API key for the project", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth", "management-api"], - "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" }, "get": { @@ -1478,7 +1443,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "22222222-2222-4222-8222-222222222222", "type": "string" } @@ -1487,8 +1451,8 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", - "schema": { "example": "true", "type": "string" } + "description": "Boolean string, true or false", + "schema": { "example": true, "type": "boolean" } } ], "responses": { @@ -1502,12 +1466,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["api_gateway_keys_read"] }], "summary": "Get API key", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:read", "position": "after" }], "x-endpoint-owners": ["auth", "management-api"], - "x-fga-permissions": [["api_gateway_keys_read"]], "x-oauth-scope": "secrets:read" }, "delete": { @@ -1532,7 +1495,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "22222222-2222-4222-8222-222222222222", "type": "string" } @@ -1542,14 +1504,14 @@ "required": false, "in": "query", "description": "Boolean string, true or false", - "schema": { "example": true, "type": "string" } + "schema": { "example": true, "type": "boolean" } }, { "name": "was_compromised", "required": false, "in": "query", "description": "Boolean string, true or false", - "schema": { "example": false, "type": "string" } + "schema": { "example": false, "type": "boolean" } }, { "name": "reason", @@ -1569,12 +1531,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["api_gateway_keys_write"] }], "summary": "Deletes an API key for the project", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth", "management-api"], - "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -1611,12 +1572,15 @@ }, "500": { "description": "Failed to retrieve database branches" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["branching_production_read"] }, + { "fga_permissions": ["branching_development_read"] } + ], "summary": "List all database branches", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:read", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_read"], ["branching_production_read"]], "x-oauth-scope": "environment:read" }, "post": { @@ -1652,12 +1616,15 @@ }, "500": { "description": "Failed to create database branch" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["branching_production_create"] }, + { "fga_permissions": ["branching_development_create"] } + ], "summary": "Create a database branch", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_create"], ["branching_production_create"]], "x-oauth-scope": "environment:write" }, "delete": { @@ -1685,12 +1652,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to disable preview branching" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["branching_production_delete"] }], "summary": "Disables preview branching", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_production_delete"]], "x-oauth-scope": "environment:write" } }, @@ -1728,12 +1694,15 @@ }, "500": { "description": "Failed to fetch database branch" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["branching_production_read"] }, + { "fga_permissions": ["branching_development_read"] } + ], "summary": "Get a database branch", "tags": ["Environments"], "x-badges": [{ "name": "OAuth scope: environment:read", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_read"], ["branching_production_read"]], "x-oauth-scope": "environment:read" } }, @@ -1769,12 +1738,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's custom hostname config" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["custom_domain_read"] }], "summary": "[Beta] Gets project's custom hostname config", "tags": ["Domains"], "x-badges": [{ "name": "OAuth scope: domains:read", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["custom_domain_read"]], "x-oauth-scope": "domains:read" }, "delete": { @@ -1798,7 +1766,7 @@ "required": false, "in": "query", "description": "If true, also removes the custom domain add-on from the project subscription.", - "schema": { "type": "string" } + "schema": { "default": "false", "type": "boolean" } } ], "responses": { @@ -1808,12 +1776,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to delete project custom hostname configuration" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["custom_domain_write"] }], "summary": "[Beta] Deletes a project's custom hostname configuration", "tags": ["Domains"], "x-badges": [{ "name": "OAuth scope: domains:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -1857,12 +1824,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project custom hostname configuration" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["custom_domain_write"] }], "summary": "[Beta] Updates project's custom hostname configuration", "tags": ["Domains"], "x-badges": [{ "name": "OAuth scope: domains:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -1898,12 +1864,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to verify project custom hostname configuration" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["custom_domain_write"] }], "summary": "[Beta] Attempts to verify the DNS configuration for project's custom hostname configuration", "tags": ["Domains"], "x-badges": [{ "name": "OAuth scope: domains:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -1939,12 +1904,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to activate project custom hostname configuration" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["custom_domain_write"] }], "summary": "[Beta] Activates a custom hostname for a project.", "tags": ["Domains"], "x-badges": [{ "name": "OAuth scope: domains:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -1970,38 +1934,7 @@ "200": { "description": "", "content": { - "application/json": { - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - { - "type": "object", - "properties": { - "state": { "type": "string", "enum": ["enabled", "disabled"] }, - "appliedSuccessfully": { "type": "boolean" } - }, - "required": ["state"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "state": { "type": "string", "const": "unavailable" }, - "unavailableReason": { - "type": "string", - "enum": [ - "postgres_upgrade_required", - "ssl_enforcement_required", - "temporarily_unavailable" - ] - } - }, - "required": ["state", "unavailableReason"], - "additionalProperties": false - } - ] - } - } + "application/json": { "schema": { "$ref": "#/components/schemas/JitStateResponse" } } } }, "401": { "description": "Unauthorized" }, @@ -2009,12 +1942,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's temporary access configuration." } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_read"] }], "summary": "[Beta] Get project's temporary access configuration.", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["security", "management-api"], - "x-fga-permissions": [["project_admin_read"]], "x-oauth-scope": "database:read" }, "put": { @@ -2046,38 +1978,7 @@ "200": { "description": "", "content": { - "application/json": { - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - { - "type": "object", - "properties": { - "state": { "type": "string", "enum": ["enabled", "disabled"] }, - "appliedSuccessfully": { "type": "boolean" } - }, - "required": ["state"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "state": { "type": "string", "const": "unavailable" }, - "unavailableReason": { - "type": "string", - "enum": [ - "postgres_upgrade_required", - "ssl_enforcement_required", - "temporarily_unavailable" - ] - } - }, - "required": ["state", "unavailableReason"], - "additionalProperties": false - } - ] - } - } + "application/json": { "schema": { "$ref": "#/components/schemas/JitStateResponse" } } } }, "401": { "description": "Unauthorized" }, @@ -2085,12 +1986,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's temporary access configuration." } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], "summary": "[Beta] Update project's temporary access configuration.", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["security", "management-api"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "database:write" } }, @@ -2126,12 +2026,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's network bans" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_network_bans_read"] }], "summary": "[Beta] Gets project's network bans", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["database_network_bans_read"]], "x-oauth-scope": "projects:read" } }, @@ -2167,12 +2066,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's enriched network bans" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_network_bans_read"] }], "summary": "[Beta] Gets project's network bans with additional information about which databases they affect", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["database_network_bans_read"]], "x-oauth-scope": "projects:read" } }, @@ -2209,12 +2107,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to remove network bans." } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_network_bans_write"] }], "summary": "[Beta] Remove network bans.", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["database_network_bans_write"]], "x-oauth-scope": "projects:write" } }, @@ -2250,12 +2147,14 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's network restrictions" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["database_network_restrictions_read"] } + ], "summary": "[Beta] Gets project's network restrictions", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_network_restrictions_read"]], "x-oauth-scope": "projects:read" }, "patch": { @@ -2297,12 +2196,14 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project network restrictions" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["database_network_restrictions_write"] } + ], "summary": "[Alpha] Updates project's network restrictions by adding or removing CIDRs", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_network_restrictions_write"]], "x-oauth-scope": "projects:write" } }, @@ -2346,12 +2247,14 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project network restrictions" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["database_network_restrictions_write"] } + ], "summary": "[Beta] Updates project's network restrictions", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_network_restrictions_write"]], "x-oauth-scope": "projects:write" } }, @@ -2387,12 +2290,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's pgsodium config" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], "summary": "[Beta] Gets project's pgsodium config", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:read", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "secrets:read" }, "put": { @@ -2434,12 +2336,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's pgsodium config" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], "summary": "[Beta] Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "secrets:write" } }, @@ -2475,12 +2376,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's postgrest config" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["data_api_config_read"] }], "summary": "Gets project's postgrest config", "tags": ["Rest"], "x-badges": [{ "name": "OAuth scope: rest:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["data_api_config_read"]], "x-oauth-scope": "rest:read" }, "patch": { @@ -2522,12 +2422,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's postgrest config" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["data_api_config_write"] }], "summary": "Updates project's postgrest config", "tags": ["Rest"], "x-badges": [{ "name": "OAuth scope: rest:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["data_api_config_write"]], "x-oauth-scope": "rest:write" } }, @@ -2563,12 +2462,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_read"] }], "summary": "Gets a specific project that belongs to the authenticated user", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["project_admin_read"]], "x-oauth-scope": "projects:read" }, "delete": { @@ -2601,12 +2499,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], "summary": "Deletes the given project", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra", "dev-workflows"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" }, "patch": { @@ -2646,12 +2543,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], "summary": "Updates the given project", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -2691,12 +2587,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's secrets" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_secrets_read"] }], "summary": "List all secrets", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:read", "position": "after" }], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_secrets_read"]], "x-oauth-scope": "secrets:read" }, "post": { @@ -2730,12 +2625,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to create project's secrets" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_secrets_write"] }], "summary": "Bulk create secrets", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_secrets_write"]], "x-oauth-scope": "secrets:write" }, "delete": { @@ -2769,12 +2663,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to delete secrets with given names" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_secrets_write"] }], "summary": "Bulk delete secrets", "tags": ["Secrets"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_secrets_write"]], "x-oauth-scope": "secrets:write" } }, @@ -2810,12 +2703,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's SSL enforcement config" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_ssl_config_read"] }], "summary": "[Beta] Get project's SSL enforcement configuration.", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_ssl_config_read"]], "x-oauth-scope": "database:read" }, "put": { @@ -2857,12 +2749,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's SSL enforcement configuration." } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_ssl_config_write"] }], "summary": "[Beta] Update project's SSL enforcement configuration.", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_ssl_config_write"]], "x-oauth-scope": "database:write" } }, @@ -2905,12 +2796,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to generate TypeScript types" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_read"] }], "summary": "Generate TypeScript types", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["database_read"]], "x-oauth-scope": "database:read" } }, @@ -2942,17 +2832,14 @@ } }, "400": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan.", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/PlanGateErrorBody" } } - } + "description": "This feature requires the Pro, Team, or Enterprise organization plan." }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get project vanity subdomain configuration" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["vanity_subdomain_read"] }], "summary": "[Beta] Gets current vanity subdomain config", "tags": ["Domains"], "x-allowed-plans": ["Pro", "Team", "Enterprise"], @@ -2961,7 +2848,6 @@ { "name": "Only available on Pro, Team, Enterprise", "position": "before" } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["vanity_subdomain_read"]], "x-oauth-scope": "domains:read" }, "delete": { @@ -2988,12 +2874,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to delete project vanity subdomain configuration" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["vanity_subdomain_write"] }], "summary": "[Beta] Deletes a project's vanity subdomain configuration", "tags": ["Domains"], "x-badges": [{ "name": "OAuth scope: domains:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["vanity_subdomain_write"]], "x-oauth-scope": "domains:write" } }, @@ -3031,17 +2916,14 @@ } }, "400": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan.", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/PlanGateErrorBody" } } - } + "description": "This feature requires the Pro, Team, or Enterprise organization plan." }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to check project vanity subdomain configuration" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["vanity_subdomain_write"] }], "summary": "[Beta] Checks vanity subdomain availability", "tags": ["Domains"], "x-allowed-plans": ["Pro", "Team", "Enterprise"], @@ -3050,7 +2932,6 @@ { "name": "Only available on Pro, Team, Enterprise", "position": "before" } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["vanity_subdomain_write"]], "x-oauth-scope": "domains:write" } }, @@ -3088,17 +2969,14 @@ } }, "400": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan.", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/PlanGateErrorBody" } } - } + "description": "This feature requires the Pro, Team, or Enterprise organization plan." }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to activate project vanity subdomain configuration" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["vanity_subdomain_write"] }], "summary": "[Beta] Activates a vanity subdomain for a project.", "tags": ["Domains"], "x-allowed-plans": ["Pro", "Team", "Enterprise"], @@ -3107,7 +2985,6 @@ { "name": "Only available on Pro, Team, Enterprise", "position": "before" } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["vanity_subdomain_write"]], "x-oauth-scope": "domains:write" } }, @@ -3149,12 +3026,14 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to initiate project upgrade" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["project_admin_write", "database_write"] } + ], "summary": "[Beta] Upgrades the project's Postgres version", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["project_admin_write", "database_write"]], "x-oauth-scope": "projects:write" } }, @@ -3190,12 +3069,14 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to determine project upgrade eligibility" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["project_admin_read", "database_read"] } + ], "summary": "[Beta] Returns the project's eligibility for upgrades", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["project_admin_read", "database_read"]], "x-oauth-scope": "projects:read" } }, @@ -3237,12 +3118,14 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project upgrade status" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["project_admin_read", "database_read"] } + ], "summary": "[Beta] Gets the latest status of the project's upgrade", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["project_admin_read", "database_read"]], "x-oauth-scope": "projects:read" } }, @@ -3278,12 +3161,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get project readonly mode status" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_readonly_config_read"] }], "summary": "Returns project's readonly mode status", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra", "support-tooling"], - "x-fga-permissions": [["database_readonly_config_read"]], "x-oauth-scope": "database:read" } }, @@ -3312,12 +3194,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to disable project's readonly mode" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_readonly_config_write"] }], "summary": "Disables project's readonly mode for the next 15 minutes", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra", "support-tooling"], - "x-fga-permissions": [["database_readonly_config_write"]], "x-oauth-scope": "database:write" } }, @@ -3351,22 +3232,18 @@ "204": { "description": "" }, "401": { "description": "Unauthorized" }, "402": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan.", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/PlanGateErrorBody" } } - } + "description": "This feature requires the Pro, Team, or Enterprise organization plan." }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to set up read replica" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["infra_read_replicas_write"] }], "summary": "[Beta] Set up a read replica", "tags": ["Database"], "x-allowed-plans": ["Pro", "Team", "Enterprise"], "x-badges": [{ "name": "Only available on Pro, Team, Enterprise", "position": "before" }], - "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["infra_read_replicas_write"]] + "x-endpoint-owners": ["management-api", "infra"] } }, "/v1/projects/{ref}/read-replicas/remove": { @@ -3402,11 +3279,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to remove read replica" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["infra_read_replicas_write"] }], "summary": "[Beta] Remove a read replica", "tags": ["Database"], - "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["infra_read_replicas_write"]] + "x-endpoint-owners": ["management-api", "infra"] } }, "/v1/projects/{ref}/health": { @@ -3430,34 +3306,22 @@ "name": "services", "required": true, "in": "query", - "description": "Comma-separated list of enums or array of enums.", "schema": { - "example": ["auth,db", "auth"], - "anyOf": [ - { - "type": "string", - "description": "Comma-separated list of enums:\n\n- `auth`\n- `db`\n- `db_postgres_user`\n- `pooler`\n- `realtime`\n- `rest`\n- `storage`\n- `pg_bouncer`", - "example": ["auth,db", "auth"] - }, - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "auth", - "db", - "db_postgres_user", - "pooler", - "realtime", - "rest", - "storage", - "pg_bouncer" - ] - }, - "description": "Array of enums.", - "example": ["{field}=auth&{field}=db", "{field}=auth"] - } - ] + "example": ["auth", "rest"], + "type": "array", + "items": { + "type": "string", + "enum": [ + "auth", + "db", + "db_postgres_user", + "pooler", + "realtime", + "rest", + "storage", + "pg_bouncer" + ] + } } }, { @@ -3484,12 +3348,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's service health status" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_read"] }], "summary": "Gets project's service health status", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["project_admin_read"]], "x-oauth-scope": "projects:read" } }, @@ -3524,12 +3387,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_signing_keys_write"] }], "summary": "Set up the project's existing JWT secret as an in_use JWT signing key. This endpoint will be removed in the future always check for HTTP 404 Not Found.", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" }, "get": { @@ -3562,12 +3424,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_signing_keys_read"] }], "summary": "Get the signing key information for the JWT secret imported as signing key for this project. This endpoint will be removed in the future, check for HTTP 404 Not Found.", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: secrets:read", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_signing_keys_read"]], "x-oauth-scope": "secrets:read" } }, @@ -3610,12 +3471,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_signing_keys_write"] }], "summary": "Create a new signing key for the project in standby status", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" }, "get": { @@ -3648,12 +3508,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_signing_keys_read"] }], "summary": "List all signing keys for the project", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: secrets:read", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_signing_keys_read"]], "x-oauth-scope": "secrets:read" } }, @@ -3667,7 +3526,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "33333333-3333-4333-8333-333333333333", "type": "string" } @@ -3699,11 +3557,10 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_signing_keys_read"] }], "summary": "Get information about a signing key", "tags": ["Auth"], - "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_signing_keys_read"]] + "x-endpoint-owners": ["auth"] }, "delete": { "operationId": "v1-remove-project-signing-key", @@ -3714,7 +3571,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "33333333-3333-4333-8333-333333333333", "type": "string" } @@ -3746,12 +3602,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_signing_keys_write"] }], "summary": "Remove a signing key from a project. Only possible if the key has been in revoked status for a while.", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" }, "patch": { @@ -3763,7 +3618,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "33333333-3333-4333-8333-333333333333", "type": "string" } @@ -3803,12 +3657,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_signing_keys_write"] }], "summary": "Update a signing key, mainly its status", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: secrets:write", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -3844,12 +3697,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's auth config" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_read"] }], "summary": "Gets project's auth config", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:read", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" }, "patch": { @@ -3891,12 +3743,14 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's auth config" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["auth_config_write", "project_admin_write"] } + ], "summary": "Updates a project's auth config", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:write", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_write", "project_admin_write"]], "x-oauth-scope": "auth:write" } }, @@ -3937,12 +3791,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_write"] }], "summary": "Creates a new third-party auth integration", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:write", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" }, "get": { @@ -3978,12 +3831,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_read"] }], "summary": "Lists all third-party auth integrations", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:read", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" } }, @@ -4010,7 +3862,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "88888888-8888-4888-8888-888888888888", "type": "string" } @@ -4027,12 +3878,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_write"] }], "summary": "Removes a third-party auth integration", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:write", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" }, "get": { @@ -4057,7 +3907,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "88888888-8888-4888-8888-888888888888", "type": "string" } @@ -4074,12 +3923,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_read"] }], "summary": "Get a third-party integration", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:read", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" } }, @@ -4107,12 +3955,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], "summary": "Pauses the given project", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -4140,12 +3987,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], "summary": "Restarts the given project", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -4182,12 +4028,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_read"] }], "summary": "Lists available restore versions for the given project", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["project_admin_read"]], "x-oauth-scope": "projects:read" }, "post": { @@ -4213,12 +4058,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], "summary": "Restores the given project", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -4246,12 +4090,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], "summary": "Cancels the given project restoration", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -4288,11 +4131,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to list project addons" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["infra_add_ons_read"] }], "summary": "List billing addons and compute instance selections", "tags": ["Billing"], - "x-endpoint-owners": ["billing"], - "x-fga-permissions": [["infra_add_ons_read"]] + "x-endpoint-owners": ["billing"] }, "patch": { "description": "Selects an addon variant, for example scaling the project’s compute instance up or down, and applies it to the project.", @@ -4327,11 +4169,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to apply project addon" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["infra_add_ons_write"] }], "summary": "Apply or update billing addons, including compute instance size", "tags": ["Billing"], - "x-endpoint-owners": ["billing"], - "x-fga-permissions": [["infra_add_ons_write"]] + "x-endpoint-owners": ["billing"] } }, "/v1/projects/{ref}/billing/addons/{addon_variant}": { @@ -4358,7 +4199,7 @@ "in": "path", "schema": { "example": "pitr_7", - "anyOf": [ + "oneOf": [ { "type": "string", "enum": [ @@ -4396,11 +4237,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to remove project addon" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["infra_add_ons_write"] }], "summary": "Remove billing addons or revert compute instance sizing", "tags": ["Billing"], - "x-endpoint-owners": ["billing"], - "x-fga-permissions": [["infra_add_ons_write"]] + "x-endpoint-owners": ["billing"] } }, "/v1/projects/{ref}/claim-token": { @@ -4434,11 +4274,10 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_read"] }], "summary": "Gets project claim token", "tags": ["Projects"], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["project_admin_read"]], "x-internal": true }, "post": { @@ -4471,11 +4310,13 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["organization_admin_write", "project_admin_write"] } + ], "summary": "Creates project claim token", "tags": ["Projects"], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_write", "project_admin_write"]], "x-internal": true }, "delete": { @@ -4501,11 +4342,13 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["organization_admin_write", "project_admin_write"] } + ], "summary": "Revokes project claim token", "tags": ["Projects"], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_write", "project_admin_write"]], "x-internal": true } }, @@ -4542,12 +4385,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["advisors_read"] }], "summary": "Gets project performance advisors.", "tags": ["Advisors"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["advisors_read"]], "x-oauth-scope": "database:read" } }, @@ -4590,12 +4432,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["advisors_read"] }], "summary": "Gets project security advisors.", "tags": ["Advisors"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["advisors_read"]], "x-oauth-scope": "database:read" } }, @@ -4623,32 +4464,19 @@ "required": false, "in": "query", "description": "Custom SQL query to execute on the logs. See [querying logs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer) for more details.", - "schema": { - "example": "select event_message from edge_logs limit 10", - "type": "string" - } + "schema": { "type": "string" } }, { "name": "iso_timestamp_start", "required": false, "in": "query", - "schema": { - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "example": "2025-03-01T00:00:00Z", - "type": "string" - } + "schema": { "format": "date-time", "example": "2025-03-01T00:00:00Z", "type": "string" } }, { "name": "iso_timestamp_end", "required": false, "in": "query", - "schema": { - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "example": "2025-03-01T23:59:59Z", - "type": "string" - } + "schema": { "format": "date-time", "example": "2025-03-01T23:59:59Z", "type": "string" } } ], "responses": { @@ -4663,12 +4491,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_logs_read"] }], "summary": "Gets project's logs", "tags": ["Analytics"], "x-badges": [{ "name": "OAuth scope: analytics:read", "position": "after" }], "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_logs_read"]], "x-oauth-scope": "analytics:read" } }, @@ -4696,32 +4523,19 @@ "required": false, "in": "query", "description": "Custom SQL query to execute on the logs. See [querying logs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer) for more details.", - "schema": { - "example": "select event_message from edge_logs limit 10", - "type": "string" - } + "schema": { "type": "string" } }, { "name": "iso_timestamp_start", "required": false, "in": "query", - "schema": { - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "example": "2025-03-01T00:00:00Z", - "type": "string" - } + "schema": { "format": "date-time", "example": "2025-03-01T00:00:00Z", "type": "string" } }, { "name": "iso_timestamp_end", "required": false, "in": "query", - "schema": { - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "example": "2025-03-01T23:59:59Z", - "type": "string" - } + "schema": { "format": "date-time", "example": "2025-03-01T23:59:59Z", "type": "string" } } ], "responses": { @@ -4736,12 +4550,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_logs_read"] }], "summary": "Gets all project's logs in a single log stream", "tags": ["Analytics"], "x-badges": [{ "name": "OAuth scope: analytics:read", "position": "after" }], "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_logs_read"]], "x-oauth-scope": "analytics:read" } }, @@ -4787,11 +4600,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get project's usage api counts" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_usage_read"] }], "summary": "Gets project's usage api counts", "tags": ["Analytics"], - "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_usage_read"]] + "x-endpoint-owners": ["analytics"] } }, "/v1/projects/{ref}/analytics/endpoints/usage.api-requests-count": { @@ -4826,11 +4638,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get project's usage api requests count" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_usage_read"] }], "summary": "Gets project's usage api requests count", "tags": ["Analytics"], - "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_usage_read"]] + "x-endpoint-owners": ["analytics"] } }, "/v1/projects/{ref}/analytics/endpoints/functions.combined-stats": { @@ -4879,52 +4690,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get project's function combined statistics" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_usage_read"] }], "summary": "Gets a project's function combined statistics", "tags": ["Analytics"], - "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_usage_read"]] - } - }, - "/v1/projects/{ref}/analytics/endpoints/metrics": { - "get": { - "description": "Prometheus scrape endpoint. Returns metrics of a customer project in the Prometheus open exposition format.", - "operationId": "v1-scrape-project-metrics", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Prometheus / OpenMetrics text exposition", - "content": { - "text/plain": { "schema": { "type": "string" } }, - "application/openmetrics-text": { "schema": { "type": "string" } } - } - }, - "401": { "description": "Unauthorized" }, - "403": { "description": "Forbidden action" }, - "429": { "description": "Rate limit exceeded" }, - "500": { "description": "Failed to fetch project's metrics" } - }, - "security": [{ "bearer": [] }], - "summary": "Scrape a project's metrics", - "tags": ["Analytics"], - "x-badges": [{ "name": "OAuth scope: analytics:read", "position": "after" }], - "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_logs_read"]], - "x-oauth-scope": "analytics:read" + "x-endpoint-owners": ["analytics"] } }, "/v1/projects/{ref}/cli/login-role": { @@ -4965,12 +4734,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to create login role" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_write"] }], "summary": "[Beta] Create a login role for CLI with temporary password", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["database_write"]], "x-oauth-scope": "database:write" }, "delete": { @@ -5004,17 +4772,17 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to delete login roles" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_write"] }], "summary": "[Beta] Delete existing login roles used by CLI", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["database_write"]], "x-oauth-scope": "database:write" } }, "/v1/projects/{ref}/database/migrations": { "get": { + "description": "Only available to selected partner OAuth apps", "operationId": "v1-list-migration-history", "parameters": [ { @@ -5045,15 +4813,15 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to list database migrations" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_migrations_read"] }], "summary": "List applied migration versions", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_migrations_read"]], "x-oauth-scope": "database:read" }, "post": { + "description": "Only available to selected partner OAuth apps", "operationId": "v1-apply-a-migration", "parameters": [ { @@ -5092,15 +4860,15 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to apply database migration" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_migrations_write"] }], "summary": "Apply a database migration", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_migrations_write"]], "x-oauth-scope": "database:write" }, "put": { + "description": "Only available to selected partner OAuth apps", "operationId": "v1-upsert-a-migration", "parameters": [ { @@ -5139,15 +4907,15 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to upsert database migration" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_migrations_write"] }], "summary": "Upsert a database migration without applying", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_migrations_write"]], "x-oauth-scope": "database:write" }, "delete": { + "description": "Only available to selected partner OAuth apps", "operationId": "v1-rollback-migrations", "parameters": [ { @@ -5178,17 +4946,17 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to rollback database migration" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_migrations_write"] }], "summary": "Rollback database migrations and remove them from history table", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_migrations_write"]], "x-oauth-scope": "database:write" } }, "/v1/projects/{ref}/database/migrations/{version}": { "get": { + "description": "Only available to selected partner OAuth apps", "operationId": "v1-get-a-migration", "parameters": [ { @@ -5225,15 +4993,15 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get database migration" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_migrations_read"] }], "summary": "Fetch an existing entry from migration history", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_migrations_read"]], "x-oauth-scope": "database:read" }, "patch": { + "description": "Only available to selected partner OAuth apps", "operationId": "v1-patch-a-migration", "parameters": [ { @@ -5271,12 +5039,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to patch database migration" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_migrations_write"] }], "summary": "Patch an existing entry in migration history", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_migrations_write"]], "x-oauth-scope": "database:write" } }, @@ -5311,12 +5078,15 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to run sql query" } }, - "security": [{ "bearer": [] }], + "security": [ + { "bearer": [] }, + { "fga_permissions": ["database_write"] }, + { "fga_permissions": ["database_read"] } + ], "summary": "[Beta] Run sql query", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["database_read"], ["database_write"]], "x-oauth-scope": "database:write" } }, @@ -5352,12 +5122,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to run read-only sql query" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_read"] }], "summary": "[Beta] Run a sql query as supabase_read_only_user", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["database_read"]], "x-oauth-scope": "database:read" } }, @@ -5386,12 +5155,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to enable Database Webhooks on the project" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_webhooks_config_write"] }], "summary": "[Beta] Enables Database Webhooks on the project", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["database_webhooks_config_write"]], "x-oauth-scope": "database:write" } }, @@ -5428,12 +5196,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_read"] }], "summary": "Gets database metadata for the given project.", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["database_read"]], "x-oauth-scope": "projects:read" } }, @@ -5477,12 +5244,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update database password" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_config_write"] }], "summary": "Updates the database password", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["database_config_write"]], "x-oauth-scope": "database:write" } }, @@ -5517,12 +5283,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to list database jit access" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_jit_read"] }], "summary": "Get user-id to role mappings for JIT access", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["security"], - "x-fga-permissions": [["database_jit_read"]], "x-oauth-scope": "database:read" }, "post": { @@ -5565,12 +5330,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to authorize database jit access" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_jit_read"] }], "summary": "Authorize user-id to role mappings for JIT access", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["security"], - "x-fga-permissions": [["database_jit_read"]], "x-oauth-scope": "database:read" }, "put": { @@ -5609,11 +5373,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update JIT access" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_jit_write"] }], "summary": "Updates a user mapping for JIT access", "tags": ["Database"], - "x-endpoint-owners": ["security"], - "x-fga-permissions": [["database_jit_write"]] + "x-endpoint-owners": ["security"] } }, "/v1/projects/{ref}/database/jit/list": { @@ -5649,11 +5412,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to list database jit access" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_jit_read"] }], "summary": "List all user-id to role mappings for JIT access", "tags": ["Database"], - "x-endpoint-owners": ["security"], - "x-fga-permissions": [["database_jit_write"]] + "x-endpoint-owners": ["security"] } }, "/v1/projects/{ref}/database/jit/invite": { @@ -5697,11 +5459,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to invite external user" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_jit_write"] }], "summary": "Invites an external user to a database for JIT access", "tags": ["Database"], - "x-endpoint-owners": ["security"], - "x-fga-permissions": [["database_jit_write"]] + "x-endpoint-owners": ["security"] } }, "/v1/projects/{ref}/database/jit/invite/accept": { @@ -5770,7 +5531,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "55555555-5555-4555-8555-555555555555", "type": "string" } @@ -5783,11 +5543,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to revoke invite for external user" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_jit_write"] }], "summary": "Deletes the invite for an external user to a database for JIT access", "tags": ["Database"], - "x-endpoint-owners": ["security"], - "x-fga-permissions": [["database_jit_write"]] + "x-endpoint-owners": ["security"] } }, "/v1/projects/{ref}/database/jit/{user_id}": { @@ -5814,7 +5573,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "55555555-5555-4555-8555-555555555555", "type": "string" } @@ -5827,11 +5585,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to remove JIT access" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_jit_write"] }], "summary": "Delete JIT access by user-id", "tags": ["Database"], - "x-endpoint-owners": ["security"], - "x-fga-permissions": [["database_jit_write"]] + "x-endpoint-owners": ["security"] } }, "/v1/projects/{ref}/database/openapi": { @@ -5870,12 +5627,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to fetch PostgREST OpenAPI spec" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_read"] }], "summary": "Get PostgREST OpenAPI spec", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["database_read"]], "x-oauth-scope": "database:read" } }, @@ -5915,12 +5671,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's functions" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_read"] }], "summary": "List all functions", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:read", "position": "after" }], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_read"]], "x-oauth-scope": "edge_functions:read" }, "post": { @@ -5957,13 +5712,15 @@ "name": "verify_jwt", "required": false, "in": "query", - "schema": { "example": true, "type": "string" } + "description": "Boolean string, true or false", + "schema": { "example": true, "type": "boolean" } }, { "name": "import_map", "required": false, "in": "query", - "schema": { "example": false, "type": "string" } + "description": "Boolean string, true or false", + "schema": { "example": false, "type": "boolean" } }, { "name": "entrypoint_path", @@ -6011,12 +5768,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to create project's function" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_write"] }], "summary": "Create a function", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:write", "position": "after" }], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" }, "put": { @@ -6060,12 +5816,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update functions" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_write"] }], "summary": "Bulk update functions", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:write", "position": "after" }], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" } }, @@ -6101,7 +5856,8 @@ "name": "bundleOnly", "required": false, "in": "query", - "schema": { "example": false, "type": "string" } + "description": "Boolean string, true or false", + "schema": { "example": false, "type": "boolean" } } ], "requestBody": { @@ -6127,12 +5883,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to deploy function" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_write"] }], "summary": "Deploy a function", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:write", "position": "after" }], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" } }, @@ -6176,12 +5931,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve function with given slug" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_read"] }], "summary": "Retrieve a function", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:read", "position": "after" }], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_read"]], "x-oauth-scope": "edge_functions:read" }, "patch": { @@ -6224,13 +5978,15 @@ "name": "verify_jwt", "required": false, "in": "query", - "schema": { "example": true, "type": "string" } + "description": "Boolean string, true or false", + "schema": { "example": true, "type": "boolean" } }, { "name": "import_map", "required": false, "in": "query", - "schema": { "example": false, "type": "string" } + "description": "Boolean string, true or false", + "schema": { "example": false, "type": "boolean" } }, { "name": "entrypoint_path", @@ -6277,12 +6033,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update function with given slug" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_write"] }], "summary": "Update a function", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:write", "position": "after" }], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" }, "delete": { @@ -6317,12 +6072,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to delete function with given slug" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_write"] }], "summary": "Delete a function", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:write", "position": "after" }], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" } }, @@ -6364,12 +6118,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve function body with given slug" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["edge_functions_read"] }], "summary": "Retrieve a function body", "tags": ["Edge Functions"], "x-badges": [{ "name": "OAuth scope: edge_functions:read", "position": "after" }], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_read"]], "x-oauth-scope": "edge_functions:read" } }, @@ -6408,12 +6161,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get list of buckets" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["storage_read"] }], "summary": "Lists all buckets", "tags": ["Storage"], "x-badges": [{ "name": "OAuth scope: storage:read", "position": "after" }], "x-endpoint-owners": ["storage"], - "x-fga-permissions": [["storage_read"]], "x-oauth-scope": "storage:read" } }, @@ -6447,11 +6199,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get database disk attributes" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["infra_disk_config_read"] }], "summary": "Get database disk attributes", "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["infra_disk_config_read"]] + "x-endpoint-owners": ["management-api", "infra"] }, "post": { "operationId": "v1-modify-database-disk", @@ -6483,11 +6234,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to modify database disk" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["infra_disk_config_write"] }], "summary": "Modify database disk", "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["infra_disk_config_write"]] + "x-endpoint-owners": ["management-api", "infra"] } }, "/v1/projects/{ref}/config/disk/util": { @@ -6522,11 +6272,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get disk utilization" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["infra_disk_config_read"] }], "summary": "Get disk utilization", "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["infra_disk_config_read"]] + "x-endpoint-owners": ["management-api", "infra"] } }, "/v1/projects/{ref}/config/disk/autoscale": { @@ -6561,11 +6310,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get project disk autoscale config" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["infra_disk_config_read"] }], "summary": "Gets project disk autoscale config", "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["infra_disk_config_read"]] + "x-endpoint-owners": ["management-api", "infra"] } }, "/v1/projects/{ref}/config/storage": { @@ -6600,11 +6348,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's storage config" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["storage_config_read"] }], "summary": "Gets project's storage config", "tags": ["Storage"], - "x-endpoint-owners": ["storage"], - "x-fga-permissions": [["storage_config_read"]] + "x-endpoint-owners": ["storage"] }, "patch": { "operationId": "v1-update-storage-config", @@ -6638,11 +6385,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's storage config" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["storage_config_write"] }], "summary": "Updates project's storage config", "tags": ["Storage"], - "x-endpoint-owners": ["storage"], - "x-fga-permissions": [["storage_config_write"]] + "x-endpoint-owners": ["storage"] } }, "/v1/projects/{ref}/config/database/pgbouncer": { @@ -6677,11 +6423,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's pgbouncer config" } }, + "security": [{ "fga_permissions": ["database_read"] }], "summary": "Get project's pgbouncer config", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_read"]], "x-oauth-scope": "database:read" } }, @@ -6720,12 +6466,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's supavisor config" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_pooling_config_read"] }], "summary": "Gets project's supavisor config", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_pooling_config_read"]], "x-oauth-scope": "database:read" }, "patch": { @@ -6767,12 +6512,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's supavisor config" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_pooling_config_write"] }], "summary": "Updates project's supavisor config", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_pooling_config_write"]], "x-oauth-scope": "database:write" } }, @@ -6808,12 +6552,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve project's Postgres config" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_config_read"] }], "summary": "Gets project's Postgres config", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_config_read"]], "x-oauth-scope": "database:read" }, "put": { @@ -6855,12 +6598,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update project's Postgres config" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["database_config_write"] }], "summary": "Updates project's Postgres config", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_config_write"]], "x-oauth-scope": "database:write" } }, @@ -6895,11 +6637,10 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["realtime_config_read"] }], "summary": "Gets realtime configuration", "tags": ["Realtime"], - "x-endpoint-owners": ["realtime"], - "x-fga-permissions": [["realtime_config_read"]] + "x-endpoint-owners": ["realtime"] }, "patch": { "operationId": "v1-update-realtime-config", @@ -6932,11 +6673,10 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["realtime_config_write"] }], "summary": "Updates realtime configuration", "tags": ["Realtime"], - "x-endpoint-owners": ["realtime"], - "x-fga-permissions": [["realtime_config_write"]] + "x-endpoint-owners": ["realtime"] } }, "/v1/projects/{ref}/config/realtime/shutdown": { @@ -6964,11 +6704,10 @@ "404": { "description": "Tenant not found" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["realtime_config_write"] }], "summary": "Shutdowns realtime connections for a project", "tags": ["Realtime"], - "x-endpoint-owners": ["realtime"], - "x-fga-permissions": [["realtime_config_write"]] + "x-endpoint-owners": ["realtime"] } }, "/v1/projects/{ref}/config/auth/sso/providers": { @@ -7009,12 +6748,11 @@ "404": { "description": "SAML 2.0 support is not enabled for this project" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_write"] }], "summary": "Creates a new SSO provider", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:write", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" }, "get": { @@ -7048,12 +6786,11 @@ "404": { "description": "SAML 2.0 support is not enabled for this project" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_read"] }], "summary": "Lists all SSO providers", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:read", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" } }, @@ -7080,7 +6817,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "77777777-7777-4777-8777-777777777777", "type": "string" } @@ -7102,12 +6838,11 @@ }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_read"] }], "summary": "Gets a SSO provider by its UUID", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:read", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" }, "put": { @@ -7132,7 +6867,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "77777777-7777-4777-8777-777777777777", "type": "string" } @@ -7160,12 +6894,11 @@ }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_write"] }], "summary": "Updates a SSO provider by its UUID", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:write", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" }, "delete": { @@ -7190,7 +6923,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "77777777-7777-4777-8777-777777777777", "type": "string" } @@ -7212,12 +6944,11 @@ }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["auth_config_write"] }], "summary": "Removes a SSO provider by its UUID", "tags": ["Auth"], "x-badges": [{ "name": "OAuth scope: auth:write", "position": "after" }], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" } }, @@ -7251,12 +6982,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get backups" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["backups_read"] }], "summary": "Lists all backups", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_read"]], "x-oauth-scope": "database:read" } }, @@ -7290,12 +7020,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["backups_write"] }], "summary": "Restores a PITR backup for a database", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_write"]], "x-oauth-scope": "database:write" } }, @@ -7338,12 +7067,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["backups_write"] }], "summary": "Initiates a creation of a restore point for a database", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_write"]], "x-internal": true, "x-oauth-scope": "database:write" }, @@ -7384,12 +7112,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to get requested restore points" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["backups_read"] }], "summary": "Get restore points for project", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:read", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_read"]], "x-internal": true, "x-oauth-scope": "database:read" } @@ -7424,12 +7151,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["backups_write"] }], "summary": "Restores a physical backup for a database", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_write"]], "x-internal": true, "x-oauth-scope": "database:write" } @@ -7462,18 +7188,13 @@ } }, "401": { "description": "Unauthorized" }, - "402": { - "description": "This feature requires the Enterprise organization plan.", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/PlanGateErrorBody" } } - } - }, + "402": { "description": "This feature requires the Enterprise organization plan." }, "403": { "description": "Forbidden action" }, "404": { "description": "Project or backup schedule not found" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve backup schedule" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["backups_read"] }], "summary": "Gets the backup schedule for a project", "tags": ["Database"], "x-allowed-plans": ["Enterprise"], @@ -7482,7 +7203,6 @@ { "name": "Only available on Enterprise", "position": "before" } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_read"]], "x-oauth-scope": "database:read" }, "patch": { @@ -7522,18 +7242,13 @@ }, "400": { "description": "Invalid schedule_for format" }, "401": { "description": "Unauthorized" }, - "402": { - "description": "This feature requires the Enterprise organization plan.", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/PlanGateErrorBody" } } - } - }, + "402": { "description": "This feature requires the Enterprise organization plan." }, "403": { "description": "Forbidden action" }, "404": { "description": "Project or backup schedule not found" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update backup schedule" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["backups_write"] }], "summary": "Updates the backup schedule time for a project", "tags": ["Database"], "x-allowed-plans": ["Enterprise"], @@ -7542,7 +7257,6 @@ { "name": "Only available on Enterprise", "position": "before" } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_write"]], "x-oauth-scope": "database:write" } }, @@ -7576,12 +7290,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["backups_write"] }], "summary": "Initiates an undo to a given restore point", "tags": ["Database"], "x-badges": [{ "name": "OAuth scope: database:write", "position": "after" }], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_write"]], "x-internal": true, "x-oauth-scope": "database:write" } @@ -7616,12 +7329,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["organization_admin_read"] }], "summary": "Get entitlements for an organization", "tags": ["Organizations"], "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }], "x-endpoint-owners": ["billing"], - "x-fga-permissions": [["organization_admin_read"]], "x-oauth-scope": "organizations:read" } }, @@ -7654,12 +7366,11 @@ } } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["members_read"] }], "summary": "List members of an organization", "tags": ["Organizations"], "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["members_read"]], "x-oauth-scope": "organizations:read" } }, @@ -7692,12 +7403,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["organization_admin_read"] }], "summary": "Gets information about the organization", "tags": ["Organizations"], "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_read"]], "x-oauth-scope": "organizations:read" } }, @@ -7736,11 +7446,10 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["organization_admin_write"] }], "summary": "Gets project details for the specified organization and claim token", "tags": ["Organizations"], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_write"]], "x-internal": true }, "post": { @@ -7770,11 +7479,10 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["organization_admin_write"] }], "summary": "Claims project for the specified organization", "tags": ["Organizations"], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_write"]], "x-internal": true } }, @@ -7799,13 +7507,7 @@ "required": false, "in": "query", "description": "Number of projects to skip", - "schema": { - "minimum": 0, - "maximum": 9007199254740991, - "default": 0, - "example": 0, - "type": "integer" - } + "schema": { "minimum": 0, "default": 0, "example": 0, "type": "integer" } }, { "name": "limit", @@ -7861,12 +7563,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve projects" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["organization_projects_read"] }], "summary": "Gets all projects for the given organization", "tags": ["Projects"], "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_projects_read"]], "x-oauth-scope": "projects:read" } } @@ -7928,12 +7629,7 @@ ] }, "db_host": { "type": "string" }, - "db_port": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 - }, + "db_port": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, "db_user": { "type": "string" }, "db_pass": { "type": "string" }, "jwt_secret": { "type": "string" } @@ -7954,9 +7650,9 @@ "branch_name": { "type": "string" }, "git_branch": { "type": "string" }, "reset_on_push": { + "type": "boolean", "description": "This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead.", - "deprecated": true, - "type": "boolean" + "deprecated": true }, "persistent": { "type": "boolean" }, "status": { @@ -7988,26 +7684,17 @@ "BranchResponse": { "type": "object", "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "project_ref": { "type": "string" }, "parent_project_ref": { "type": "string" }, "is_default": { "type": "boolean" }, "git_branch": { "type": "string" }, - "pr_number": { - "type": "integer", - "format": "int32", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, + "pr_number": { "type": "integer", "format": "int32" }, "latest_check_run_id": { + "type": "number", "description": "This field is deprecated and will not be populated.", - "deprecated": true, - "type": "number" + "deprecated": true }, "persistent": { "type": "boolean" }, "status": { @@ -8023,28 +7710,12 @@ "description": "This field is deprecated. List action runs to get branch status instead.", "deprecated": true }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" - }, - "review_requested_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" - }, + "created_at": { "type": "string", "format": "date-time" }, + "updated_at": { "type": "string", "format": "date-time" }, + "review_requested_at": { "type": "string", "format": "date-time" }, "with_data": { "type": "boolean" }, "notify_url": { "type": "string", "format": "uri" }, - "deletion_scheduled_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" - }, + "deletion_scheduled_at": { "type": "string", "format": "date-time" }, "preview_project_status": { "type": "string", "enum": [ @@ -8181,9 +7852,9 @@ "db_pass": { "type": "string", "description": "Database password" }, "name": { "type": "string", "maxLength": 256, "description": "Name of your project" }, "organization_id": { - "deprecated": true, + "type": "string", "description": "Deprecated: Use `organization_slug` instead.", - "type": "string" + "deprecated": true }, "organization_slug": { "type": "string", @@ -8192,12 +7863,13 @@ "example": "tsrqponmlkjihgfedcba" }, "plan": { - "deprecated": true, - "description": "Subscription Plan is now set on organization level and is ignored in this request", "type": "string", - "enum": ["free", "pro"] + "enum": ["free", "pro"], + "deprecated": true, + "description": "Subscription Plan is now set on organization level and is ignored in this request" }, "region": { + "type": "string", "description": "Region you want your server to reside in. Use region_selection instead.", "deprecated": true, "enum": [ @@ -8219,11 +7891,10 @@ "ca-central-1", "ap-south-1", "sa-east-1" - ], - "type": "string" + ] }, "region_selection": { - "description": "Region selection. Only one of region or region_selection can be specified.", + "discriminator": { "propertyName": "type" }, "oneOf": [ { "type": "object", @@ -8268,12 +7939,13 @@ }, "required": ["type", "code"] } - ] + ], + "description": "Region selection. Only one of region or region_selection can be specified." }, "kps_enabled": { + "type": "boolean", "deprecated": true, - "description": "This field is deprecated and is ignored in this request", - "type": "boolean" + "description": "This field is deprecated and is ignored in this request" }, "desired_instance_size": { "description": "Desired instance size. Omit this field to always default to the smallest possible size.", @@ -8301,25 +7973,24 @@ ] }, "template_url": { - "description": "Template URL used to create the project from the CLI.", "type": "string", - "format": "uri" + "format": "uri", + "description": "Template URL used to create the project from the CLI." }, - "release_channel": { "deprecated": true, "type": "null" }, - "postgres_engine": { "deprecated": true, "type": "null" }, "high_availability": { - "description": "[Experimental] Whether to enable high availability for the project.", - "type": "boolean" + "type": "boolean", + "description": "[Experimental] Whether to enable high availability for the project." } }, "required": ["db_pass", "name", "organization_slug"], + "additionalProperties": false, + "hideDefinitions": ["release_channel", "postgres_engine"], "example": { "db_pass": "correct-horse-battery-staple", "name": "acme-prod", "organization_slug": "tsrqponmlkjihgfedcba", "region": "us-east-1" - }, - "additionalProperties": false + } }, "V1ProjectResponse": { "type": "object", @@ -8522,8 +8193,8 @@ "type": "object", "properties": { "name": { "type": "string", "maxLength": 256 } }, "required": ["name"], - "example": { "name": "Acme" }, - "additionalProperties": false + "additionalProperties": false, + "example": { "name": "Acme" } }, "OAuthTokenBody": { "type": "object", @@ -8536,27 +8207,24 @@ "urn:ietf:params:oauth:grant-type:jwt-bearer" ] }, - "client_id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "client_id": { "type": "string", "format": "uuid" }, "client_secret": { "type": "string" }, "code": { "type": "string" }, "code_verifier": { "type": "string" }, "redirect_uri": { "type": "string" }, "refresh_token": { "type": "string" }, "assertion": { - "description": "IDJAG assertion JWT for grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer. Beta - available on Team and Enterprise plans only.", - "type": "string" + "type": "string", + "description": "IDJAG assertion JWT for grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer. Beta - available on Team and Enterprise plans only." }, "resource": { - "description": "Resource indicator for MCP (Model Context Protocol) clients", "type": "string", - "format": "uri" + "format": "uri", + "description": "Resource indicator for MCP (Model Context Protocol) clients" }, "scope": { "type": "string" } }, + "additionalProperties": false, "example": { "grant_type": "authorization_code", "client_id": "66666666-6666-4666-8666-666666666666", @@ -8565,22 +8233,17 @@ "code_verifier": "qW0Z6d9pQnW0mL1dK1q9wFq6Yz2nV5rA8jT3mP7sH4c", "redirect_uri": "https://app.acme.com/auth/callback", "scope": "projects:read projects:write" - }, - "additionalProperties": false + } }, "OAuthTokenResponse": { "type": "object", "properties": { "access_token": { "type": "string" }, "refresh_token": { - "description": "The `urn:ietf:params:oauth:grant-type:jwt-bearer` grant type issues access tokens only, no refresh token is returned and the token cannot be revoked via `/v1/oauth/revoke`.", - "type": "string" - }, - "expires_in": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string", + "description": "The `urn:ietf:params:oauth:grant-type:jwt-bearer` grant type issues access tokens only, no refresh token is returned and the token cannot be revoked via `/v1/oauth/revoke`." }, + "expires_in": { "type": "integer" }, "token_type": { "type": "string", "enum": ["Bearer"] } }, "required": ["access_token", "expires_in", "token_type"], @@ -8589,21 +8252,17 @@ "OAuthRevokeTokenBody": { "type": "object", "properties": { - "client_id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "client_id": { "type": "string", "format": "uuid" }, "client_secret": { "type": "string" }, "refresh_token": { "type": "string" } }, "required": ["client_id", "client_secret", "refresh_token"], + "additionalProperties": false, "example": { "client_id": "66666666-6666-4666-8666-666666666666", "client_secret": "sb_secret_live_example_9f4d3a206b2e4a7e8c91", "refresh_token": "oauth_refresh_9f4d3a206b2e4a7e8c91" - }, - "additionalProperties": false + } }, "SnippetList": { "type": "object", @@ -8686,9 +8345,9 @@ "type": "object", "properties": { "favorite": { + "type": "boolean", "deprecated": true, - "description": "Deprecated: Rely on root-level favorite property instead.", - "type": "boolean" + "description": "Deprecated: Rely on root-level favorite property instead." }, "schema_version": { "type": "string" }, "sql": { "type": "string" } @@ -8870,31 +8529,16 @@ "id": { "type": "string", "nullable": true }, "type": { "type": "string", - "enum": ["legacy", "publishable", "secret", null], + "enum": ["legacy", "publishable", "secret"], "nullable": true }, "prefix": { "type": "string", "nullable": true }, "name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "hash": { "type": "string", "nullable": true }, - "secret_jwt_template": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {}, - "nullable": true - }, - "inserted_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "nullable": true - } + "secret_jwt_template": { "type": "object", "additionalProperties": {}, "nullable": true }, + "inserted_at": { "type": "string", "format": "date-time", "nullable": true }, + "updated_at": { "type": "string", "format": "date-time", "nullable": true } }, "required": ["name"] }, @@ -8914,12 +8558,7 @@ "pattern": "^[a-z_][a-z0-9_]+$" }, "description": { "type": "string", "nullable": true }, - "secret_jwt_template": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {}, - "nullable": true - } + "secret_jwt_template": { "type": "object", "additionalProperties": {}, "nullable": true } }, "required": ["type", "name"], "example": { "type": "secret", "name": "ci_secret_key", "description": "CI deploy key" } @@ -8934,12 +8573,7 @@ "pattern": "^[a-z_][a-z0-9_]+$" }, "description": { "type": "string", "nullable": true }, - "secret_jwt_template": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {}, - "nullable": true - } + "secret_jwt_template": { "type": "object", "additionalProperties": {}, "nullable": true } }, "example": { "name": "ci_secret_key_rotated", "description": "Rotated after March release" } }, @@ -9003,25 +8637,6 @@ "notify_url": "https://example.com/webhooks/branches" } }, - "UpdateCustomHostnameResponseJsonValue": { - "description": "Any JSON-serializable value", - "anyOf": [ - { - "anyOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }], - "nullable": true - }, - { - "type": "array", - "items": { "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" } - }, - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" - } - } - ] - }, "UpdateCustomHostnameResponse": { "type": "object", "properties": { @@ -9042,11 +8657,11 @@ "success": { "type": "boolean" }, "errors": { "type": "array", - "items": { "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" } + "items": { "description": "Any JSON-serializable value" } }, "messages": { "type": "array", - "items": { "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" } + "items": { "description": "Any JSON-serializable value" } }, "result": { "type": "object", @@ -9109,10 +8724,34 @@ }, "UpdateCustomHostnameBody": { "type": "object", - "properties": { "custom_hostname": { "type": "string", "minLength": 1, "maxLength": 253 } }, + "properties": { "custom_hostname": { "type": "string", "maxLength": 253, "minLength": 1 } }, "required": ["custom_hostname"], "example": { "custom_hostname": "docs.example.com" } }, + "JitStateResponse": { + "discriminator": { "propertyName": "state" }, + "oneOf": [ + { + "type": "object", + "properties": { + "state": { "type": "string", "enum": ["enabled", "disabled"] }, + "appliedSuccessfully": { "type": "boolean" } + }, + "required": ["state"] + }, + { + "type": "object", + "properties": { + "state": { "type": "string", "enum": ["unavailable"] }, + "unavailableReason": { + "type": "string", + "enum": ["postgres_upgrade_required", "temporarily_unavailable"] + } + }, + "required": ["state", "unavailableReason"] + } + ] + }, "JitAccessRequestRequest": { "type": "object", "properties": { "state": { "type": "string", "enum": ["enabled", "disabled"] } }, @@ -9154,8 +8793,8 @@ }, "requester_ip": { "default": false, - "description": "Include requester's public IP in the list of addresses to unban.", - "type": "boolean" + "type": "boolean", + "description": "Include requester's public IP in the list of addresses to unban." }, "identifier": { "type": "string" } }, @@ -9172,14 +8811,9 @@ "dbAllowedCidrs": { "type": "array", "items": { "type": "string" } }, "dbAllowedCidrsV6": { "type": "array", "items": { "type": "string" } } }, - "example": { - "dbAllowedCidrs": ["203.0.113.0/24"], - "dbAllowedCidrsV6": ["2001:db8::/32"] - }, "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." }, "old_config": { - "description": "Populated when a new config has been received, but not registered as successfully applied to a project.", "type": "object", "properties": { "dbAllowedCidrs": { "type": "array", "items": { "type": "string" } }, @@ -9188,19 +8822,12 @@ "example": { "dbAllowedCidrs": ["203.0.113.0/24"], "dbAllowedCidrsV6": ["2001:db8::/32"] - } + }, + "description": "Populated when a new config has been received, but not registered as successfully applied to a project." }, "status": { "type": "string", "enum": ["stored", "applied"] }, - "updated_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" - }, - "applied_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" - } + "updated_at": { "type": "string", "format": "date-time" }, + "applied_at": { "type": "string", "format": "date-time" } }, "required": ["entitlement", "config", "status"] }, @@ -9257,7 +8884,6 @@ "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." }, "old_config": { - "description": "Populated when a new config has been received, but not registered as successfully applied to a project.", "type": "object", "properties": { "dbAllowedCidrs": { @@ -9271,71 +8897,41 @@ "required": ["address", "type"] } } - } - }, - "updated_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" - }, - "applied_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + }, + "description": "Populated when a new config has been received, but not registered as successfully applied to a project." }, + "updated_at": { "type": "string", "format": "date-time" }, + "applied_at": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": ["stored", "applied"] } }, "required": ["entitlement", "config", "status"] }, "PgsodiumConfigResponse": { "type": "object", - "properties": { - "root_key": { - "type": "string", - "description": "The pgsodium root key: 32 bytes, hex-encoded (64 characters)." - } - }, - "required": ["root_key"], - "example": { - "root_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" - } + "properties": { "root_key": { "type": "string" } }, + "required": ["root_key"] }, "UpdatePgsodiumConfigBody": { "type": "object", - "properties": { - "root_key": { - "type": "string", - "description": "The pgsodium root key: 32 bytes, hex-encoded (64 characters)." - } - }, + "properties": { "root_key": { "type": "string" } }, "required": ["root_key"], - "example": { - "root_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" - } + "example": { "root_key": "MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=" } }, "PostgrestConfigWithJWTSecretResponse": { "type": "object", "properties": { "db_schema": { "type": "string" }, - "max_rows": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, + "max_rows": { "type": "integer" }, "db_extra_search_path": { "type": "string" }, "db_pool": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "If `null`, the value is automatically configured based on compute size.", - "nullable": true + "nullable": true, + "description": "If `null`, the value is automatically configured based on compute size." }, "db_pool_acquisition_timeout": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "If `null`, the value is automatically configured to 10.", - "nullable": true + "nullable": true, + "description": "If `null`, the value is automatically configured to 10." }, "jwt_secret": { "type": "string" } }, @@ -9362,25 +8958,17 @@ "type": "object", "properties": { "db_schema": { "type": "string" }, - "max_rows": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, + "max_rows": { "type": "integer" }, "db_extra_search_path": { "type": "string" }, "db_pool": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "If `null`, the value is automatically configured based on compute size.", - "nullable": true + "nullable": true, + "description": "If `null`, the value is automatically configured based on compute size." }, "db_pool_acquisition_timeout": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "If `null`, the value is automatically configured to 10.", - "nullable": true + "nullable": true, + "description": "If `null`, the value is automatically configured to 10." } }, "required": [ @@ -9394,7 +8982,7 @@ "V1ProjectRefResponse": { "type": "object", "properties": { - "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "id": { "type": "integer" }, "ref": { "type": "string" }, "name": { "type": "string" } }, @@ -9416,7 +9004,6 @@ "required": ["name", "value"] }, "CreateSecretBody": { - "maxItems": 100, "type": "array", "items": { "type": "object", @@ -9478,36 +9065,6 @@ }, "required": ["status"] }, - "PlanGateErrorBody": { - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "Human-readable explanation of the plan gate" - }, - "error": { - "description": "Present on entitlement denials. Other errors with this status code (validation, billing state) carry only message.", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Machine-readable marker for plan-gated denials", - "enum": ["entitlement_required"] - }, - "feature": { - "type": "string", - "description": "Entitlement feature key that failed the check" - }, - "upgrade_url": { - "description": "Billing page URL for the organization, present when the org is resolvable", - "type": "string" - } - }, - "required": ["code", "feature"] - } - }, - "required": ["message"] - }, "VanitySubdomainBody": { "type": "object", "properties": { "vanity_subdomain": { "type": "string", "maxLength": 63 } }, @@ -9592,7 +9149,7 @@ "validation_errors": { "type": "array", "items": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -9658,12 +9215,7 @@ "type": "string", "enum": ["user_defined_objects_in_internal_schemas"] }, - "obj_type": { - "anyOf": [ - { "type": "string", "enum": ["table"] }, - { "type": "string", "enum": ["function"] } - ] - }, + "obj_type": { "type": "string", "enum": ["table", "function"] }, "schema_name": { "type": "string" }, "obj_name": { "type": "string" } }, @@ -9693,6 +9245,7 @@ "warnings": { "type": "array", "items": { + "discriminator": { "propertyName": "type" }, "oneOf": [ { "type": "object", @@ -9850,7 +9403,7 @@ }, "status": { "type": "string", "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"] }, "info": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -9870,11 +9423,7 @@ }, "db_connected": { "type": "boolean" }, "replication_connected": { "type": "boolean" }, - "connected_cluster": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } + "connected_cluster": { "type": "integer" } }, "required": [ "healthy", @@ -9897,29 +9446,17 @@ "SigningKeyResponse": { "type": "object", "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "id": { "type": "string", "format": "uuid" }, "algorithm": { "type": "string", "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, "status": { "type": "string", "enum": ["in_use", "previously_used", "revoked", "standby"] }, "public_jwk": { "nullable": true }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" - } + "created_at": { "type": "string", "format": "date-time" }, + "updated_at": { "type": "string", "format": "date-time" } }, - "required": ["id", "algorithm", "status", "public_jwk", "created_at", "updated_at"], + "required": ["id", "algorithm", "status", "created_at", "updated_at"], "additionalProperties": false }, "CreateSigningKeyBody": { @@ -9928,21 +9465,18 @@ "algorithm": { "type": "string", "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, "status": { "type": "string", "enum": ["in_use", "standby"] }, "private_jwk": { + "discriminator": { "propertyName": "kty" }, "oneOf": [ { "type": "object", "properties": { - "kid": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "kid": { "type": "string", "format": "uuid" }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { - "minItems": 2, - "maxItems": 2, "type": "array", - "items": { "type": "string", "enum": ["sign", "verify"] } + "items": { "type": "string", "enum": ["sign", "verify"] }, + "minItems": 2, + "maxItems": 2 }, "ext": { "type": "boolean", "enum": [true] }, "kty": { "type": "string", "enum": ["RSA"] }, @@ -9962,17 +9496,13 @@ { "type": "object", "properties": { - "kid": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "kid": { "type": "string", "format": "uuid" }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { - "minItems": 2, - "maxItems": 2, "type": "array", - "items": { "type": "string", "enum": ["sign", "verify"] } + "items": { "type": "string", "enum": ["sign", "verify"] }, + "minItems": 2, + "maxItems": 2 }, "ext": { "type": "boolean", "enum": [true] }, "kty": { "type": "string", "enum": ["EC"] }, @@ -9988,17 +9518,13 @@ { "type": "object", "properties": { - "kid": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "kid": { "type": "string", "format": "uuid" }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { - "minItems": 2, - "maxItems": 2, "type": "array", - "items": { "type": "string", "enum": ["sign", "verify"] } + "items": { "type": "string", "enum": ["sign", "verify"] }, + "minItems": 2, + "maxItems": 2 }, "ext": { "type": "boolean", "enum": [true] }, "kty": { "type": "string", "enum": ["OKP"] }, @@ -10013,17 +9539,13 @@ { "type": "object", "properties": { - "kid": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "kid": { "type": "string", "format": "uuid" }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { - "minItems": 2, - "maxItems": 2, "type": "array", - "items": { "type": "string", "enum": ["sign", "verify"] } + "items": { "type": "string", "enum": ["sign", "verify"] }, + "minItems": 2, + "maxItems": 2 }, "ext": { "type": "boolean", "enum": [true] }, "kty": { "type": "string", "enum": ["oct"] }, @@ -10037,8 +9559,8 @@ } }, "required": ["algorithm"], - "example": { "algorithm": "RS256", "status": "standby" }, - "additionalProperties": false + "additionalProperties": false, + "example": { "algorithm": "RS256", "status": "standby" } }, "SigningKeysResponse": { "type": "object", @@ -10048,29 +9570,17 @@ "items": { "type": "object", "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "id": { "type": "string", "format": "uuid" }, "algorithm": { "type": "string", "enum": ["EdDSA", "ES256", "RS256", "HS256"] }, "status": { "type": "string", "enum": ["in_use", "previously_used", "revoked", "standby"] }, "public_jwk": { "nullable": true }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" - } + "created_at": { "type": "string", "format": "date-time" }, + "updated_at": { "type": "string", "format": "date-time" } }, - "required": ["id", "algorithm", "status", "public_jwk", "created_at", "updated_at"], + "required": ["id", "algorithm", "status", "created_at", "updated_at"], "additionalProperties": false } } @@ -10087,27 +9597,17 @@ } }, "required": ["status"], - "example": { "status": "standby" }, - "additionalProperties": false + "additionalProperties": false, + "example": { "status": "standby" } }, "AuthConfigResponse": { "type": "object", "properties": { - "api_max_request_duration": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "db_max_pool_size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, + "api_max_request_duration": { "type": "integer", "nullable": true }, + "db_max_pool_size": { "type": "integer", "nullable": true }, "db_max_pool_size_unit": { "type": "string", - "enum": ["connections", "percent", null], + "enum": ["connections", "percent"], "nullable": true }, "disable_signup": { "type": "boolean", "nullable": true }, @@ -10227,25 +9727,11 @@ "hook_after_user_created_enabled": { "type": "boolean", "nullable": true }, "hook_after_user_created_uri": { "type": "string", "nullable": true }, "hook_after_user_created_secrets": { "type": "string", "nullable": true }, - "jwt_exp": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, + "jwt_exp": { "type": "integer", "nullable": true }, "mailer_allow_unverified_email_sign_ins": { "type": "boolean", "nullable": true }, "mailer_autoconfirm": { "type": "boolean", "nullable": true }, - "mailer_otp_exp": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "mailer_otp_length": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, + "mailer_otp_exp": { "type": "integer" }, + "mailer_otp_length": { "type": "integer", "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 }, @@ -10313,12 +9799,7 @@ }, "mailer_notifications_identity_linked_enabled": { "type": "boolean", "nullable": true }, "mailer_notifications_identity_unlinked_enabled": { "type": "boolean", "nullable": true }, - "mfa_max_enrolled_factors": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, + "mfa_max_enrolled_factors": { "type": "integer", "nullable": true }, "mfa_totp_enroll_enabled": { "type": "boolean", "nullable": true }, "mfa_totp_verify_enabled": { "type": "boolean", "nullable": true }, "mfa_phone_enroll_enabled": { "type": "boolean", "nullable": true }, @@ -10329,81 +9810,31 @@ "webauthn_rp_display_name": { "type": "string", "nullable": true }, "webauthn_rp_id": { "type": "string", "nullable": true }, "webauthn_rp_origins": { "type": "string", "nullable": true }, - "mfa_phone_otp_length": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, + "mfa_phone_otp_length": { "type": "integer" }, "mfa_phone_template": { "type": "string", "nullable": true }, - "mfa_phone_max_frequency": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, + "mfa_phone_max_frequency": { "type": "integer", "nullable": true }, "nimbus_oauth_client_id": { "type": "string", "nullable": true }, "nimbus_oauth_email_optional": { "type": "boolean", "nullable": true }, "nimbus_oauth_client_secret": { "type": "string", "nullable": true }, "password_hibp_enabled": { "type": "boolean", "nullable": true }, - "password_min_length": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, + "password_min_length": { "type": "integer", "nullable": true }, "password_required_characters": { "type": "string", "enum": [ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", - "", - null + "" ], "nullable": true }, - "rate_limit_anonymous_users": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "rate_limit_email_sent": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "rate_limit_sms_sent": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "rate_limit_token_refresh": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "rate_limit_verify": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "rate_limit_otp": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "rate_limit_web3": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, + "rate_limit_anonymous_users": { "type": "integer", "nullable": true }, + "rate_limit_email_sent": { "type": "integer", "nullable": true }, + "rate_limit_sms_sent": { "type": "integer", "nullable": true }, + "rate_limit_token_refresh": { "type": "integer", "nullable": true }, + "rate_limit_verify": { "type": "integer", "nullable": true }, + "rate_limit_otp": { "type": "integer", "nullable": true }, + "rate_limit_web3": { "type": "integer", "nullable": true }, "refresh_token_rotation_enabled": { "type": "boolean", "nullable": true }, "saml_enabled": { "type": "boolean", "nullable": true }, "saml_external_url": { "type": "string", "nullable": true }, @@ -10412,17 +9843,12 @@ "security_captcha_enabled": { "type": "boolean", "nullable": true }, "security_captcha_provider": { "type": "string", - "enum": ["turnstile", "hcaptcha", null], + "enum": ["turnstile", "hcaptcha"], "nullable": true }, "security_captcha_secret": { "type": "string", "nullable": true }, "security_manual_linking_enabled": { "type": "boolean", "nullable": true }, - "security_refresh_token_reuse_interval": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, + "security_refresh_token_reuse_interval": { "type": "integer", "nullable": true }, "security_update_password_require_reauthentication": { "type": "boolean", "nullable": true @@ -10433,38 +9859,19 @@ "sessions_timebox": { "type": "number", "nullable": true }, "site_url": { "type": "string", "nullable": true }, "sms_autoconfirm": { "type": "boolean", "nullable": true }, - "sms_max_frequency": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, + "sms_max_frequency": { "type": "integer", "nullable": true }, "sms_messagebird_access_key": { "type": "string", "nullable": true }, "sms_messagebird_originator": { "type": "string", "nullable": true }, - "sms_otp_exp": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "sms_otp_length": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, + "sms_otp_exp": { "type": "integer", "nullable": true }, + "sms_otp_length": { "type": "integer" }, "sms_provider": { "type": "string", - "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage", null], + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], "nullable": true }, "sms_template": { "type": "string", "nullable": true }, "sms_test_otp": { "type": "string", "nullable": true }, - "sms_test_otp_valid_until": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, + "sms_test_otp_valid_until": { "type": "string", "format": "date-time", "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 }, @@ -10477,19 +9884,9 @@ "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", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", - "nullable": true - }, + "smtp_admin_email": { "type": "string", "format": "email", "nullable": true }, "smtp_host": { "type": "string", "nullable": true }, - "smtp_max_frequency": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, + "smtp_max_frequency": { "type": "integer", "nullable": true }, "smtp_pass": { "type": "string", "nullable": true }, "smtp_port": { "type": "string", "nullable": true }, "smtp_sender_name": { "type": "string", "nullable": true }, @@ -10499,11 +9896,7 @@ "oauth_server_allow_dynamic_registration": { "type": "boolean" }, "oauth_server_authorization_path": { "type": "string", "nullable": true }, "custom_oauth_enabled": { "type": "boolean" }, - "custom_oauth_max_providers": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } + "custom_oauth_max_providers": { "type": "integer" } }, "required": [ "api_max_request_duration", @@ -10751,12 +10144,7 @@ "site_url": { "type": "string", "pattern": "^[^,]+$", "nullable": true }, "disable_signup": { "type": "boolean", "nullable": true }, "jwt_exp": { "type": "integer", "minimum": 0, "maximum": 604800, "nullable": true }, - "smtp_admin_email": { - "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", - "nullable": true - }, + "smtp_admin_email": { "type": "string", "format": "email", "nullable": true }, "smtp_host": { "type": "string", "nullable": true }, "smtp_port": { "type": "string", "nullable": true }, "smtp_user": { "type": "string", "nullable": true }, @@ -10852,7 +10240,7 @@ "security_captcha_enabled": { "type": "boolean", "nullable": true }, "security_captcha_provider": { "type": "string", - "enum": ["turnstile", "hcaptcha", null], + "enum": ["turnstile", "hcaptcha"], "nullable": true }, "security_captcha_secret": { "type": "string", "nullable": true }, @@ -10921,8 +10309,7 @@ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", - "", - null + "" ], "nullable": true }, @@ -10955,7 +10342,7 @@ "sms_otp_length": { "type": "integer", "minimum": 0, "maximum": 32767 }, "sms_provider": { "type": "string", - "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage", null], + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], "nullable": true }, "sms_messagebird_access_key": { "type": "string", "nullable": true }, @@ -10965,12 +10352,7 @@ "pattern": "^([0-9]{1,15}=[0-9]+,?)*$", "nullable": true }, - "sms_test_otp_valid_until": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, + "sms_test_otp_valid_until": { "type": "string", "format": "date-time", "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 }, @@ -11097,23 +10479,13 @@ "external_zoom_client_id": { "type": "string", "nullable": true }, "external_zoom_email_optional": { "type": "boolean", "nullable": true }, "external_zoom_secret": { "type": "string", "nullable": true }, - "db_max_pool_size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, + "db_max_pool_size": { "type": "integer", "nullable": true }, "db_max_pool_size_unit": { "type": "string", - "enum": ["connections", "percent", null], - "nullable": true - }, - "api_max_request_duration": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, + "enum": ["connections", "percent"], "nullable": true }, + "api_max_request_duration": { "type": "integer", "nullable": true }, "mfa_totp_enroll_enabled": { "type": "boolean", "nullable": true }, "mfa_totp_verify_enabled": { "type": "boolean", "nullable": true }, "mfa_web_authn_enroll_enabled": { "type": "boolean", "nullable": true }, @@ -11165,11 +10537,7 @@ "ThirdPartyAuth": { "type": "object", "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "id": { "type": "string", "format": "uuid" }, "type": { "type": "string" }, "oidc_issuer_url": { "type": "string", "nullable": true }, "jwks_url": { "type": "string", "nullable": true }, @@ -11205,25 +10573,6 @@ }, "required": ["available_versions"] }, - "ListProjectAddonsResponseJsonValue": { - "description": "Any JSON-serializable value", - "anyOf": [ - { - "anyOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }], - "nullable": true - }, - { - "type": "array", - "items": { "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" } - }, - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" - } - } - ] - }, "ListProjectAddonsResponse": { "type": "object", "properties": { @@ -11249,7 +10598,7 @@ "type": "object", "properties": { "id": { - "anyOf": [ + "oneOf": [ { "type": "string", "enum": [ @@ -11293,7 +10642,7 @@ }, "required": ["description", "type", "interval", "amount"] }, - "meta": { "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" } + "meta": { "description": "Any JSON-serializable value" } }, "required": ["id", "name", "price"] } @@ -11326,7 +10675,7 @@ "type": "object", "properties": { "id": { - "anyOf": [ + "oneOf": [ { "type": "string", "enum": [ @@ -11370,7 +10719,7 @@ }, "required": ["description", "type", "interval", "amount"] }, - "meta": { "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" } + "meta": { "description": "Any JSON-serializable value" } }, "required": ["id", "name", "price"] } @@ -11386,7 +10735,7 @@ "type": "object", "properties": { "addon_variant": { - "anyOf": [ + "oneOf": [ { "type": "string", "enum": [ @@ -11438,11 +10787,7 @@ "token_alias": { "type": "string" }, "expires_at": { "type": "string" }, "created_at": { "type": "string" }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - } + "created_by": { "type": "string", "format": "uuid" } }, "required": ["token_alias", "expires_at", "created_at", "created_by"] }, @@ -11453,11 +10798,7 @@ "token_alias": { "type": "string" }, "expires_at": { "type": "string" }, "created_at": { "type": "string" }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - } + "created_by": { "type": "string", "format": "uuid" } }, "required": ["token", "token_alias", "expires_at", "created_at", "created_by"] }, @@ -11470,6 +10811,7 @@ "type": "object", "properties": { "name": { + "type": "string", "enum": [ "unindexed_foreign_keys", "auth_users_exposed", @@ -11500,8 +10842,7 @@ "leaked_service_key", "no_backup_admin", "vulnerable_postgres_version" - ], - "type": "string" + ] }, "title": { "type": "string" }, "level": { "type": "string", "enum": ["ERROR", "WARN", "INFO"] }, @@ -11550,7 +10891,7 @@ "properties": { "result": { "type": "array", "items": {} }, "error": { - "anyOf": [ + "oneOf": [ { "type": "string" }, { "type": "object", @@ -11587,11 +10928,7 @@ "items": { "type": "object", "properties": { - "timestamp": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|))$" - }, + "timestamp": { "type": "string", "format": "date-time" }, "total_auth_requests": { "type": "number" }, "total_realtime_requests": { "type": "number" }, "total_rest_requests": { "type": "number" }, @@ -11607,7 +10944,7 @@ } }, "error": { - "anyOf": [ + "oneOf": [ { "type": "string" }, { "type": "object", @@ -11648,7 +10985,7 @@ } }, "error": { - "anyOf": [ + "oneOf": [ { "type": "string" }, { "type": "object", @@ -11688,12 +11025,7 @@ "properties": { "role": { "type": "string", "minLength": 1 }, "password": { "type": "string", "minLength": 1 }, - "ttl_seconds": { - "type": "integer", - "minimum": 1, - "maximum": 9007199254740991, - "format": "int64" - } + "ttl_seconds": { "type": "integer", "minimum": 1, "format": "int64" } }, "required": ["role", "password", "ttl_seconds"] }, @@ -11795,12 +11127,12 @@ "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"], - "additionalProperties": {} + "additionalProperties": true } } }, "required": ["name", "schemas"], - "additionalProperties": {} + "additionalProperties": true } } }, @@ -11820,11 +11152,7 @@ "JitAccessResponse": { "type": "object", "properties": { - "user_id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "user_id": { "type": "string", "format": "uuid" }, "user_roles": { "type": "array", "items": { @@ -11839,13 +11167,7 @@ "type": "array", "items": { "type": "object", - "properties": { - "cidr": { - "type": "string", - "format": "cidrv4", - "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" - } - }, + "properties": { "cidr": { "type": "string" } }, "required": ["cidr"] } }, @@ -11853,13 +11175,7 @@ "type": "array", "items": { "type": "object", - "properties": { - "cidr": { - "type": "string", - "format": "cidrv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" - } - }, + "properties": { "cidr": { "type": "string" } }, "required": ["cidr"] } } @@ -11877,20 +11193,7 @@ "type": "object", "properties": { "role": { "type": "string", "minLength": 1 }, - "rhost": { - "anyOf": [ - { - "type": "string", - "format": "ipv4", - "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$" - }, - { - "type": "string", - "format": "ipv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$" - } - ] - } + "rhost": { "type": "string", "minLength": 1 } }, "required": ["role", "rhost"], "example": { "role": "postgres", "rhost": "203.0.113.10" } @@ -11898,11 +11201,7 @@ "JitAuthorizeAccessResponse": { "type": "object", "properties": { - "user_id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "user_id": { "type": "string", "format": "uuid" }, "user_role": { "type": "object", "properties": { @@ -11915,13 +11214,7 @@ "type": "array", "items": { "type": "object", - "properties": { - "cidr": { - "type": "string", - "format": "cidrv4", - "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" - } - }, + "properties": { "cidr": { "type": "string" } }, "required": ["cidr"] } }, @@ -11929,13 +11222,7 @@ "type": "array", "items": { "type": "object", - "properties": { - "cidr": { - "type": "string", - "format": "cidrv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" - } - }, + "properties": { "cidr": { "type": "string" } }, "required": ["cidr"] } } @@ -11954,15 +11241,11 @@ "items": { "type": "array", "items": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { - "user_id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "user_id": { "type": "string", "format": "uuid" }, "primary_email": { "type": "string", "nullable": true }, "invite_id": { "type": "null" }, "expires_at": { "type": "null" }, @@ -11980,13 +11263,7 @@ "type": "array", "items": { "type": "object", - "properties": { - "cidr": { - "type": "string", - "format": "cidrv4", - "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" - } - }, + "properties": { "cidr": { "type": "string" } }, "required": ["cidr"] } }, @@ -11994,13 +11271,7 @@ "type": "array", "items": { "type": "object", - "properties": { - "cidr": { - "type": "string", - "format": "cidrv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" - } - }, + "properties": { "cidr": { "type": "string" } }, "required": ["cidr"] } } @@ -12019,11 +11290,7 @@ "properties": { "user_id": { "type": "null" }, "primary_email": { "type": "string" }, - "invite_id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "invite_id": { "type": "string", "format": "uuid" }, "expires_at": { "type": "string" }, "user_roles": { "type": "array", @@ -12039,13 +11306,7 @@ "type": "array", "items": { "type": "object", - "properties": { - "cidr": { - "type": "string", - "format": "cidrv4", - "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" - } - }, + "properties": { "cidr": { "type": "string" } }, "required": ["cidr"] } }, @@ -12053,13 +11314,7 @@ "type": "array", "items": { "type": "object", - "properties": { - "cidr": { - "type": "string", - "format": "cidrv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" - } - }, + "properties": { "cidr": { "type": "string" } }, "required": ["cidr"] } } @@ -12082,12 +11337,7 @@ "UpdateJitAccessBody": { "type": "object", "properties": { - "user_id": { - "type": "string", - "minLength": 1, - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "user_id": { "type": "string", "format": "uuid", "minLength": 1 }, "roles": { "type": "array", "items": { @@ -12102,13 +11352,7 @@ "type": "array", "items": { "type": "object", - "properties": { - "cidr": { - "type": "string", - "format": "cidrv4", - "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" - } - }, + "properties": { "cidr": { "type": "string" } }, "required": ["cidr"] } }, @@ -12116,13 +11360,7 @@ "type": "array", "items": { "type": "object", - "properties": { - "cidr": { - "type": "string", - "format": "cidrv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" - } - }, + "properties": { "cidr": { "type": "string" } }, "required": ["cidr"] } } @@ -12150,12 +11388,7 @@ "InviteExternalUserJitAccessBody": { "type": "object", "properties": { - "email": { - "type": "string", - "minLength": 1, - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - }, + "email": { "type": "string", "format": "email", "minLength": 1 }, "roles": { "type": "array", "items": { @@ -12170,13 +11403,7 @@ "type": "array", "items": { "type": "object", - "properties": { - "cidr": { - "type": "string", - "format": "cidrv4", - "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" - } - }, + "properties": { "cidr": { "type": "string" } }, "required": ["cidr"] } }, @@ -12184,13 +11411,7 @@ "type": "array", "items": { "type": "object", - "properties": { - "cidr": { - "type": "string", - "format": "cidrv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" - } - }, + "properties": { "cidr": { "type": "string" } }, "required": ["cidr"] } } @@ -12218,16 +11439,8 @@ "InviteExternalUserJitResponse": { "type": "object", "properties": { - "email": { - "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - }, - "invite_id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, + "email": { "type": "string", "format": "email" }, + "invite_id": { "type": "string", "format": "uuid" }, "user_roles": { "type": "array", "items": { @@ -12242,13 +11455,7 @@ "type": "array", "items": { "type": "object", - "properties": { - "cidr": { - "type": "string", - "format": "cidrv4", - "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" - } - }, + "properties": { "cidr": { "type": "string" } }, "required": ["cidr"] } }, @@ -12256,13 +11463,7 @@ "type": "array", "items": { "type": "object", - "properties": { - "cidr": { - "type": "string", - "format": "cidrv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" - } - }, + "properties": { "cidr": { "type": "string" } }, "required": ["cidr"] } } @@ -12279,12 +11480,7 @@ "AcceptInviteExternalUserJitAccessBody": { "type": "object", "properties": { - "email": { - "type": "string", - "minLength": 1, - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - }, + "email": { "type": "string", "format": "email", "minLength": 1 }, "token": { "type": "string", "minLength": 1 } }, "required": ["email", "token"], @@ -12297,23 +11493,9 @@ "slug": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, - "version": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "created_at": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "format": "int64" - }, - "updated_at": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "format": "int64" - }, + "version": { "type": "integer" }, + "created_at": { "type": "integer", "format": "int64" }, + "updated_at": { "type": "integer", "format": "int64" }, "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, "entrypoint_path": { "type": "string" }, @@ -12347,17 +11529,8 @@ "slug": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_-]*$" }, "name": { "type": "string" }, "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, - "version": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "created_at": { - "type": "integer", - "format": "int64", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, + "version": { "type": "integer" }, + "created_at": { "type": "integer", "format": "int64" }, "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, "entrypoint_path": { "type": "string" }, @@ -12390,23 +11563,9 @@ "slug": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, - "version": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "created_at": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "format": "int64" - }, - "updated_at": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "format": "int64" - }, + "version": { "type": "integer" }, + "created_at": { "type": "integer", "format": "int64" }, + "updated_at": { "type": "integer", "format": "int64" }, "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, "entrypoint_path": { "type": "string" }, @@ -12435,7 +11594,7 @@ "required": ["entrypoint_path"] } }, - "required": ["file", "metadata"], + "required": ["metadata"], "example": { "file": ["./supabase/functions/hello-world/index.ts"], "metadata": { "entrypoint_path": "index.ts", "verify_jwt": true, "name": "Hello World" } @@ -12448,23 +11607,9 @@ "slug": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, - "version": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "created_at": { - "type": "integer", - "format": "int64", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "updated_at": { - "type": "integer", - "format": "int64", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, + "version": { "type": "integer" }, + "created_at": { "type": "integer", "format": "int64" }, + "updated_at": { "type": "integer", "format": "int64" }, "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, "entrypoint_path": { "type": "string" }, @@ -12480,23 +11625,9 @@ "slug": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string", "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, - "version": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "created_at": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "format": "int64" - }, - "updated_at": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "format": "int64" - }, + "version": { "type": "integer" }, + "created_at": { "type": "integer", "format": "int64" }, + "updated_at": { "type": "integer", "format": "int64" }, "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, "entrypoint_path": { "type": "string" }, @@ -12535,28 +11666,13 @@ "type": "object", "properties": { "attributes": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { - "iops": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 - }, - "size_gb": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 - }, - "throughput_mibps": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 - }, + "iops": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, + "size_gb": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, + "throughput_mibps": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, "type": { "type": "string", "enum": ["gp3"] } }, "required": ["iops", "size_gb", "type"] @@ -12564,18 +11680,8 @@ { "type": "object", "properties": { - "iops": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 - }, - "size_gb": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 - }, + "iops": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, + "size_gb": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, "type": { "type": "string", "enum": ["io2"] } }, "required": ["iops", "size_gb", "type"] @@ -12590,28 +11696,14 @@ "type": "object", "properties": { "attributes": { + "discriminator": { "propertyName": "type" }, "oneOf": [ { "type": "object", "properties": { - "iops": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 - }, - "size_gb": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 - }, - "throughput_mibps": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 - }, + "iops": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, + "size_gb": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, + "throughput_mibps": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, "type": { "type": "string", "enum": ["gp3"] } }, "required": ["iops", "size_gb", "type"] @@ -12619,18 +11711,8 @@ { "type": "object", "properties": { - "iops": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 - }, - "size_gb": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 - }, + "iops": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, + "size_gb": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, "type": { "type": "string", "enum": ["io2"] } }, "required": ["iops", "size_gb", "type"] @@ -12664,24 +11746,24 @@ "properties": { "growth_percent": { "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991, - "description": "Growth percentage for disk autoscaling", - "nullable": true + "minimum": 0, + "exclusiveMinimum": true, + "nullable": true, + "description": "Growth percentage for disk autoscaling" }, "min_increment_gb": { "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991, - "description": "Minimum increment size for disk autoscaling in GB", - "nullable": true + "minimum": 0, + "exclusiveMinimum": true, + "nullable": true, + "description": "Minimum increment size for disk autoscaling in GB" }, "max_size_gb": { "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991, - "description": "Maximum limit the disk size will grow to in GB", - "nullable": true + "minimum": 0, + "exclusiveMinimum": true, + "nullable": true, + "description": "Maximum limit the disk size will grow to in GB" } }, "required": ["growth_percent", "min_increment_gb", "max_size_gb"] @@ -12689,12 +11771,7 @@ "StorageConfigResponse": { "type": "object", "properties": { - "fileSizeLimit": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "format": "int64" - }, + "fileSizeLimit": { "type": "integer", "format": "int64" }, "features": { "type": "object", "properties": { @@ -12717,9 +11794,9 @@ "type": "object", "properties": { "enabled": { "type": "boolean" }, - "maxNamespaces": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, - "maxTables": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, - "maxCatalogs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } + "maxNamespaces": { "type": "integer", "minimum": 0 }, + "maxTables": { "type": "integer", "minimum": 0 }, + "maxCatalogs": { "type": "integer", "minimum": 0 } }, "required": ["enabled", "maxNamespaces", "maxTables", "maxCatalogs"] }, @@ -12727,8 +11804,8 @@ "type": "object", "properties": { "enabled": { "type": "boolean" }, - "maxBuckets": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, - "maxIndexes": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } + "maxBuckets": { "type": "integer", "minimum": 0 }, + "maxIndexes": { "type": "integer", "minimum": 0 } }, "required": ["enabled", "maxBuckets", "maxIndexes"] } @@ -12771,9 +11848,9 @@ "properties": { "fileSizeLimit": { "type": "integer", - "format": "int64", "minimum": 0, - "maximum": 536870912000 + "maximum": 536870912000, + "format": "int64" }, "features": { "type": "object", @@ -12797,9 +11874,9 @@ "type": "object", "properties": { "enabled": { "type": "boolean" }, - "maxNamespaces": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, - "maxTables": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, - "maxCatalogs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } + "maxNamespaces": { "type": "integer", "minimum": 0 }, + "maxTables": { "type": "integer", "minimum": 0 }, + "maxCatalogs": { "type": "integer", "minimum": 0 } }, "required": ["enabled", "maxNamespaces", "maxTables", "maxCatalogs"] }, @@ -12807,8 +11884,8 @@ "type": "object", "properties": { "enabled": { "type": "boolean" }, - "maxBuckets": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, - "maxIndexes": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } + "maxBuckets": { "type": "integer", "minimum": 0 }, + "maxIndexes": { "type": "integer", "minimum": 0 } }, "required": ["enabled", "maxBuckets", "maxIndexes"] } @@ -12820,48 +11897,24 @@ "required": ["upstreamTarget"] } }, + "additionalProperties": false, "example": { "fileSizeLimit": 10485760, "features": { "imageTransformation": { "enabled": true } } - }, - "additionalProperties": false + } }, "V1PgbouncerConfigResponse": { "type": "object", "properties": { - "default_pool_size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, + "default_pool_size": { "type": "integer" }, "ignore_startup_parameters": { "type": "string" }, - "max_client_conn": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, + "max_client_conn": { "type": "integer" }, "pool_mode": { "type": "string", "enum": ["transaction", "session", "statement"] }, "connection_string": { "type": "string" }, - "server_idle_timeout": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "server_lifetime": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "query_wait_timeout": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "reserve_pool_size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } + "server_idle_timeout": { "type": "integer" }, + "server_lifetime": { "type": "integer" }, + "query_wait_timeout": { "type": "integer" }, + "reserve_pool_size": { "type": "integer" } } }, "SupavisorConfigResponse": { @@ -12872,26 +11925,12 @@ "is_using_scram_auth": { "type": "boolean" }, "db_user": { "type": "string" }, "db_host": { "type": "string" }, - "db_port": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, + "db_port": { "type": "integer" }, "db_name": { "type": "string" }, "connection_string": { "type": "string" }, "connectionString": { "type": "string", "description": "Use connection_string instead" }, - "default_pool_size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "max_client_conn": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, + "default_pool_size": { "type": "integer", "nullable": true }, + "max_client_conn": { "type": "integer", "nullable": true }, "pool_mode": { "type": "string", "enum": ["transaction", "session"] } }, "required": [ @@ -12919,9 +11958,9 @@ "nullable": true }, "pool_mode": { - "description": "Dedicated pooler mode for the project", "type": "string", - "enum": ["transaction", "session"] + "enum": ["transaction", "session"], + "description": "Dedicated pooler mode for the project" } }, "example": { "default_pool_size": 25, "pool_mode": "transaction" } @@ -12929,12 +11968,7 @@ "UpdateSupavisorConfigResponse": { "type": "object", "properties": { - "default_pool_size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, + "default_pool_size": { "type": "integer", "nullable": true }, "pool_mode": { "type": "string" } }, "required": ["default_pool_size", "pool_mode"] @@ -12967,29 +12001,15 @@ "track_activity_query_size": { "type": "string" }, "max_connections": { "type": "integer", "minimum": 1, "maximum": 262143 }, "max_locks_per_transaction": { "type": "integer", "minimum": 10, "maximum": 2147483640 }, - "max_logical_replication_workers": { "type": "integer", "minimum": 0, "maximum": 262143 }, "max_parallel_maintenance_workers": { "type": "integer", "minimum": 0, "maximum": 1024 }, "max_parallel_workers": { "type": "integer", "minimum": 0, "maximum": 1024 }, "max_parallel_workers_per_gather": { "type": "integer", "minimum": 0, "maximum": 1024 }, - "max_replication_slots": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, + "max_replication_slots": { "type": "integer" }, "max_slot_wal_keep_size": { "type": "string" }, "max_standby_archive_delay": { "type": "string" }, "max_standby_streaming_delay": { "type": "string" }, - "max_sync_workers_per_subscription": { - "type": "integer", - "minimum": 0, - "maximum": 262143 - }, "max_wal_size": { "type": "string" }, - "max_wal_senders": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, + "max_wal_senders": { "type": "integer" }, "max_worker_processes": { "type": "integer", "minimum": 0, "maximum": 262143 }, "session_replication_role": { "type": "string", "enum": ["origin", "replica", "local"] }, "shared_buffers": { "type": "string" }, @@ -13042,29 +12062,15 @@ "track_activity_query_size": { "type": "string" }, "max_connections": { "type": "integer", "minimum": 1, "maximum": 262143 }, "max_locks_per_transaction": { "type": "integer", "minimum": 10, "maximum": 2147483640 }, - "max_logical_replication_workers": { "type": "integer", "minimum": 0, "maximum": 262143 }, "max_parallel_maintenance_workers": { "type": "integer", "minimum": 0, "maximum": 1024 }, "max_parallel_workers": { "type": "integer", "minimum": 0, "maximum": 1024 }, "max_parallel_workers_per_gather": { "type": "integer", "minimum": 0, "maximum": 1024 }, - "max_replication_slots": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, + "max_replication_slots": { "type": "integer" }, "max_slot_wal_keep_size": { "type": "string" }, "max_standby_archive_delay": { "type": "string" }, "max_standby_streaming_delay": { "type": "string" }, - "max_sync_workers_per_subscription": { - "type": "integer", - "minimum": 0, - "maximum": 262143 - }, "max_wal_size": { "type": "string" }, - "max_wal_senders": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, + "max_wal_senders": { "type": "integer" }, "max_worker_processes": { "type": "integer", "minimum": 0, "maximum": 262143 }, "session_replication_role": { "type": "string", "enum": ["origin", "replica", "local"] }, "shared_buffers": { "type": "string" }, @@ -13089,82 +12095,82 @@ "hot_standby_feedback": { "type": "boolean" }, "restart_database": { "type": "boolean" } }, + "additionalProperties": false, "example": { "max_connections": 120, "shared_buffers": "256MB", "work_mem": "4MB", "statement_timeout": "60000ms" - }, - "additionalProperties": false + } }, "RealtimeConfigResponse": { "type": "object", "properties": { "private_only": { "type": "boolean", - "description": "Whether to only allow private channels", - "nullable": true + "nullable": true, + "description": "Whether to only allow private channels" }, "connection_pool": { "type": "integer", "minimum": 1, "maximum": 100, - "description": "Sets connection pool size for Realtime Authorization", - "nullable": true + "nullable": true, + "description": "Sets connection pool size for Realtime Authorization" }, "max_concurrent_users": { "type": "integer", "minimum": 1, "maximum": 50000, - "description": "Sets maximum number of concurrent users rate limit", - "nullable": true + "nullable": true, + "description": "Sets maximum number of concurrent users rate limit" }, "max_events_per_second": { "type": "integer", "minimum": 1, "maximum": 50000, - "description": "Sets maximum number of events per second rate per channel limit", - "nullable": true + "nullable": true, + "description": "Sets maximum number of events per second rate per channel limit" }, "max_bytes_per_second": { "type": "integer", "minimum": 1, "maximum": 10000000, - "description": "Sets maximum number of bytes per second rate per channel limit", - "nullable": true + "nullable": true, + "description": "Sets maximum number of bytes per second rate per channel limit" }, "max_channels_per_client": { "type": "integer", "minimum": 1, "maximum": 10000, - "description": "Sets maximum number of channels per client rate limit", - "nullable": true + "nullable": true, + "description": "Sets maximum number of channels per client rate limit" }, "max_joins_per_second": { "type": "integer", "minimum": 1, "maximum": 5000, - "description": "Sets maximum number of joins per second rate limit", - "nullable": true + "nullable": true, + "description": "Sets maximum number of joins per second rate limit" }, "max_presence_events_per_second": { "type": "integer", "minimum": 1, "maximum": 5000, - "description": "Sets maximum number of presence events per second rate limit", - "nullable": true + "nullable": true, + "description": "Sets maximum number of presence events per second rate limit" }, "max_payload_size_in_kb": { "type": "integer", "minimum": 1, "maximum": 10000, - "description": "Sets maximum number of payload size in KB rate limit", - "nullable": true + "nullable": true, + "description": "Sets maximum number of payload size in KB rate limit" }, "suspend": { "type": "boolean", - "description": "Disables the Realtime service for this project when true. Set to false to re-enable it.", - "nullable": true + "nullable": true, + "description": "Disables the Realtime service for this project when true. Set to false to re-enable it." }, "presence_enabled": { "type": "boolean", "description": "Whether to enable presence" } }, @@ -13243,12 +12249,12 @@ }, "presence_enabled": { "type": "boolean", "description": "Whether to enable presence" } }, + "additionalProperties": false, "example": { "private_only": false, "max_concurrent_users": 1000, "max_channels_per_client": 100 - }, - "additionalProperties": false + } }, "CreateProviderBody": { "type": "object", @@ -13272,7 +12278,7 @@ "name": { "type": "string" }, "names": { "type": "array", "items": { "type": "string" } }, "default": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": {} }, { "type": "number" }, { "type": "string" }, @@ -13317,6 +12323,7 @@ "saml": { "type": "object", "properties": { + "id": { "type": "string" }, "entity_id": { "type": "string" }, "metadata_url": { "type": "string" }, "metadata_xml": { "type": "string" }, @@ -13331,7 +12338,7 @@ "name": { "type": "string" }, "names": { "type": "array", "items": { "type": "string" } }, "default": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": {} }, { "type": "number" }, { "type": "string" }, @@ -13355,17 +12362,19 @@ ] } }, - "required": ["entity_id"] + "required": ["id", "entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { + "id": { "type": "string" }, "domain": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } - } + }, + "required": ["id"] } }, "created_at": { "type": "string" }, @@ -13385,6 +12394,7 @@ "saml": { "type": "object", "properties": { + "id": { "type": "string" }, "entity_id": { "type": "string" }, "metadata_url": { "type": "string" }, "metadata_xml": { "type": "string" }, @@ -13399,7 +12409,7 @@ "name": { "type": "string" }, "names": { "type": "array", "items": { "type": "string" } }, "default": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": {} }, { "type": "number" }, { "type": "string" }, @@ -13423,17 +12433,19 @@ ] } }, - "required": ["entity_id"] + "required": ["id", "entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { + "id": { "type": "string" }, "domain": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } - } + }, + "required": ["id"] } }, "created_at": { "type": "string" }, @@ -13452,6 +12464,7 @@ "saml": { "type": "object", "properties": { + "id": { "type": "string" }, "entity_id": { "type": "string" }, "metadata_url": { "type": "string" }, "metadata_xml": { "type": "string" }, @@ -13466,7 +12479,7 @@ "name": { "type": "string" }, "names": { "type": "array", "items": { "type": "string" } }, "default": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": {} }, { "type": "number" }, { "type": "string" }, @@ -13490,17 +12503,19 @@ ] } }, - "required": ["entity_id"] + "required": ["id", "entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { + "id": { "type": "string" }, "domain": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } - } + }, + "required": ["id"] } }, "created_at": { "type": "string" }, @@ -13525,7 +12540,7 @@ "name": { "type": "string" }, "names": { "type": "array", "items": { "type": "string" } }, "default": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": {} }, { "type": "number" }, { "type": "string" }, @@ -13561,6 +12576,7 @@ "saml": { "type": "object", "properties": { + "id": { "type": "string" }, "entity_id": { "type": "string" }, "metadata_url": { "type": "string" }, "metadata_xml": { "type": "string" }, @@ -13575,7 +12591,7 @@ "name": { "type": "string" }, "names": { "type": "array", "items": { "type": "string" } }, "default": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": {} }, { "type": "number" }, { "type": "string" }, @@ -13599,17 +12615,19 @@ ] } }, - "required": ["entity_id"] + "required": ["id", "entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { + "id": { "type": "string" }, "domain": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } - } + }, + "required": ["id"] } }, "created_at": { "type": "string" }, @@ -13624,6 +12642,7 @@ "saml": { "type": "object", "properties": { + "id": { "type": "string" }, "entity_id": { "type": "string" }, "metadata_url": { "type": "string" }, "metadata_xml": { "type": "string" }, @@ -13638,7 +12657,7 @@ "name": { "type": "string" }, "names": { "type": "array", "items": { "type": "string" } }, "default": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": {} }, { "type": "number" }, { "type": "string" }, @@ -13662,17 +12681,19 @@ ] } }, - "required": ["entity_id"] + "required": ["id", "entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { + "id": { "type": "string" }, "domain": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } - } + }, + "required": ["id"] } }, "created_at": { "type": "string" }, @@ -13691,11 +12712,7 @@ "items": { "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, + "id": { "type": "integer" }, "is_physical_backup": { "type": "boolean" }, "status": { "type": "string", @@ -13709,16 +12726,8 @@ "physical_backup_data": { "type": "object", "properties": { - "earliest_physical_backup_date_unix": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "latest_physical_backup_date_unix": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } + "earliest_physical_backup_date_unix": { "type": "integer" }, + "latest_physical_backup_date_unix": { "type": "integer" } } } }, @@ -13727,12 +12736,7 @@ "V1RestorePitrBody": { "type": "object", "properties": { - "recovery_time_target_unix": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991, - "format": "int64" - } + "recovery_time_target_unix": { "type": "integer", "minimum": 0, "format": "int64" } }, "required": ["recovery_time_target_unix"], "example": { "recovery_time_target_unix": 1740787200 } @@ -13748,20 +12752,13 @@ "properties": { "name": { "type": "string" }, "status": { "type": "string", "enum": ["AVAILABLE", "PENDING", "REMOVED", "FAILED"] }, - "completed_on": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "nullable": true - } + "completed_on": { "type": "string", "format": "date-time", "nullable": true } }, "required": ["name", "status", "completed_on"] }, "V1RestoreBackupBody": { "type": "object", - "properties": { - "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } - }, + "properties": { "id": { "type": "integer" } }, "required": ["id"], "example": { "id": 12345 } }, @@ -13770,14 +12767,12 @@ "properties": { "schedule_for": { "type": "string", - "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?$", "description": "Time of day to schedule daily backups, in UTC. Format: HH:MM:SS.", "example": "04:00:00" }, "updated_at": { "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", "description": "Timestamp of when the backup schedule was last updated.", "example": "2026-05-04T14:40:44+00:00" } @@ -13789,7 +12784,6 @@ "properties": { "schedule_for": { "type": "string", - "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?$", "description": "Time of day to schedule daily backups, in UTC. Format: HH:MM:SS.", "example": "04:00:00" } @@ -13889,7 +12883,7 @@ "hasAccess": { "type": "boolean" }, "type": { "type": "string", "enum": ["boolean", "numeric", "set"] }, "config": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { "enabled": { "type": "boolean" } }, @@ -13943,6 +12937,7 @@ "opt_in_tags": { "type": "array", "items": { + "type": "string", "enum": [ "AI_SQL_GENERATOR_OPT_IN", "AI_DATA_GENERATOR_OPT_IN", @@ -14010,7 +13005,7 @@ }, "target_subscription_plan": { "type": "string", - "enum": ["free", "pro", "team", "enterprise", "platform", null], + "enum": ["free", "pro", "team", "enterprise", "platform"], "nullable": true } }, @@ -14026,11 +13021,7 @@ }, "expires_at": { "type": "string" }, "created_at": { "type": "string" }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - } + "created_by": { "type": "string", "format": "uuid" } }, "required": ["project", "preview", "expires_at", "created_at", "created_by"] }, diff --git a/apps/docs/spec/api_v2_openapi.json b/apps/docs/spec/api_v2_openapi.json index 2e07d5ac062e4..3f82b25778f73 100644 --- a/apps/docs/spec/api_v2_openapi.json +++ b/apps/docs/spec/api_v2_openapi.json @@ -33,12 +33,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to fetch log drains" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_config_read"] }], "summary": "List project log drains", "tags": ["Analytics"], "x-badges": [{ "name": "OAuth scope: analytics_config:read", "position": "after" }], "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_config_read"]], "x-oauth-scope": "analytics_config:read" }, "post": { @@ -75,18 +74,13 @@ }, "401": { "description": "Unauthorized" }, "402": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan.", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/PlanGateErrorBodyV2" } - } - } + "description": "This feature requires the Pro, Team, or Enterprise organization plan." }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to create a log drain" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_config_write"] }], "summary": "Create a log drain for a project", "tags": ["Analytics"], "x-allowed-plans": ["Pro", "Team", "Enterprise"], @@ -95,7 +89,6 @@ { "name": "OAuth scope: analytics_config:write", "position": "after" } ], "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_config_write"]], "x-oauth-scope": "analytics_config:write" } }, @@ -121,11 +114,7 @@ "required": true, "in": "path", "description": "Log drains identifier", - "schema": { - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "type": "string" - } + "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { @@ -148,12 +137,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to update log drain" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_config_write"] }], "summary": "Update a project log drain", "tags": ["Analytics"], "x-badges": [{ "name": "OAuth scope: analytics_config:write", "position": "after" }], "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_config_write"]], "x-oauth-scope": "analytics_config:write" }, "delete": { @@ -177,11 +165,7 @@ "required": true, "in": "path", "description": "Log drains identifier", - "schema": { - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "type": "string" - } + "schema": { "format": "uuid", "type": "string" } } ], "responses": { @@ -191,12 +175,11 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to delete a log drain" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["analytics_config_write"] }], "summary": "Delete a project log drain", "tags": ["Analytics"], "x-badges": [{ "name": "OAuth scope: analytics_config:write", "position": "after" }], "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_config_write"]], "x-oauth-scope": "analytics_config:write" } }, @@ -239,11 +222,10 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_read"] }], "summary": "Previews transferring a project to a different organizations, shows eligibility and impact", "tags": ["Projects"], - "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["project_admin_read"]] + "x-endpoint-owners": ["management-api"] } }, "/v2/projects/{ref}/transfers": { @@ -278,11 +260,10 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["organization_admin_write"] }], "summary": "Transfers a project to a different organization", "tags": ["Projects"], - "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_write"]] + "x-endpoint-owners": ["management-api"] } }, "/v2/projects/{ref}/private-link/associations": { @@ -317,11 +298,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to retrieve AWS accounts for project" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_read"] }], "summary": "List AWS accounts attached to the project PrivateLink share", "tags": ["Projects"], - "x-endpoint-owners": ["platform-networking", "management-api"], - "x-fga-permissions": [["project_admin_read"]] + "x-endpoint-owners": ["platform-networking", "management-api"] }, "post": { "description": "Adds an AWS account to the project's PrivateLink configuration and schedules the AWS resources to be created.", @@ -360,29 +340,23 @@ }, "401": { "description": "Unauthorized" }, "402": { - "description": "This feature requires the Team, or Enterprise organization plan.", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/PlanGateErrorBodyV2" } - } - } + "description": "This feature requires the Team, or Enterprise organization plan." }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to add AWS account to PrivateLink share" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], "summary": "Add an AWS account to the project PrivateLink share", "tags": ["Projects"], "x-allowed-plans": ["Team", "Enterprise"], "x-badges": [{ "name": "Only available on Team, Enterprise", "position": "before" }], - "x-endpoint-owners": ["platform-networking", "management-api"], - "x-fga-permissions": [["project_admin_write"]] + "x-endpoint-owners": ["platform-networking", "management-api"] } }, "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}": { "delete": { - "description": "Removes an AWS account from the project's PrivateLink configuration (targeting the primary database). Cleans up the associated AWS resources.", + "description": "Removes an AWS account from the project's PrivateLink configuration. Cleans up the associated AWS resources.", "operationId": "v2-delete-private-link-association", "parameters": [ { @@ -400,7 +374,7 @@ }, { "name": "aws_account_id", - "required": true, + "required": false, "in": "path", "description": "AWS account ID used in PrivateLink association", "schema": { "type": "string" } @@ -413,58 +387,10 @@ "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to remove AWS account from PrivateLink share" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["project_admin_write"] }], "summary": "Remove an AWS account from the project PrivateLink share", "tags": ["Projects"], - "x-endpoint-owners": ["platform-networking", "management-api"], - "x-fga-permissions": [["project_admin_write"]] - } - }, - "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}/database/{database_identifier}": { - "delete": { - "description": "Removes an AWS account from the project's PrivateLink configuration for the given read replica. Cleans up the associated AWS resources.", - "operationId": "v2-delete-private-link-association-for-database", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - }, - { - "name": "aws_account_id", - "required": true, - "in": "path", - "description": "AWS account ID used in PrivateLink association", - "schema": { "type": "string" } - }, - { - "name": "database_identifier", - "required": true, - "in": "path", - "description": "Identifier of the read replica this PrivateLink association targets", - "schema": { "type": "string" } - } - ], - "responses": { - "204": { "description": "" }, - "401": { "description": "Unauthorized" }, - "403": { "description": "Forbidden action" }, - "429": { "description": "Rate limit exceeded" }, - "500": { "description": "Failed to remove AWS account from PrivateLink share" } - }, - "security": [{ "bearer": [] }], - "summary": "Remove an AWS account from a specific database PrivateLink share", - "tags": ["Projects"], - "x-endpoint-owners": ["platform-networking", "management-api"], - "x-fga-permissions": [["project_admin_write"]] + "x-endpoint-owners": ["platform-networking", "management-api"] } }, "/v2/organizations/{slug}/members": { @@ -489,21 +415,12 @@ "in": "query", "schema": { "properties": { - "size": { "type": "integer", "minimum": 1, "maximum": 100 }, - "after": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "before": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - } + "size": { "type": "integer", "minimum": 1, "maximum": 100, "required": false }, + "after": { "type": "string", "format": "uuid", "required": false }, + "before": { "type": "string", "format": "uuid", "required": false } }, "type": "object" - }, - "style": "deepObject" + } }, { "name": "filter", @@ -511,16 +428,11 @@ "in": "query", "schema": { "properties": { - "username": { "type": "string" }, - "primary_email": { - "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - } + "username": { "type": "string", "required": false }, + "primary_email": { "type": "string", "format": "email", "required": false } }, "type": "object" - }, - "style": "deepObject" + } } ], "responses": { @@ -536,12 +448,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["members_read"] }], "summary": "List members of an organization", "tags": ["Organizations"], "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["members_read"]], "x-oauth-scope": "organizations:read" } }, @@ -565,11 +476,7 @@ "name": "user_id", "required": true, "in": "path", - "schema": { - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "type": "string" - } + "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { @@ -590,25 +497,17 @@ } }, "401": { "description": "Unauthorized" }, - "402": { - "description": "This feature requires the Enterprise organization plan.", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/PlanGateErrorBodyV2" } - } - } - }, + "402": { "description": "This feature requires the Enterprise organization plan." }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" }, "500": { "description": "Failed to assign organization member role" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["organization_admin_write"] }], "summary": "Assign or change an organization member role", "tags": ["Organizations"], "x-allowed-plans": ["Enterprise"], "x-badges": [{ "name": "Only available on Enterprise", "position": "before" }], - "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_write"]] + "x-endpoint-owners": ["management-api"] } }, "/v2/organizations/{slug}/roles": { @@ -641,12 +540,11 @@ "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["members_read"] }], "summary": "List roles of an organization", "tags": ["Organizations"], "x-badges": [{ "name": "OAuth scope: organizations:read", "position": "after" }], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["members_read"]], "x-oauth-scope": "organizations:read" } }, @@ -685,18 +583,11 @@ } }, "401": { "description": "Unauthorized" }, - "402": { - "description": "This feature requires the Enterprise organization plan.", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/PlanGateErrorBodyV2" } - } - } - }, + "402": { "description": "This feature requires the Enterprise organization plan." }, "403": { "description": "Forbidden action" }, "429": { "description": "Rate limit exceeded" } }, - "security": [{ "bearer": [] }], + "security": [{ "bearer": [] }, { "fga_permissions": ["members_write"] }], "summary": "Creates organization invitations", "tags": ["Organizations Members Invitations"], "x-allowed-plans": ["Enterprise"], @@ -705,14615 +596,8 @@ { "name": "Only available on Enterprise", "position": "before" } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["members_write"]], - "x-oauth-scope": "organizations:write" - }, - "delete": { - "description": "Bulk delete member invitations for an organization by email address.", - "operationId": "v2-delete-organization-invitations", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "description": "Organization slug", - "schema": { - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba", - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/V2DeleteInvitationsRequest" } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/V2DeleteInvitationsResponse" } - } - } - }, - "401": { "description": "Unauthorized" }, - "402": { - "description": "This feature requires the Enterprise organization plan.", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/PlanGateErrorBodyV2" } - } - } - }, - "403": { "description": "Forbidden action" }, - "429": { "description": "Rate limit exceeded" } - }, - "security": [{ "bearer": [] }], - "summary": "Deletes organization invitations by email", - "tags": ["Organizations Members Invitations"], - "x-allowed-plans": ["Enterprise"], - "x-badges": [ - { "name": "OAuth scope: organizations:write", "position": "after" }, - { "name": "Only available on Enterprise", "position": "before" } - ], - "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["members_write"]], "x-oauth-scope": "organizations:write" } - }, - "/v2/organizations/{slug}/projects": { - "get": { - "description": "Returns a cursor-paginated list of projects for the specified organization, including their databases.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the number of projects returned per page.", - "operationId": "v2-list-organization-projects", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "description": "Organization slug", - "schema": { - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba", - "type": "string" - } - }, - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "properties": { - "size": { "type": "integer", "minimum": 1, "maximum": 100 }, - "after": { "type": "string", "minLength": 1 }, - "before": { "type": "string", "minLength": 1 } - }, - "type": "object" - }, - "style": "deepObject" - }, - { - "name": "sort", - "required": false, - "in": "query", - "description": "Sort order by creation time: `inserted_at` (oldest first) or `-inserted_at` (newest first). Defaults to `inserted_at`.", - "schema": { - "example": "-inserted_at", - "type": "string", - "enum": ["inserted_at", "-inserted_at"] - } - }, - { - "name": "search", - "required": false, - "in": "query", - "description": "Case-insensitive substring match on the project name.", - "schema": { "minLength": 1, "type": "string" } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/V2ListProjectsResponse" } - } - } - }, - "401": { "description": "Unauthorized" }, - "403": { "description": "Forbidden action" }, - "429": { "description": "Rate limit exceeded" } - }, - "security": [{ "bearer": [] }], - "summary": "List projects of an organization", - "tags": ["Organizations"], - "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], - "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_projects_read"]], - "x-oauth-scope": "projects:read" - } - }, - "/v2/organizations/{slug}/integrations/github/connections": { - "get": { - "description": "Returns a cursor-paginated list of the GitHub connections of the organization's projects.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the page size.\nPaging walks the organization projects, so a page holds at most `page[size]` connections and can hold fewer (or none) when some of its projects are not connected.\nFollow `links.next` until it is `null` rather than stopping on a short page.\n\nUse `filter[project_ref]` to narrow the list down to a single project.", - "operationId": "v2-list-organization-github-connections", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "description": "Organization slug", - "schema": { - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba", - "type": "string" - } - }, - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "properties": { - "size": { "type": "integer", "minimum": 1, "maximum": 100 }, - "after": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - }, - "before": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - } - }, - "type": "object" - }, - "style": "deepObject" - }, - { - "name": "filter", - "required": false, - "in": "query", - "schema": { - "properties": { - "project_ref": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - } - }, - "type": "object" - }, - "style": "deepObject" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/V2ListGitHubConnectionsResponse" } - } - } - }, - "401": { "description": "Unauthorized" }, - "403": { "description": "Forbidden action" }, - "429": { "description": "Rate limit exceeded" } - }, - "security": [{ "bearer": [] }], - "summary": "List GitHub connections of an organization", - "tags": ["Organizations"], - "x-badges": [{ "name": "OAuth scope: projects:read", "position": "after" }], - "x-endpoint-owners": ["management-api", "dev-workflows"], - "x-fga-permissions": [["organization_projects_read"]], - "x-oauth-scope": "projects:read" - } - }, - "/v2/projects/{ref}/webhooks/endpoints": { - "get": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "query", - "name": "page[offset]", - "schema": { "default": "0", "type": "string", "pattern": "^\\d+$" }, - "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend." - }, - { - "in": "query", - "name": "page[limit]", - "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" }, - "description": "Up to how many records to return." - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "Collection of endpoints", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { "type": "string", "maxLength": 512 }, - { "type": "null" } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "links": { - "type": "object", - "properties": { - "first": { - "description": "URL path to the first page if available.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0", - "anyOf": [{ "type": "string" }, { "type": "null" }] - }, - "prev": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "description": "URL path to the previous page.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0" - }, - "next": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "description": "URL path to the next page.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20" - }, - "last": { - "description": "URL path to the last page if available.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30", - "anyOf": [{ "type": "string" }, { "type": "null" }] - } - }, - "required": ["prev", "next"] - } - }, - "required": ["data", "links"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "List endpoints", - "description": "List all Webhook endpoints based on a project's ref or an organization's slug." - }, - "post": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - } - ], - "tags": ["Project webhooks"], - "responses": { - "201": { - "description": "Created endpoint", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Create endpoint", - "description": "Create new endpoint configuration to subscribe to specific webhook events.", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "default": true, - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "signing_secret": { - "type": "string", - "minLength": 8, - "maxLength": 64, - "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." - } - }, - "required": ["url", "event_types", "signing_secret"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] - } - } - } - } - }, - "delete": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "Deleted endpoints", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { "type": "string", "maxLength": 512 }, - { "type": "null" } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Delete all endpoints", - "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op." - } - }, - "/v2/projects/{ref}/webhooks/endpoints/{id}": { - "get": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "Endpoint details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "not_found.endpoint" }, - "message": { "type": "string", "const": "Not Found: Endpoint not found" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Get endpoint", - "description": "Get details of a specific endpoint." - }, - "patch": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "Updated endpoint details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "not_found.endpoint" }, - "message": { "type": "string", "const": "Not Found: Endpoint not found" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Update endpoint", - "description": "Update endpoint's configuration.", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "signing_secret": { - "type": "string", - "minLength": 8, - "maxLength": 64, - "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." - } - } - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] - } - } - } - } - }, - "delete": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "Deleted endpoint details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "not_found.endpoint" }, - "message": { "type": "string", "const": "Not Found: Endpoint not found" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Delete endpoint", - "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op." - } - }, - "/v2/projects/{ref}/webhooks/endpoints/{id}/deliveries": { - "get": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - }, - { - "in": "query", - "name": "page[before]", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param." - }, - { - "in": "query", - "name": "page[after]", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param." - }, - { - "in": "query", - "name": "page[size]", - "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" }, - "description": "Up to how many records to return." - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "List of deliveries", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "delivery", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." - }, - "event_id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of the event, which triggered the delivery (UUID v7)." - }, - "status": { - "type": "string", - "enum": ["pending", "success", "failure", "skipped"], - "description": "Status of the delivery attempt." - }, - "response_code": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "HTTP status code of the response, `0` if unavailable." - }, - "response_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "HTTP headers of the response, `{}` if unavailable." - }, - "response_body": { - "anyOf": [ - { - "anyOf": [ - { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { "type": "string" }, - "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." - }, - { - "type": "string", - "description": "String representation of an HTTP body of the response." - } - ] - }, - { "type": "null" } - ] - }, - "attempt_timestamp": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of the attempt." - } - }, - "required": [ - "id", - "event_id", - "status", - "response_code", - "response_headers", - "response_body", - "attempt_timestamp" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "links": { - "type": "object", - "properties": { - "first": { - "description": "URL path to the first page if available.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10", - "anyOf": [{ "type": "string" }, { "type": "null" }] - }, - "prev": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "description": "URL path to the previous page.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7" - }, - "next": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "description": "URL path to the next page.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4" - }, - "last": { - "description": "URL path to the last page if available.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", - "anyOf": [{ "type": "string" }, { "type": "null" }] - } - }, - "required": ["prev", "next"] - } - }, - "required": ["data", "links"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "not_found.endpoint" }, - "message": { "type": "string", "const": "Not Found: Endpoint not found" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "List deliveries", - "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed." - } - }, - "/v2/projects/{ref}/webhooks/endpoints/{id}/test": { - "post": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Project webhooks"], - "responses": { - "201": { - "description": "Event published", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "event", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an event (UUID v7)." - } - }, - "required": ["type", "id"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { - "type": "string", - "const": "bad_request.endpoint.test.disabled" - }, - "message": { - "type": "string", - "const": "Bad Request: Endpoint is disabled" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "EndpointTestDisabled" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { - "type": "string", - "const": "bad_request.endpoint.test.wrong_event_type" - }, - "message": { - "type": "string", - "const": "Bad Request: Provided event type is not subscribed to by the endpoint" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "EndpointTestWrongEventType" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "EndpointTestDisabled": { - "value": { - "error": { - "code": "bad_request.endpoint.test.disabled", - "message": "Bad Request: Endpoint is disabled", - "description": "Endpoint is disabled, to send test event endpoint must first be enabled." - } - } - }, - "EndpointTestWrongEventType": { - "value": { - "error": { - "code": "bad_request.endpoint.test.wrong_event_type", - "message": "Bad Request: Provided event type is not subscribed to by the endpoint", - "description": "Only event types that the endpoint is subscribed to can be specified." - } - } - }, - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "not_found.endpoint" }, - "message": { "type": "string", "const": "Not Found: Endpoint not found" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Send test event", - "description": "Publish a test event to verify the endpoint is working.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "event", - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "type": { - "description": "Webhook event type.", - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "project.v1.paused", - "project.v1.created", - "project.v1.restored", - "project.v1.transferred", - "project.v1.removed", - "project.v1.restarted", - "project.v1.status.changed", - "project.v1.backup.started", - "project.v1.branch.created", - "project.v1.branch.updated", - "project.v1.branch.removed", - "organization.v1.member.invitation.created", - "organization.v1.member.invitation.canceled", - "organization.v1.member.added", - "organization.v1.member.removed", - "organization.v1.member.role.assigned", - "organization.v1.member.role.removed", - "organization.v1.member.role.updated", - "organization.v1.billing.plan.upgraded", - "organization.v1.billing.plan.downgraded", - "project.v1.branch.deleted" - ] - } - }, - "required": ["type"] - } - }, - "required": ["type", "attributes"] - } - } - } - } - } - } - } - }, - "/v2/projects/{ref}/webhooks/deliveries/{id}": { - "get": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of a delivery (UUID v7)." - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "Delivery details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "delivery", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." - }, - "event_id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of the event, which triggered the delivery (UUID v7)." - }, - "status": { - "type": "string", - "enum": ["pending", "success", "failure", "skipped"], - "description": "Status of the delivery attempt." - }, - "response_code": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "HTTP status code of the response, `0` if unavailable." - }, - "response_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "HTTP headers of the response, `{}` if unavailable." - }, - "response_body": { - "anyOf": [ - { - "anyOf": [ - { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { "type": "string" }, - "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." - }, - { - "type": "string", - "description": "String representation of an HTTP body of the response." - } - ] - }, - { "type": "null" } - ] - }, - "attempt_timestamp": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of the attempt." - }, - "event": { - "type": "object", - "properties": { - "type": { - "description": "Webhook event type.", - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "project.v1.paused", - "project.v1.created", - "project.v1.restored", - "project.v1.transferred", - "project.v1.removed", - "project.v1.restarted", - "project.v1.status.changed", - "project.v1.backup.started", - "project.v1.branch.created", - "project.v1.branch.updated", - "project.v1.branch.removed", - "organization.v1.member.invitation.created", - "organization.v1.member.invitation.canceled", - "organization.v1.member.added", - "organization.v1.member.removed", - "organization.v1.member.role.assigned", - "organization.v1.member.role.removed", - "organization.v1.member.role.updated", - "organization.v1.billing.plan.upgraded", - "organization.v1.billing.plan.downgraded", - "project.v1.branch.deleted" - ] - }, - "payload": { - "type": "object", - "properties": { - "organization_slug": { - "type": "string", - "pattern": "^[\\w-]+$", - "description": "Organization slug", - "example": "tsrqponmlkjihgfedcba" - }, - "project_ref": { - "anyOf": [ - { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - }, - { "type": "null" } - ] - } - }, - "required": ["organization_slug", "project_ref"], - "additionalProperties": {}, - "description": "Final data sent to the consumer." - }, - "timestamp": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of event publication." - } - }, - "required": ["type", "payload", "timestamp"] - } - }, - "required": [ - "id", - "event_id", - "status", - "response_code", - "response_headers", - "response_body", - "attempt_timestamp", - "event" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "DeliveryNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "not_found.delivery" }, - "message": { "type": "string", "const": "Not Found: Delivery not found" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.delivery", - "message": "Not Found: Delivery not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Get delivery", - "description": "Get details of a specific delivery attempt." - } - }, - "/v2/projects/{ref}/webhooks/deliveries/{id}/retry": { - "post": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of a delivery (UUID v7)." - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "Delivery details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "event", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an event (UUID v7)." - } - }, - "required": ["type", "id"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "DeliveryNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "not_found.delivery" }, - "message": { "type": "string", "const": "Not Found: Delivery not found" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.delivery", - "message": "Not Found: Delivery not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Retry delivery", - "description": "Retry delivering the same event again.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds." - } - }, - "/v2/organizations/{slug}/webhooks/endpoints": { - "get": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "query", - "name": "page[offset]", - "schema": { "default": "0", "type": "string", "pattern": "^\\d+$" }, - "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend." - }, - { - "in": "query", - "name": "page[limit]", - "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" }, - "description": "Up to how many records to return." - } - ], - "tags": ["Organization webhooks"], - "responses": { - "200": { - "description": "Collection of endpoints", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { "type": "string", "maxLength": 512 }, - { "type": "null" } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "links": { - "type": "object", - "properties": { - "first": { - "description": "URL path to the first page if available.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0", - "anyOf": [{ "type": "string" }, { "type": "null" }] - }, - "prev": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "description": "URL path to the previous page.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0" - }, - "next": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "description": "URL path to the next page.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20" - }, - "last": { - "description": "URL path to the last page if available.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30", - "anyOf": [{ "type": "string" }, { "type": "null" }] - } - }, - "required": ["prev", "next"] - } - }, - "required": ["data", "links"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "List endpoints", - "description": "List all Webhook endpoints based on a project's ref or an organization's slug." - }, - "post": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - } - ], - "tags": ["Organization webhooks"], - "responses": { - "201": { - "description": "Created endpoint", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Create endpoint", - "description": "Create new endpoint configuration to subscribe to specific webhook events.", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "default": true, - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "signing_secret": { - "type": "string", - "minLength": 8, - "maxLength": 64, - "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." - } - }, - "required": ["url", "event_types", "signing_secret"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] - } - } - } - } - }, - "delete": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - } - ], - "tags": ["Organization webhooks"], - "responses": { - "200": { - "description": "Deleted endpoints", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { "type": "string", "maxLength": 512 }, - { "type": "null" } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Delete all endpoints", - "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op." - } - }, - "/v2/organizations/{slug}/webhooks/endpoints/{id}": { - "get": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Organization webhooks"], - "responses": { - "200": { - "description": "Endpoint details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "not_found.endpoint" }, - "message": { "type": "string", "const": "Not Found: Endpoint not found" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Get endpoint", - "description": "Get details of a specific endpoint." - }, - "patch": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Organization webhooks"], - "responses": { - "200": { - "description": "Updated endpoint details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "not_found.endpoint" }, - "message": { "type": "string", "const": "Not Found: Endpoint not found" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Update endpoint", - "description": "Update endpoint's configuration.", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "signing_secret": { - "type": "string", - "minLength": 8, - "maxLength": 64, - "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." - } - } - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] - } - } - } - } - }, - "delete": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Organization webhooks"], - "responses": { - "200": { - "description": "Deleted endpoint details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [{ "type": "string", "maxLength": 512 }, { "type": "null" }], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [{ "type": "v1.project.paused" }] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { "Authorization": "Bearer example_token" } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "not_found.endpoint" }, - "message": { "type": "string", "const": "Not Found: Endpoint not found" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Delete endpoint", - "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op." - } - }, - "/v2/organizations/{slug}/webhooks/endpoints/{id}/deliveries": { - "get": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - }, - { - "in": "query", - "name": "page[before]", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param." - }, - { - "in": "query", - "name": "page[after]", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param." - }, - { - "in": "query", - "name": "page[size]", - "schema": { "default": "20", "type": "string", "pattern": "^\\d+$" }, - "description": "Up to how many records to return." - } - ], - "tags": ["Organization webhooks"], - "responses": { - "200": { - "description": "List of deliveries", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "delivery", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." - }, - "event_id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of the event, which triggered the delivery (UUID v7)." - }, - "status": { - "type": "string", - "enum": ["pending", "success", "failure", "skipped"], - "description": "Status of the delivery attempt." - }, - "response_code": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "HTTP status code of the response, `0` if unavailable." - }, - "response_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "HTTP headers of the response, `{}` if unavailable." - }, - "response_body": { - "anyOf": [ - { - "anyOf": [ - { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { "type": "string" }, - "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." - }, - { - "type": "string", - "description": "String representation of an HTTP body of the response." - } - ] - }, - { "type": "null" } - ] - }, - "attempt_timestamp": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of the attempt." - } - }, - "required": [ - "id", - "event_id", - "status", - "response_code", - "response_headers", - "response_body", - "attempt_timestamp" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "links": { - "type": "object", - "properties": { - "first": { - "description": "URL path to the first page if available.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10", - "anyOf": [{ "type": "string" }, { "type": "null" }] - }, - "prev": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "description": "URL path to the previous page.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7" - }, - "next": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "description": "URL path to the next page.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4" - }, - "last": { - "description": "URL path to the last page if available.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", - "anyOf": [{ "type": "string" }, { "type": "null" }] - } - }, - "required": ["prev", "next"] - } - }, - "required": ["data", "links"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "not_found.endpoint" }, - "message": { "type": "string", "const": "Not Found: Endpoint not found" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "List deliveries", - "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed." - } - }, - "/v2/organizations/{slug}/webhooks/endpoints/{id}/test": { - "post": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Organization webhooks"], - "responses": { - "201": { - "description": "Event published", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "event", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an event (UUID v7)." - } - }, - "required": ["type", "id"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { - "type": "string", - "const": "bad_request.endpoint.test.disabled" - }, - "message": { - "type": "string", - "const": "Bad Request: Endpoint is disabled" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "EndpointTestDisabled" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { - "type": "string", - "const": "bad_request.endpoint.test.wrong_event_type" - }, - "message": { - "type": "string", - "const": "Bad Request: Provided event type is not subscribed to by the endpoint" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "EndpointTestWrongEventType" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "EndpointTestDisabled": { - "value": { - "error": { - "code": "bad_request.endpoint.test.disabled", - "message": "Bad Request: Endpoint is disabled", - "description": "Endpoint is disabled, to send test event endpoint must first be enabled." - } - } - }, - "EndpointTestWrongEventType": { - "value": { - "error": { - "code": "bad_request.endpoint.test.wrong_event_type", - "message": "Bad Request: Provided event type is not subscribed to by the endpoint", - "description": "Only event types that the endpoint is subscribed to can be specified." - } - } - }, - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "not_found.endpoint" }, - "message": { "type": "string", "const": "Not Found: Endpoint not found" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Send test event", - "description": "Publish a test event to verify the endpoint is working.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "event", - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "type": { - "description": "Webhook event type.", - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "project.v1.paused", - "project.v1.created", - "project.v1.restored", - "project.v1.transferred", - "project.v1.removed", - "project.v1.restarted", - "project.v1.status.changed", - "project.v1.backup.started", - "project.v1.branch.created", - "project.v1.branch.updated", - "project.v1.branch.removed", - "organization.v1.member.invitation.created", - "organization.v1.member.invitation.canceled", - "organization.v1.member.added", - "organization.v1.member.removed", - "organization.v1.member.role.assigned", - "organization.v1.member.role.removed", - "organization.v1.member.role.updated", - "organization.v1.billing.plan.upgraded", - "organization.v1.billing.plan.downgraded", - "project.v1.branch.deleted" - ] - } - }, - "required": ["type"] - } - }, - "required": ["type", "attributes"] - } - } - } - } - } - } - } - }, - "/v2/organizations/{slug}/webhooks/deliveries/{id}": { - "get": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of a delivery (UUID v7)." - } - ], - "tags": ["Organization webhooks"], - "responses": { - "200": { - "description": "Delivery details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "delivery", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." - }, - "event_id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of the event, which triggered the delivery (UUID v7)." - }, - "status": { - "type": "string", - "enum": ["pending", "success", "failure", "skipped"], - "description": "Status of the delivery attempt." - }, - "response_code": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "HTTP status code of the response, `0` if unavailable." - }, - "response_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { "type": "string" } - }, - { "type": "null" } - ], - "description": "HTTP headers of the response, `{}` if unavailable." - }, - "response_body": { - "anyOf": [ - { - "anyOf": [ - { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { "type": "string" }, - "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." - }, - { - "type": "string", - "description": "String representation of an HTTP body of the response." - } - ] - }, - { "type": "null" } - ] - }, - "attempt_timestamp": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of the attempt." - }, - "event": { - "type": "object", - "properties": { - "type": { - "description": "Webhook event type.", - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "project.v1.paused", - "project.v1.created", - "project.v1.restored", - "project.v1.transferred", - "project.v1.removed", - "project.v1.restarted", - "project.v1.status.changed", - "project.v1.backup.started", - "project.v1.branch.created", - "project.v1.branch.updated", - "project.v1.branch.removed", - "organization.v1.member.invitation.created", - "organization.v1.member.invitation.canceled", - "organization.v1.member.added", - "organization.v1.member.removed", - "organization.v1.member.role.assigned", - "organization.v1.member.role.removed", - "organization.v1.member.role.updated", - "organization.v1.billing.plan.upgraded", - "organization.v1.billing.plan.downgraded", - "project.v1.branch.deleted" - ] - }, - "payload": { - "type": "object", - "properties": { - "organization_slug": { - "type": "string", - "pattern": "^[\\w-]+$", - "description": "Organization slug", - "example": "tsrqponmlkjihgfedcba" - }, - "project_ref": { - "anyOf": [ - { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - }, - { "type": "null" } - ] - } - }, - "required": ["organization_slug", "project_ref"], - "additionalProperties": {}, - "description": "Final data sent to the consumer." - }, - "timestamp": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of event publication." - } - }, - "required": ["type", "payload", "timestamp"] - } - }, - "required": [ - "id", - "event_id", - "status", - "response_code", - "response_headers", - "response_body", - "attempt_timestamp", - "event" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "DeliveryNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "not_found.delivery" }, - "message": { "type": "string", "const": "Not Found: Delivery not found" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.delivery", - "message": "Not Found: Delivery not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Get delivery", - "description": "Get details of a specific delivery attempt." - } - }, - "/v2/organizations/{slug}/webhooks/deliveries/{id}/retry": { - "post": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of a delivery (UUID v7)." - } - ], - "tags": ["Organization webhooks"], - "responses": { - "200": { - "description": "Delivery details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "event", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an event (UUID v7)." - } - }, - "required": ["type", "id"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_slug" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "bad_request.invalid_ref" }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "unauthorized" }, - "message": { "type": "string", "const": "Unauthorized" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { "error": { "code": "unauthorized", "message": "Unauthorized" } } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.permission_denied" }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "forbidden.access_disabled" }, - "message": { "type": "string", "const": "Forbidden: Access disabled" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "DeliveryNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "not_found.delivery" }, - "message": { "type": "string", "const": "Not Found: Delivery not found" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.delivery", - "message": "Not Found: Delivery not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "request_timeout" }, - "message": { "type": "string", "const": "Request Timeout" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "request_timeout", "message": "Request Timeout" } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "too_many_requests" }, - "message": { "type": "string", "const": "Too Many Requests" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { "code": "too_many_requests", "message": "Too Many Requests" } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string", "const": "internal_server_error" }, - "message": { "type": "string", "const": "Internal Server Error" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { "$ref": "#/components/schemas/APIErrorObject" } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { "APIErrorObject": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Retry delivery", - "description": "Retry delivering the same event again.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds." - } } }, "info": { @@ -15337,8 +621,8 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["log_drain"] + "enum": ["log_drain"], + "description": "Resource type." }, "id": { "type": "string" }, "attributes": { @@ -15347,7 +631,7 @@ "name": { "type": "string" }, "description": { "type": "string" }, "config": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -15473,14 +757,14 @@ "data": { "type": "object", "properties": { - "type": { "type": "string", "description": "Resource type.", "enum": ["log_drain"] }, + "type": { "type": "string", "enum": ["log_drain"], "description": "Resource type." }, "attributes": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "config": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -15605,7 +889,7 @@ "data": { "type": "object", "properties": { - "type": { "type": "string", "description": "Resource type.", "enum": ["log_drain"] }, + "type": { "type": "string", "enum": ["log_drain"], "description": "Resource type." }, "id": { "type": "string" }, "attributes": { "type": "object", @@ -15613,7 +897,7 @@ "name": { "type": "string" }, "description": { "type": "string" }, "config": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -15732,41 +1016,20 @@ }, "required": ["data"] }, - "PlanGateErrorBodyV2": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "HTTP status-derived error code, e.g. \"payment_required\"" - }, - "message": { - "type": "string", - "description": "Human-readable explanation of the plan gate" - } - }, - "required": ["code", "message"], - "description": "Plan-gate error object" - } - }, - "required": ["error"] - }, "UpdateLogDrainRequestOpenApi": { "type": "object", "properties": { "data": { "type": "object", "properties": { - "type": { "type": "string", "description": "Resource type.", "enum": ["log_drain"] }, + "type": { "type": "string", "enum": ["log_drain"], "description": "Resource type." }, "attributes": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "config": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -15893,8 +1156,8 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["project_transfer_input"] + "enum": ["project_transfer_input"], + "description": "Resource type." }, "attributes": { "type": "object", @@ -15915,8 +1178,8 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["project_transfer_result"] + "enum": ["project_transfer_result"], + "description": "Resource type." }, "attributes": { "type": "object", @@ -15974,8 +1237,8 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["private_link_association"] + "enum": ["private_link_association"], + "description": "Resource type." }, "id": { "type": "string" }, "attributes": { @@ -15989,8 +1252,8 @@ "description": "The AWS account ID this PrivateLink share is associated with." }, "account_name": { - "description": "Human-readable name for the AWS account.", - "type": "string" + "type": "string", + "description": "Human-readable name for the AWS account." }, "status": { "type": "string", @@ -16007,27 +1270,11 @@ "shared_at": { "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending.", - "nullable": true - }, - "database_type": { - "type": "string", - "enum": ["PRIMARY", "READ_REPLICA"], - "description": "Whether this PrivateLink share targets the primary database or a read replica." - }, - "database_identifier": { - "type": "string", - "description": "Identifier of the database this PrivateLink share targets - the project ref for the primary, or the read replica identifier." + "nullable": true, + "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending." } }, - "required": [ - "aws_account_id", - "status", - "shared_at", - "database_type", - "database_identifier" - ] + "required": ["aws_account_id", "status", "shared_at"] } }, "required": ["type", "id", "attributes"] @@ -16044,8 +1291,8 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["private_link_association"] + "enum": ["private_link_association"], + "description": "Resource type." }, "attributes": { "type": "object", @@ -16058,13 +1305,9 @@ "description": "The AWS account ID to add to the project PrivateLink share." }, "account_name": { - "description": "Optional human-readable name for the AWS account.", "type": "string", - "maxLength": 128 - }, - "database_identifier": { - "description": "Identifier of the read replica this PrivateLink share should target. Omit to target the primary database.", - "type": "string" + "maxLength": 128, + "description": "Optional human-readable name for the AWS account." } }, "required": ["aws_account_id"] @@ -16083,8 +1326,8 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["private_link_association"] + "enum": ["private_link_association"], + "description": "Resource type." }, "id": { "type": "string" }, "attributes": { @@ -16098,8 +1341,8 @@ "description": "The AWS account ID this PrivateLink share is associated with." }, "account_name": { - "description": "Human-readable name for the AWS account.", - "type": "string" + "type": "string", + "description": "Human-readable name for the AWS account." }, "status": { "type": "string", @@ -16116,27 +1359,11 @@ "shared_at": { "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending.", - "nullable": true - }, - "database_type": { - "type": "string", - "enum": ["PRIMARY", "READ_REPLICA"], - "description": "Whether this PrivateLink share targets the primary database or a read replica." - }, - "database_identifier": { - "type": "string", - "description": "Identifier of the database this PrivateLink share targets - the project ref for the primary, or the read replica identifier." + "nullable": true, + "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending." } }, - "required": [ - "aws_account_id", - "status", - "shared_at", - "database_type", - "database_identifier" - ] + "required": ["aws_account_id", "status", "shared_at"] } }, "required": ["type", "id", "attributes"] @@ -16154,26 +1381,22 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["organization_member"] - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$" + "enum": ["organization_member"], + "description": "Resource type." }, + "id": { "type": "string", "format": "uuid" }, "attributes": { "type": "object", "properties": { "username": { "type": "string", - "description": "Member's username", - "nullable": true + "nullable": true, + "description": "Member's username" }, "primary_email": { "type": "string", - "description": "Member's primary email", - "nullable": true + "nullable": true, + "description": "Member's primary email" }, "mfa_enabled": { "type": "boolean", @@ -16185,8 +1408,8 @@ }, "avatar_url": { "type": "string", - "description": "Member's avatar URL", - "nullable": true + "nullable": true, + "description": "Member's avatar URL" }, "roles": { "type": "array", @@ -16239,27 +1462,27 @@ "properties": { "first": { "type": "string", + "nullable": true, "description": "URL path to the first page if available.", - "example": "/v2/organizations/my-org/members?page[size]=10", - "nullable": true + "example": "/v2/organizations/my-org/members?page[size]=10" }, "prev": { "type": "string", + "nullable": true, "description": "URL path to the previous page.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7", - "nullable": true + "example": "/v2/organizations/my-org/members?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7" }, "next": { "type": "string", + "nullable": true, "description": "URL path to the next page.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4", - "nullable": true + "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4" }, "last": { "type": "string", + "nullable": true, "description": "URL path to the last page if available.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", - "nullable": true + "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295" } }, "required": ["prev", "next"] @@ -16275,8 +1498,8 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["organization_member_role"] + "enum": ["organization_member_role"], + "description": "Resource type." }, "attributes": { "type": "object", @@ -16288,8 +1511,6 @@ "example": "developer" }, "projects": { - "description": "The projects to assign a project-scoped role for. If omitted, assigns an org-wide role.", - "minItems": 1, "type": "array", "items": { "type": "object", @@ -16301,7 +1522,9 @@ } }, "required": ["ref"] - } + }, + "minItems": 1, + "description": "The projects to assign a project-scoped role for. If omitted, assigns an org-wide role." } }, "required": ["role"] @@ -16320,8 +1543,8 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["organization_member_role"] + "enum": ["organization_member_role"], + "description": "Resource type." }, "attributes": { "type": "object", @@ -16364,9 +1587,10 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["organization_role"] + "enum": ["organization_role"], + "description": "Resource type." }, + "id": {}, "attributes": { "type": "object", "properties": { @@ -16389,25 +1613,19 @@ "type": "object", "properties": { "data": { - "minItems": 1, - "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["organization_invitation"] + "enum": ["organization_invitation"], + "description": "Resource type." }, "attributes": { "type": "object", "properties": { - "email": { - "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - }, + "email": { "type": "string", "format": "email" }, "role": { "type": "string", "enum": ["owner", "administrator", "developer", "read-only"], @@ -16415,8 +1633,6 @@ "example": "developer" }, "projects": { - "description": "The projects to limit a user to. If omitted, user will have org-wide access with the provided role.", - "minItems": 1, "type": "array", "items": { "type": "object", @@ -16428,7 +1644,9 @@ } }, "required": ["ref"] - } + }, + "minItems": 1, + "description": "The projects to limit a user to. If omitted, user will have org-wide access with the provided role." }, "require_sso": { "type": "boolean" } }, @@ -16436,7 +1654,9 @@ } }, "required": ["type", "attributes"] - } + }, + "minItems": 1, + "maxItems": 50 } }, "required": ["data"] @@ -16493,13 +1713,7 @@ }, "meta": { "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - } - }, + "properties": { "email": { "type": "string", "format": "email" } }, "required": ["email"] } }, @@ -16516,82 +1730,13 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["organization_invitation"] - }, - "attributes": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - } - }, - "required": ["email"] - } - }, - "required": ["type", "attributes"] - } - } - }, - "required": ["data"] - }, - "V2DeleteInvitationsRequest": { - "type": "object", - "properties": { - "data": { - "minItems": 1, - "maxItems": 100, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Resource type.", - "enum": ["organization_invitation"] - }, - "attributes": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - } - }, - "required": ["email"] - } - }, - "required": ["type", "attributes"] - } - } - }, - "required": ["data"] - }, - "V2DeleteInvitationsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Resource type.", - "enum": ["organization_invitation"] + "enum": ["organization_invitation"], + "description": "Resource type." }, + "id": {}, "attributes": { "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - } - }, + "properties": { "email": { "type": "string", "format": "email" } }, "required": ["email"] } }, @@ -16600,333 +1745,6 @@ } }, "required": ["data"] - }, - "V2ListProjectsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { "type": "string", "description": "Resource type.", "enum": ["project"] }, - "id": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - }, - "attributes": { - "type": "object", - "properties": { - "name": { "type": "string", "description": "Project name" }, - "status": { - "type": "string", - "enum": [ - "INACTIVE", - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "UNKNOWN", - "GOING_DOWN", - "INIT_FAILED", - "REMOVED", - "RESTORING", - "UPGRADING", - "PAUSING", - "RESTORE_FAILED", - "RESTARTING", - "PAUSE_FAILED", - "RESIZING" - ], - "description": "Project status" - }, - "cloud_provider": { - "type": "string", - "description": "Cloud provider hosting the project" - }, - "region": { - "type": "string", - "description": "Region the project is hosted in" - }, - "inserted_at": { - "type": "string", - "description": "When the project was created" - }, - "databases": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cloud_provider": { "type": "string" }, - "identifier": { "type": "string" }, - "region": { "type": "string", "nullable": true }, - "status": { - "type": "string", - "enum": [ - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "GOING_DOWN", - "INIT_FAILED", - "REMOVED", - "RESTORING", - "UNKNOWN", - "INIT_READ_REPLICA", - "INIT_READ_REPLICA_FAILED", - "RESTARTING", - "RESIZING" - ] - }, - "type": { "type": "string", "enum": ["PRIMARY", "READ_REPLICA"] }, - "infra_compute_size": { - "type": "string", - "enum": [ - "pico", - "nano", - "micro", - "small", - "medium", - "large", - "xlarge", - "2xlarge", - "4xlarge", - "8xlarge", - "12xlarge", - "16xlarge", - "24xlarge", - "24xlarge_optimized_memory", - "24xlarge_optimized_cpu", - "24xlarge_high_memory", - "48xlarge", - "48xlarge_optimized_memory", - "48xlarge_optimized_cpu", - "48xlarge_high_memory" - ] - }, - "disk_volume_size_gb": { "type": "number" }, - "disk_type": { "type": "string", "enum": ["gp3", "io2"] }, - "disk_throughput_mbps": { "type": "number" }, - "disk_last_modified_at": { "type": "string" } - }, - "required": ["cloud_provider", "identifier", "region", "status", "type"] - }, - "description": "The project's databases including compute and disk attributes." - } - }, - "required": [ - "name", - "status", - "cloud_provider", - "region", - "inserted_at", - "databases" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "links": { - "type": "object", - "properties": { - "first": { - "type": "string", - "description": "URL path to the first page if available.", - "example": "/v2/organizations/my-org/projects?page[size]=10", - "nullable": true - }, - "prev": { - "type": "string", - "description": "URL path to the previous page.", - "example": "/v2/organizations/my-org/projects?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7", - "nullable": true - }, - "next": { - "type": "string", - "description": "URL path to the next page.", - "example": "/v2/organizations/my-org/projects?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4", - "nullable": true - }, - "last": { - "type": "string", - "description": "URL path to the last page if available.", - "example": "/v2/organizations/my-org/projects?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", - "nullable": true - } - }, - "required": ["prev", "next"] - } - }, - "required": ["data", "links"] - }, - "V2ListGitHubConnectionsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Resource type.", - "enum": ["github_connection"] - }, - "id": { "type": "string", "description": "Connection id.", "example": "7" }, - "attributes": { - "type": "object", - "properties": { - "inserted_at": { - "type": "string", - "description": "When the connection was created" - }, - "updated_at": { - "type": "string", - "description": "When the connection was last updated" - }, - "installation_id": { - "type": "number", - "description": "GitHub App installation id" - }, - "workdir": { - "type": "string", - "description": "Directory within the repository the project lives in" - }, - "supabase_changes_only": { - "type": "boolean", - "description": "Whether branches are only created for changes under `supabase/`" - }, - "branch_limit": { - "type": "number", - "description": "Maximum number of preview branches" - }, - "new_branch_per_pr": { - "type": "boolean", - "description": "Whether a preview branch is created for every pull request" - }, - "project": { - "type": "object", - "properties": { - "id": { "type": "number" }, - "ref": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - }, - "name": { "type": "string" } - }, - "required": ["id", "ref", "name"], - "description": "The connected Supabase project" - }, - "repository": { - "type": "object", - "properties": { "id": { "type": "number" }, "name": { "type": "string" } }, - "required": ["id", "name"], - "description": "The connected GitHub repository" - }, - "user": { - "type": "object", - "properties": { - "id": { "type": "number" }, - "username": { "type": "string" }, - "primary_email": { "type": "string", "nullable": true } - }, - "required": ["id", "username", "primary_email"], - "description": "The user who created the connection, if still known", - "nullable": true - } - }, - "required": [ - "inserted_at", - "updated_at", - "installation_id", - "workdir", - "supabase_changes_only", - "branch_limit", - "new_branch_per_pr", - "project", - "repository", - "user" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "links": { - "type": "object", - "properties": { - "first": { - "type": "string", - "description": "URL path to the first page if available.", - "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10", - "nullable": true - }, - "prev": { - "type": "string", - "description": "URL path to the previous page.", - "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7", - "nullable": true - }, - "next": { - "type": "string", - "description": "URL path to the next page.", - "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4", - "nullable": true - }, - "last": { - "type": "string", - "description": "URL path to the last page if available.", - "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", - "nullable": true - } - }, - "required": ["prev", "next"] - } - }, - "required": ["data", "links"] - }, - "APIErrorObject": { - "type": "object", - "properties": { - "id": { "type": "string" }, - "code": { "type": "string" }, - "message": { "type": "string" }, - "description": { "type": "string" }, - "links": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { "type": "string" }, - "rel": { "type": "string" }, - "title": { "type": "string" }, - "type": { "type": "string" }, - "describedby": { "type": "string" }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { "type": "array", "items": { "$ref": "#/components/schemas/APIErrorObject" } } - }, - "required": ["code", "message"] } } } diff --git a/apps/docs/spec/common-api-sections.json b/apps/docs/spec/common-api-sections.json index 9421f19a16b03..ffe92d96efb4e 100644 --- a/apps/docs/spec/common-api-sections.json +++ b/apps/docs/spec/common-api-sections.json @@ -76,12 +76,6 @@ "slug": "v2-list-log-drains", "type": "operation" }, - { - "id": "v1-scrape-project-metrics", - "title": "Scrape project metrics", - "slug": "v1-scrape-project-metrics", - "type": "operation" - }, { "id": "v2-update-log-drain", "title": "Update log drain", @@ -766,12 +760,6 @@ "slug": "v1-list-all-organizations", "type": "operation" }, - { - "id": "v2-list-organization-github-connections", - "title": "List organization github connections", - "slug": "v2-list-organization-github-connections", - "type": "operation" - }, { "id": "v1-list-organization-members", "title": "List organization members", @@ -784,12 +772,6 @@ "slug": "v2-list-organization-members", "type": "operation" }, - { - "id": "v2-list-organization-projects", - "title": "List organization projects", - "slug": "v2-list-organization-projects", - "type": "operation" - }, { "id": "v2-list-organization-roles", "title": "List organization roles", @@ -807,12 +789,6 @@ "title": "Create organization invitations", "slug": "v2-create-organization-invitations", "type": "operation" - }, - { - "id": "v2-delete-organization-invitations", - "title": "Delete organization invitations", - "slug": "v2-delete-organization-invitations", - "type": "operation" } ] }, @@ -868,12 +844,6 @@ "slug": "v2-delete-private-link-association", "type": "operation" }, - { - "id": "v2-delete-private-link-association-for-database", - "title": "Delete private link association for database", - "slug": "v2-delete-private-link-association-for-database", - "type": "operation" - }, { "id": "v1-get-all-projects-for-organization", "title": "Get all projects for organization", diff --git a/apps/docs/spec/transforms/api_v1_openapi_deparsed.json b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json index da424d3bcd57a..c7576a9b540b5 100644 --- a/apps/docs/spec/transforms/api_v1_openapi_deparsed.json +++ b/apps/docs/spec/transforms/api_v1_openapi_deparsed.json @@ -78,7 +78,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -90,7 +90,6 @@ { "type": "string", "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -103,7 +102,67 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BranchDetailResponse" + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "postgres_version": { + "type": "string" + }, + "postgres_engine": { + "type": "string" + }, + "release_channel": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "INACTIVE", + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "UNKNOWN", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UPGRADING", + "PAUSING", + "RESTORE_FAILED", + "RESTARTING", + "PAUSE_FAILED", + "RESIZING" + ] + }, + "db_host": { + "type": "string" + }, + "db_port": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "db_user": { + "type": "string" + }, + "db_pass": { + "type": "string" + }, + "jwt_secret": { + "type": "string" + } + }, + "required": [ + "ref", + "postgres_version", + "postgres_engine", + "release_channel", + "status", + "db_host", + "db_port" + ] } } } @@ -115,6 +174,12 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["branching_production_read"] + }, + { + "fga_permissions": ["branching_development_read"] } ], "summary": "Get database branch config", @@ -126,7 +191,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_read"], ["branching_production_read"]], "x-oauth-scope": "environment:read" }, "patch": { @@ -140,7 +204,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -152,7 +216,6 @@ { "type": "string", "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -164,7 +227,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateBranchBody" + "type": "object", + "properties": { + "branch_name": { + "type": "string" + }, + "git_branch": { + "type": "string" + }, + "reset_on_push": { + "type": "boolean", + "description": "This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead.", + "deprecated": true + }, + "persistent": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "CREATING_PROJECT", + "RUNNING_MIGRATIONS", + "MIGRATIONS_PASSED", + "MIGRATIONS_FAILED", + "FUNCTIONS_DEPLOYED", + "FUNCTIONS_FAILED" + ] + }, + "request_review": { + "type": "boolean" + }, + "notify_url": { + "type": "string", + "format": "uri", + "description": "HTTP endpoint to receive branch status updates." + } + }, + "example": { + "branch_name": "preview-login-page", + "git_branch": "feature/login-page", + "persistent": true, + "request_review": true, + "notify_url": "https://example.com/webhooks/branches" + } } } } @@ -175,7 +280,108 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BranchResponse" + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "project_ref": { + "type": "string" + }, + "parent_project_ref": { + "type": "string" + }, + "is_default": { + "type": "boolean" + }, + "git_branch": { + "type": "string" + }, + "pr_number": { + "type": "integer", + "format": "int32" + }, + "latest_check_run_id": { + "type": "number", + "description": "This field is deprecated and will not be populated.", + "deprecated": true + }, + "persistent": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "CREATING_PROJECT", + "RUNNING_MIGRATIONS", + "MIGRATIONS_PASSED", + "MIGRATIONS_FAILED", + "FUNCTIONS_DEPLOYED", + "FUNCTIONS_FAILED" + ], + "description": "This field is deprecated. List action runs to get branch status instead.", + "deprecated": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "review_requested_at": { + "type": "string", + "format": "date-time" + }, + "with_data": { + "type": "boolean" + }, + "notify_url": { + "type": "string", + "format": "uri" + }, + "deletion_scheduled_at": { + "type": "string", + "format": "date-time" + }, + "preview_project_status": { + "type": "string", + "enum": [ + "INACTIVE", + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "UNKNOWN", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UPGRADING", + "PAUSING", + "RESTORE_FAILED", + "RESTARTING", + "PAUSE_FAILED", + "RESIZING" + ] + } + }, + "required": [ + "id", + "name", + "project_ref", + "parent_project_ref", + "is_default", + "persistent", + "status", + "created_at", + "updated_at", + "with_data" + ] } } } @@ -187,6 +393,12 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["branching_production_write"] + }, + { + "fga_permissions": ["branching_development_write"] } ], "summary": "Update database branch config", @@ -198,7 +410,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" }, "delete": { @@ -212,7 +423,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -224,7 +435,6 @@ { "type": "string", "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -236,8 +446,9 @@ "in": "query", "description": "If set to false, schedule deletion with 1-hour grace period (only when soft deletion is enabled).", "schema": { + "default": "true", "example": false, - "type": "string" + "type": "boolean" } } ], @@ -247,7 +458,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BranchDeleteResponse" + "type": "object", + "properties": { + "message": { + "type": "string", + "enum": ["ok"] + } + }, + "required": ["message"] } } } @@ -259,6 +477,12 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["branching_production_delete"] + }, + { + "fga_permissions": ["branching_development_delete"] } ], "summary": "Delete a database branch", @@ -270,7 +494,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_delete"], ["branching_production_delete"]], "x-oauth-scope": "environment:write" } }, @@ -286,7 +509,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -298,7 +521,6 @@ { "type": "string", "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -310,7 +532,15 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BranchActionBody" + "type": "object", + "properties": { + "migration_version": { + "type": "string" + } + }, + "example": { + "migration_version": "20250312000000" + } } } } @@ -321,7 +551,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BranchUpdateResponse" + "type": "object", + "properties": { + "workflow_run_id": { + "type": "string" + }, + "message": { + "type": "string", + "enum": ["ok"] + } + }, + "required": ["workflow_run_id", "message"] } } } @@ -333,6 +573,12 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["branching_production_write"] + }, + { + "fga_permissions": ["branching_development_write"] } ], "summary": "Pushes a database branch", @@ -344,7 +590,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -360,7 +605,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -372,7 +617,6 @@ { "type": "string", "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -384,7 +628,15 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BranchActionBody" + "type": "object", + "properties": { + "migration_version": { + "type": "string" + } + }, + "example": { + "migration_version": "20250312000000" + } } } } @@ -395,7 +647,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BranchUpdateResponse" + "type": "object", + "properties": { + "workflow_run_id": { + "type": "string" + }, + "message": { + "type": "string", + "enum": ["ok"] + } + }, + "required": ["workflow_run_id", "message"] } } } @@ -407,6 +669,12 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["branching_production_write"] + }, + { + "fga_permissions": ["branching_development_write"] } ], "summary": "Merges a database branch", @@ -418,7 +686,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -434,7 +701,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -446,7 +713,6 @@ { "type": "string", "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -458,7 +724,15 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BranchActionBody" + "type": "object", + "properties": { + "migration_version": { + "type": "string" + } + }, + "example": { + "migration_version": "20250312000000" + } } } } @@ -469,7 +743,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BranchUpdateResponse" + "type": "object", + "properties": { + "workflow_run_id": { + "type": "string" + }, + "message": { + "type": "string", + "enum": ["ok"] + } + }, + "required": ["workflow_run_id", "message"] } } } @@ -481,6 +765,12 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["branching_production_write"] + }, + { + "fga_permissions": ["branching_development_write"] } ], "summary": "Resets a database branch", @@ -492,7 +782,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -508,7 +797,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -520,7 +809,6 @@ { "type": "string", "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -533,7 +821,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BranchRestoreResponse" + "type": "object", + "properties": { + "message": { + "type": "string", + "enum": ["Branch restoration initiated"] + } + }, + "required": ["message"] } } } @@ -545,6 +840,12 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["branching_production_write"] + }, + { + "fga_permissions": ["branching_development_write"] } ], "summary": "Restore a scheduled branch deletion", @@ -556,7 +857,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -572,7 +872,7 @@ "description": "Branch ref or deprecated branch ID", "schema": { "example": "abcdefghijklmnopqrst", - "anyOf": [ + "oneOf": [ { "type": "string", "minLength": 20, @@ -584,7 +884,6 @@ { "type": "string", "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "deprecated": true } ] @@ -603,10 +902,10 @@ "name": "pgdelta", "required": false, "in": "query", - "description": "Use pg-delta instead of Migra for diffing when true. \nBoolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", + "description": "Use pg-delta instead of Migra for diffing when true", "schema": { - "example": "true", - "type": "string" + "example": false, + "type": "boolean" } } ], @@ -628,6 +927,12 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["branching_production_write"] + }, + { + "fga_permissions": ["branching_development_write"] } ], "summary": "[Beta] Diffs a database branch", @@ -639,7 +944,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_write"], ["branching_production_write"]], "x-oauth-scope": "environment:write" } }, @@ -656,7 +960,98 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/V1ProjectWithDatabaseResponse" + "type": "object", + "properties": { + "id": { + "type": "string", + "deprecated": true, + "description": "Deprecated: Use `ref` instead." + }, + "ref": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + }, + "organization_id": { + "type": "string", + "description": "Deprecated: Use `organization_slug` instead.", + "deprecated": true + }, + "organization_slug": { + "type": "string", + "pattern": "^[\\w-]+$", + "description": "Organization slug", + "example": "tsrqponmlkjihgfedcba" + }, + "name": { + "type": "string", + "description": "Name of your project" + }, + "region": { + "type": "string", + "description": "Region of your project" + }, + "created_at": { + "type": "string", + "description": "Creation timestamp" + }, + "status": { + "type": "string", + "enum": [ + "INACTIVE", + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "UNKNOWN", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UPGRADING", + "PAUSING", + "RESTORE_FAILED", + "RESTARTING", + "PAUSE_FAILED", + "RESIZING" + ] + }, + "database": { + "type": "object", + "properties": { + "host": { + "type": "string", + "description": "Database host" + }, + "version": { + "type": "string", + "description": "Database version" + }, + "postgres_engine": { + "type": "string", + "description": "Database engine" + }, + "release_channel": { + "type": "string", + "description": "Release channel" + } + }, + "required": ["host", "version", "postgres_engine", "release_channel"] + } + }, + "required": [ + "id", + "ref", + "organization_id", + "organization_slug", + "name", + "region", + "created_at", + "status", + "database" + ] } } } @@ -675,6 +1070,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["projects_read"] } ], "summary": "List all projects", @@ -686,7 +1084,6 @@ } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["projects_read"]], "x-oauth-scope": "projects:read" }, "post": { @@ -697,25 +1094,251 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1CreateProjectBody" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V1ProjectResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, + "type": "object", + "properties": { + "db_pass": { + "type": "string", + "description": "Database password" + }, + "name": { + "type": "string", + "maxLength": 256, + "description": "Name of your project" + }, + "organization_id": { + "type": "string", + "description": "Deprecated: Use `organization_slug` instead.", + "deprecated": true + }, + "organization_slug": { + "type": "string", + "pattern": "^[\\w-]+$", + "description": "Organization slug", + "example": "tsrqponmlkjihgfedcba" + }, + "plan": { + "type": "string", + "enum": ["free", "pro"], + "deprecated": true, + "description": "Subscription Plan is now set on organization level and is ignored in this request" + }, + "region": { + "type": "string", + "description": "Region you want your server to reside in. Use region_selection instead.", + "deprecated": true, + "enum": [ + "us-east-1", + "us-east-2", + "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-north-1", + "eu-central-1", + "eu-central-2", + "ca-central-1", + "ap-south-1", + "sa-east-1" + ] + }, + "region_selection": { + "discriminator": { + "propertyName": "type" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["specific"] + }, + "code": { + "type": "string", + "description": "Specific region code. The codes supported are not a stable API, and should be retrieved from the /available-regions endpoint.", + "enum": [ + "us-east-1", + "us-east-2", + "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-north-1", + "eu-central-1", + "eu-central-2", + "ca-central-1", + "ap-south-1", + "sa-east-1" + ] + } + }, + "required": ["type", "code"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["smartGroup"] + }, + "code": { + "type": "string", + "enum": ["americas", "emea", "apac"], + "description": "The Smart Region Group's code. The codes supported are not a stable API, and should be retrieved from the /available-regions endpoint." + } + }, + "required": ["type", "code"] + } + ], + "description": "Region selection. Only one of region or region_selection can be specified." + }, + "kps_enabled": { + "type": "boolean", + "deprecated": true, + "description": "This field is deprecated and is ignored in this request" + }, + "desired_instance_size": { + "description": "Desired instance size. Omit this field to always default to the smallest possible size.", + "type": "string", + "enum": [ + "nano", + "micro", + "small", + "medium", + "large", + "xlarge", + "2xlarge", + "4xlarge", + "8xlarge", + "12xlarge", + "16xlarge", + "24xlarge", + "24xlarge_optimized_memory", + "24xlarge_optimized_cpu", + "24xlarge_high_memory", + "48xlarge", + "48xlarge_optimized_memory", + "48xlarge_optimized_cpu", + "48xlarge_high_memory" + ] + }, + "template_url": { + "type": "string", + "format": "uri", + "description": "Template URL used to create the project from the CLI." + }, + "high_availability": { + "type": "boolean", + "description": "[Experimental] Whether to enable high availability for the project." + } + }, + "required": ["db_pass", "name", "organization_slug"], + "additionalProperties": false, + "hideDefinitions": ["release_channel", "postgres_engine"], + "example": { + "db_pass": "correct-horse-battery-staple", + "name": "acme-prod", + "organization_slug": "tsrqponmlkjihgfedcba", + "region": "us-east-1" + } + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "deprecated": true, + "description": "Deprecated: Use `ref` instead." + }, + "ref": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + }, + "organization_id": { + "type": "string", + "description": "Deprecated: Use `organization_slug` instead.", + "deprecated": true + }, + "organization_slug": { + "type": "string", + "pattern": "^[\\w-]+$", + "description": "Organization slug", + "example": "tsrqponmlkjihgfedcba" + }, + "name": { + "type": "string", + "description": "Name of your project" + }, + "region": { + "type": "string", + "description": "Region of your project" + }, + "created_at": { + "type": "string", + "description": "Creation timestamp" + }, + "status": { + "type": "string", + "enum": [ + "INACTIVE", + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "UNKNOWN", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UPGRADING", + "PAUSING", + "RESTORE_FAILED", + "RESTARTING", + "PAUSE_FAILED", + "RESIZING" + ] + } + }, + "required": [ + "id", + "ref", + "organization_id", + "organization_slug", + "name", + "region", + "created_at", + "status" + ] + } + } + } + }, + "401": { + "description": "Unauthorized" + }, "403": { "description": "Forbidden action" }, @@ -726,6 +1349,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["organization_projects_create"] } ], "summary": "Create a project", @@ -737,7 +1363,6 @@ } ], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["organization_projects_create"]], "x-oauth-scope": "projects:write" } }, @@ -803,7 +1428,153 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RegionsInfo" + "type": "object", + "properties": { + "recommendations": { + "type": "object", + "properties": { + "smartGroup": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string", + "enum": ["americas", "emea", "apac"] + }, + "type": { + "type": "string", + "enum": ["smartGroup"] + } + }, + "required": ["name", "code", "type"] + }, + "specific": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string", + "enum": [ + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + "ap-southeast-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-east-1", + "ap-southeast-2", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "eu-north-1", + "eu-central-1", + "eu-central-2", + "ca-central-1", + "ap-south-1", + "sa-east-1" + ] + }, + "type": { + "type": "string", + "enum": ["specific"] + }, + "provider": { + "type": "string", + "enum": ["AWS", "FLY", "AWS_K8S", "AWS_NIMBUS"] + }, + "status": { + "type": "string", + "enum": ["capacity", "other"] + } + }, + "required": ["name", "code", "type", "provider"] + } + } + }, + "required": ["smartGroup", "specific"] + }, + "all": { + "type": "object", + "properties": { + "smartGroup": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string", + "enum": ["americas", "emea", "apac"] + }, + "type": { + "type": "string", + "enum": ["smartGroup"] + } + }, + "required": ["name", "code", "type"] + } + }, + "specific": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string", + "enum": [ + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + "ap-southeast-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-east-1", + "ap-southeast-2", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "eu-north-1", + "eu-central-1", + "eu-central-2", + "ca-central-1", + "ap-south-1", + "sa-east-1" + ] + }, + "type": { + "type": "string", + "enum": ["specific"] + }, + "provider": { + "type": "string", + "enum": ["AWS", "FLY", "AWS_K8S", "AWS_NIMBUS"] + }, + "status": { + "type": "string", + "enum": ["capacity", "other"] + } + }, + "required": ["name", "code", "type", "provider"] + } + } + }, + "required": ["smartGroup", "specific"] + } + }, + "required": ["recommendations", "all"] } } } @@ -839,7 +1610,24 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/OrganizationResponseV1" + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Deprecated: Use `slug` instead.", + "deprecated": true + }, + "slug": { + "type": "string", + "pattern": "^[\\w-]+$", + "description": "Organization slug", + "example": "tsrqponmlkjihgfedcba" + }, + "name": { + "type": "string" + } + }, + "required": ["id", "slug", "name"] } } } @@ -861,6 +1649,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["organizations_read"] } ], "summary": "List all organizations", @@ -872,7 +1663,6 @@ } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organizations_read"]], "x-oauth-scope": "organizations:read" }, "post": { @@ -883,7 +1673,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateOrganizationV1" + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 256 + } + }, + "required": ["name"], + "additionalProperties": false, + "example": { + "name": "Acme" + } } } } @@ -894,7 +1695,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationResponseV1" + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Deprecated: Use `slug` instead.", + "deprecated": true + }, + "slug": { + "type": "string", + "pattern": "^[\\w-]+$", + "description": "Organization slug", + "example": "tsrqponmlkjihgfedcba" + }, + "name": { + "type": "string" + } + }, + "required": ["id", "slug", "name"] } } } @@ -915,12 +1733,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["organizations_create"] } ], "summary": "Create an organization", "tags": ["Organizations"], - "x-endpoint-owners": ["management-api", "billing"], - "x-fga-permissions": [["organizations_create"]] + "x-endpoint-owners": ["management-api", "billing"] } }, "/v1/oauth/authorize": { @@ -933,7 +1753,6 @@ "in": "query", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "66666666-6666-4666-8666-666666666666", "type": "string" } @@ -1029,7 +1848,6 @@ "description": "Resource indicator for MCP (Model Context Protocol) clients", "schema": { "format": "uri", - "example": "https://mcp.supabase.com/projects", "type": "string" } } @@ -1039,6 +1857,11 @@ "description": "" } }, + "security": [ + { + "oauth2": ["read"] + } + ], "summary": "[Beta] Authorize user through oauth", "tags": ["OAuth"], "x-endpoint-owners": ["auth", "management-api"] @@ -1054,7 +1877,58 @@ "content": { "application/x-www-form-urlencoded": { "schema": { - "$ref": "#/components/schemas/OAuthTokenBody" + "type": "object", + "properties": { + "grant_type": { + "type": "string", + "enum": [ + "authorization_code", + "refresh_token", + "urn:ietf:params:oauth:grant-type:jwt-bearer" + ] + }, + "client_id": { + "type": "string", + "format": "uuid" + }, + "client_secret": { + "type": "string" + }, + "code": { + "type": "string" + }, + "code_verifier": { + "type": "string" + }, + "redirect_uri": { + "type": "string" + }, + "refresh_token": { + "type": "string" + }, + "assertion": { + "type": "string", + "description": "IDJAG assertion JWT for grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer. Beta - available on Team and Enterprise plans only." + }, + "resource": { + "type": "string", + "format": "uri", + "description": "Resource indicator for MCP (Model Context Protocol) clients" + }, + "scope": { + "type": "string" + } + }, + "additionalProperties": false, + "example": { + "grant_type": "authorization_code", + "client_id": "66666666-6666-4666-8666-666666666666", + "client_secret": "sb_secret_live_example_9f4d3a206b2e4a7e8c91", + "code": "oauth_code_9f4d3a206b2e4a7e8c91", + "code_verifier": "qW0Z6d9pQnW0mL1dK1q9wFq6Yz2nV5rA8jT3mP7sH4c", + "redirect_uri": "https://app.acme.com/auth/callback", + "scope": "projects:read projects:write" + } } } } @@ -1065,12 +1939,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OAuthTokenResponse" + "type": "object", + "properties": { + "access_token": { + "type": "string" + }, + "refresh_token": { + "type": "string", + "description": "The `urn:ietf:params:oauth:grant-type:jwt-bearer` grant type issues access tokens only, no refresh token is returned and the token cannot be revoked via `/v1/oauth/revoke`." + }, + "expires_in": { + "type": "integer" + }, + "token_type": { + "type": "string", + "enum": ["Bearer"] + } + }, + "required": ["access_token", "expires_in", "token_type"], + "additionalProperties": false } } } } }, + "security": [ + { + "oauth2": ["write"] + } + ], "summary": "[Beta] Exchange auth code for user's access and refresh token", "tags": ["OAuth"], "x-endpoint-owners": ["auth", "management-api"] @@ -1085,8 +1982,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OAuthRevokeTokenBody" - } + "type": "object", + "properties": { + "client_id": { + "type": "string", + "format": "uuid" + }, + "client_secret": { + "type": "string" + }, + "refresh_token": { + "type": "string" + } + }, + "required": ["client_id", "client_secret", "refresh_token"], + "additionalProperties": false, + "example": { + "client_id": "66666666-6666-4666-8666-666666666666", + "client_secret": "sb_secret_live_example_9f4d3a206b2e4a7e8c91", + "refresh_token": "oauth_refresh_9f4d3a206b2e4a7e8c91" + } + } } } }, @@ -1095,6 +2011,11 @@ "description": "" } }, + "security": [ + { + "oauth2": ["write"] + } + ], "summary": "[Beta] Revoke oauth app authorization and it's corresponding tokens", "tags": ["OAuth"], "x-endpoint-owners": ["auth", "management-api"] @@ -1124,7 +2045,6 @@ "in": "query", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "66666666-6666-4666-8666-666666666666", "type": "string" } @@ -1203,12 +2123,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["organization_admin_write", "project_admin_write"] } ], "summary": "Authorize user through oauth and claim a project", "tags": ["OAuth"], - "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_write", "project_admin_write"]] + "x-endpoint-owners": ["management-api"] } }, "/v1/snippets": { @@ -1271,7 +2193,97 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SnippetList" + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "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", + "nullable": true + }, + "project": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + } + }, + "required": ["id", "name"] + }, + "owner": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "username": { + "type": "string" + } + }, + "required": ["id", "username"] + }, + "updated_by": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "username": { + "type": "string" + } + }, + "required": ["id", "username"] + }, + "favorite": { + "type": "boolean" + } + }, + "required": [ + "id", + "inserted_at", + "updated_at", + "type", + "visibility", + "name", + "description", + "project", + "owner", + "updated_by", + "favorite" + ] + } + }, + "cursor": { + "type": "string" + } + }, + "required": ["data"] } } } @@ -1292,6 +2304,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["snippets_read"] } ], "summary": "Lists SQL snippets for the logged in user", @@ -1303,7 +2318,6 @@ } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["snippets_read"]], "x-oauth-scope": "database:read" } }, @@ -1317,7 +2331,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "44444444-4444-4444-8444-444444444444", "type": "string" } @@ -1329,7 +2342,103 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SnippetResponse" + "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", + "nullable": true + }, + "project": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + } + }, + "required": ["id", "name"] + }, + "owner": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "username": { + "type": "string" + } + }, + "required": ["id", "username"] + }, + "updated_by": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "username": { + "type": "string" + } + }, + "required": ["id", "username"] + }, + "favorite": { + "type": "boolean" + }, + "content": { + "type": "object", + "properties": { + "favorite": { + "type": "boolean", + "deprecated": true, + "description": "Deprecated: Rely on root-level favorite property instead." + }, + "schema_version": { + "type": "string" + }, + "sql": { + "type": "string" + } + }, + "required": ["schema_version", "sql"] + } + }, + "required": [ + "id", + "inserted_at", + "updated_at", + "type", + "visibility", + "name", + "description", + "project", + "owner", + "updated_by", + "favorite", + "content" + ] } } } @@ -1350,6 +2459,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["snippets_read"] } ], "summary": "Gets a specific SQL snippet", @@ -1361,7 +2473,6 @@ } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["snippets_read"]], "x-oauth-scope": "database:read" } }, @@ -1375,7 +2486,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1ProfileResponse" + "type": "object", + "properties": { + "gotrue_id": { + "type": "string" + }, + "primary_email": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "required": ["gotrue_id", "primary_email", "username"] } } } @@ -1392,67 +2515,6 @@ } }, "/v1/projects/{ref}/actions": { - "head": { - "description": "Returns the total number of action runs of the specified project.", - "operationId": "v1-count-action-runs", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - } - ], - "responses": { - "200": { - "headers": { - "X-Total-Count": { - "schema": { - "type": "integer", - "format": "int64", - "minimum": 0 - }, - "description": "total count value" - } - }, - "description": "" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to count action runs" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "Count the number of action runs", - "tags": ["Environments"], - "x-badges": [ - { - "name": "OAuth scope: environment:read", - "position": "after" - } - ], - "x-fga-permissions": [["action_runs_read"]], - "x-oauth-scope": "environment:read" - }, "get": { "description": "Returns a paginated list of action runs of the specified project.", "operationId": "v1-list-action-runs", @@ -1497,7 +2559,83 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListActionRunResponse" + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "branch_id": { + "type": "string" + }, + "run_steps": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "clone", + "pull", + "health", + "configure", + "migrate", + "seed", + "deploy" + ] + }, + "status": { + "type": "string", + "enum": [ + "CREATED", + "DEAD", + "EXITED", + "PAUSED", + "REMOVING", + "RESTARTING", + "RUNNING" + ] + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": ["name", "status", "created_at", "updated_at"] + } + }, + "git_config": { + "nullable": true + }, + "workdir": { + "type": "string", + "nullable": true + }, + "check_run_id": { + "type": "number", + "nullable": true + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": [ + "id", + "branch_id", + "run_steps", + "workdir", + "check_run_id", + "created_at", + "updated_at" + ] + } } } } @@ -1518,6 +2656,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["action_runs_read"] } ], "summary": "List all action runs", @@ -1529,14 +2670,11 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["action_runs_read"]], "x-oauth-scope": "environment:read" - } - }, - "/v1/projects/{ref}/actions/{run_id}": { - "get": { - "description": "Returns the current status of the specified action run.", - "operationId": "v1-get-action-run", + }, + "head": { + "description": "Returns the total number of action runs of the specified project.", + "operationId": "v1-count-action-runs", "parameters": [ { "name": "ref", @@ -1550,10 +2688,75 @@ "example": "abcdefghijklmnopqrst", "type": "string" } - }, - { - "name": "run_id", - "required": true, + } + ], + "responses": { + "200": { + "headers": { + "X-Total-Count": { + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + }, + "description": "total count value" + } + }, + "description": "" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to count action runs" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["action_runs_read"] + } + ], + "summary": "Count the number of action runs", + "tags": ["Environments"], + "x-badges": [ + { + "name": "OAuth scope: environment:read", + "position": "after" + } + ], + "x-oauth-scope": "environment:read" + } + }, + "/v1/projects/{ref}/actions/{run_id}": { + "get": { + "description": "Returns the current status of the specified action run.", + "operationId": "v1-get-action-run", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + }, + { + "name": "run_id", + "required": true, "in": "path", "description": "Action Run ID", "schema": { @@ -1568,7 +2771,80 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ActionRunResponse" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "branch_id": { + "type": "string" + }, + "run_steps": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "clone", + "pull", + "health", + "configure", + "migrate", + "seed", + "deploy" + ] + }, + "status": { + "type": "string", + "enum": [ + "CREATED", + "DEAD", + "EXITED", + "PAUSED", + "REMOVING", + "RESTARTING", + "RUNNING" + ] + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": ["name", "status", "created_at", "updated_at"] + } + }, + "git_config": { + "nullable": true + }, + "workdir": { + "type": "string", + "nullable": true + }, + "check_run_id": { + "type": "number", + "nullable": true + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": [ + "id", + "branch_id", + "run_steps", + "workdir", + "check_run_id", + "created_at", + "updated_at" + ] } } } @@ -1589,6 +2865,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["action_runs_read"] } ], "summary": "Get the status of an action run", @@ -1600,7 +2879,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["action_runs_read"]], "x-oauth-scope": "environment:read" } }, @@ -1638,7 +2916,99 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateRunStatusBody" + "type": "object", + "properties": { + "clone": { + "type": "string", + "enum": [ + "CREATED", + "DEAD", + "EXITED", + "PAUSED", + "REMOVING", + "RESTARTING", + "RUNNING" + ] + }, + "pull": { + "type": "string", + "enum": [ + "CREATED", + "DEAD", + "EXITED", + "PAUSED", + "REMOVING", + "RESTARTING", + "RUNNING" + ] + }, + "health": { + "type": "string", + "enum": [ + "CREATED", + "DEAD", + "EXITED", + "PAUSED", + "REMOVING", + "RESTARTING", + "RUNNING" + ] + }, + "configure": { + "type": "string", + "enum": [ + "CREATED", + "DEAD", + "EXITED", + "PAUSED", + "REMOVING", + "RESTARTING", + "RUNNING" + ] + }, + "migrate": { + "type": "string", + "enum": [ + "CREATED", + "DEAD", + "EXITED", + "PAUSED", + "REMOVING", + "RESTARTING", + "RUNNING" + ] + }, + "seed": { + "type": "string", + "enum": [ + "CREATED", + "DEAD", + "EXITED", + "PAUSED", + "REMOVING", + "RESTARTING", + "RUNNING" + ] + }, + "deploy": { + "type": "string", + "enum": [ + "CREATED", + "DEAD", + "EXITED", + "PAUSED", + "REMOVING", + "RESTARTING", + "RUNNING" + ] + } + }, + "example": { + "clone": "RUNNING", + "configure": "RUNNING", + "migrate": "RUNNING", + "deploy": "CREATED" + } } } } @@ -1649,7 +3019,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateRunStatusResponse" + "type": "object", + "properties": { + "message": { + "type": "string", + "enum": ["ok"] + } + }, + "required": ["message"] } } } @@ -1670,6 +3047,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["action_runs_write"] } ], "summary": "Update the status of an action run", @@ -1681,7 +3061,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["action_runs_write"]], "x-oauth-scope": "environment:write" } }, @@ -1741,6 +3120,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["action_runs_read"] } ], "summary": "Get the logs of an action run", @@ -1752,7 +3134,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["action_runs_read"]], "x-oauth-scope": "environment:read" } }, @@ -1777,10 +3158,10 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", + "description": "Boolean string, true or false", "schema": { - "example": "true", - "type": "string" + "example": true, + "type": "boolean" } } ], @@ -1792,7 +3173,53 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/ApiKeyResponse" + "type": "object", + "properties": { + "api_key": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": ["legacy", "publishable", "secret"], + "nullable": true + }, + "prefix": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "hash": { + "type": "string", + "nullable": true + }, + "secret_jwt_template": { + "type": "object", + "additionalProperties": {}, + "nullable": true + }, + "inserted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "required": ["name"] } } } @@ -1811,6 +3238,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["api_gateway_keys_read"] } ], "summary": "Get project api keys", @@ -1822,7 +3252,6 @@ } ], "x-endpoint-owners": ["auth", "management-api"], - "x-fga-permissions": [["api_gateway_keys_read"]], "x-oauth-scope": "secrets:read" }, "post": { @@ -1845,10 +3274,10 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", + "description": "Boolean string, true or false", "schema": { - "example": "true", - "type": "string" + "example": true, + "type": "boolean" } } ], @@ -1857,7 +3286,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateApiKeyBody" + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["publishable", "secret"] + }, + "name": { + "type": "string", + "minLength": 4, + "maxLength": 64, + "pattern": "^[a-z_][a-z0-9_]+$" + }, + "description": { + "type": "string", + "nullable": true + }, + "secret_jwt_template": { + "type": "object", + "additionalProperties": {}, + "nullable": true + } + }, + "required": ["type", "name"], + "example": { + "type": "secret", + "name": "ci_secret_key", + "description": "CI deploy key" + } } } } @@ -1868,11 +3324,57 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKeyResponse" - } - } - } - }, + "type": "object", + "properties": { + "api_key": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": ["legacy", "publishable", "secret"], + "nullable": true + }, + "prefix": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "hash": { + "type": "string", + "nullable": true + }, + "secret_jwt_template": { + "type": "object", + "additionalProperties": {}, + "nullable": true + }, + "inserted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "required": ["name"] + } + } + } + }, "401": { "description": "Unauthorized" }, @@ -1886,6 +3388,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["api_gateway_keys_write"] } ], "summary": "Creates a new API key for the project", @@ -1897,7 +3402,6 @@ } ], "x-endpoint-owners": ["auth", "management-api"], - "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -1925,7 +3429,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LegacyApiKeysResponse" + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] } } } @@ -1943,6 +3453,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["api_gateway_keys_read"] } ], "summary": "Check whether JWT based legacy (anon, service_role) API keys are enabled. This API endpoint will be removed in the future, check for HTTP 404 Not Found.", @@ -1954,7 +3467,6 @@ } ], "x-endpoint-owners": ["auth", "management-api"], - "x-fga-permissions": [["api_gateway_keys_read"]], "x-oauth-scope": "secrets:read" }, "put": { @@ -1977,10 +3489,10 @@ "name": "enabled", "required": true, "in": "query", - "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", + "description": "Boolean string, true or false", "schema": { - "example": "true", - "type": "string" + "example": true, + "type": "boolean" } } ], @@ -1990,7 +3502,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LegacyApiKeysResponse" + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] } } } @@ -2008,6 +3526,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["api_gateway_keys_write"] } ], "summary": "Disable or re-enable JWT based legacy (anon, service_role) API keys. This API endpoint will be removed in the future, check for HTTP 404 Not Found.", @@ -2019,7 +3540,6 @@ } ], "x-endpoint-owners": ["auth", "management-api"], - "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -2046,7 +3566,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "22222222-2222-4222-8222-222222222222", "type": "string" } @@ -2055,10 +3574,10 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", + "description": "Boolean string, true or false", "schema": { - "example": "true", - "type": "string" + "example": true, + "type": "boolean" } } ], @@ -2067,7 +3586,28 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateApiKeyBody" + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 4, + "maxLength": 64, + "pattern": "^[a-z_][a-z0-9_]+$" + }, + "description": { + "type": "string", + "nullable": true + }, + "secret_jwt_template": { + "type": "object", + "additionalProperties": {}, + "nullable": true + } + }, + "example": { + "name": "ci_secret_key_rotated", + "description": "Rotated after March release" + } } } } @@ -2078,7 +3618,53 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKeyResponse" + "type": "object", + "properties": { + "api_key": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": ["legacy", "publishable", "secret"], + "nullable": true + }, + "prefix": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "hash": { + "type": "string", + "nullable": true + }, + "secret_jwt_template": { + "type": "object", + "additionalProperties": {}, + "nullable": true + }, + "inserted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "required": ["name"] } } } @@ -2096,6 +3682,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["api_gateway_keys_write"] } ], "summary": "Updates an API key for the project", @@ -2107,7 +3696,6 @@ } ], "x-endpoint-owners": ["auth", "management-api"], - "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" }, "get": { @@ -2132,7 +3720,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "22222222-2222-4222-8222-222222222222", "type": "string" } @@ -2141,10 +3728,10 @@ "name": "reveal", "required": false, "in": "query", - "description": "Boolean string.\n\nTruthy values: `true`, `1`, `yes`, `on`, `y`, `enabled`\n\nFalsy values: `false`, `0`, `no`, `off`, `n`, `disabled`", + "description": "Boolean string, true or false", "schema": { - "example": "true", - "type": "string" + "example": true, + "type": "boolean" } } ], @@ -2154,7 +3741,53 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKeyResponse" + "type": "object", + "properties": { + "api_key": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": ["legacy", "publishable", "secret"], + "nullable": true + }, + "prefix": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "hash": { + "type": "string", + "nullable": true + }, + "secret_jwt_template": { + "type": "object", + "additionalProperties": {}, + "nullable": true + }, + "inserted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "required": ["name"] } } } @@ -2172,6 +3805,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["api_gateway_keys_read"] } ], "summary": "Get API key", @@ -2183,7 +3819,6 @@ } ], "x-endpoint-owners": ["auth", "management-api"], - "x-fga-permissions": [["api_gateway_keys_read"]], "x-oauth-scope": "secrets:read" }, "delete": { @@ -2208,7 +3843,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "22222222-2222-4222-8222-222222222222", "type": "string" } @@ -2220,7 +3854,7 @@ "description": "Boolean string, true or false", "schema": { "example": true, - "type": "string" + "type": "boolean" } }, { @@ -2230,7 +3864,7 @@ "description": "Boolean string, true or false", "schema": { "example": false, - "type": "string" + "type": "boolean" } }, { @@ -2249,7 +3883,53 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKeyResponse" + "type": "object", + "properties": { + "api_key": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": ["legacy", "publishable", "secret"], + "nullable": true + }, + "prefix": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "hash": { + "type": "string", + "nullable": true + }, + "secret_jwt_template": { + "type": "object", + "additionalProperties": {}, + "nullable": true + }, + "inserted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "required": ["name"] } } } @@ -2267,6 +3947,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["api_gateway_keys_write"] } ], "summary": "Deletes an API key for the project", @@ -2278,7 +3961,6 @@ } ], "x-endpoint-owners": ["auth", "management-api"], - "x-fga-permissions": [["api_gateway_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -2309,7 +3991,108 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/BranchResponse" + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "project_ref": { + "type": "string" + }, + "parent_project_ref": { + "type": "string" + }, + "is_default": { + "type": "boolean" + }, + "git_branch": { + "type": "string" + }, + "pr_number": { + "type": "integer", + "format": "int32" + }, + "latest_check_run_id": { + "type": "number", + "description": "This field is deprecated and will not be populated.", + "deprecated": true + }, + "persistent": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "CREATING_PROJECT", + "RUNNING_MIGRATIONS", + "MIGRATIONS_PASSED", + "MIGRATIONS_FAILED", + "FUNCTIONS_DEPLOYED", + "FUNCTIONS_FAILED" + ], + "description": "This field is deprecated. List action runs to get branch status instead.", + "deprecated": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "review_requested_at": { + "type": "string", + "format": "date-time" + }, + "with_data": { + "type": "boolean" + }, + "notify_url": { + "type": "string", + "format": "uri" + }, + "deletion_scheduled_at": { + "type": "string", + "format": "date-time" + }, + "preview_project_status": { + "type": "string", + "enum": [ + "INACTIVE", + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "UNKNOWN", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UPGRADING", + "PAUSING", + "RESTORE_FAILED", + "RESTARTING", + "PAUSE_FAILED", + "RESIZING" + ] + } + }, + "required": [ + "id", + "name", + "project_ref", + "parent_project_ref", + "is_default", + "persistent", + "status", + "created_at", + "updated_at", + "with_data" + ] } } } @@ -2322,6 +4105,12 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["branching_production_read"] + }, + { + "fga_permissions": ["branching_development_read"] } ], "summary": "List all database branches", @@ -2333,7 +4122,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_read"], ["branching_production_read"]], "x-oauth-scope": "environment:read" }, "post": { @@ -2359,18 +4147,194 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateBranchBody" - } - } - } - }, - "responses": { - "201": { - "description": "", + "type": "object", + "properties": { + "branch_name": { + "type": "string", + "minLength": 1 + }, + "git_branch": { + "type": "string" + }, + "is_default": { + "type": "boolean" + }, + "persistent": { + "type": "boolean" + }, + "region": { + "type": "string" + }, + "desired_instance_size": { + "type": "string", + "enum": [ + "pico", + "nano", + "micro", + "small", + "medium", + "large", + "xlarge", + "2xlarge", + "4xlarge", + "8xlarge", + "12xlarge", + "16xlarge", + "24xlarge", + "24xlarge_optimized_memory", + "24xlarge_optimized_cpu", + "24xlarge_high_memory", + "48xlarge", + "48xlarge_optimized_memory", + "48xlarge_optimized_cpu", + "48xlarge_high_memory" + ] + }, + "release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"], + "description": "Release channel. If not provided, GA will be used." + }, + "postgres_engine": { + "type": "string", + "enum": ["15", "17", "17-oriole"], + "description": "Postgres engine version. If not provided, the latest version will be used." + }, + "secrets": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "with_data": { + "type": "boolean" + }, + "notify_url": { + "type": "string", + "format": "uri", + "description": "HTTP endpoint to receive branch status updates." + } + }, + "required": ["branch_name"], + "example": { + "branch_name": "preview-login-page", + "git_branch": "feature/login-page", + "persistent": true, + "with_data": false, + "notify_url": "https://example.com/webhooks/branches" + } + } + } + } + }, + "responses": { + "201": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BranchResponse" + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "project_ref": { + "type": "string" + }, + "parent_project_ref": { + "type": "string" + }, + "is_default": { + "type": "boolean" + }, + "git_branch": { + "type": "string" + }, + "pr_number": { + "type": "integer", + "format": "int32" + }, + "latest_check_run_id": { + "type": "number", + "description": "This field is deprecated and will not be populated.", + "deprecated": true + }, + "persistent": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "CREATING_PROJECT", + "RUNNING_MIGRATIONS", + "MIGRATIONS_PASSED", + "MIGRATIONS_FAILED", + "FUNCTIONS_DEPLOYED", + "FUNCTIONS_FAILED" + ], + "description": "This field is deprecated. List action runs to get branch status instead.", + "deprecated": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "review_requested_at": { + "type": "string", + "format": "date-time" + }, + "with_data": { + "type": "boolean" + }, + "notify_url": { + "type": "string", + "format": "uri" + }, + "deletion_scheduled_at": { + "type": "string", + "format": "date-time" + }, + "preview_project_status": { + "type": "string", + "enum": [ + "INACTIVE", + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "UNKNOWN", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UPGRADING", + "PAUSING", + "RESTORE_FAILED", + "RESTARTING", + "PAUSE_FAILED", + "RESIZING" + ] + } + }, + "required": [ + "id", + "name", + "project_ref", + "parent_project_ref", + "is_default", + "persistent", + "status", + "created_at", + "updated_at", + "with_data" + ] } } } @@ -2382,6 +4346,12 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["branching_production_create"] + }, + { + "fga_permissions": ["branching_development_create"] } ], "summary": "Create a database branch", @@ -2393,7 +4363,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_create"], ["branching_production_create"]], "x-oauth-scope": "environment:write" }, "delete": { @@ -2434,6 +4403,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["branching_production_delete"] } ], "summary": "Disables preview branching", @@ -2445,7 +4417,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_production_delete"]], "x-oauth-scope": "environment:write" } }, @@ -2483,7 +4454,108 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BranchResponse" + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "project_ref": { + "type": "string" + }, + "parent_project_ref": { + "type": "string" + }, + "is_default": { + "type": "boolean" + }, + "git_branch": { + "type": "string" + }, + "pr_number": { + "type": "integer", + "format": "int32" + }, + "latest_check_run_id": { + "type": "number", + "description": "This field is deprecated and will not be populated.", + "deprecated": true + }, + "persistent": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "CREATING_PROJECT", + "RUNNING_MIGRATIONS", + "MIGRATIONS_PASSED", + "MIGRATIONS_FAILED", + "FUNCTIONS_DEPLOYED", + "FUNCTIONS_FAILED" + ], + "description": "This field is deprecated. List action runs to get branch status instead.", + "deprecated": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "review_requested_at": { + "type": "string", + "format": "date-time" + }, + "with_data": { + "type": "boolean" + }, + "notify_url": { + "type": "string", + "format": "uri" + }, + "deletion_scheduled_at": { + "type": "string", + "format": "date-time" + }, + "preview_project_status": { + "type": "string", + "enum": [ + "INACTIVE", + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "UNKNOWN", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UPGRADING", + "PAUSING", + "RESTORE_FAILED", + "RESTARTING", + "PAUSE_FAILED", + "RESIZING" + ] + } + }, + "required": [ + "id", + "name", + "project_ref", + "parent_project_ref", + "is_default", + "persistent", + "status", + "created_at", + "updated_at", + "with_data" + ] } } } @@ -2495,6 +4567,12 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["branching_production_read"] + }, + { + "fga_permissions": ["branching_development_read"] } ], "summary": "Get a database branch", @@ -2506,7 +4584,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["branching_development_read"], ["branching_production_read"]], "x-oauth-scope": "environment:read" } }, @@ -2534,7 +4611,126 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateCustomHostnameResponse" + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "1_not_started", + "2_initiated", + "3_challenge_verified", + "4_origin_setup_completed", + "5_services_reconfigured" + ] + }, + "custom_hostname": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "errors": { + "type": "array", + "items": { + "description": "Any JSON-serializable value" + } + }, + "messages": { + "type": "array", + "items": { + "description": "Any JSON-serializable value" + } + }, + "result": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hostname": { + "type": "string" + }, + "ssl": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "validation_records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "txt_name": { + "type": "string" + }, + "txt_value": { + "type": "string" + } + }, + "required": ["txt_name", "txt_value"] + } + }, + "validation_errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": ["message"] + } + } + }, + "required": ["status", "validation_records"] + }, + "ownership_verification": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["type", "name", "value"] + }, + "custom_origin_server": { + "type": "string" + }, + "verification_errors": { + "type": "array", + "items": { + "type": "string" + } + }, + "status": { + "type": "string" + } + }, + "required": [ + "id", + "hostname", + "ssl", + "ownership_verification", + "custom_origin_server", + "status" + ] + } + }, + "required": ["success", "errors", "messages", "result"] + } + }, + "required": ["status", "custom_hostname", "data"] } } } @@ -2555,6 +4751,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["custom_domain_read"] } ], "summary": "[Beta] Gets project's custom hostname config", @@ -2566,7 +4765,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["custom_domain_read"]], "x-oauth-scope": "domains:read" }, "delete": { @@ -2591,7 +4789,8 @@ "in": "query", "description": "If true, also removes the custom domain add-on from the project subscription.", "schema": { - "type": "string" + "default": "false", + "type": "boolean" } } ], @@ -2615,6 +4814,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["custom_domain_write"] } ], "summary": "[Beta] Deletes a project's custom hostname configuration", @@ -2626,7 +4828,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -2653,7 +4854,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateCustomHostnameBody" + "type": "object", + "properties": { + "custom_hostname": { + "type": "string", + "maxLength": 253, + "minLength": 1 + } + }, + "required": ["custom_hostname"], + "example": { + "custom_hostname": "docs.example.com" + } } } } @@ -2664,7 +4876,126 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateCustomHostnameResponse" + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "1_not_started", + "2_initiated", + "3_challenge_verified", + "4_origin_setup_completed", + "5_services_reconfigured" + ] + }, + "custom_hostname": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "errors": { + "type": "array", + "items": { + "description": "Any JSON-serializable value" + } + }, + "messages": { + "type": "array", + "items": { + "description": "Any JSON-serializable value" + } + }, + "result": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hostname": { + "type": "string" + }, + "ssl": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "validation_records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "txt_name": { + "type": "string" + }, + "txt_value": { + "type": "string" + } + }, + "required": ["txt_name", "txt_value"] + } + }, + "validation_errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": ["message"] + } + } + }, + "required": ["status", "validation_records"] + }, + "ownership_verification": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["type", "name", "value"] + }, + "custom_origin_server": { + "type": "string" + }, + "verification_errors": { + "type": "array", + "items": { + "type": "string" + } + }, + "status": { + "type": "string" + } + }, + "required": [ + "id", + "hostname", + "ssl", + "ownership_verification", + "custom_origin_server", + "status" + ] + } + }, + "required": ["success", "errors", "messages", "result"] + } + }, + "required": ["status", "custom_hostname", "data"] } } } @@ -2685,6 +5016,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["custom_domain_write"] } ], "summary": "[Beta] Updates project's custom hostname configuration", @@ -2696,7 +5030,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -2724,7 +5057,126 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateCustomHostnameResponse" + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "1_not_started", + "2_initiated", + "3_challenge_verified", + "4_origin_setup_completed", + "5_services_reconfigured" + ] + }, + "custom_hostname": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "errors": { + "type": "array", + "items": { + "description": "Any JSON-serializable value" + } + }, + "messages": { + "type": "array", + "items": { + "description": "Any JSON-serializable value" + } + }, + "result": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hostname": { + "type": "string" + }, + "ssl": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "validation_records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "txt_name": { + "type": "string" + }, + "txt_value": { + "type": "string" + } + }, + "required": ["txt_name", "txt_value"] + } + }, + "validation_errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": ["message"] + } + } + }, + "required": ["status", "validation_records"] + }, + "ownership_verification": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["type", "name", "value"] + }, + "custom_origin_server": { + "type": "string" + }, + "verification_errors": { + "type": "array", + "items": { + "type": "string" + } + }, + "status": { + "type": "string" + } + }, + "required": [ + "id", + "hostname", + "ssl", + "ownership_verification", + "custom_origin_server", + "status" + ] + } + }, + "required": ["success", "errors", "messages", "result"] + } + }, + "required": ["status", "custom_hostname", "data"] } } } @@ -2745,6 +5197,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["custom_domain_write"] } ], "summary": "[Beta] Attempts to verify the DNS configuration for project's custom hostname configuration", @@ -2756,7 +5211,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -2784,7 +5238,126 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateCustomHostnameResponse" + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "1_not_started", + "2_initiated", + "3_challenge_verified", + "4_origin_setup_completed", + "5_services_reconfigured" + ] + }, + "custom_hostname": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "errors": { + "type": "array", + "items": { + "description": "Any JSON-serializable value" + } + }, + "messages": { + "type": "array", + "items": { + "description": "Any JSON-serializable value" + } + }, + "result": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "hostname": { + "type": "string" + }, + "ssl": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "validation_records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "txt_name": { + "type": "string" + }, + "txt_value": { + "type": "string" + } + }, + "required": ["txt_name", "txt_value"] + } + }, + "validation_errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": ["message"] + } + } + }, + "required": ["status", "validation_records"] + }, + "ownership_verification": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["type", "name", "value"] + }, + "custom_origin_server": { + "type": "string" + }, + "verification_errors": { + "type": "array", + "items": { + "type": "string" + } + }, + "status": { + "type": "string" + } + }, + "required": [ + "id", + "hostname", + "ssl", + "ownership_verification", + "custom_origin_server", + "status" + ] + } + }, + "required": ["success", "errors", "messages", "result"] + } + }, + "required": ["status", "custom_hostname", "data"] } } } @@ -2805,6 +5378,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["custom_domain_write"] } ], "summary": "[Beta] Activates a custom hostname for a project.", @@ -2816,7 +5392,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["custom_domain_write"]], "x-oauth-scope": "domains:write" } }, @@ -2844,7 +5419,9 @@ "content": { "application/json": { "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", + "discriminator": { + "propertyName": "state" + }, "oneOf": [ { "type": "object", @@ -2857,27 +5434,21 @@ "type": "boolean" } }, - "required": ["state"], - "additionalProperties": false + "required": ["state"] }, { "type": "object", "properties": { "state": { "type": "string", - "const": "unavailable" + "enum": ["unavailable"] }, "unavailableReason": { "type": "string", - "enum": [ - "postgres_upgrade_required", - "ssl_enforcement_required", - "temporarily_unavailable" - ] + "enum": ["postgres_upgrade_required", "temporarily_unavailable"] } }, - "required": ["state", "unavailableReason"], - "additionalProperties": false + "required": ["state", "unavailableReason"] } ] } @@ -2900,6 +5471,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_read"] } ], "summary": "[Beta] Get project's temporary access configuration.", @@ -2911,7 +5485,6 @@ } ], "x-endpoint-owners": ["security", "management-api"], - "x-fga-permissions": [["project_admin_read"]], "x-oauth-scope": "database:read" }, "put": { @@ -2936,7 +5509,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JitAccessRequestRequest" + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": ["enabled", "disabled"] + } + }, + "required": ["state"], + "example": { + "state": "enabled" + } } } } @@ -2947,7 +5530,9 @@ "content": { "application/json": { "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", + "discriminator": { + "propertyName": "state" + }, "oneOf": [ { "type": "object", @@ -2960,27 +5545,21 @@ "type": "boolean" } }, - "required": ["state"], - "additionalProperties": false + "required": ["state"] }, { "type": "object", "properties": { "state": { "type": "string", - "const": "unavailable" + "enum": ["unavailable"] }, "unavailableReason": { "type": "string", - "enum": [ - "postgres_upgrade_required", - "ssl_enforcement_required", - "temporarily_unavailable" - ] + "enum": ["postgres_upgrade_required", "temporarily_unavailable"] } }, - "required": ["state", "unavailableReason"], - "additionalProperties": false + "required": ["state", "unavailableReason"] } ] } @@ -3003,6 +5582,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_write"] } ], "summary": "[Beta] Update project's temporary access configuration.", @@ -3014,7 +5596,6 @@ } ], "x-endpoint-owners": ["security", "management-api"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "database:write" } }, @@ -3042,7 +5623,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NetworkBanResponse" + "type": "object", + "properties": { + "banned_ipv4_addresses": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["banned_ipv4_addresses"] } } } @@ -3063,6 +5653,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_network_bans_read"] } ], "summary": "[Beta] Gets project's network bans", @@ -3074,7 +5667,6 @@ } ], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["database_network_bans_read"]], "x-oauth-scope": "projects:read" } }, @@ -3102,7 +5694,28 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NetworkBanResponseEnriched" + "type": "object", + "properties": { + "banned_ipv4_addresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "banned_address": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": ["banned_address", "identifier", "type"] + } + } + }, + "required": ["banned_ipv4_addresses"] } } } @@ -3123,6 +5736,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_network_bans_read"] } ], "summary": "[Beta] Gets project's network bans with additional information about which databases they affect", @@ -3134,7 +5750,6 @@ } ], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["database_network_bans_read"]], "x-oauth-scope": "projects:read" } }, @@ -3161,7 +5776,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RemoveNetworkBanRequest" + "type": "object", + "properties": { + "ipv4_addresses": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of IP addresses to unban." + }, + "requester_ip": { + "default": false, + "type": "boolean", + "description": "Include requester's public IP in the list of addresses to unban." + }, + "identifier": { + "type": "string" + } + }, + "required": ["ipv4_addresses"], + "example": { + "ipv4_addresses": ["203.0.113.10"], + "requester_ip": false + } } } } @@ -3186,6 +5823,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_network_bans_write"] } ], "summary": "[Beta] Remove network bans.", @@ -3197,7 +5837,6 @@ } ], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["database_network_bans_write"]], "x-oauth-scope": "projects:write" } }, @@ -3225,7 +5864,66 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NetworkRestrictionsResponse" + "type": "object", + "properties": { + "entitlement": { + "type": "string", + "enum": ["disallowed", "allowed"] + }, + "config": { + "type": "object", + "properties": { + "dbAllowedCidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "dbAllowedCidrsV6": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." + }, + "old_config": { + "type": "object", + "properties": { + "dbAllowedCidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "dbAllowedCidrsV6": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "example": { + "dbAllowedCidrs": ["203.0.113.0/24"], + "dbAllowedCidrsV6": ["2001:db8::/32"] + }, + "description": "Populated when a new config has been received, but not registered as successfully applied to a project." + }, + "status": { + "type": "string", + "enum": ["stored", "applied"] + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "applied_at": { + "type": "string", + "format": "date-time" + } + }, + "required": ["entitlement", "config", "status"] } } } @@ -3246,6 +5944,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_network_restrictions_read"] } ], "summary": "[Beta] Gets project's network restrictions", @@ -3257,7 +5958,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_network_restrictions_read"]], "x-oauth-scope": "projects:read" }, "patch": { @@ -3282,7 +5982,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NetworkRestrictionsPatchRequest" + "type": "object", + "properties": { + "add": { + "type": "object", + "properties": { + "dbAllowedCidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "dbAllowedCidrsV6": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "remove": { + "type": "object", + "properties": { + "dbAllowedCidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "dbAllowedCidrsV6": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "example": { + "add": { + "dbAllowedCidrs": ["203.0.113.0/24"] + }, + "remove": { + "dbAllowedCidrs": ["198.51.100.0/24"] + } + } } } } @@ -3293,8 +6037,71 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NetworkRestrictionsV2Response" - } + "type": "object", + "properties": { + "entitlement": { + "type": "string", + "enum": ["disallowed", "allowed"] + }, + "config": { + "type": "object", + "properties": { + "dbAllowedCidrs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["v4", "v6"] + } + }, + "required": ["address", "type"] + } + } + }, + "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." + }, + "old_config": { + "type": "object", + "properties": { + "dbAllowedCidrs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["v4", "v6"] + } + }, + "required": ["address", "type"] + } + } + }, + "description": "Populated when a new config has been received, but not registered as successfully applied to a project." + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "applied_at": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string", + "enum": ["stored", "applied"] + } + }, + "required": ["entitlement", "config", "status"] + } } } }, @@ -3314,6 +6121,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_network_restrictions_write"] } ], "summary": "[Alpha] Updates project's network restrictions by adding or removing CIDRs", @@ -3325,7 +6135,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_network_restrictions_write"]], "x-oauth-scope": "projects:write" } }, @@ -3352,7 +6161,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NetworkRestrictionsRequest" + "type": "object", + "properties": { + "dbAllowedCidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "dbAllowedCidrsV6": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "example": { + "dbAllowedCidrs": ["203.0.113.0/24"], + "dbAllowedCidrsV6": ["2001:db8::/32"] + } } } } @@ -3363,7 +6190,66 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NetworkRestrictionsResponse" + "type": "object", + "properties": { + "entitlement": { + "type": "string", + "enum": ["disallowed", "allowed"] + }, + "config": { + "type": "object", + "properties": { + "dbAllowedCidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "dbAllowedCidrsV6": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." + }, + "old_config": { + "type": "object", + "properties": { + "dbAllowedCidrs": { + "type": "array", + "items": { + "type": "string" + } + }, + "dbAllowedCidrsV6": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "example": { + "dbAllowedCidrs": ["203.0.113.0/24"], + "dbAllowedCidrsV6": ["2001:db8::/32"] + }, + "description": "Populated when a new config has been received, but not registered as successfully applied to a project." + }, + "status": { + "type": "string", + "enum": ["stored", "applied"] + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "applied_at": { + "type": "string", + "format": "date-time" + } + }, + "required": ["entitlement", "config", "status"] } } } @@ -3384,6 +6270,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_network_restrictions_write"] } ], "summary": "[Beta] Updates project's network restrictions", @@ -3395,7 +6284,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_network_restrictions_write"]], "x-oauth-scope": "projects:write" } }, @@ -3423,7 +6311,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PgsodiumConfigResponse" + "type": "object", + "properties": { + "root_key": { + "type": "string" + } + }, + "required": ["root_key"] } } } @@ -3444,6 +6338,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_write"] } ], "summary": "[Beta] Gets project's pgsodium config", @@ -3455,7 +6352,6 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "secrets:read" }, "put": { @@ -3480,7 +6376,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdatePgsodiumConfigBody" + "type": "object", + "properties": { + "root_key": { + "type": "string" + } + }, + "required": ["root_key"], + "example": { + "root_key": "MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=" + } } } } @@ -3491,7 +6396,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PgsodiumConfigResponse" + "type": "object", + "properties": { + "root_key": { + "type": "string" + } + }, + "required": ["root_key"] } } } @@ -3512,6 +6423,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_write"] } ], "summary": "[Beta] Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.", @@ -3523,7 +6437,6 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "secrets:write" } }, @@ -3551,7 +6464,38 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PostgrestConfigWithJWTSecretResponse" + "type": "object", + "properties": { + "db_schema": { + "type": "string" + }, + "max_rows": { + "type": "integer" + }, + "db_extra_search_path": { + "type": "string" + }, + "db_pool": { + "type": "integer", + "nullable": true, + "description": "If `null`, the value is automatically configured based on compute size." + }, + "db_pool_acquisition_timeout": { + "type": "integer", + "nullable": true, + "description": "If `null`, the value is automatically configured to 10." + }, + "jwt_secret": { + "type": "string" + } + }, + "required": [ + "db_schema", + "max_rows", + "db_extra_search_path", + "db_pool", + "db_pool_acquisition_timeout" + ] } } } @@ -3572,6 +6516,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["data_api_config_read"] } ], "summary": "Gets project's postgrest config", @@ -3583,7 +6530,6 @@ } ], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["data_api_config_read"]], "x-oauth-scope": "rest:read" }, "patch": { @@ -3608,7 +6554,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1UpdatePostgrestConfigBody" + "type": "object", + "properties": { + "db_extra_search_path": { + "type": "string" + }, + "db_schema": { + "type": "string" + }, + "max_rows": { + "type": "integer", + "minimum": 0, + "maximum": 1000000 + }, + "db_pool": { + "type": "integer", + "minimum": 0, + "maximum": 1000 + }, + "db_pool_acquisition_timeout": { + "type": "integer", + "minimum": 0, + "maximum": 60 + } + }, + "example": { + "db_schema": "public,storage", + "db_pool": 20, + "max_rows": 1000 + } } } } @@ -3619,7 +6593,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1PostgrestConfigResponse" + "type": "object", + "properties": { + "db_schema": { + "type": "string" + }, + "max_rows": { + "type": "integer" + }, + "db_extra_search_path": { + "type": "string" + }, + "db_pool": { + "type": "integer", + "nullable": true, + "description": "If `null`, the value is automatically configured based on compute size." + }, + "db_pool_acquisition_timeout": { + "type": "integer", + "nullable": true, + "description": "If `null`, the value is automatically configured to 10." + } + }, + "required": [ + "db_schema", + "max_rows", + "db_extra_search_path", + "db_pool", + "db_pool_acquisition_timeout" + ] } } } @@ -3640,6 +6642,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["data_api_config_write"] } ], "summary": "Updates project's postgrest config", @@ -3651,7 +6656,6 @@ } ], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["data_api_config_write"]], "x-oauth-scope": "rest:write" } }, @@ -3679,7 +6683,98 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1ProjectWithDatabaseResponse" + "type": "object", + "properties": { + "id": { + "type": "string", + "deprecated": true, + "description": "Deprecated: Use `ref` instead." + }, + "ref": { + "type": "string", + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "description": "Project ref", + "example": "abcdefghijklmnopqrst" + }, + "organization_id": { + "type": "string", + "description": "Deprecated: Use `organization_slug` instead.", + "deprecated": true + }, + "organization_slug": { + "type": "string", + "pattern": "^[\\w-]+$", + "description": "Organization slug", + "example": "tsrqponmlkjihgfedcba" + }, + "name": { + "type": "string", + "description": "Name of your project" + }, + "region": { + "type": "string", + "description": "Region of your project" + }, + "created_at": { + "type": "string", + "description": "Creation timestamp" + }, + "status": { + "type": "string", + "enum": [ + "INACTIVE", + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "UNKNOWN", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UPGRADING", + "PAUSING", + "RESTORE_FAILED", + "RESTARTING", + "PAUSE_FAILED", + "RESIZING" + ] + }, + "database": { + "type": "object", + "properties": { + "host": { + "type": "string", + "description": "Database host" + }, + "version": { + "type": "string", + "description": "Database version" + }, + "postgres_engine": { + "type": "string", + "description": "Database engine" + }, + "release_channel": { + "type": "string", + "description": "Release channel" + } + }, + "required": ["host", "version", "postgres_engine", "release_channel"] + } + }, + "required": [ + "id", + "ref", + "organization_id", + "organization_slug", + "name", + "region", + "created_at", + "status", + "database" + ] } } } @@ -3700,6 +6795,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_read"] } ], "summary": "Gets a specific project that belongs to the authenticated user", @@ -3711,7 +6809,6 @@ } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["project_admin_read"]], "x-oauth-scope": "projects:read" }, "delete": { @@ -3737,7 +6834,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1ProjectRefResponse" + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "ref": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["id", "ref", "name"] } } } @@ -3755,6 +6864,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_write"] } ], "summary": "Deletes the given project", @@ -3766,7 +6878,6 @@ } ], "x-endpoint-owners": ["management-api", "infra", "dev-workflows"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" }, "patch": { @@ -3791,7 +6902,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1UpdateProjectBody" + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 256 + } + }, + "required": ["name"], + "example": { + "name": "Acme Platform" + } } } } @@ -3802,7 +6924,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1ProjectRefResponse" + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "ref": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["id", "ref", "name"] } } } @@ -3823,6 +6957,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_write"] } ], "summary": "Updates the given project", @@ -3834,7 +6971,6 @@ } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -3865,7 +7001,19 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/SecretResponse" + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": ["name", "value"] } } } @@ -3887,6 +7035,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["edge_functions_secrets_read"] } ], "summary": "List all secrets", @@ -3898,7 +7049,6 @@ } ], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_secrets_read"]], "x-oauth-scope": "secrets:read" }, "post": { @@ -3924,13 +7074,39 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateSecretBody" - } - } - } - }, - "responses": { - "201": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 256, + "pattern": "^(?!SUPABASE_).*", + "description": "Secret name must not start with the SUPABASE_ prefix." + }, + "value": { + "type": "string", + "maxLength": 24576 + } + }, + "required": ["name", "value"] + }, + "example": [ + { + "name": "OPENAI_API_KEY", + "value": "sk-example-secret" + }, + { + "name": "STRIPE_WEBHOOK_SECRET", + "value": "whsec_example" + } + ] + } + } + } + }, + "responses": { + "201": { "description": "" }, "401": { @@ -3949,6 +7125,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["edge_functions_secrets_write"] } ], "summary": "Bulk create secrets", @@ -3960,7 +7139,6 @@ } ], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_secrets_write"]], "x-oauth-scope": "secrets:write" }, "delete": { @@ -3986,7 +7164,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteSecretsBody" + "type": "array", + "items": { + "type": "string" + }, + "example": ["OPENAI_API_KEY"] } } } @@ -4011,6 +7193,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["edge_functions_secrets_write"] } ], "summary": "Bulk delete secrets", @@ -4022,7 +7207,6 @@ } ], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_secrets_write"]], "x-oauth-scope": "secrets:write" } }, @@ -4050,7 +7234,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SslEnforcementResponse" + "type": "object", + "properties": { + "currentConfig": { + "type": "object", + "properties": { + "database": { + "type": "boolean" + } + }, + "required": ["database"] + }, + "appliedSuccessfully": { + "type": "boolean" + } + }, + "required": ["currentConfig", "appliedSuccessfully"] } } } @@ -4071,6 +7270,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_ssl_config_read"] } ], "summary": "[Beta] Get project's SSL enforcement configuration.", @@ -4082,7 +7284,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_ssl_config_read"]], "x-oauth-scope": "database:read" }, "put": { @@ -4107,7 +7308,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SslEnforcementRequest" + "type": "object", + "properties": { + "requestedConfig": { + "type": "object", + "properties": { + "database": { + "type": "boolean" + } + }, + "required": ["database"] + } + }, + "required": ["requestedConfig"], + "example": { + "requestedConfig": { + "database": true + } + } } } } @@ -4118,7 +7336,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SslEnforcementResponse" + "type": "object", + "properties": { + "currentConfig": { + "type": "object", + "properties": { + "database": { + "type": "boolean" + } + }, + "required": ["database"] + }, + "appliedSuccessfully": { + "type": "boolean" + } + }, + "required": ["currentConfig", "appliedSuccessfully"] } } } @@ -4139,6 +7372,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_ssl_config_write"] } ], "summary": "[Beta] Update project's SSL enforcement configuration.", @@ -4150,7 +7386,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_ssl_config_write"]], "x-oauth-scope": "database:write" } }, @@ -4189,7 +7424,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TypescriptResponse" + "type": "object", + "properties": { + "types": { + "type": "string" + } + }, + "required": ["types"] } } } @@ -4210,6 +7451,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_read"] } ], "summary": "Generate TypeScript types", @@ -4221,7 +7465,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["database_read"]], "x-oauth-scope": "database:read" } }, @@ -4249,20 +7492,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VanitySubdomainConfigResponse" + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["not-used", "custom-domain-used", "active"] + }, + "custom_domain": { + "type": "string", + "minLength": 1 + } + }, + "required": ["status"] } } } }, "400": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlanGateErrorBody" - } - } - } + "description": "This feature requires the Pro, Team, or Enterprise organization plan." }, "401": { "description": "Unauthorized" @@ -4280,6 +7527,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["vanity_subdomain_read"] } ], "summary": "[Beta] Gets current vanity subdomain config", @@ -4296,7 +7546,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["vanity_subdomain_read"]], "x-oauth-scope": "domains:read" }, "delete": { @@ -4336,6 +7585,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["vanity_subdomain_write"] } ], "summary": "[Beta] Deletes a project's vanity subdomain configuration", @@ -4347,7 +7599,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["vanity_subdomain_write"]], "x-oauth-scope": "domains:write" } }, @@ -4374,7 +7625,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VanitySubdomainBody" + "type": "object", + "properties": { + "vanity_subdomain": { + "type": "string", + "maxLength": 63 + } + }, + "required": ["vanity_subdomain"], + "example": { + "vanity_subdomain": "acme-prod" + } } } } @@ -4385,20 +7646,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubdomainAvailabilityResponse" + "type": "object", + "properties": { + "available": { + "type": "boolean" + } + }, + "required": ["available"] } } } }, "400": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlanGateErrorBody" - } - } - } + "description": "This feature requires the Pro, Team, or Enterprise organization plan." }, "401": { "description": "Unauthorized" @@ -4416,6 +7676,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["vanity_subdomain_write"] } ], "summary": "[Beta] Checks vanity subdomain availability", @@ -4432,7 +7695,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["vanity_subdomain_write"]], "x-oauth-scope": "domains:write" } }, @@ -4459,7 +7721,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VanitySubdomainBody" + "type": "object", + "properties": { + "vanity_subdomain": { + "type": "string", + "maxLength": 63 + } + }, + "required": ["vanity_subdomain"], + "example": { + "vanity_subdomain": "acme-prod" + } } } } @@ -4470,20 +7742,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ActivateVanitySubdomainResponse" + "type": "object", + "properties": { + "custom_domain": { + "type": "string" + } + }, + "required": ["custom_domain"] } } } }, "400": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlanGateErrorBody" - } - } - } + "description": "This feature requires the Pro, Team, or Enterprise organization plan." }, "401": { "description": "Unauthorized" @@ -4501,6 +7772,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["vanity_subdomain_write"] } ], "summary": "[Beta] Activates a vanity subdomain for a project.", @@ -4517,7 +7791,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["vanity_subdomain_write"]], "x-oauth-scope": "domains:write" } }, @@ -4544,7 +7817,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpgradeDatabaseBody" + "type": "object", + "properties": { + "target_version": { + "type": "string" + }, + "release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + } + }, + "required": ["target_version"], + "example": { + "target_version": "17", + "release_channel": "ga" + } } } } @@ -4555,7 +7842,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectUpgradeInitiateResponse" + "type": "object", + "properties": { + "tracking_id": { + "type": "string" + } + }, + "required": ["tracking_id"] } } } @@ -4576,6 +7869,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_write", "database_write"] } ], "summary": "[Beta] Upgrades the project's Postgres version", @@ -4587,7 +7883,6 @@ } ], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["project_admin_write", "database_write"]], "x-oauth-scope": "projects:write" } }, @@ -4615,136 +7910,291 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectUpgradeEligibilityResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to determine project upgrade eligibility" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "[Beta] Returns the project's eligibility for upgrades", - "tags": ["Projects"], - "x-badges": [ - { - "name": "OAuth scope: projects:read", - "position": "after" - } - ], - "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["project_admin_read", "database_read"]], - "x-oauth-scope": "projects:read" - } - }, - "/v1/projects/{ref}/upgrade/status": { - "get": { - "operationId": "v1-get-postgres-upgrade-status", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - }, - { - "name": "tracking_id", - "required": false, - "in": "query", - "schema": { - "example": "9f4d3a20-6b2e-4a7e-8c91-1d5f3e7a2b4c", - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DatabaseUpgradeStatusResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to retrieve project upgrade status" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "[Beta] Gets the latest status of the project's upgrade", - "tags": ["Projects"], - "x-badges": [ - { - "name": "OAuth scope: projects:read", - "position": "after" - } - ], - "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["project_admin_read", "database_read"]], - "x-oauth-scope": "projects:read" - } - }, - "/v1/projects/{ref}/readonly": { - "get": { - "operationId": "v1-get-readonly-mode-status", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReadOnlyStatusResponse" + "type": "object", + "properties": { + "eligible": { + "type": "boolean" + }, + "current_app_version": { + "type": "string" + }, + "current_app_version_release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + }, + "latest_app_version": { + "type": "string" + }, + "target_upgrade_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "postgres_version": { + "type": "string", + "enum": ["13", "14", "15", "17", "17-oriole"] + }, + "release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + }, + "app_version": { + "type": "string" + } + }, + "required": ["postgres_version", "release_channel", "app_version"] + } + }, + "duration_estimate_hours": { + "type": "number" + }, + "legacy_auth_custom_roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "objects_to_be_dropped": { + "type": "array", + "items": { + "type": "string" + }, + "deprecated": true, + "description": "Use validation_errors instead." + }, + "unsupported_extensions": { + "type": "array", + "items": { + "type": "string" + }, + "deprecated": true, + "description": "Use validation_errors instead." + }, + "user_defined_objects_in_internal_schemas": { + "type": "array", + "items": { + "type": "string" + }, + "deprecated": true, + "description": "Use validation_errors instead." + }, + "validation_errors": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["objects_depending_on_pg_cron"] + }, + "dependents": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["type", "dependents"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["indexes_referencing_ll_to_earth"] + }, + "schema_name": { + "type": "string" + }, + "table_name": { + "type": "string" + }, + "index_name": { + "type": "string" + } + }, + "required": ["type", "schema_name", "table_name", "index_name"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["function_using_obsolete_lang"] + }, + "schema_name": { + "type": "string" + }, + "function_name": { + "type": "string" + }, + "lang_name": { + "type": "string" + } + }, + "required": ["type", "schema_name", "function_name", "lang_name"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["unsupported_extension"] + }, + "extension_name": { + "type": "string" + } + }, + "required": ["type", "extension_name"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["unsupported_fdw_handler"] + }, + "fdw_name": { + "type": "string" + }, + "fdw_handler_name": { + "type": "string" + } + }, + "required": ["type", "fdw_name", "fdw_handler_name"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["unlogged_table_with_persistent_sequence"] + }, + "schema_name": { + "type": "string" + }, + "table_name": { + "type": "string" + }, + "sequence_name": { + "type": "string" + } + }, + "required": ["type", "schema_name", "table_name", "sequence_name"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["user_defined_objects_in_internal_schemas"] + }, + "obj_type": { + "type": "string", + "enum": ["table", "function"] + }, + "schema_name": { + "type": "string" + }, + "obj_name": { + "type": "string" + } + }, + "required": ["type", "obj_type", "schema_name", "obj_name"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["active_replication_slot"] + }, + "slot_name": { + "type": "string" + } + }, + "required": ["type", "slot_name"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["x86_architecture"] + } + }, + "required": ["type"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["project_hibernating"] + } + }, + "required": ["type"] + } + ] + } + }, + "warnings": { + "type": "array", + "items": { + "discriminator": { + "propertyName": "type" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["pg_graphql_introspection_change"] + } + }, + "required": ["type"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ltree_reindex_required"] + } + }, + "required": ["type"] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["operator_estimator_gate"] + } + }, + "required": ["type"] + } + ] + } + } + }, + "required": [ + "eligible", + "current_app_version", + "current_app_version_release_channel", + "latest_app_version", + "target_upgrade_versions", + "duration_estimate_hours", + "legacy_auth_custom_roles", + "objects_to_be_dropped", + "unsupported_extensions", + "user_defined_objects_in_internal_schemas", + "validation_errors", + "warnings" + ] } } } @@ -4759,30 +8209,32 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to get project readonly mode status" + "description": "Failed to determine project upgrade eligibility" } }, "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_read", "database_read"] } ], - "summary": "Returns project's readonly mode status", - "tags": ["Database"], + "summary": "[Beta] Returns the project's eligibility for upgrades", + "tags": ["Projects"], "x-badges": [ { - "name": "OAuth scope: database:read", + "name": "OAuth scope: projects:read", "position": "after" } ], - "x-endpoint-owners": ["management-api", "infra", "support-tooling"], - "x-fga-permissions": [["database_readonly_config_read"]], - "x-oauth-scope": "database:read" + "x-endpoint-owners": ["management-api", "infra"], + "x-oauth-scope": "projects:read" } }, - "/v1/projects/{ref}/readonly/temporary-disable": { - "post": { - "operationId": "v1-disable-readonly-mode-temporarily", + "/v1/projects/{ref}/upgrade/status": { + "get": { + "operationId": "v1-get-postgres-upgrade-status", "parameters": [ { "name": "ref", @@ -4796,11 +8248,79 @@ "example": "abcdefghijklmnopqrst", "type": "string" } + }, + { + "name": "tracking_id", + "required": false, + "in": "query", + "schema": { + "example": "9f4d3a20-6b2e-4a7e-8c91-1d5f3e7a2b4c", + "type": "string" + } } ], "responses": { - "201": { - "description": "" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "databaseUpgradeStatus": { + "type": "object", + "properties": { + "initiated_at": { + "type": "string" + }, + "latest_status_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", + "9_post_physical_backup_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", + "10_completed_post_physical_backup" + ] + }, + "status": { + "type": "number" + } + }, + "required": ["initiated_at", "latest_status_at", "target_version", "status"], + "nullable": true + } + }, + "required": ["databaseUpgradeStatus"] + } + } + } }, "401": { "description": "Unauthorized" @@ -4812,16 +8332,148 @@ "description": "Rate limit exceeded" }, "500": { - "description": "Failed to disable project's readonly mode" + "description": "Failed to retrieve project upgrade status" } }, "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_read", "database_read"] } ], - "summary": "Disables project's readonly mode for the next 15 minutes", - "tags": ["Database"], + "summary": "[Beta] Gets the latest status of the project's upgrade", + "tags": ["Projects"], + "x-badges": [ + { + "name": "OAuth scope: projects:read", + "position": "after" + } + ], + "x-endpoint-owners": ["management-api", "infra"], + "x-oauth-scope": "projects:read" + } + }, + "/v1/projects/{ref}/readonly": { + "get": { + "operationId": "v1-get-readonly-mode-status", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "override_enabled": { + "type": "boolean" + }, + "override_active_until": { + "type": "string" + } + }, + "required": ["enabled", "override_enabled", "override_active_until"] + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to get project readonly mode status" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["database_readonly_config_read"] + } + ], + "summary": "Returns project's readonly mode status", + "tags": ["Database"], + "x-badges": [ + { + "name": "OAuth scope: database:read", + "position": "after" + } + ], + "x-endpoint-owners": ["management-api", "infra", "support-tooling"], + "x-oauth-scope": "database:read" + } + }, + "/v1/projects/{ref}/readonly/temporary-disable": { + "post": { + "operationId": "v1-disable-readonly-mode-temporarily", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to disable project's readonly mode" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["database_readonly_config_write"] + } + ], + "summary": "Disables project's readonly mode for the next 15 minutes", + "tags": ["Database"], "x-badges": [ { "name": "OAuth scope: database:write", @@ -4829,7 +8481,6 @@ } ], "x-endpoint-owners": ["management-api", "infra", "support-tooling"], - "x-fga-permissions": [["database_readonly_config_write"]], "x-oauth-scope": "database:write" } }, @@ -4856,7 +8507,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SetUpReadReplicaBody" + "type": "object", + "properties": { + "read_replica_region": { + "type": "string", + "enum": [ + "us-east-1", + "us-east-2", + "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-north-1", + "eu-central-1", + "eu-central-2", + "ca-central-1", + "ap-south-1", + "sa-east-1" + ], + "description": "Region you want your read replica to reside in" + } + }, + "required": ["read_replica_region"], + "example": { + "read_replica_region": "us-west-1" + } } } } @@ -4869,14 +8550,7 @@ "description": "Unauthorized" }, "402": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlanGateErrorBody" - } - } - } + "description": "This feature requires the Pro, Team, or Enterprise organization plan." }, "403": { "description": "Forbidden action" @@ -4891,6 +8565,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["infra_read_replicas_write"] } ], "summary": "[Beta] Set up a read replica", @@ -4902,8 +8579,7 @@ "position": "before" } ], - "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["infra_read_replicas_write"]] + "x-endpoint-owners": ["management-api", "infra"] } }, "/v1/projects/{ref}/read-replicas/remove": { @@ -4929,7 +8605,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RemoveReadReplicaBody" + "type": "object", + "properties": { + "database_identifier": { + "type": "string" + } + }, + "required": ["database_identifier"], + "example": { + "database_identifier": "abcdefghijklmnopqrst-rr-us-west-1-abcde" + } } } } @@ -4954,12 +8639,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["infra_read_replicas_write"] } ], "summary": "[Beta] Remove a read replica", "tags": ["Database"], - "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["infra_read_replicas_write"]] + "x-endpoint-owners": ["management-api", "infra"] } }, "/v1/projects/{ref}/health": { @@ -4983,34 +8670,22 @@ "name": "services", "required": true, "in": "query", - "description": "Comma-separated list of enums or array of enums.", "schema": { - "example": ["auth,db", "auth"], - "anyOf": [ - { - "type": "string", - "description": "Comma-separated list of enums:\n\n- `auth`\n- `db`\n- `db_postgres_user`\n- `pooler`\n- `realtime`\n- `rest`\n- `storage`\n- `pg_bouncer`", - "example": ["auth,db", "auth"] - }, - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "auth", - "db", - "db_postgres_user", - "pooler", - "realtime", - "rest", - "storage", - "pg_bouncer" - ] - }, - "description": "Array of enums.", - "example": ["{field}=auth&{field}=db", "{field}=auth"] - } - ] + "example": ["auth", "rest"], + "type": "array", + "items": { + "type": "string", + "enum": [ + "auth", + "db", + "db_postgres_user", + "pooler", + "realtime", + "rest", + "storage", + "pg_bouncer" + ] + } } }, { @@ -5033,7 +8708,89 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/V1ServiceHealthResponse" + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "auth", + "db", + "db_postgres_user", + "pooler", + "realtime", + "rest", + "storage", + "pg_bouncer" + ] + }, + "healthy": { + "type": "boolean", + "deprecated": true, + "description": "Deprecated. Use `status` instead." + }, + "status": { + "type": "string", + "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"] + }, + "info": { + "oneOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": ["GoTrue"] + }, + "version": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": ["name", "version", "description"] + }, + { + "type": "object", + "properties": { + "healthy": { + "type": "boolean", + "deprecated": true, + "description": "Deprecated. Use `status` instead." + }, + "db_connected": { + "type": "boolean" + }, + "replication_connected": { + "type": "boolean" + }, + "connected_cluster": { + "type": "integer" + } + }, + "required": [ + "healthy", + "db_connected", + "replication_connected", + "connected_cluster" + ] + }, + { + "type": "object", + "properties": { + "db_schema": { + "type": "string" + } + }, + "required": ["db_schema"] + } + ] + }, + "error": { + "type": "string" + } + }, + "required": ["name", "healthy", "status"] } } } @@ -5055,6 +8812,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_read"] } ], "summary": "Gets project's service health status", @@ -5066,7 +8826,6 @@ } ], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["project_admin_read"]], "x-oauth-scope": "projects:read" } }, @@ -5094,7 +8853,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SigningKeyResponse" + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + }, + "public_jwk": { + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false } } } @@ -5112,6 +8898,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_signing_keys_write"] } ], "summary": "Set up the project's existing JWT secret as an in_use JWT signing key. This endpoint will be removed in the future always check for HTTP 404 Not Found.", @@ -5123,7 +8912,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" }, "get": { @@ -5149,12 +8937,39 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SigningKeyResponse" - } - } - } - }, - "401": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + }, + "public_jwk": { + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false + } + } + } + }, + "401": { "description": "Unauthorized" }, "403": { @@ -5167,6 +8982,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_signing_keys_read"] } ], "summary": "Get the signing key information for the JWT secret imported as signing key for this project. This endpoint will be removed in the future, check for HTTP 404 Not Found.", @@ -5178,7 +8996,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_signing_keys_read"]], "x-oauth-scope": "secrets:read" } }, @@ -5205,7 +9022,226 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateSigningKeyBody" + "type": "object", + "properties": { + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "standby"] + }, + "private_jwk": { + "discriminator": { + "propertyName": "kty" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "kid": { + "type": "string", + "format": "uuid" + }, + "use": { + "type": "string", + "enum": ["sig"] + }, + "key_ops": { + "type": "array", + "items": { + "type": "string", + "enum": ["sign", "verify"] + }, + "minItems": 2, + "maxItems": 2 + }, + "ext": { + "type": "boolean", + "enum": [true] + }, + "kty": { + "type": "string", + "enum": ["RSA"] + }, + "alg": { + "type": "string", + "enum": ["RS256"] + }, + "n": { + "type": "string" + }, + "e": { + "type": "string", + "enum": ["AQAB"] + }, + "d": { + "type": "string" + }, + "p": { + "type": "string" + }, + "q": { + "type": "string" + }, + "dp": { + "type": "string" + }, + "dq": { + "type": "string" + }, + "qi": { + "type": "string" + } + }, + "required": ["kty", "n", "e", "d", "p", "q", "dp", "dq", "qi"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kid": { + "type": "string", + "format": "uuid" + }, + "use": { + "type": "string", + "enum": ["sig"] + }, + "key_ops": { + "type": "array", + "items": { + "type": "string", + "enum": ["sign", "verify"] + }, + "minItems": 2, + "maxItems": 2 + }, + "ext": { + "type": "boolean", + "enum": [true] + }, + "kty": { + "type": "string", + "enum": ["EC"] + }, + "alg": { + "type": "string", + "enum": ["ES256"] + }, + "crv": { + "type": "string", + "enum": ["P-256"] + }, + "x": { + "type": "string" + }, + "y": { + "type": "string" + }, + "d": { + "type": "string" + } + }, + "required": ["kty", "crv", "x", "y", "d"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kid": { + "type": "string", + "format": "uuid" + }, + "use": { + "type": "string", + "enum": ["sig"] + }, + "key_ops": { + "type": "array", + "items": { + "type": "string", + "enum": ["sign", "verify"] + }, + "minItems": 2, + "maxItems": 2 + }, + "ext": { + "type": "boolean", + "enum": [true] + }, + "kty": { + "type": "string", + "enum": ["OKP"] + }, + "alg": { + "type": "string", + "enum": ["EdDSA"] + }, + "crv": { + "type": "string", + "enum": ["Ed25519"] + }, + "x": { + "type": "string" + }, + "d": { + "type": "string" + } + }, + "required": ["kty", "crv", "x", "d"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "kid": { + "type": "string", + "format": "uuid" + }, + "use": { + "type": "string", + "enum": ["sig"] + }, + "key_ops": { + "type": "array", + "items": { + "type": "string", + "enum": ["sign", "verify"] + }, + "minItems": 2, + "maxItems": 2 + }, + "ext": { + "type": "boolean", + "enum": [true] + }, + "kty": { + "type": "string", + "enum": ["oct"] + }, + "alg": { + "type": "string", + "enum": ["HS256"] + }, + "k": { + "type": "string", + "minLength": 16 + } + }, + "required": ["kty", "k"], + "additionalProperties": false + } + ] + } + }, + "required": ["algorithm"], + "additionalProperties": false, + "example": { + "algorithm": "RS256", + "status": "standby" + } } } } @@ -5216,7 +9252,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SigningKeyResponse" + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + }, + "public_jwk": { + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false } } } @@ -5234,6 +9297,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_signing_keys_write"] } ], "summary": "Create a new signing key for the project in standby status", @@ -5245,7 +9311,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" }, "get": { @@ -5271,7 +9336,44 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SigningKeysResponse" + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + }, + "public_jwk": { + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false + } + } + }, + "required": ["keys"], + "additionalProperties": false } } } @@ -5289,6 +9391,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_signing_keys_read"] } ], "summary": "List all signing keys for the project", @@ -5300,7 +9405,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_signing_keys_read"]], "x-oauth-scope": "secrets:read" } }, @@ -5314,7 +9418,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "33333333-3333-4333-8333-333333333333", "type": "string" } @@ -5339,7 +9442,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SigningKeyResponse" + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + }, + "public_jwk": { + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false } } } @@ -5357,12 +9487,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_signing_keys_read"] } ], "summary": "Get information about a signing key", "tags": ["Auth"], - "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_signing_keys_read"]] + "x-endpoint-owners": ["auth"] }, "delete": { "operationId": "v1-remove-project-signing-key", @@ -5373,7 +9505,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "33333333-3333-4333-8333-333333333333", "type": "string" } @@ -5398,7 +9529,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SigningKeyResponse" + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + }, + "public_jwk": { + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false } } } @@ -5416,6 +9574,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_signing_keys_write"] } ], "summary": "Remove a signing key from a project. Only possible if the key has been in revoked status for a while.", @@ -5427,7 +9588,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" }, "patch": { @@ -5439,7 +9599,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "33333333-3333-4333-8333-333333333333", "type": "string" } @@ -5463,7 +9622,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSigningKeyBody" + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + } + }, + "required": ["status"], + "additionalProperties": false, + "example": { + "status": "standby" + } } } } @@ -5474,7 +9644,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SigningKeyResponse" + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "algorithm": { + "type": "string", + "enum": ["EdDSA", "ES256", "RS256", "HS256"] + }, + "status": { + "type": "string", + "enum": ["in_use", "previously_used", "revoked", "standby"] + }, + "public_jwk": { + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": ["id", "algorithm", "status", "created_at", "updated_at"], + "additionalProperties": false } } } @@ -5492,6 +9689,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_signing_keys_write"] } ], "summary": "Update a signing key, mainly its status", @@ -5503,7 +9703,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_signing_keys_write"]], "x-oauth-scope": "secrets:write" } }, @@ -5531,28 +9730,1223 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthConfigResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to retrieve project's auth config" - } - }, - "security": [ - { - "bearer": [] - } + "type": "object", + "properties": { + "api_max_request_duration": { + "type": "integer", + "nullable": true + }, + "db_max_pool_size": { + "type": "integer", + "nullable": true + }, + "db_max_pool_size_unit": { + "type": "string", + "enum": ["connections", "percent"], + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_linkedin_oidc_enabled": { + "type": "boolean", + "nullable": true + }, + "external_linkedin_oidc_secret": { + "type": "string", + "nullable": true + }, + "external_slack_oidc_client_id": { + "type": "string", + "nullable": true + }, + "external_slack_oidc_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_slack_oidc_enabled": { + "type": "boolean", + "nullable": true + }, + "external_slack_oidc_secret": { + "type": "string", + "nullable": true + }, + "external_notion_client_id": { + "type": "string", + "nullable": true + }, + "external_notion_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_twitter_enabled": { + "type": "boolean", + "nullable": true + }, + "external_twitter_secret": { + "type": "string", + "nullable": true + }, + "external_x_client_id": { + "type": "string", + "nullable": true + }, + "external_x_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_x_enabled": { + "type": "boolean", + "nullable": true + }, + "external_x_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_web3_solana_enabled": { + "type": "boolean", + "nullable": true + }, + "external_web3_ethereum_enabled": { + "type": "boolean", + "nullable": true + }, + "external_zoom_client_id": { + "type": "string", + "nullable": true + }, + "external_zoom_email_optional": { + "type": "boolean", + "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 + }, + "hook_before_user_created_enabled": { + "type": "boolean", + "nullable": true + }, + "hook_before_user_created_uri": { + "type": "string", + "nullable": true + }, + "hook_before_user_created_secrets": { + "type": "string", + "nullable": true + }, + "hook_after_user_created_enabled": { + "type": "boolean", + "nullable": true + }, + "hook_after_user_created_uri": { + "type": "string", + "nullable": true + }, + "hook_after_user_created_secrets": { + "type": "string", + "nullable": true + }, + "jwt_exp": { + "type": "integer", + "nullable": true + }, + "mailer_allow_unverified_email_sign_ins": { + "type": "boolean", + "nullable": true + }, + "mailer_autoconfirm": { + "type": "boolean", + "nullable": true + }, + "mailer_otp_exp": { + "type": "integer" + }, + "mailer_otp_length": { + "type": "integer", + "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_subjects_password_changed_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_email_changed_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_phone_changed_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_mfa_factor_enrolled_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_mfa_factor_unenrolled_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_identity_linked_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_identity_unlinked_notification": { + "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 + }, + "mailer_templates_password_changed_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_email_changed_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_phone_changed_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_mfa_factor_enrolled_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_mfa_factor_unenrolled_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_identity_linked_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_identity_unlinked_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_notifications_password_changed_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_email_changed_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_phone_changed_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_mfa_factor_enrolled_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_mfa_factor_unenrolled_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_identity_linked_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_identity_unlinked_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_max_enrolled_factors": { + "type": "integer", + "nullable": true + }, + "mfa_totp_enroll_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_totp_verify_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_phone_enroll_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_phone_verify_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_web_authn_enroll_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_web_authn_verify_enabled": { + "type": "boolean", + "nullable": true + }, + "passkey_enabled": { + "type": "boolean" + }, + "webauthn_rp_display_name": { + "type": "string", + "nullable": true + }, + "webauthn_rp_id": { + "type": "string", + "nullable": true + }, + "webauthn_rp_origins": { + "type": "string", + "nullable": true + }, + "mfa_phone_otp_length": { + "type": "integer" + }, + "mfa_phone_template": { + "type": "string", + "nullable": true + }, + "mfa_phone_max_frequency": { + "type": "integer", + "nullable": true + }, + "nimbus_oauth_client_id": { + "type": "string", + "nullable": true + }, + "nimbus_oauth_email_optional": { + "type": "boolean", + "nullable": true + }, + "nimbus_oauth_client_secret": { + "type": "string", + "nullable": true + }, + "password_hibp_enabled": { + "type": "boolean", + "nullable": true + }, + "password_min_length": { + "type": "integer", + "nullable": true + }, + "password_required_characters": { + "type": "string", + "enum": [ + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", + "" + ], + "nullable": true + }, + "rate_limit_anonymous_users": { + "type": "integer", + "nullable": true + }, + "rate_limit_email_sent": { + "type": "integer", + "nullable": true + }, + "rate_limit_sms_sent": { + "type": "integer", + "nullable": true + }, + "rate_limit_token_refresh": { + "type": "integer", + "nullable": true + }, + "rate_limit_verify": { + "type": "integer", + "nullable": true + }, + "rate_limit_otp": { + "type": "integer", + "nullable": true + }, + "rate_limit_web3": { + "type": "integer", + "nullable": true + }, + "refresh_token_rotation_enabled": { + "type": "boolean", + "nullable": true + }, + "saml_enabled": { + "type": "boolean", + "nullable": true + }, + "saml_external_url": { + "type": "string", + "nullable": true + }, + "saml_allow_encrypted_assertions": { + "type": "boolean", + "nullable": true + }, + "security_sb_forwarded_for_enabled": { + "type": "boolean", + "nullable": true + }, + "security_captcha_enabled": { + "type": "boolean", + "nullable": true + }, + "security_captcha_provider": { + "type": "string", + "enum": ["turnstile", "hcaptcha"], + "nullable": true + }, + "security_captcha_secret": { + "type": "string", + "nullable": true + }, + "security_manual_linking_enabled": { + "type": "boolean", + "nullable": true + }, + "security_refresh_token_reuse_interval": { + "type": "integer", + "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": "integer", + "nullable": true + }, + "sms_messagebird_access_key": { + "type": "string", + "nullable": true + }, + "sms_messagebird_originator": { + "type": "string", + "nullable": true + }, + "sms_otp_exp": { + "type": "integer", + "nullable": true + }, + "sms_otp_length": { + "type": "integer" + }, + "sms_provider": { + "type": "string", + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], + "nullable": true + }, + "sms_template": { + "type": "string", + "nullable": true + }, + "sms_test_otp": { + "type": "string", + "nullable": true + }, + "sms_test_otp_valid_until": { + "type": "string", + "format": "date-time", + "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", + "format": "email", + "nullable": true + }, + "smtp_host": { + "type": "string", + "nullable": true + }, + "smtp_max_frequency": { + "type": "integer", + "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 + }, + "oauth_server_enabled": { + "type": "boolean" + }, + "oauth_server_allow_dynamic_registration": { + "type": "boolean" + }, + "oauth_server_authorization_path": { + "type": "string", + "nullable": true + }, + "custom_oauth_enabled": { + "type": "boolean" + }, + "custom_oauth_max_providers": { + "type": "integer" + } + }, + "required": [ + "api_max_request_duration", + "db_max_pool_size", + "db_max_pool_size_unit", + "disable_signup", + "external_anonymous_users_enabled", + "external_apple_additional_client_ids", + "external_apple_client_id", + "external_apple_email_optional", + "external_apple_enabled", + "external_apple_secret", + "external_azure_client_id", + "external_azure_email_optional", + "external_azure_enabled", + "external_azure_secret", + "external_azure_url", + "external_bitbucket_client_id", + "external_bitbucket_email_optional", + "external_bitbucket_enabled", + "external_bitbucket_secret", + "external_discord_client_id", + "external_discord_email_optional", + "external_discord_enabled", + "external_discord_secret", + "external_email_enabled", + "external_facebook_client_id", + "external_facebook_email_optional", + "external_facebook_enabled", + "external_facebook_secret", + "external_figma_client_id", + "external_figma_email_optional", + "external_figma_enabled", + "external_figma_secret", + "external_github_client_id", + "external_github_email_optional", + "external_github_enabled", + "external_github_secret", + "external_gitlab_client_id", + "external_gitlab_email_optional", + "external_gitlab_enabled", + "external_gitlab_secret", + "external_gitlab_url", + "external_google_additional_client_ids", + "external_google_client_id", + "external_google_email_optional", + "external_google_enabled", + "external_google_secret", + "external_google_skip_nonce_check", + "external_kakao_client_id", + "external_kakao_email_optional", + "external_kakao_enabled", + "external_kakao_secret", + "external_keycloak_client_id", + "external_keycloak_email_optional", + "external_keycloak_enabled", + "external_keycloak_secret", + "external_keycloak_url", + "external_linkedin_oidc_client_id", + "external_linkedin_oidc_email_optional", + "external_linkedin_oidc_enabled", + "external_linkedin_oidc_secret", + "external_slack_oidc_client_id", + "external_slack_oidc_email_optional", + "external_slack_oidc_enabled", + "external_slack_oidc_secret", + "external_notion_client_id", + "external_notion_email_optional", + "external_notion_enabled", + "external_notion_secret", + "external_phone_enabled", + "external_slack_client_id", + "external_slack_email_optional", + "external_slack_enabled", + "external_slack_secret", + "external_spotify_client_id", + "external_spotify_email_optional", + "external_spotify_enabled", + "external_spotify_secret", + "external_twitch_client_id", + "external_twitch_email_optional", + "external_twitch_enabled", + "external_twitch_secret", + "external_twitter_client_id", + "external_twitter_email_optional", + "external_twitter_enabled", + "external_twitter_secret", + "external_x_client_id", + "external_x_email_optional", + "external_x_enabled", + "external_x_secret", + "external_workos_client_id", + "external_workos_enabled", + "external_workos_secret", + "external_workos_url", + "external_web3_solana_enabled", + "external_web3_ethereum_enabled", + "external_zoom_client_id", + "external_zoom_email_optional", + "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", + "hook_before_user_created_enabled", + "hook_before_user_created_uri", + "hook_before_user_created_secrets", + "hook_after_user_created_enabled", + "hook_after_user_created_uri", + "hook_after_user_created_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_subjects_password_changed_notification", + "mailer_subjects_email_changed_notification", + "mailer_subjects_phone_changed_notification", + "mailer_subjects_mfa_factor_enrolled_notification", + "mailer_subjects_mfa_factor_unenrolled_notification", + "mailer_subjects_identity_linked_notification", + "mailer_subjects_identity_unlinked_notification", + "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", + "mailer_templates_password_changed_notification_content", + "mailer_templates_email_changed_notification_content", + "mailer_templates_phone_changed_notification_content", + "mailer_templates_mfa_factor_enrolled_notification_content", + "mailer_templates_mfa_factor_unenrolled_notification_content", + "mailer_templates_identity_linked_notification_content", + "mailer_templates_identity_unlinked_notification_content", + "mailer_notifications_password_changed_enabled", + "mailer_notifications_email_changed_enabled", + "mailer_notifications_phone_changed_enabled", + "mailer_notifications_mfa_factor_enrolled_enabled", + "mailer_notifications_mfa_factor_unenrolled_enabled", + "mailer_notifications_identity_linked_enabled", + "mailer_notifications_identity_unlinked_enabled", + "mfa_max_enrolled_factors", + "mfa_totp_enroll_enabled", + "mfa_totp_verify_enabled", + "mfa_phone_enroll_enabled", + "mfa_phone_verify_enabled", + "mfa_web_authn_enroll_enabled", + "mfa_web_authn_verify_enabled", + "passkey_enabled", + "webauthn_rp_display_name", + "webauthn_rp_id", + "webauthn_rp_origins", + "mfa_phone_otp_length", + "mfa_phone_template", + "mfa_phone_max_frequency", + "nimbus_oauth_client_id", + "nimbus_oauth_email_optional", + "nimbus_oauth_client_secret", + "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", + "rate_limit_otp", + "rate_limit_web3", + "refresh_token_rotation_enabled", + "saml_enabled", + "saml_external_url", + "saml_allow_encrypted_assertions", + "security_sb_forwarded_for_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", + "oauth_server_enabled", + "oauth_server_allow_dynamic_registration", + "oauth_server_authorization_path", + "custom_oauth_enabled", + "custom_oauth_max_providers" + ] + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to retrieve project's auth config" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["auth_config_read"] + } ], "summary": "Gets project's auth config", "tags": ["Auth"], @@ -5563,7 +10957,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" }, "patch": { @@ -5588,7 +10981,1001 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAuthConfigBody" + "type": "object", + "properties": { + "site_url": { + "type": "string", + "pattern": "^[^,]+$", + "nullable": true + }, + "disable_signup": { + "type": "boolean", + "nullable": true + }, + "jwt_exp": { + "type": "integer", + "minimum": 0, + "maximum": 604800, + "nullable": true + }, + "smtp_admin_email": { + "type": "string", + "format": "email", + "nullable": true + }, + "smtp_host": { + "type": "string", + "nullable": true + }, + "smtp_port": { + "type": "string", + "nullable": true + }, + "smtp_user": { + "type": "string", + "nullable": true + }, + "smtp_pass": { + "type": "string", + "nullable": true + }, + "smtp_max_frequency": { + "type": "integer", + "minimum": 0, + "maximum": 32767, + "nullable": true + }, + "smtp_sender_name": { + "type": "string", + "nullable": true + }, + "mailer_allow_unverified_email_sign_ins": { + "type": "boolean", + "nullable": true + }, + "mailer_autoconfirm": { + "type": "boolean", + "nullable": true + }, + "mailer_subjects_invite": { + "type": "string", + "nullable": true + }, + "mailer_subjects_confirmation": { + "type": "string", + "nullable": true + }, + "mailer_subjects_recovery": { + "type": "string", + "nullable": true + }, + "mailer_subjects_email_change": { + "type": "string", + "nullable": true + }, + "mailer_subjects_magic_link": { + "type": "string", + "nullable": true + }, + "mailer_subjects_reauthentication": { + "type": "string", + "nullable": true + }, + "mailer_subjects_password_changed_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_email_changed_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_phone_changed_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_mfa_factor_enrolled_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_mfa_factor_unenrolled_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_identity_linked_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_identity_unlinked_notification": { + "type": "string", + "nullable": true + }, + "mailer_templates_invite_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_confirmation_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_recovery_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_email_change_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_magic_link_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_reauthentication_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_password_changed_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_email_changed_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_phone_changed_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_mfa_factor_enrolled_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_mfa_factor_unenrolled_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_identity_linked_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_identity_unlinked_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_notifications_password_changed_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_email_changed_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_phone_changed_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_mfa_factor_enrolled_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_mfa_factor_unenrolled_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_identity_linked_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_identity_unlinked_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_max_enrolled_factors": { + "type": "integer", + "minimum": 0, + "maximum": 2147483647, + "nullable": true + }, + "uri_allow_list": { + "type": "string", + "nullable": true + }, + "external_anonymous_users_enabled": { + "type": "boolean", + "nullable": true + }, + "external_email_enabled": { + "type": "boolean", + "nullable": true + }, + "external_phone_enabled": { + "type": "boolean", + "nullable": true + }, + "saml_enabled": { + "type": "boolean", + "nullable": true + }, + "saml_external_url": { + "type": "string", + "pattern": "^[^,]+$", + "nullable": true + }, + "security_sb_forwarded_for_enabled": { + "type": "boolean", + "nullable": true + }, + "security_captcha_enabled": { + "type": "boolean", + "nullable": true + }, + "security_captcha_provider": { + "type": "string", + "enum": ["turnstile", "hcaptcha"], + "nullable": true + }, + "security_captcha_secret": { + "type": "string", + "nullable": true + }, + "sessions_timebox": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "sessions_inactivity_timeout": { + "type": "number", + "minimum": 0, + "nullable": true + }, + "sessions_single_per_user": { + "type": "boolean", + "nullable": true + }, + "sessions_tags": { + "type": "string", + "pattern": "^\\s*([a-zA-Z0-9_-]+(\\s*,+\\s*)?)*\\s*$", + "nullable": true + }, + "rate_limit_anonymous_users": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_email_sent": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_sms_sent": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_verify": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_token_refresh": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_otp": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "rate_limit_web3": { + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "nullable": true + }, + "mailer_secure_email_change_enabled": { + "type": "boolean", + "nullable": true + }, + "refresh_token_rotation_enabled": { + "type": "boolean", + "nullable": true + }, + "password_hibp_enabled": { + "type": "boolean", + "nullable": true + }, + "password_min_length": { + "type": "integer", + "minimum": 6, + "maximum": 32767, + "nullable": true + }, + "password_required_characters": { + "type": "string", + "enum": [ + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", + "" + ], + "nullable": true + }, + "security_manual_linking_enabled": { + "type": "boolean", + "nullable": true + }, + "security_update_password_require_reauthentication": { + "type": "boolean", + "nullable": true + }, + "security_refresh_token_reuse_interval": { + "type": "integer", + "minimum": 0, + "maximum": 2147483647, + "nullable": true + }, + "mailer_otp_exp": { + "type": "integer", + "minimum": 0, + "maximum": 2147483647 + }, + "mailer_otp_length": { + "type": "integer", + "minimum": 6, + "maximum": 10, + "nullable": true + }, + "sms_autoconfirm": { + "type": "boolean", + "nullable": true + }, + "sms_max_frequency": { + "type": "integer", + "minimum": 0, + "maximum": 32767, + "nullable": true + }, + "sms_otp_exp": { + "type": "integer", + "minimum": 0, + "maximum": 2147483647, + "nullable": true + }, + "sms_otp_length": { + "type": "integer", + "minimum": 0, + "maximum": 32767 + }, + "sms_provider": { + "type": "string", + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], + "nullable": true + }, + "sms_messagebird_access_key": { + "type": "string", + "nullable": true + }, + "sms_messagebird_originator": { + "type": "string", + "nullable": true + }, + "sms_test_otp": { + "type": "string", + "pattern": "^([0-9]{1,15}=[0-9]+,?)*$", + "nullable": true + }, + "sms_test_otp_valid_until": { + "type": "string", + "format": "date-time", + "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 + }, + "sms_template": { + "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_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_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 + }, + "hook_before_user_created_enabled": { + "type": "boolean", + "nullable": true + }, + "hook_before_user_created_uri": { + "type": "string", + "nullable": true + }, + "hook_before_user_created_secrets": { + "type": "string", + "nullable": true + }, + "hook_after_user_created_enabled": { + "type": "boolean", + "nullable": true + }, + "hook_after_user_created_uri": { + "type": "string", + "nullable": true + }, + "hook_after_user_created_secrets": { + "type": "string", + "nullable": true + }, + "external_apple_enabled": { + "type": "boolean", + "nullable": true + }, + "external_apple_client_id": { + "type": "string", + "nullable": true + }, + "external_apple_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_apple_secret": { + "type": "string", + "nullable": true + }, + "external_apple_additional_client_ids": { + "type": "string", + "nullable": true + }, + "external_azure_enabled": { + "type": "boolean", + "nullable": true + }, + "external_azure_client_id": { + "type": "string", + "nullable": true + }, + "external_azure_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_azure_secret": { + "type": "string", + "nullable": true + }, + "external_azure_url": { + "type": "string", + "nullable": true + }, + "external_bitbucket_enabled": { + "type": "boolean", + "nullable": true + }, + "external_bitbucket_client_id": { + "type": "string", + "nullable": true + }, + "external_bitbucket_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_bitbucket_secret": { + "type": "string", + "nullable": true + }, + "external_discord_enabled": { + "type": "boolean", + "nullable": true + }, + "external_discord_client_id": { + "type": "string", + "nullable": true + }, + "external_discord_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_discord_secret": { + "type": "string", + "nullable": true + }, + "external_facebook_enabled": { + "type": "boolean", + "nullable": true + }, + "external_facebook_client_id": { + "type": "string", + "nullable": true + }, + "external_facebook_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_facebook_secret": { + "type": "string", + "nullable": true + }, + "external_figma_enabled": { + "type": "boolean", + "nullable": true + }, + "external_figma_client_id": { + "type": "string", + "nullable": true + }, + "external_figma_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_figma_secret": { + "type": "string", + "nullable": true + }, + "external_github_enabled": { + "type": "boolean", + "nullable": true + }, + "external_github_client_id": { + "type": "string", + "nullable": true + }, + "external_github_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_github_secret": { + "type": "string", + "nullable": true + }, + "external_gitlab_enabled": { + "type": "boolean", + "nullable": true + }, + "external_gitlab_client_id": { + "type": "string", + "nullable": true + }, + "external_gitlab_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_gitlab_secret": { + "type": "string", + "nullable": true + }, + "external_gitlab_url": { + "type": "string", + "nullable": true + }, + "external_google_enabled": { + "type": "boolean", + "nullable": true + }, + "external_google_client_id": { + "type": "string", + "nullable": true + }, + "external_google_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_google_secret": { + "type": "string", + "nullable": true + }, + "external_google_additional_client_ids": { + "type": "string", + "nullable": true + }, + "external_google_skip_nonce_check": { + "type": "boolean", + "nullable": true + }, + "external_kakao_enabled": { + "type": "boolean", + "nullable": true + }, + "external_kakao_client_id": { + "type": "string", + "nullable": true + }, + "external_kakao_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_kakao_secret": { + "type": "string", + "nullable": true + }, + "external_keycloak_enabled": { + "type": "boolean", + "nullable": true + }, + "external_keycloak_client_id": { + "type": "string", + "nullable": true + }, + "external_keycloak_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_keycloak_secret": { + "type": "string", + "nullable": true + }, + "external_keycloak_url": { + "type": "string", + "nullable": true + }, + "external_linkedin_oidc_enabled": { + "type": "boolean", + "nullable": true + }, + "external_linkedin_oidc_client_id": { + "type": "string", + "nullable": true + }, + "external_linkedin_oidc_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_linkedin_oidc_secret": { + "type": "string", + "nullable": true + }, + "external_slack_oidc_enabled": { + "type": "boolean", + "nullable": true + }, + "external_slack_oidc_client_id": { + "type": "string", + "nullable": true + }, + "external_slack_oidc_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_slack_oidc_secret": { + "type": "string", + "nullable": true + }, + "external_notion_enabled": { + "type": "boolean", + "nullable": true + }, + "external_notion_client_id": { + "type": "string", + "nullable": true + }, + "external_notion_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_notion_secret": { + "type": "string", + "nullable": true + }, + "external_slack_enabled": { + "type": "boolean", + "nullable": true + }, + "external_slack_client_id": { + "type": "string", + "nullable": true + }, + "external_slack_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_slack_secret": { + "type": "string", + "nullable": true + }, + "external_spotify_enabled": { + "type": "boolean", + "nullable": true + }, + "external_spotify_client_id": { + "type": "string", + "nullable": true + }, + "external_spotify_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_spotify_secret": { + "type": "string", + "nullable": true + }, + "external_twitch_enabled": { + "type": "boolean", + "nullable": true + }, + "external_twitch_client_id": { + "type": "string", + "nullable": true + }, + "external_twitch_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_twitch_secret": { + "type": "string", + "nullable": true + }, + "external_twitter_enabled": { + "type": "boolean", + "nullable": true + }, + "external_twitter_client_id": { + "type": "string", + "nullable": true + }, + "external_twitter_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_twitter_secret": { + "type": "string", + "nullable": true + }, + "external_x_enabled": { + "type": "boolean", + "nullable": true + }, + "external_x_client_id": { + "type": "string", + "nullable": true + }, + "external_x_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_x_secret": { + "type": "string", + "nullable": true + }, + "external_workos_enabled": { + "type": "boolean", + "nullable": true + }, + "external_workos_client_id": { + "type": "string", + "nullable": true + }, + "external_workos_secret": { + "type": "string", + "nullable": true + }, + "external_workos_url": { + "type": "string", + "nullable": true + }, + "external_web3_solana_enabled": { + "type": "boolean", + "nullable": true + }, + "external_web3_ethereum_enabled": { + "type": "boolean", + "nullable": true + }, + "external_zoom_enabled": { + "type": "boolean", + "nullable": true + }, + "external_zoom_client_id": { + "type": "string", + "nullable": true + }, + "external_zoom_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_zoom_secret": { + "type": "string", + "nullable": true + }, + "db_max_pool_size": { + "type": "integer", + "nullable": true + }, + "db_max_pool_size_unit": { + "type": "string", + "enum": ["connections", "percent"], + "nullable": true + }, + "api_max_request_duration": { + "type": "integer", + "nullable": true + }, + "mfa_totp_enroll_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_totp_verify_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_web_authn_enroll_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_web_authn_verify_enabled": { + "type": "boolean", + "nullable": true + }, + "passkey_enabled": { + "type": "boolean" + }, + "webauthn_rp_display_name": { + "type": "string", + "nullable": true + }, + "webauthn_rp_id": { + "type": "string", + "nullable": true + }, + "webauthn_rp_origins": { + "type": "string", + "nullable": true + }, + "mfa_phone_enroll_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_phone_verify_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_phone_max_frequency": { + "type": "integer", + "minimum": 0, + "maximum": 32767, + "nullable": true + }, + "mfa_phone_otp_length": { + "type": "integer", + "minimum": 0, + "maximum": 32767, + "nullable": true + }, + "mfa_phone_template": { + "type": "string", + "nullable": true + }, + "nimbus_oauth_client_id": { + "type": "string", + "nullable": true + }, + "nimbus_oauth_client_secret": { + "type": "string", + "nullable": true + }, + "oauth_server_enabled": { + "type": "boolean", + "nullable": true + }, + "oauth_server_allow_dynamic_registration": { + "type": "boolean", + "nullable": true + }, + "oauth_server_authorization_path": { + "type": "string", + "nullable": true + }, + "custom_oauth_enabled": { + "type": "boolean" + } + }, + "example": { + "site_url": "https://app.example.com", + "disable_signup": false, + "jwt_exp": 3600 + } } } } @@ -5599,7 +11986,1199 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthConfigResponse" + "type": "object", + "properties": { + "api_max_request_duration": { + "type": "integer", + "nullable": true + }, + "db_max_pool_size": { + "type": "integer", + "nullable": true + }, + "db_max_pool_size_unit": { + "type": "string", + "enum": ["connections", "percent"], + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_linkedin_oidc_enabled": { + "type": "boolean", + "nullable": true + }, + "external_linkedin_oidc_secret": { + "type": "string", + "nullable": true + }, + "external_slack_oidc_client_id": { + "type": "string", + "nullable": true + }, + "external_slack_oidc_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_slack_oidc_enabled": { + "type": "boolean", + "nullable": true + }, + "external_slack_oidc_secret": { + "type": "string", + "nullable": true + }, + "external_notion_client_id": { + "type": "string", + "nullable": true + }, + "external_notion_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "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_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_twitter_enabled": { + "type": "boolean", + "nullable": true + }, + "external_twitter_secret": { + "type": "string", + "nullable": true + }, + "external_x_client_id": { + "type": "string", + "nullable": true + }, + "external_x_email_optional": { + "type": "boolean", + "nullable": true + }, + "external_x_enabled": { + "type": "boolean", + "nullable": true + }, + "external_x_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_web3_solana_enabled": { + "type": "boolean", + "nullable": true + }, + "external_web3_ethereum_enabled": { + "type": "boolean", + "nullable": true + }, + "external_zoom_client_id": { + "type": "string", + "nullable": true + }, + "external_zoom_email_optional": { + "type": "boolean", + "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 + }, + "hook_before_user_created_enabled": { + "type": "boolean", + "nullable": true + }, + "hook_before_user_created_uri": { + "type": "string", + "nullable": true + }, + "hook_before_user_created_secrets": { + "type": "string", + "nullable": true + }, + "hook_after_user_created_enabled": { + "type": "boolean", + "nullable": true + }, + "hook_after_user_created_uri": { + "type": "string", + "nullable": true + }, + "hook_after_user_created_secrets": { + "type": "string", + "nullable": true + }, + "jwt_exp": { + "type": "integer", + "nullable": true + }, + "mailer_allow_unverified_email_sign_ins": { + "type": "boolean", + "nullable": true + }, + "mailer_autoconfirm": { + "type": "boolean", + "nullable": true + }, + "mailer_otp_exp": { + "type": "integer" + }, + "mailer_otp_length": { + "type": "integer", + "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_subjects_password_changed_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_email_changed_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_phone_changed_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_mfa_factor_enrolled_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_mfa_factor_unenrolled_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_identity_linked_notification": { + "type": "string", + "nullable": true + }, + "mailer_subjects_identity_unlinked_notification": { + "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 + }, + "mailer_templates_password_changed_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_email_changed_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_phone_changed_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_mfa_factor_enrolled_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_mfa_factor_unenrolled_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_identity_linked_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_templates_identity_unlinked_notification_content": { + "type": "string", + "nullable": true + }, + "mailer_notifications_password_changed_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_email_changed_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_phone_changed_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_mfa_factor_enrolled_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_mfa_factor_unenrolled_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_identity_linked_enabled": { + "type": "boolean", + "nullable": true + }, + "mailer_notifications_identity_unlinked_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_max_enrolled_factors": { + "type": "integer", + "nullable": true + }, + "mfa_totp_enroll_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_totp_verify_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_phone_enroll_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_phone_verify_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_web_authn_enroll_enabled": { + "type": "boolean", + "nullable": true + }, + "mfa_web_authn_verify_enabled": { + "type": "boolean", + "nullable": true + }, + "passkey_enabled": { + "type": "boolean" + }, + "webauthn_rp_display_name": { + "type": "string", + "nullable": true + }, + "webauthn_rp_id": { + "type": "string", + "nullable": true + }, + "webauthn_rp_origins": { + "type": "string", + "nullable": true + }, + "mfa_phone_otp_length": { + "type": "integer" + }, + "mfa_phone_template": { + "type": "string", + "nullable": true + }, + "mfa_phone_max_frequency": { + "type": "integer", + "nullable": true + }, + "nimbus_oauth_client_id": { + "type": "string", + "nullable": true + }, + "nimbus_oauth_email_optional": { + "type": "boolean", + "nullable": true + }, + "nimbus_oauth_client_secret": { + "type": "string", + "nullable": true + }, + "password_hibp_enabled": { + "type": "boolean", + "nullable": true + }, + "password_min_length": { + "type": "integer", + "nullable": true + }, + "password_required_characters": { + "type": "string", + "enum": [ + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", + "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", + "" + ], + "nullable": true + }, + "rate_limit_anonymous_users": { + "type": "integer", + "nullable": true + }, + "rate_limit_email_sent": { + "type": "integer", + "nullable": true + }, + "rate_limit_sms_sent": { + "type": "integer", + "nullable": true + }, + "rate_limit_token_refresh": { + "type": "integer", + "nullable": true + }, + "rate_limit_verify": { + "type": "integer", + "nullable": true + }, + "rate_limit_otp": { + "type": "integer", + "nullable": true + }, + "rate_limit_web3": { + "type": "integer", + "nullable": true + }, + "refresh_token_rotation_enabled": { + "type": "boolean", + "nullable": true + }, + "saml_enabled": { + "type": "boolean", + "nullable": true + }, + "saml_external_url": { + "type": "string", + "nullable": true + }, + "saml_allow_encrypted_assertions": { + "type": "boolean", + "nullable": true + }, + "security_sb_forwarded_for_enabled": { + "type": "boolean", + "nullable": true + }, + "security_captcha_enabled": { + "type": "boolean", + "nullable": true + }, + "security_captcha_provider": { + "type": "string", + "enum": ["turnstile", "hcaptcha"], + "nullable": true + }, + "security_captcha_secret": { + "type": "string", + "nullable": true + }, + "security_manual_linking_enabled": { + "type": "boolean", + "nullable": true + }, + "security_refresh_token_reuse_interval": { + "type": "integer", + "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": "integer", + "nullable": true + }, + "sms_messagebird_access_key": { + "type": "string", + "nullable": true + }, + "sms_messagebird_originator": { + "type": "string", + "nullable": true + }, + "sms_otp_exp": { + "type": "integer", + "nullable": true + }, + "sms_otp_length": { + "type": "integer" + }, + "sms_provider": { + "type": "string", + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], + "nullable": true + }, + "sms_template": { + "type": "string", + "nullable": true + }, + "sms_test_otp": { + "type": "string", + "nullable": true + }, + "sms_test_otp_valid_until": { + "type": "string", + "format": "date-time", + "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", + "format": "email", + "nullable": true + }, + "smtp_host": { + "type": "string", + "nullable": true + }, + "smtp_max_frequency": { + "type": "integer", + "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 + }, + "oauth_server_enabled": { + "type": "boolean" + }, + "oauth_server_allow_dynamic_registration": { + "type": "boolean" + }, + "oauth_server_authorization_path": { + "type": "string", + "nullable": true + }, + "custom_oauth_enabled": { + "type": "boolean" + }, + "custom_oauth_max_providers": { + "type": "integer" + } + }, + "required": [ + "api_max_request_duration", + "db_max_pool_size", + "db_max_pool_size_unit", + "disable_signup", + "external_anonymous_users_enabled", + "external_apple_additional_client_ids", + "external_apple_client_id", + "external_apple_email_optional", + "external_apple_enabled", + "external_apple_secret", + "external_azure_client_id", + "external_azure_email_optional", + "external_azure_enabled", + "external_azure_secret", + "external_azure_url", + "external_bitbucket_client_id", + "external_bitbucket_email_optional", + "external_bitbucket_enabled", + "external_bitbucket_secret", + "external_discord_client_id", + "external_discord_email_optional", + "external_discord_enabled", + "external_discord_secret", + "external_email_enabled", + "external_facebook_client_id", + "external_facebook_email_optional", + "external_facebook_enabled", + "external_facebook_secret", + "external_figma_client_id", + "external_figma_email_optional", + "external_figma_enabled", + "external_figma_secret", + "external_github_client_id", + "external_github_email_optional", + "external_github_enabled", + "external_github_secret", + "external_gitlab_client_id", + "external_gitlab_email_optional", + "external_gitlab_enabled", + "external_gitlab_secret", + "external_gitlab_url", + "external_google_additional_client_ids", + "external_google_client_id", + "external_google_email_optional", + "external_google_enabled", + "external_google_secret", + "external_google_skip_nonce_check", + "external_kakao_client_id", + "external_kakao_email_optional", + "external_kakao_enabled", + "external_kakao_secret", + "external_keycloak_client_id", + "external_keycloak_email_optional", + "external_keycloak_enabled", + "external_keycloak_secret", + "external_keycloak_url", + "external_linkedin_oidc_client_id", + "external_linkedin_oidc_email_optional", + "external_linkedin_oidc_enabled", + "external_linkedin_oidc_secret", + "external_slack_oidc_client_id", + "external_slack_oidc_email_optional", + "external_slack_oidc_enabled", + "external_slack_oidc_secret", + "external_notion_client_id", + "external_notion_email_optional", + "external_notion_enabled", + "external_notion_secret", + "external_phone_enabled", + "external_slack_client_id", + "external_slack_email_optional", + "external_slack_enabled", + "external_slack_secret", + "external_spotify_client_id", + "external_spotify_email_optional", + "external_spotify_enabled", + "external_spotify_secret", + "external_twitch_client_id", + "external_twitch_email_optional", + "external_twitch_enabled", + "external_twitch_secret", + "external_twitter_client_id", + "external_twitter_email_optional", + "external_twitter_enabled", + "external_twitter_secret", + "external_x_client_id", + "external_x_email_optional", + "external_x_enabled", + "external_x_secret", + "external_workos_client_id", + "external_workos_enabled", + "external_workos_secret", + "external_workos_url", + "external_web3_solana_enabled", + "external_web3_ethereum_enabled", + "external_zoom_client_id", + "external_zoom_email_optional", + "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", + "hook_before_user_created_enabled", + "hook_before_user_created_uri", + "hook_before_user_created_secrets", + "hook_after_user_created_enabled", + "hook_after_user_created_uri", + "hook_after_user_created_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_subjects_password_changed_notification", + "mailer_subjects_email_changed_notification", + "mailer_subjects_phone_changed_notification", + "mailer_subjects_mfa_factor_enrolled_notification", + "mailer_subjects_mfa_factor_unenrolled_notification", + "mailer_subjects_identity_linked_notification", + "mailer_subjects_identity_unlinked_notification", + "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", + "mailer_templates_password_changed_notification_content", + "mailer_templates_email_changed_notification_content", + "mailer_templates_phone_changed_notification_content", + "mailer_templates_mfa_factor_enrolled_notification_content", + "mailer_templates_mfa_factor_unenrolled_notification_content", + "mailer_templates_identity_linked_notification_content", + "mailer_templates_identity_unlinked_notification_content", + "mailer_notifications_password_changed_enabled", + "mailer_notifications_email_changed_enabled", + "mailer_notifications_phone_changed_enabled", + "mailer_notifications_mfa_factor_enrolled_enabled", + "mailer_notifications_mfa_factor_unenrolled_enabled", + "mailer_notifications_identity_linked_enabled", + "mailer_notifications_identity_unlinked_enabled", + "mfa_max_enrolled_factors", + "mfa_totp_enroll_enabled", + "mfa_totp_verify_enabled", + "mfa_phone_enroll_enabled", + "mfa_phone_verify_enabled", + "mfa_web_authn_enroll_enabled", + "mfa_web_authn_verify_enabled", + "passkey_enabled", + "webauthn_rp_display_name", + "webauthn_rp_id", + "webauthn_rp_origins", + "mfa_phone_otp_length", + "mfa_phone_template", + "mfa_phone_max_frequency", + "nimbus_oauth_client_id", + "nimbus_oauth_email_optional", + "nimbus_oauth_client_secret", + "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", + "rate_limit_otp", + "rate_limit_web3", + "refresh_token_rotation_enabled", + "saml_enabled", + "saml_external_url", + "saml_allow_encrypted_assertions", + "security_sb_forwarded_for_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", + "oauth_server_enabled", + "oauth_server_allow_dynamic_registration", + "oauth_server_authorization_path", + "custom_oauth_enabled", + "custom_oauth_max_providers" + ] } } } @@ -5620,6 +13199,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_config_write", "project_admin_write"] } ], "summary": "Updates a project's auth config", @@ -5631,7 +13213,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_write", "project_admin_write"]], "x-oauth-scope": "auth:write" } }, @@ -5658,7 +13239,20 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateThirdPartyAuthBody" + "type": "object", + "properties": { + "oidc_issuer_url": { + "type": "string" + }, + "jwks_url": { + "type": "string" + }, + "custom_jwks": {} + }, + "example": { + "oidc_issuer_url": "https://login.acme.com", + "jwks_url": "https://login.acme.com/.well-known/jwks.json" + } } } } @@ -5669,7 +13263,41 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThirdPartyAuth" + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string" + }, + "oidc_issuer_url": { + "type": "string", + "nullable": true + }, + "jwks_url": { + "type": "string", + "nullable": true + }, + "custom_jwks": { + "nullable": true + }, + "resolved_jwks": { + "nullable": true + }, + "inserted_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "resolved_at": { + "type": "string", + "nullable": true + } + }, + "required": ["id", "type", "inserted_at", "updated_at"] } } } @@ -5687,6 +13315,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_config_write"] } ], "summary": "Creates a new third-party auth integration", @@ -5698,7 +13329,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" }, "get": { @@ -5726,7 +13356,41 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/ThirdPartyAuth" + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string" + }, + "oidc_issuer_url": { + "type": "string", + "nullable": true + }, + "jwks_url": { + "type": "string", + "nullable": true + }, + "custom_jwks": { + "nullable": true + }, + "resolved_jwks": { + "nullable": true + }, + "inserted_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "resolved_at": { + "type": "string", + "nullable": true + } + }, + "required": ["id", "type", "inserted_at", "updated_at"] } } } @@ -5745,6 +13409,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_config_read"] } ], "summary": "Lists all third-party auth integrations", @@ -5756,7 +13423,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" } }, @@ -5783,7 +13449,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "88888888-8888-4888-8888-888888888888", "type": "string" } @@ -5795,7 +13460,41 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThirdPartyAuth" + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string" + }, + "oidc_issuer_url": { + "type": "string", + "nullable": true + }, + "jwks_url": { + "type": "string", + "nullable": true + }, + "custom_jwks": { + "nullable": true + }, + "resolved_jwks": { + "nullable": true + }, + "inserted_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "resolved_at": { + "type": "string", + "nullable": true + } + }, + "required": ["id", "type", "inserted_at", "updated_at"] } } } @@ -5813,6 +13512,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_config_write"] } ], "summary": "Removes a third-party auth integration", @@ -5824,7 +13526,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" }, "get": { @@ -5849,7 +13550,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "88888888-8888-4888-8888-888888888888", "type": "string" } @@ -5861,7 +13561,41 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThirdPartyAuth" + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string" + }, + "oidc_issuer_url": { + "type": "string", + "nullable": true + }, + "jwks_url": { + "type": "string", + "nullable": true + }, + "custom_jwks": { + "nullable": true + }, + "resolved_jwks": { + "nullable": true + }, + "inserted_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "resolved_at": { + "type": "string", + "nullable": true + } + }, + "required": ["id", "type", "inserted_at", "updated_at"] } } } @@ -5879,6 +13613,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_config_read"] } ], "summary": "Get a third-party integration", @@ -5890,7 +13627,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" } }, @@ -5929,6 +13665,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_write"] } ], "summary": "Pauses the given project", @@ -5940,7 +13679,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -5979,6 +13717,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_write"] } ], "summary": "Restarts the given project", @@ -5990,7 +13731,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -6018,7 +13758,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetProjectAvailableRestoreVersionsResponse" + "type": "object", + "properties": { + "available_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "release_channel": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + }, + "postgres_engine": { + "type": "string", + "enum": ["13", "14", "15", "17", "17-oriole"] + } + }, + "required": ["version", "release_channel", "postgres_engine"] + } + } + }, + "required": ["available_versions"] } } } @@ -6036,6 +13799,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_read"] } ], "summary": "Lists available restore versions for the given project", @@ -6047,7 +13813,6 @@ } ], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["project_admin_read"]], "x-oauth-scope": "projects:read" }, "post": { @@ -6084,6 +13849,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_write"] } ], "summary": "Restores the given project", @@ -6095,7 +13863,6 @@ } ], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -6134,6 +13901,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_write"] } ], "summary": "Cancels the given project restoration", @@ -6145,7 +13915,6 @@ } ], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["project_admin_write"]], "x-oauth-scope": "projects:write" } }, @@ -6174,7 +13943,234 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListProjectAddonsResponse" + "type": "object", + "properties": { + "selected_addons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_domain", + "compute_instance", + "pitr", + "ipv4", + "auth_mfa_phone", + "auth_mfa_web_authn", + "log_drain", + "etl_pipeline" + ] + }, + "variant": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ci_micro", + "ci_small", + "ci_medium", + "ci_large", + "ci_xlarge", + "ci_2xlarge", + "ci_4xlarge", + "ci_8xlarge", + "ci_12xlarge", + "ci_16xlarge", + "ci_24xlarge", + "ci_24xlarge_optimized_cpu", + "ci_24xlarge_optimized_memory", + "ci_24xlarge_high_memory", + "ci_48xlarge", + "ci_48xlarge_optimized_cpu", + "ci_48xlarge_optimized_memory", + "ci_48xlarge_high_memory" + ] + }, + { + "type": "string", + "enum": ["cd_default"] + }, + { + "type": "string", + "enum": ["pitr_7", "pitr_14", "pitr_28"] + }, + { + "type": "string", + "enum": ["ipv4_default"] + }, + { + "type": "string", + "enum": ["auth_mfa_phone_default"] + }, + { + "type": "string", + "enum": ["auth_mfa_web_authn_default"] + }, + { + "type": "string", + "enum": ["log_drain_default"] + }, + { + "type": "string", + "enum": ["etl_pipeline_default"] + } + ] + }, + "name": { + "type": "string" + }, + "price": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["fixed", "usage"] + }, + "interval": { + "type": "string", + "enum": ["monthly", "hourly"] + }, + "amount": { + "type": "number" + } + }, + "required": ["description", "type", "interval", "amount"] + }, + "meta": { + "description": "Any JSON-serializable value" + } + }, + "required": ["id", "name", "price"] + } + }, + "required": ["type", "variant"] + } + }, + "available_addons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_domain", + "compute_instance", + "pitr", + "ipv4", + "auth_mfa_phone", + "auth_mfa_web_authn", + "log_drain", + "etl_pipeline" + ] + }, + "name": { + "type": "string" + }, + "variants": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ci_micro", + "ci_small", + "ci_medium", + "ci_large", + "ci_xlarge", + "ci_2xlarge", + "ci_4xlarge", + "ci_8xlarge", + "ci_12xlarge", + "ci_16xlarge", + "ci_24xlarge", + "ci_24xlarge_optimized_cpu", + "ci_24xlarge_optimized_memory", + "ci_24xlarge_high_memory", + "ci_48xlarge", + "ci_48xlarge_optimized_cpu", + "ci_48xlarge_optimized_memory", + "ci_48xlarge_high_memory" + ] + }, + { + "type": "string", + "enum": ["cd_default"] + }, + { + "type": "string", + "enum": ["pitr_7", "pitr_14", "pitr_28"] + }, + { + "type": "string", + "enum": ["ipv4_default"] + }, + { + "type": "string", + "enum": ["auth_mfa_phone_default"] + }, + { + "type": "string", + "enum": ["auth_mfa_web_authn_default"] + }, + { + "type": "string", + "enum": ["log_drain_default"] + }, + { + "type": "string", + "enum": ["etl_pipeline_default"] + } + ] + }, + "name": { + "type": "string" + }, + "price": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["fixed", "usage"] + }, + "interval": { + "type": "string", + "enum": ["monthly", "hourly"] + }, + "amount": { + "type": "number" + } + }, + "required": ["description", "type", "interval", "amount"] + }, + "meta": { + "description": "Any JSON-serializable value" + } + }, + "required": ["id", "name", "price"] + } + } + }, + "required": ["type", "name", "variants"] + } + } + }, + "required": ["selected_addons", "available_addons"] } } } @@ -6195,12 +14191,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["infra_add_ons_read"] } ], "summary": "List billing addons and compute instance selections", "tags": ["Billing"], - "x-endpoint-owners": ["billing"], - "x-fga-permissions": [["infra_add_ons_read"]] + "x-endpoint-owners": ["billing"] }, "patch": { "description": "Selects an addon variant, for example scaling the project’s compute instance up or down, and applies it to the project.", @@ -6225,7 +14223,66 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApplyProjectAddonBody" + "type": "object", + "properties": { + "addon_variant": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ci_micro", + "ci_small", + "ci_medium", + "ci_large", + "ci_xlarge", + "ci_2xlarge", + "ci_4xlarge", + "ci_8xlarge", + "ci_12xlarge", + "ci_16xlarge", + "ci_24xlarge", + "ci_24xlarge_optimized_cpu", + "ci_24xlarge_optimized_memory", + "ci_24xlarge_high_memory", + "ci_48xlarge", + "ci_48xlarge_optimized_cpu", + "ci_48xlarge_optimized_memory", + "ci_48xlarge_high_memory" + ] + }, + { + "type": "string", + "enum": ["cd_default"] + }, + { + "type": "string", + "enum": ["pitr_7", "pitr_14", "pitr_28"] + }, + { + "type": "string", + "enum": ["ipv4_default"] + } + ] + }, + "addon_type": { + "type": "string", + "enum": [ + "custom_domain", + "compute_instance", + "pitr", + "ipv4", + "auth_mfa_phone", + "auth_mfa_web_authn", + "log_drain", + "etl_pipeline" + ] + } + }, + "required": ["addon_variant", "addon_type"], + "example": { + "addon_variant": "pitr_7", + "addon_type": "pitr" + } } } } @@ -6250,12 +14307,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["infra_add_ons_write"] } ], "summary": "Apply or update billing addons, including compute instance size", "tags": ["Billing"], - "x-endpoint-owners": ["billing"], - "x-fga-permissions": [["infra_add_ons_write"]] + "x-endpoint-owners": ["billing"] } }, "/v1/projects/{ref}/billing/addons/{addon_variant}": { @@ -6282,7 +14341,7 @@ "in": "path", "schema": { "example": "pitr_7", - "anyOf": [ + "oneOf": [ { "type": "string", "enum": [ @@ -6342,12 +14401,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["infra_add_ons_write"] } ], "summary": "Remove billing addons or revert compute instance sizing", "tags": ["Billing"], - "x-endpoint-owners": ["billing"], - "x-fga-permissions": [["infra_add_ons_write"]] + "x-endpoint-owners": ["billing"] } }, "/v1/projects/{ref}/claim-token": { @@ -6374,7 +14435,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectClaimTokenResponse" + "type": "object", + "properties": { + "token_alias": { + "type": "string" + }, + "expires_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "created_by": { + "type": "string", + "format": "uuid" + } + }, + "required": ["token_alias", "expires_at", "created_at", "created_by"] } } } @@ -6392,12 +14469,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["project_admin_read"] } ], "summary": "Gets project claim token", "tags": ["Projects"], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["project_admin_read"]], "x-internal": true }, "post": { @@ -6423,7 +14502,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateProjectClaimTokenResponse" + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "token_alias": { + "type": "string" + }, + "expires_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "created_by": { + "type": "string", + "format": "uuid" + } + }, + "required": ["token", "token_alias", "expires_at", "created_at", "created_by"] } } } @@ -6441,12 +14539,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["organization_admin_write", "project_admin_write"] } ], "summary": "Creates project claim token", "tags": ["Projects"], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_write", "project_admin_write"]], "x-internal": true }, "delete": { @@ -6483,12 +14583,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["organization_admin_write", "project_admin_write"] } ], "summary": "Revokes project claim token", "tags": ["Projects"], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_write", "project_admin_write"]], "x-internal": true } }, @@ -6518,7 +14620,127 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1ProjectAdvisorsResponse" + "type": "object", + "properties": { + "lints": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "unindexed_foreign_keys", + "auth_users_exposed", + "auth_rls_initplan", + "no_primary_key", + "unused_index", + "multiple_permissive_policies", + "policy_exists_rls_disabled", + "rls_enabled_no_policy", + "duplicate_index", + "security_definer_view", + "function_search_path_mutable", + "rls_disabled_in_public", + "extension_in_public", + "rls_references_user_metadata", + "materialized_view_in_api", + "foreign_table_in_api", + "unsupported_reg_types", + "auth_otp_long_expiry", + "auth_otp_short_length", + "ssl_not_enforced", + "network_restrictions_not_set", + "password_requirements_min_length", + "pitr_not_enabled", + "auth_leaked_password_protection", + "auth_insufficient_mfa_options", + "auth_password_policy_missing", + "leaked_service_key", + "no_backup_admin", + "vulnerable_postgres_version" + ] + }, + "title": { + "type": "string" + }, + "level": { + "type": "string", + "enum": ["ERROR", "WARN", "INFO"] + }, + "facing": { + "type": "string", + "enum": ["EXTERNAL"] + }, + "categories": { + "type": "array", + "items": { + "type": "string", + "enum": ["PERFORMANCE", "SECURITY"] + } + }, + "description": { + "type": "string" + }, + "detail": { + "type": "string" + }, + "remediation": { + "type": "string" + }, + "metadata": { + "type": "object", + "properties": { + "schema": { + "type": "string" + }, + "name": { + "type": "string" + }, + "entity": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "table", + "view", + "auth", + "function", + "extension", + "compliance" + ] + }, + "fkey_name": { + "type": "string" + }, + "fkey_columns": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "cache_key": { + "type": "string" + } + }, + "required": [ + "name", + "title", + "level", + "facing", + "categories", + "description", + "detail", + "remediation", + "cache_key" + ] + } + } + }, + "required": ["lints"] } } } @@ -6536,6 +14758,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["advisors_read"] } ], "summary": "Gets project performance advisors.", @@ -6547,7 +14772,6 @@ } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["advisors_read"]], "x-oauth-scope": "database:read" } }, @@ -6587,7 +14811,127 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1ProjectAdvisorsResponse" + "type": "object", + "properties": { + "lints": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "unindexed_foreign_keys", + "auth_users_exposed", + "auth_rls_initplan", + "no_primary_key", + "unused_index", + "multiple_permissive_policies", + "policy_exists_rls_disabled", + "rls_enabled_no_policy", + "duplicate_index", + "security_definer_view", + "function_search_path_mutable", + "rls_disabled_in_public", + "extension_in_public", + "rls_references_user_metadata", + "materialized_view_in_api", + "foreign_table_in_api", + "unsupported_reg_types", + "auth_otp_long_expiry", + "auth_otp_short_length", + "ssl_not_enforced", + "network_restrictions_not_set", + "password_requirements_min_length", + "pitr_not_enabled", + "auth_leaked_password_protection", + "auth_insufficient_mfa_options", + "auth_password_policy_missing", + "leaked_service_key", + "no_backup_admin", + "vulnerable_postgres_version" + ] + }, + "title": { + "type": "string" + }, + "level": { + "type": "string", + "enum": ["ERROR", "WARN", "INFO"] + }, + "facing": { + "type": "string", + "enum": ["EXTERNAL"] + }, + "categories": { + "type": "array", + "items": { + "type": "string", + "enum": ["PERFORMANCE", "SECURITY"] + } + }, + "description": { + "type": "string" + }, + "detail": { + "type": "string" + }, + "remediation": { + "type": "string" + }, + "metadata": { + "type": "object", + "properties": { + "schema": { + "type": "string" + }, + "name": { + "type": "string" + }, + "entity": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "table", + "view", + "auth", + "function", + "extension", + "compliance" + ] + }, + "fkey_name": { + "type": "string" + }, + "fkey_columns": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "cache_key": { + "type": "string" + } + }, + "required": [ + "name", + "title", + "level", + "facing", + "categories", + "description", + "detail", + "remediation", + "cache_key" + ] + } + } + }, + "required": ["lints"] } } } @@ -6605,6 +14949,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["advisors_read"] } ], "summary": "Gets project security advisors.", @@ -6616,7 +14963,6 @@ } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["advisors_read"]], "x-oauth-scope": "database:read" } }, @@ -6645,7 +14991,6 @@ "in": "query", "description": "Custom SQL query to execute on the logs. See [querying logs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer) for more details.", "schema": { - "example": "select event_message from edge_logs limit 10", "type": "string" } }, @@ -6655,7 +15000,6 @@ "in": "query", "schema": { "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "example": "2025-03-01T00:00:00Z", "type": "string" } @@ -6666,7 +15010,6 @@ "in": "query", "schema": { "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "example": "2025-03-01T23:59:59Z", "type": "string" } @@ -6678,7 +15021,65 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnalyticsResponse" + "type": "object", + "properties": { + "result": { + "type": "array", + "items": {} + }, + "error": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "code": { + "type": "number" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "location": { + "type": "string" + }, + "locationType": { + "type": "string" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "domain", + "location", + "locationType", + "message", + "reason" + ] + } + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "required": ["code", "errors", "message", "status"] + } + ] + } + } } } } @@ -6699,6 +15100,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["analytics_logs_read"] } ], "summary": "Gets project's logs", @@ -6710,7 +15114,6 @@ } ], "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_logs_read"]], "x-oauth-scope": "analytics:read" } }, @@ -6739,7 +15142,6 @@ "in": "query", "description": "Custom SQL query to execute on the logs. See [querying logs](/docs/guides/telemetry/logs?queryGroups=product&product=postgres&queryGroups=source&source=edge_logs#querying-with-the-logs-explorer) for more details.", "schema": { - "example": "select event_message from edge_logs limit 10", "type": "string" } }, @@ -6749,7 +15151,6 @@ "in": "query", "schema": { "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "example": "2025-03-01T00:00:00Z", "type": "string" } @@ -6760,7 +15161,6 @@ "in": "query", "schema": { "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "example": "2025-03-01T23:59:59Z", "type": "string" } @@ -6772,7 +15172,65 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnalyticsResponse" + "type": "object", + "properties": { + "result": { + "type": "array", + "items": {} + }, + "error": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "code": { + "type": "number" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "location": { + "type": "string" + }, + "locationType": { + "type": "string" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "domain", + "location", + "locationType", + "message", + "reason" + ] + } + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "required": ["code", "errors", "message", "status"] + } + ] + } + } } } } @@ -6793,6 +15251,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["analytics_logs_read"] } ], "summary": "Gets all project's logs in a single log stream", @@ -6804,7 +15265,6 @@ } ], "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_logs_read"]], "x-oauth-scope": "analytics:read" } }, @@ -6842,7 +15302,92 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1GetUsageApiCountResponse" + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time" + }, + "total_auth_requests": { + "type": "number" + }, + "total_realtime_requests": { + "type": "number" + }, + "total_rest_requests": { + "type": "number" + }, + "total_storage_requests": { + "type": "number" + } + }, + "required": [ + "timestamp", + "total_auth_requests", + "total_realtime_requests", + "total_rest_requests", + "total_storage_requests" + ] + } + }, + "error": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "code": { + "type": "number" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "location": { + "type": "string" + }, + "locationType": { + "type": "string" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "domain", + "location", + "locationType", + "message", + "reason" + ] + } + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "required": ["code", "errors", "message", "status"] + } + ] + } + } } } } @@ -6863,12 +15408,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["analytics_usage_read"] } ], "summary": "Gets project's usage api counts", "tags": ["Analytics"], - "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_usage_read"]] + "x-endpoint-owners": ["analytics"] } }, "/v1/projects/{ref}/analytics/endpoints/usage.api-requests-count": { @@ -6895,7 +15442,73 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1GetUsageApiRequestsCountResponse" + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "count": { + "type": "number" + } + }, + "required": ["count"] + } + }, + "error": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "code": { + "type": "number" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "location": { + "type": "string" + }, + "locationType": { + "type": "string" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "domain", + "location", + "locationType", + "message", + "reason" + ] + } + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "required": ["code", "errors", "message", "status"] + } + ] + } + } } } } @@ -6916,12 +15529,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["analytics_usage_read"] } ], "summary": "Gets project's usage api requests count", "tags": ["Analytics"], - "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_usage_read"]] + "x-endpoint-owners": ["analytics"] } }, "/v1/projects/{ref}/analytics/endpoints/functions.combined-stats": { @@ -6967,7 +15582,65 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnalyticsResponse" + "type": "object", + "properties": { + "result": { + "type": "array", + "items": {} + }, + "error": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "code": { + "type": "number" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "location": { + "type": "string" + }, + "locationType": { + "type": "string" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "domain", + "location", + "locationType", + "message", + "reason" + ] + } + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "required": ["code", "errors", "message", "status"] + } + ] + } + } } } } @@ -6988,78 +15661,14 @@ "security": [ { "bearer": [] - } - ], - "summary": "Gets a project's function combined statistics", - "tags": ["Analytics"], - "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_usage_read"]] - } - }, - "/v1/projects/{ref}/analytics/endpoints/metrics": { - "get": { - "description": "Prometheus scrape endpoint. Returns metrics of a customer project in the Prometheus open exposition format.", - "operationId": "v1-scrape-project-metrics", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Prometheus / OpenMetrics text exposition", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/openmetrics-text": { - "schema": { - "type": "string" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" }, - "500": { - "description": "Failed to fetch project's metrics" - } - }, - "security": [ { - "bearer": [] + "fga_permissions": ["analytics_usage_read"] } ], - "summary": "Scrape a project's metrics", + "summary": "Gets a project's function combined statistics", "tags": ["Analytics"], - "x-badges": [ - { - "name": "OAuth scope: analytics:read", - "position": "after" - } - ], - "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_logs_read"]], - "x-oauth-scope": "analytics:read" + "x-endpoint-owners": ["analytics"] } }, "/v1/projects/{ref}/cli/login-role": { @@ -7085,7 +15694,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRoleBody" + "type": "object", + "properties": { + "read_only": { + "type": "boolean" + } + }, + "required": ["read_only"], + "example": { + "read_only": true + } } } } @@ -7096,7 +15714,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRoleResponse" + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "password": { + "type": "string", + "minLength": 1 + }, + "ttl_seconds": { + "type": "integer", + "minimum": 1, + "format": "int64" + } + }, + "required": ["role", "password", "ttl_seconds"] } } } @@ -7117,6 +15751,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_write"] } ], "summary": "[Beta] Create a login role for CLI with temporary password", @@ -7128,7 +15765,6 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["database_write"]], "x-oauth-scope": "database:write" }, "delete": { @@ -7154,7 +15790,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteRolesResponse" + "type": "object", + "properties": { + "message": { + "type": "string", + "enum": ["ok"] + } + }, + "required": ["message"] } } } @@ -7175,6 +15818,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_write"] } ], "summary": "[Beta] Delete existing login roles used by CLI", @@ -7186,12 +15832,12 @@ } ], "x-endpoint-owners": ["dev-workflows"], - "x-fga-permissions": [["database_write"]], "x-oauth-scope": "database:write" } }, "/v1/projects/{ref}/database/migrations": { "get": { + "description": "Only available to selected partner OAuth apps", "operationId": "v1-list-migration-history", "parameters": [ { @@ -7214,7 +15860,20 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1ListMigrationsResponse" + "type": "array", + "items": { + "type": "object", + "properties": { + "version": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string" + } + }, + "required": ["version"] + } } } } @@ -7235,6 +15894,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_migrations_read"] } ], "summary": "List applied migration versions", @@ -7246,10 +15908,10 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_migrations_read"]], "x-oauth-scope": "database:read" }, "post": { + "description": "Only available to selected partner OAuth apps", "operationId": "v1-apply-a-migration", "parameters": [ { @@ -7280,7 +15942,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1CreateMigrationBody" + "type": "object", + "properties": { + "query": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string" + }, + "rollback": { + "type": "string" + } + }, + "required": ["query"], + "example": { + "query": "create table public.widgets(id bigint primary key);", + "name": "create_widgets_table", + "rollback": "drop table if exists public.widgets;" + } } } } @@ -7305,6 +15985,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_migrations_write"] } ], "summary": "Apply a database migration", @@ -7316,10 +15999,10 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_migrations_write"]], "x-oauth-scope": "database:write" }, "put": { + "description": "Only available to selected partner OAuth apps", "operationId": "v1-upsert-a-migration", "parameters": [ { @@ -7350,7 +16033,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1UpsertMigrationBody" + "type": "object", + "properties": { + "query": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string" + }, + "rollback": { + "type": "string" + } + }, + "required": ["query"], + "example": { + "query": "create table public.widgets(id bigint primary key);", + "name": "create_widgets_table", + "rollback": "drop table if exists public.widgets;" + } } } } @@ -7375,6 +16076,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_migrations_write"] } ], "summary": "Upsert a database migration without applying", @@ -7386,10 +16090,10 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_migrations_write"]], "x-oauth-scope": "database:write" }, "delete": { + "description": "Only available to selected partner OAuth apps", "operationId": "v1-rollback-migrations", "parameters": [ { @@ -7437,6 +16141,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_migrations_write"] } ], "summary": "Rollback database migrations and remove them from history table", @@ -7448,12 +16155,12 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_migrations_write"]], "x-oauth-scope": "database:write" } }, "/v1/projects/{ref}/database/migrations/{version}": { "get": { + "description": "Only available to selected partner OAuth apps", "operationId": "v1-get-a-migration", "parameters": [ { @@ -7486,7 +16193,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1GetMigrationResponse" + "type": "object", + "properties": { + "version": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string" + }, + "statements": { + "type": "array", + "items": { + "type": "string" + } + }, + "rollback": { + "type": "array", + "items": { + "type": "string" + } + }, + "created_by": { + "type": "string" + }, + "idempotency_key": { + "type": "string" + } + }, + "required": ["version"] } } } @@ -7507,6 +16242,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_migrations_read"] } ], "summary": "Fetch an existing entry from migration history", @@ -7518,10 +16256,10 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_migrations_read"]], "x-oauth-scope": "database:read" }, "patch": { + "description": "Only available to selected partner OAuth apps", "operationId": "v1-patch-a-migration", "parameters": [ { @@ -7553,7 +16291,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1PatchMigrationBody" + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "rollback": { + "type": "string" + } + }, + "example": { + "name": "create_widgets_table", + "rollback": "drop table if exists public.widgets;" + } } } } @@ -7578,6 +16328,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_migrations_write"] } ], "summary": "Patch an existing entry in migration history", @@ -7589,7 +16342,6 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_migrations_write"]], "x-oauth-scope": "database:write" } }, @@ -7616,7 +16368,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1RunQueryBody" + "type": "object", + "properties": { + "query": { + "type": "string", + "minLength": 1 + }, + "parameters": { + "type": "array", + "items": {} + }, + "read_only": { + "type": "boolean" + } + }, + "required": ["query"], + "example": { + "query": "select * from pg_stat_activity limit 1;", + "read_only": true + } } } } @@ -7641,6 +16411,12 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_write"] + }, + { + "fga_permissions": ["database_read"] } ], "summary": "[Beta] Run sql query", @@ -7652,7 +16428,6 @@ } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["database_read"], ["database_write"]], "x-oauth-scope": "database:write" } }, @@ -7680,7 +16455,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1ReadOnlyQueryBody" + "type": "object", + "properties": { + "query": { + "type": "string", + "minLength": 1 + }, + "parameters": { + "type": "array", + "items": {} + } + }, + "required": ["query"], + "example": { + "query": "select * from pg_stat_activity limit 1;" + } } } } @@ -7705,6 +16494,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_read"] } ], "summary": "[Beta] Run a sql query as supabase_read_only_user", @@ -7716,7 +16508,6 @@ } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["database_read"]], "x-oauth-scope": "database:read" } }, @@ -7758,6 +16549,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_webhooks_config_write"] } ], "summary": "[Beta] Enables Database Webhooks on the project", @@ -7769,7 +16563,6 @@ } ], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["database_webhooks_config_write"]], "x-oauth-scope": "database:write" } }, @@ -7799,7 +16592,36 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetProjectDbMetadataResponse" + "type": "object", + "properties": { + "databases": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "schemas": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": ["name"], + "additionalProperties": true + } + } + }, + "required": ["name", "schemas"], + "additionalProperties": true + } + } + }, + "required": ["databases"] } } } @@ -7817,6 +16639,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_read"] } ], "summary": "Gets database metadata for the given project.", @@ -7828,7 +16653,6 @@ } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["database_read"]], "x-oauth-scope": "projects:read" } }, @@ -7855,7 +16679,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1UpdatePasswordBody" + "type": "object", + "properties": { + "password": { + "type": "string", + "minLength": 4 + } + }, + "required": ["password"], + "example": { + "password": "correct-horse-battery-staple" + } } } } @@ -7866,7 +16700,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1UpdatePasswordResponse" + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": ["message"] } } } @@ -7887,6 +16727,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_config_write"] } ], "summary": "Updates the database password", @@ -7898,7 +16741,6 @@ } ], "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["database_config_write"]], "x-oauth-scope": "database:write" } }, @@ -7927,7 +16769,62 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JitAccessResponse" + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid" + }, + "user_roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "number" + }, + "allowed_networks": { + "type": "object", + "properties": { + "allowed_cidrs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + }, + "allowed_cidrs_v6": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + } + } + }, + "branches_only": { + "type": "boolean" + } + }, + "required": ["role"] + } + } + }, + "required": ["user_roles"] } } } @@ -7948,6 +16845,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_jit_read"] } ], "summary": "Get user-id to role mappings for JIT access", @@ -7959,7 +16859,6 @@ } ], "x-endpoint-owners": ["security"], - "x-fga-permissions": [["database_jit_read"]], "x-oauth-scope": "database:read" }, "post": { @@ -7985,7 +16884,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthorizeJitAccessBody" + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "rhost": { + "type": "string", + "minLength": 1 + } + }, + "required": ["role", "rhost"], + "example": { + "role": "postgres", + "rhost": "203.0.113.10" + } } } } @@ -7996,7 +16910,59 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JitAuthorizeAccessResponse" + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid" + }, + "user_role": { + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "number" + }, + "allowed_networks": { + "type": "object", + "properties": { + "allowed_cidrs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + }, + "allowed_cidrs_v6": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + } + } + }, + "branches_only": { + "type": "boolean" + } + }, + "required": ["role"] + } + }, + "required": ["user_id", "user_role"] } } } @@ -8017,6 +16983,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_jit_read"] } ], "summary": "Authorize user-id to role mappings for JIT access", @@ -8028,7 +16997,6 @@ } ], "x-endpoint-owners": ["security"], - "x-fga-permissions": [["database_jit_read"]], "x-oauth-scope": "database:read" }, "put": { @@ -8054,7 +17022,80 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateJitAccessBody" + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid", + "minLength": 1 + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "number" + }, + "allowed_networks": { + "type": "object", + "properties": { + "allowed_cidrs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + }, + "allowed_cidrs_v6": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + } + } + }, + "branches_only": { + "type": "boolean" + } + }, + "required": ["role"] + } + } + }, + "required": ["user_id", "roles"], + "example": { + "user_id": "55555555-5555-4555-8555-555555555555", + "roles": [ + { + "role": "postgres", + "expires_at": 1740787200, + "allowed_networks": { + "allowed_cidrs": [ + { + "cidr": "203.0.113.0/24" + } + ] + }, + "branches_only": false + } + ] + } } } } @@ -8065,7 +17106,62 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JitAccessResponse" + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid" + }, + "user_roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "number" + }, + "allowed_networks": { + "type": "object", + "properties": { + "allowed_cidrs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + }, + "allowed_cidrs_v6": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + } + } + }, + "branches_only": { + "type": "boolean" + } + }, + "required": ["role"] + } + } + }, + "required": ["user_roles"] } } } @@ -8086,12 +17182,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_jit_write"] } ], "summary": "Updates a user mapping for JIT access", "tags": ["Database"], - "x-endpoint-owners": ["security"], - "x-fga-permissions": [["database_jit_write"]] + "x-endpoint-owners": ["security"] } }, "/v1/projects/{ref}/database/jit/list": { @@ -8119,7 +17217,164 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JitListAccessResponse" + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid" + }, + "primary_email": { + "type": "string", + "nullable": true + }, + "invite_id": { + "type": "null" + }, + "expires_at": { + "type": "null" + }, + "user_roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "number" + }, + "allowed_networks": { + "type": "object", + "properties": { + "allowed_cidrs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + }, + "allowed_cidrs_v6": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + } + } + }, + "branches_only": { + "type": "boolean" + } + }, + "required": ["role"] + } + } + }, + "required": [ + "user_id", + "primary_email", + "invite_id", + "expires_at", + "user_roles" + ] + }, + { + "type": "object", + "properties": { + "user_id": { + "type": "null" + }, + "primary_email": { + "type": "string" + }, + "invite_id": { + "type": "string", + "format": "uuid" + }, + "expires_at": { + "type": "string" + }, + "user_roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "number" + }, + "allowed_networks": { + "type": "object", + "properties": { + "allowed_cidrs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + }, + "allowed_cidrs_v6": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + } + } + }, + "branches_only": { + "type": "boolean" + } + }, + "required": ["role"] + } + } + }, + "required": [ + "user_id", + "primary_email", + "invite_id", + "expires_at", + "user_roles" + ] + } + ] + } + } + }, + "required": ["items"] } } } @@ -8140,12 +17395,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_jit_read"] } ], "summary": "List all user-id to role mappings for JIT access", "tags": ["Database"], - "x-endpoint-owners": ["security"], - "x-fga-permissions": [["database_jit_write"]] + "x-endpoint-owners": ["security"] } }, "/v1/projects/{ref}/database/jit/invite": { @@ -8172,7 +17429,80 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InviteExternalUserJitAccessBody" + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "minLength": 1 + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "number" + }, + "allowed_networks": { + "type": "object", + "properties": { + "allowed_cidrs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + }, + "allowed_cidrs_v6": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + } + } + }, + "branches_only": { + "type": "boolean" + } + }, + "required": ["role"] + } + } + }, + "required": ["email", "roles"], + "example": { + "email": "external-user@somedomain.xyz", + "roles": [ + { + "role": "postgres", + "expires_at": 1740787200, + "allowed_networks": { + "allowed_cidrs": [ + { + "cidr": "203.0.113.0/24" + } + ] + }, + "branches_only": false + } + ] + } } } } @@ -8183,7 +17513,66 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InviteExternalUserJitResponse" + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "invite_id": { + "type": "string", + "format": "uuid" + }, + "user_roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "number" + }, + "allowed_networks": { + "type": "object", + "properties": { + "allowed_cidrs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + }, + "allowed_cidrs_v6": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + } + } + }, + "branches_only": { + "type": "boolean" + } + }, + "required": ["role"] + } + } + }, + "required": ["email", "invite_id", "user_roles"] } } } @@ -8204,12 +17593,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_jit_write"] } ], "summary": "Invites an external user to a database for JIT access", "tags": ["Database"], - "x-endpoint-owners": ["security"], - "x-fga-permissions": [["database_jit_write"]] + "x-endpoint-owners": ["security"] } }, "/v1/projects/{ref}/database/jit/invite/accept": { @@ -8236,7 +17627,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AcceptInviteExternalUserJitAccessBody" + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "minLength": 1 + }, + "token": { + "type": "string", + "minLength": 1 + } + }, + "required": ["email", "token"], + "example": { + "email": "external-user@somedomain.xyz", + "token": "" + } } } } @@ -8247,7 +17654,62 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JitAccessResponse" + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid" + }, + "user_roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "number" + }, + "allowed_networks": { + "type": "object", + "properties": { + "allowed_cidrs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + }, + "allowed_cidrs_v6": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cidr": { + "type": "string" + } + }, + "required": ["cidr"] + } + } + } + }, + "branches_only": { + "type": "boolean" + } + }, + "required": ["role"] + } + } + }, + "required": ["user_roles"] } } } @@ -8290,7 +17752,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "55555555-5555-4555-8555-555555555555", "type": "string" } @@ -8316,12 +17777,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_jit_write"] } ], "summary": "Deletes the invite for an external user to a database for JIT access", "tags": ["Database"], - "x-endpoint-owners": ["security"], - "x-fga-permissions": [["database_jit_write"]] + "x-endpoint-owners": ["security"] } }, "/v1/projects/{ref}/database/jit/{user_id}": { @@ -8348,7 +17811,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "55555555-5555-4555-8555-555555555555", "type": "string" } @@ -8374,12 +17836,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_jit_write"] } ], "summary": "Delete JIT access by user-id", "tags": ["Database"], - "x-endpoint-owners": ["security"], - "x-fga-permissions": [["database_jit_write"]] + "x-endpoint-owners": ["security"] } }, "/v1/projects/{ref}/database/openapi": { @@ -8438,6 +17902,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_read"] } ], "summary": "Get PostgREST OpenAPI spec", @@ -8449,7 +17916,6 @@ } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["database_read"]], "x-oauth-scope": "database:read" } }, @@ -8480,7 +17946,57 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/FunctionResponse" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "verify_jwt": { + "type": "boolean" + }, + "import_map": { + "type": "boolean" + }, + "entrypoint_path": { + "type": "string" + }, + "import_map_path": { + "type": "string" + }, + "ezbr_sha256": { + "type": "string" + } + }, + "required": [ + "id", + "slug", + "name", + "status", + "version", + "created_at", + "updated_at" + ] } } } @@ -8502,6 +18018,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["edge_functions_read"] } ], "summary": "List all functions", @@ -8513,7 +18032,6 @@ } ], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_read"]], "x-oauth-scope": "edge_functions:read" }, "post": { @@ -8557,18 +18075,20 @@ "name": "verify_jwt", "required": false, "in": "query", + "description": "Boolean string, true or false", "schema": { "example": true, - "type": "string" + "type": "boolean" } }, { "name": "import_map", "required": false, "in": "query", + "description": "Boolean string, true or false", "schema": { "example": false, - "type": "string" + "type": "boolean" } }, { @@ -8610,7 +18130,29 @@ }, "application/json": { "schema": { - "$ref": "#/components/schemas/V1CreateFunctionBody" + "type": "object", + "properties": { + "slug": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9_-]*$" + }, + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "verify_jwt": { + "type": "boolean" + } + }, + "required": ["slug", "name", "body"], + "example": { + "slug": "hello-world", + "name": "Hello World", + "body": "Deno.serve(() => new Response('Hello, world!'))", + "verify_jwt": true + } } } } @@ -8621,7 +18163,57 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FunctionResponse" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "verify_jwt": { + "type": "boolean" + }, + "import_map": { + "type": "boolean" + }, + "entrypoint_path": { + "type": "string" + }, + "import_map_path": { + "type": "string" + }, + "ezbr_sha256": { + "type": "string" + } + }, + "required": [ + "id", + "slug", + "name", + "status", + "version", + "created_at", + "updated_at" + ] } } } @@ -8645,6 +18237,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["edge_functions_write"] } ], "summary": "Create a function", @@ -8656,7 +18251,6 @@ } ], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" }, "put": { @@ -8682,7 +18276,60 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkUpdateFunctionBody" + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "slug": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9_-]*$" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "verify_jwt": { + "type": "boolean" + }, + "import_map": { + "type": "boolean" + }, + "entrypoint_path": { + "type": "string" + }, + "import_map_path": { + "type": "string" + }, + "ezbr_sha256": { + "type": "string" + } + }, + "required": ["id", "slug", "name", "status", "version"] + }, + "example": [ + { + "id": "3c078cce-ad70-4148-9f37-4da362789053", + "slug": "hello-world", + "name": "Hello World", + "status": "ACTIVE", + "version": 2, + "verify_jwt": true, + "entrypoint_path": "index.ts" + } + ] } } } @@ -8693,7 +18340,66 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkUpdateFunctionResponse" + "type": "object", + "properties": { + "functions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "verify_jwt": { + "type": "boolean" + }, + "import_map": { + "type": "boolean" + }, + "entrypoint_path": { + "type": "string" + }, + "import_map_path": { + "type": "string" + }, + "ezbr_sha256": { + "type": "string" + } + }, + "required": [ + "id", + "slug", + "name", + "status", + "version", + "created_at", + "updated_at" + ] + } + } + }, + "required": ["functions"] } } } @@ -8717,6 +18423,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["edge_functions_write"] } ], "summary": "Bulk update functions", @@ -8728,7 +18437,6 @@ } ], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" } }, @@ -8764,9 +18472,10 @@ "name": "bundleOnly", "required": false, "in": "query", + "description": "Boolean string, true or false", "schema": { "example": false, - "type": "string" + "type": "boolean" } } ], @@ -8775,7 +18484,49 @@ "content": { "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/FunctionDeployBody" + "type": "object", + "properties": { + "file": { + "type": "array", + "items": { + "type": "string", + "format": "binary" + } + }, + "metadata": { + "type": "object", + "properties": { + "entrypoint_path": { + "type": "string" + }, + "import_map_path": { + "type": "string" + }, + "static_patterns": { + "type": "array", + "items": { + "type": "string" + } + }, + "verify_jwt": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "required": ["entrypoint_path"] + } + }, + "required": ["metadata"], + "example": { + "file": ["./supabase/functions/hello-world/index.ts"], + "metadata": { + "entrypoint_path": "index.ts", + "verify_jwt": true, + "name": "Hello World" + } + } } } } @@ -8786,7 +18537,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeployFunctionResponse" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "verify_jwt": { + "type": "boolean" + }, + "import_map": { + "type": "boolean" + }, + "entrypoint_path": { + "type": "string" + }, + "import_map_path": { + "type": "string" + }, + "ezbr_sha256": { + "type": "string" + } + }, + "required": ["id", "slug", "name", "status", "version"] } } } @@ -8810,6 +18603,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["edge_functions_write"] } ], "summary": "Deploy a function", @@ -8821,7 +18617,6 @@ } ], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" } }, @@ -8861,7 +18656,57 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FunctionSlugResponse" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "verify_jwt": { + "type": "boolean" + }, + "import_map": { + "type": "boolean" + }, + "entrypoint_path": { + "type": "string" + }, + "import_map_path": { + "type": "string" + }, + "ezbr_sha256": { + "type": "string" + } + }, + "required": [ + "id", + "slug", + "name", + "status", + "version", + "created_at", + "updated_at" + ] } } } @@ -8882,6 +18727,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["edge_functions_read"] } ], "summary": "Retrieve a function", @@ -8893,7 +18741,6 @@ } ], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_read"]], "x-oauth-scope": "edge_functions:read" }, "patch": { @@ -8947,18 +18794,20 @@ "name": "verify_jwt", "required": false, "in": "query", + "description": "Boolean string, true or false", "schema": { "example": true, - "type": "string" + "type": "boolean" } }, { "name": "import_map", "required": false, "in": "query", + "description": "Boolean string, true or false", "schema": { "example": false, - "type": "string" + "type": "boolean" } }, { @@ -9000,7 +18849,23 @@ }, "application/json": { "schema": { - "$ref": "#/components/schemas/V1UpdateFunctionBody" + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "body": { + "type": "string" + }, + "verify_jwt": { + "type": "boolean" + } + }, + "example": { + "name": "Hello World", + "body": "Deno.serve(() => new Response('Hello again!'))", + "verify_jwt": true + } } } } @@ -9011,7 +18876,57 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FunctionResponse" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["ACTIVE", "REMOVED", "THROTTLED"] + }, + "version": { + "type": "integer" + }, + "created_at": { + "type": "integer", + "format": "int64" + }, + "updated_at": { + "type": "integer", + "format": "int64" + }, + "verify_jwt": { + "type": "boolean" + }, + "import_map": { + "type": "boolean" + }, + "entrypoint_path": { + "type": "string" + }, + "import_map_path": { + "type": "string" + }, + "ezbr_sha256": { + "type": "string" + } + }, + "required": [ + "id", + "slug", + "name", + "status", + "version", + "created_at", + "updated_at" + ] } } } @@ -9032,6 +18947,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["edge_functions_write"] } ], "summary": "Update a function", @@ -9043,7 +18961,6 @@ } ], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" }, "delete": { @@ -9095,6 +19012,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["edge_functions_write"] } ], "summary": "Delete a function", @@ -9106,7 +19026,6 @@ } ], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_write"]], "x-oauth-scope": "edge_functions:write" } }, @@ -9146,7 +19065,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StreamableFile" + "type": "object", + "properties": {} } } } @@ -9167,6 +19087,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["edge_functions_read"] } ], "summary": "Retrieve a function body", @@ -9178,7 +19101,6 @@ } ], "x-endpoint-owners": ["functions"], - "x-fga-permissions": [["edge_functions_read"]], "x-oauth-scope": "edge_functions:read" } }, @@ -9208,7 +19130,28 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/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"] } } } @@ -9230,6 +19173,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["storage_read"] } ], "summary": "Lists all buckets", @@ -9241,7 +19187,6 @@ } ], "x-endpoint-owners": ["storage"], - "x-fga-permissions": [["storage_read"]], "x-oauth-scope": "storage:read" } }, @@ -9269,7 +19214,62 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DiskResponse" + "type": "object", + "properties": { + "attributes": { + "oneOf": [ + { + "type": "object", + "properties": { + "iops": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "size_gb": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "throughput_mibps": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "type": { + "type": "string", + "enum": ["gp3"] + } + }, + "required": ["iops", "size_gb", "type"] + }, + { + "type": "object", + "properties": { + "iops": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "size_gb": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "type": { + "type": "string", + "enum": ["io2"] + } + }, + "required": ["iops", "size_gb", "type"] + } + ] + }, + "last_modified_at": { + "type": "string" + } + }, + "required": ["attributes"] } } } @@ -9290,12 +19290,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["infra_disk_config_read"] } ], "summary": "Get database disk attributes", "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["infra_disk_config_read"]] + "x-endpoint-owners": ["management-api", "infra"] }, "post": { "operationId": "v1-modify-database-disk", @@ -9319,7 +19321,70 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DiskRequestBody" + "type": "object", + "properties": { + "attributes": { + "discriminator": { + "propertyName": "type" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "iops": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "size_gb": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "throughput_mibps": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "type": { + "type": "string", + "enum": ["gp3"] + } + }, + "required": ["iops", "size_gb", "type"] + }, + { + "type": "object", + "properties": { + "iops": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "size_gb": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "type": { + "type": "string", + "enum": ["io2"] + } + }, + "required": ["iops", "size_gb", "type"] + } + ] + } + }, + "required": ["attributes"], + "example": { + "attributes": { + "type": "gp3", + "size_gb": 100, + "iops": 3000, + "throughput_mibps": 125 + } + } } } } @@ -9344,12 +19409,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["infra_disk_config_write"] } ], "summary": "Modify database disk", "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["infra_disk_config_write"]] + "x-endpoint-owners": ["management-api", "infra"] } }, "/v1/projects/{ref}/config/disk/util": { @@ -9376,7 +19443,28 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DiskUtilMetricsResponse" + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "metrics": { + "type": "object", + "properties": { + "fs_size_bytes": { + "type": "number" + }, + "fs_avail_bytes": { + "type": "number" + }, + "fs_used_bytes": { + "type": "number" + } + }, + "required": ["fs_size_bytes", "fs_avail_bytes", "fs_used_bytes"] + } + }, + "required": ["timestamp", "metrics"] } } } @@ -9397,12 +19485,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["infra_disk_config_read"] } ], "summary": "Get disk utilization", "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["infra_disk_config_read"]] + "x-endpoint-owners": ["management-api", "infra"] } }, "/v1/projects/{ref}/config/disk/autoscale": { @@ -9429,7 +19519,31 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DiskAutoscaleConfig" + "type": "object", + "properties": { + "growth_percent": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true, + "nullable": true, + "description": "Growth percentage for disk autoscaling" + }, + "min_increment_gb": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true, + "nullable": true, + "description": "Minimum increment size for disk autoscaling in GB" + }, + "max_size_gb": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true, + "nullable": true, + "description": "Maximum limit the disk size will grow to in GB" + } + }, + "required": ["growth_percent", "min_increment_gb", "max_size_gb"] } } } @@ -9450,12 +19564,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["infra_disk_config_read"] } ], "summary": "Gets project disk autoscale config", "tags": ["Projects"], - "x-endpoint-owners": ["management-api", "infra"], - "x-fga-permissions": [["infra_disk_config_read"]] + "x-endpoint-owners": ["management-api", "infra"] } }, "/v1/projects/{ref}/config/storage": { @@ -9482,59 +19598,277 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StorageConfigResponse" + "type": "object", + "properties": { + "fileSizeLimit": { + "type": "integer", + "format": "int64" + }, + "features": { + "type": "object", + "properties": { + "imageTransformation": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + }, + "s3Protocol": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + }, + "purgeCache": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + }, + "icebergCatalog": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "maxNamespaces": { + "type": "integer", + "minimum": 0 + }, + "maxTables": { + "type": "integer", + "minimum": 0 + }, + "maxCatalogs": { + "type": "integer", + "minimum": 0 + } + }, + "required": ["enabled", "maxNamespaces", "maxTables", "maxCatalogs"] + }, + "vectorBuckets": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "maxBuckets": { + "type": "integer", + "minimum": 0 + }, + "maxIndexes": { + "type": "integer", + "minimum": 0 + } + }, + "required": ["enabled", "maxBuckets", "maxIndexes"] + } + }, + "required": [ + "imageTransformation", + "s3Protocol", + "purgeCache", + "icebergCatalog", + "vectorBuckets" + ] + }, + "capabilities": { + "type": "object", + "properties": { + "list_v2": { + "type": "boolean" + }, + "iceberg_catalog": { + "type": "boolean" + } + }, + "required": ["list_v2", "iceberg_catalog"] + }, + "external": { + "type": "object", + "properties": { + "upstreamTarget": { + "type": "string", + "enum": ["main", "canary"] + } + }, + "required": ["upstreamTarget"] + }, + "migrationVersion": { + "type": "string" + }, + "databasePoolMode": { + "type": "string" + } + }, + "required": [ + "fileSizeLimit", + "features", + "capabilities", + "external", + "migrationVersion", + "databasePoolMode" + ] + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to retrieve project's storage config" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["storage_config_read"] + } + ], + "summary": "Gets project's storage config", + "tags": ["Storage"], + "x-endpoint-owners": ["storage"] + }, + "patch": { + "operationId": "v1-update-storage-config", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "fileSizeLimit": { + "type": "integer", + "minimum": 0, + "maximum": 536870912000, + "format": "int64" + }, + "features": { + "type": "object", + "properties": { + "imageTransformation": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + }, + "s3Protocol": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + }, + "purgeCache": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + }, + "icebergCatalog": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "maxNamespaces": { + "type": "integer", + "minimum": 0 + }, + "maxTables": { + "type": "integer", + "minimum": 0 + }, + "maxCatalogs": { + "type": "integer", + "minimum": 0 + } + }, + "required": ["enabled", "maxNamespaces", "maxTables", "maxCatalogs"] + }, + "vectorBuckets": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "maxBuckets": { + "type": "integer", + "minimum": 0 + }, + "maxIndexes": { + "type": "integer", + "minimum": 0 + } + }, + "required": ["enabled", "maxBuckets", "maxIndexes"] + } + } + }, + "external": { + "type": "object", + "properties": { + "upstreamTarget": { + "type": "string", + "enum": ["main", "canary"] + } + }, + "required": ["upstreamTarget"] + } + }, + "additionalProperties": false, + "example": { + "fileSizeLimit": 10485760, + "features": { + "imageTransformation": { + "enabled": true + } + } } } } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to retrieve project's storage config" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "Gets project's storage config", - "tags": ["Storage"], - "x-endpoint-owners": ["storage"], - "x-fga-permissions": [["storage_config_read"]] - }, - "patch": { - "operationId": "v1-update-storage-config", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateStorageConfigBody" - } - } } }, "responses": { @@ -9557,12 +19891,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["storage_config_write"] } ], "summary": "Updates project's storage config", "tags": ["Storage"], - "x-endpoint-owners": ["storage"], - "x-fga-permissions": [["storage_config_write"]] + "x-endpoint-owners": ["storage"] } }, "/v1/projects/{ref}/config/database/pgbouncer": { @@ -9589,7 +19925,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1PgbouncerConfigResponse" + "type": "object", + "properties": { + "default_pool_size": { + "type": "integer" + }, + "ignore_startup_parameters": { + "type": "string" + }, + "max_client_conn": { + "type": "integer" + }, + "pool_mode": { + "type": "string", + "enum": ["transaction", "session", "statement"] + }, + "connection_string": { + "type": "string" + }, + "server_idle_timeout": { + "type": "integer" + }, + "server_lifetime": { + "type": "integer" + }, + "query_wait_timeout": { + "type": "integer" + }, + "reserve_pool_size": { + "type": "integer" + } + } } } } @@ -9607,6 +19973,11 @@ "description": "Failed to retrieve project's pgbouncer config" } }, + "security": [ + { + "fga_permissions": ["database_read"] + } + ], "summary": "Get project's pgbouncer config", "tags": ["Database"], "x-badges": [ @@ -9616,7 +19987,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_read"]], "x-oauth-scope": "database:read" } }, @@ -9646,7 +20016,64 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/SupavisorConfigResponse" + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "database_type": { + "type": "string", + "enum": ["PRIMARY", "READ_REPLICA"] + }, + "is_using_scram_auth": { + "type": "boolean" + }, + "db_user": { + "type": "string" + }, + "db_host": { + "type": "string" + }, + "db_port": { + "type": "integer" + }, + "db_name": { + "type": "string" + }, + "connection_string": { + "type": "string" + }, + "connectionString": { + "type": "string", + "description": "Use connection_string instead" + }, + "default_pool_size": { + "type": "integer", + "nullable": true + }, + "max_client_conn": { + "type": "integer", + "nullable": true + }, + "pool_mode": { + "type": "string", + "enum": ["transaction", "session"] + } + }, + "required": [ + "identifier", + "database_type", + "is_using_scram_auth", + "db_user", + "db_host", + "db_port", + "db_name", + "connection_string", + "connectionString", + "default_pool_size", + "max_client_conn", + "pool_mode" + ] } } } @@ -9668,6 +20095,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_pooling_config_read"] } ], "summary": "Gets project's supavisor config", @@ -9679,7 +20109,6 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_pooling_config_read"]], "x-oauth-scope": "database:read" }, "patch": { @@ -9704,7 +20133,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSupavisorConfigBody" + "type": "object", + "properties": { + "default_pool_size": { + "type": "integer", + "minimum": 0, + "maximum": 3000, + "nullable": true + }, + "pool_mode": { + "type": "string", + "enum": ["transaction", "session"], + "description": "Dedicated pooler mode for the project" + } + }, + "example": { + "default_pool_size": 25, + "pool_mode": "transaction" + } } } } @@ -9715,7 +20161,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSupavisorConfigResponse" + "type": "object", + "properties": { + "default_pool_size": { + "type": "integer", + "nullable": true + }, + "pool_mode": { + "type": "string" + } + }, + "required": ["default_pool_size", "pool_mode"] } } } @@ -9736,6 +20192,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_pooling_config_write"] } ], "summary": "Updates project's supavisor config", @@ -9747,7 +20206,6 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["database_pooling_config_write"]], "x-oauth-scope": "database:write" } }, @@ -9775,7 +20233,140 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PostgresConfigResponse" + "type": "object", + "properties": { + "effective_cache_size": { + "type": "string" + }, + "logical_decoding_work_mem": { + "type": "string" + }, + "cron.log_statement": { + "type": "boolean" + }, + "log_autovacuum_min_duration": { + "type": "string", + "description": "Default unit: ms", + "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" + }, + "log_checkpoints": { + "type": "boolean" + }, + "log_connections": { + "type": "boolean" + }, + "log_disconnections": { + "type": "boolean" + }, + "log_duration": { + "type": "boolean" + }, + "log_lock_waits": { + "type": "boolean" + }, + "log_recovery_conflict_waits": { + "type": "boolean" + }, + "log_replication_commands": { + "type": "boolean" + }, + "log_startup_progress_interval": { + "type": "string", + "description": "Default unit: ms", + "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" + }, + "log_temp_files": { + "type": "string" + }, + "maintenance_work_mem": { + "type": "string" + }, + "track_activity_query_size": { + "type": "string" + }, + "max_connections": { + "type": "integer", + "minimum": 1, + "maximum": 262143 + }, + "max_locks_per_transaction": { + "type": "integer", + "minimum": 10, + "maximum": 2147483640 + }, + "max_parallel_maintenance_workers": { + "type": "integer", + "minimum": 0, + "maximum": 1024 + }, + "max_parallel_workers": { + "type": "integer", + "minimum": 0, + "maximum": 1024 + }, + "max_parallel_workers_per_gather": { + "type": "integer", + "minimum": 0, + "maximum": 1024 + }, + "max_replication_slots": { + "type": "integer" + }, + "max_slot_wal_keep_size": { + "type": "string" + }, + "max_standby_archive_delay": { + "type": "string" + }, + "max_standby_streaming_delay": { + "type": "string" + }, + "max_wal_size": { + "type": "string" + }, + "max_wal_senders": { + "type": "integer" + }, + "max_worker_processes": { + "type": "integer", + "minimum": 0, + "maximum": 262143 + }, + "session_replication_role": { + "type": "string", + "enum": ["origin", "replica", "local"] + }, + "shared_buffers": { + "type": "string" + }, + "statement_timeout": { + "type": "string", + "description": "Default unit: ms", + "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" + }, + "track_commit_timestamp": { + "type": "boolean" + }, + "wal_keep_size": { + "type": "string" + }, + "wal_sender_timeout": { + "type": "string", + "description": "Default unit: ms", + "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" + }, + "work_mem": { + "type": "string" + }, + "checkpoint_timeout": { + "type": "string", + "description": "Default unit: s", + "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" + }, + "hot_standby_feedback": { + "type": "boolean" + } + } } } } @@ -9796,6 +20387,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_config_read"] } ], "summary": "Gets project's Postgres config", @@ -9807,7 +20401,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_config_read"]], "x-oauth-scope": "database:read" }, "put": { @@ -9832,7 +20425,150 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdatePostgresConfigBody" + "type": "object", + "properties": { + "effective_cache_size": { + "type": "string" + }, + "logical_decoding_work_mem": { + "type": "string" + }, + "cron.log_statement": { + "type": "boolean" + }, + "log_autovacuum_min_duration": { + "type": "string", + "description": "Default unit: ms", + "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" + }, + "log_checkpoints": { + "type": "boolean" + }, + "log_connections": { + "type": "boolean" + }, + "log_disconnections": { + "type": "boolean" + }, + "log_duration": { + "type": "boolean" + }, + "log_lock_waits": { + "type": "boolean" + }, + "log_recovery_conflict_waits": { + "type": "boolean" + }, + "log_replication_commands": { + "type": "boolean" + }, + "log_startup_progress_interval": { + "type": "string", + "description": "Default unit: ms", + "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" + }, + "log_temp_files": { + "type": "string" + }, + "maintenance_work_mem": { + "type": "string" + }, + "track_activity_query_size": { + "type": "string" + }, + "max_connections": { + "type": "integer", + "minimum": 1, + "maximum": 262143 + }, + "max_locks_per_transaction": { + "type": "integer", + "minimum": 10, + "maximum": 2147483640 + }, + "max_parallel_maintenance_workers": { + "type": "integer", + "minimum": 0, + "maximum": 1024 + }, + "max_parallel_workers": { + "type": "integer", + "minimum": 0, + "maximum": 1024 + }, + "max_parallel_workers_per_gather": { + "type": "integer", + "minimum": 0, + "maximum": 1024 + }, + "max_replication_slots": { + "type": "integer" + }, + "max_slot_wal_keep_size": { + "type": "string" + }, + "max_standby_archive_delay": { + "type": "string" + }, + "max_standby_streaming_delay": { + "type": "string" + }, + "max_wal_size": { + "type": "string" + }, + "max_wal_senders": { + "type": "integer" + }, + "max_worker_processes": { + "type": "integer", + "minimum": 0, + "maximum": 262143 + }, + "session_replication_role": { + "type": "string", + "enum": ["origin", "replica", "local"] + }, + "shared_buffers": { + "type": "string" + }, + "statement_timeout": { + "type": "string", + "description": "Default unit: ms", + "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" + }, + "track_commit_timestamp": { + "type": "boolean" + }, + "wal_keep_size": { + "type": "string" + }, + "wal_sender_timeout": { + "type": "string", + "description": "Default unit: ms", + "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" + }, + "work_mem": { + "type": "string" + }, + "checkpoint_timeout": { + "type": "string", + "description": "Default unit: s", + "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" + }, + "hot_standby_feedback": { + "type": "boolean" + }, + "restart_database": { + "type": "boolean" + } + }, + "additionalProperties": false, + "example": { + "max_connections": 120, + "shared_buffers": "256MB", + "work_mem": "4MB", + "statement_timeout": "60000ms" + } } } } @@ -9843,7 +20579,140 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PostgresConfigResponse" + "type": "object", + "properties": { + "effective_cache_size": { + "type": "string" + }, + "logical_decoding_work_mem": { + "type": "string" + }, + "cron.log_statement": { + "type": "boolean" + }, + "log_autovacuum_min_duration": { + "type": "string", + "description": "Default unit: ms", + "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" + }, + "log_checkpoints": { + "type": "boolean" + }, + "log_connections": { + "type": "boolean" + }, + "log_disconnections": { + "type": "boolean" + }, + "log_duration": { + "type": "boolean" + }, + "log_lock_waits": { + "type": "boolean" + }, + "log_recovery_conflict_waits": { + "type": "boolean" + }, + "log_replication_commands": { + "type": "boolean" + }, + "log_startup_progress_interval": { + "type": "string", + "description": "Default unit: ms", + "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" + }, + "log_temp_files": { + "type": "string" + }, + "maintenance_work_mem": { + "type": "string" + }, + "track_activity_query_size": { + "type": "string" + }, + "max_connections": { + "type": "integer", + "minimum": 1, + "maximum": 262143 + }, + "max_locks_per_transaction": { + "type": "integer", + "minimum": 10, + "maximum": 2147483640 + }, + "max_parallel_maintenance_workers": { + "type": "integer", + "minimum": 0, + "maximum": 1024 + }, + "max_parallel_workers": { + "type": "integer", + "minimum": 0, + "maximum": 1024 + }, + "max_parallel_workers_per_gather": { + "type": "integer", + "minimum": 0, + "maximum": 1024 + }, + "max_replication_slots": { + "type": "integer" + }, + "max_slot_wal_keep_size": { + "type": "string" + }, + "max_standby_archive_delay": { + "type": "string" + }, + "max_standby_streaming_delay": { + "type": "string" + }, + "max_wal_size": { + "type": "string" + }, + "max_wal_senders": { + "type": "integer" + }, + "max_worker_processes": { + "type": "integer", + "minimum": 0, + "maximum": 262143 + }, + "session_replication_role": { + "type": "string", + "enum": ["origin", "replica", "local"] + }, + "shared_buffers": { + "type": "string" + }, + "statement_timeout": { + "type": "string", + "description": "Default unit: ms", + "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" + }, + "track_commit_timestamp": { + "type": "boolean" + }, + "wal_keep_size": { + "type": "string" + }, + "wal_sender_timeout": { + "type": "string", + "description": "Default unit: ms", + "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" + }, + "work_mem": { + "type": "string" + }, + "checkpoint_timeout": { + "type": "string", + "description": "Default unit: s", + "pattern": "^(-?[0-9]+(?:\\.[0-9]+)?)(us|ms|s|min|h|d)?$" + }, + "hot_standby_feedback": { + "type": "boolean" + } + } } } } @@ -9864,6 +20733,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["database_config_write"] } ], "summary": "Updates project's Postgres config", @@ -9875,7 +20747,6 @@ } ], "x-endpoint-owners": ["infra", "management-api"], - "x-fga-permissions": [["database_config_write"]], "x-oauth-scope": "database:write" } }, @@ -9903,7 +20774,92 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RealtimeConfigResponse" + "type": "object", + "properties": { + "private_only": { + "type": "boolean", + "nullable": true, + "description": "Whether to only allow private channels" + }, + "connection_pool": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "nullable": true, + "description": "Sets connection pool size for Realtime Authorization" + }, + "max_concurrent_users": { + "type": "integer", + "minimum": 1, + "maximum": 50000, + "nullable": true, + "description": "Sets maximum number of concurrent users rate limit" + }, + "max_events_per_second": { + "type": "integer", + "minimum": 1, + "maximum": 50000, + "nullable": true, + "description": "Sets maximum number of events per second rate per channel limit" + }, + "max_bytes_per_second": { + "type": "integer", + "minimum": 1, + "maximum": 10000000, + "nullable": true, + "description": "Sets maximum number of bytes per second rate per channel limit" + }, + "max_channels_per_client": { + "type": "integer", + "minimum": 1, + "maximum": 10000, + "nullable": true, + "description": "Sets maximum number of channels per client rate limit" + }, + "max_joins_per_second": { + "type": "integer", + "minimum": 1, + "maximum": 5000, + "nullable": true, + "description": "Sets maximum number of joins per second rate limit" + }, + "max_presence_events_per_second": { + "type": "integer", + "minimum": 1, + "maximum": 5000, + "nullable": true, + "description": "Sets maximum number of presence events per second rate limit" + }, + "max_payload_size_in_kb": { + "type": "integer", + "minimum": 1, + "maximum": 10000, + "nullable": true, + "description": "Sets maximum number of payload size in KB rate limit" + }, + "suspend": { + "type": "boolean", + "nullable": true, + "description": "Disables the Realtime service for this project when true. Set to false to re-enable it." + }, + "presence_enabled": { + "type": "boolean", + "description": "Whether to enable presence" + } + }, + "required": [ + "private_only", + "connection_pool", + "max_concurrent_users", + "max_events_per_second", + "max_bytes_per_second", + "max_channels_per_client", + "max_joins_per_second", + "max_presence_events_per_second", + "max_payload_size_in_kb", + "suspend", + "presence_enabled" + ] } } } @@ -9921,12 +20877,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["realtime_config_read"] } ], "summary": "Gets realtime configuration", "tags": ["Realtime"], - "x-endpoint-owners": ["realtime"], - "x-fga-permissions": [["realtime_config_read"]] + "x-endpoint-owners": ["realtime"] }, "patch": { "operationId": "v1-update-realtime-config", @@ -9950,7 +20908,75 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateRealtimeConfigBody" + "type": "object", + "properties": { + "private_only": { + "type": "boolean", + "description": "Whether to only allow private channels" + }, + "connection_pool": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "description": "Sets connection pool size for Realtime Authorization" + }, + "max_concurrent_users": { + "type": "integer", + "minimum": 1, + "maximum": 50000, + "description": "Sets maximum number of concurrent users rate limit" + }, + "max_events_per_second": { + "type": "integer", + "minimum": 1, + "maximum": 50000, + "description": "Sets maximum number of events per second rate per channel limit" + }, + "max_bytes_per_second": { + "type": "integer", + "minimum": 1, + "maximum": 10000000, + "description": "Sets maximum number of bytes per second rate per channel limit" + }, + "max_channels_per_client": { + "type": "integer", + "minimum": 1, + "maximum": 10000, + "description": "Sets maximum number of channels per client rate limit" + }, + "max_joins_per_second": { + "type": "integer", + "minimum": 1, + "maximum": 5000, + "description": "Sets maximum number of joins per second rate limit" + }, + "max_presence_events_per_second": { + "type": "integer", + "minimum": 1, + "maximum": 5000, + "description": "Sets maximum number of presence events per second rate limit" + }, + "max_payload_size_in_kb": { + "type": "integer", + "minimum": 1, + "maximum": 10000, + "description": "Sets maximum number of payload size in KB rate limit" + }, + "suspend": { + "type": "boolean", + "description": "Disables the Realtime service for this project when true. Set to false to re-enable it." + }, + "presence_enabled": { + "type": "boolean", + "description": "Whether to enable presence" + } + }, + "additionalProperties": false, + "example": { + "private_only": false, + "max_concurrent_users": 1000, + "max_channels_per_client": 100 + } } } } @@ -9972,12 +20998,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["realtime_config_write"] } ], "summary": "Updates realtime configuration", "tags": ["Realtime"], - "x-endpoint-owners": ["realtime"], - "x-fga-permissions": [["realtime_config_write"]] + "x-endpoint-owners": ["realtime"] } }, "/v1/projects/{ref}/config/realtime/shutdown": { @@ -10018,12 +21046,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["realtime_config_write"] } ], "summary": "Shutdowns realtime connections for a project", "tags": ["Realtime"], - "x-endpoint-owners": ["realtime"], - "x-fga-permissions": [["realtime_config_write"]] + "x-endpoint-owners": ["realtime"] } }, "/v1/projects/{ref}/config/auth/sso/providers": { @@ -10049,7 +21079,97 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/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": { + "type": "object", + "properties": { + "keys": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, + "default": { + "oneOf": [ + { + "type": "object", + "properties": {} + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "array": { + "type": "boolean" + } + } + } + } + }, + "required": ["keys"] + }, + "name_id_format": { + "type": "string", + "enum": [ + "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", + "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" + ] + } + }, + "required": ["type"], + "example": { + "type": "saml", + "metadata_url": "https://sso.acme.com/metadata.xml", + "domains": ["acme.com"], + "attribute_mapping": { + "keys": { + "email": { + "name": "email" + }, + "first_name": { + "name": "first_name" + }, + "last_name": { + "name": "last_name" + } + } + } + } } } } @@ -10060,7 +21180,110 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateProviderResponse" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "saml": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "entity_id": { + "type": "string" + }, + "metadata_url": { + "type": "string" + }, + "metadata_xml": { + "type": "string" + }, + "attribute_mapping": { + "type": "object", + "properties": { + "keys": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, + "default": { + "oneOf": [ + { + "type": "object", + "properties": {} + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "array": { + "type": "boolean" + } + } + } + } + }, + "required": ["keys"] + }, + "name_id_format": { + "type": "string", + "enum": [ + "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", + "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" + ] + } + }, + "required": ["id", "entity_id"] + }, + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": ["id"] + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": ["id"] } } } @@ -10081,6 +21304,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_config_write"] } ], "summary": "Creates a new SSO provider", @@ -10092,7 +21318,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" }, "get": { @@ -10118,7 +21343,119 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListProvidersResponse" + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "saml": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "entity_id": { + "type": "string" + }, + "metadata_url": { + "type": "string" + }, + "metadata_xml": { + "type": "string" + }, + "attribute_mapping": { + "type": "object", + "properties": { + "keys": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, + "default": { + "oneOf": [ + { + "type": "object", + "properties": {} + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "array": { + "type": "boolean" + } + } + } + } + }, + "required": ["keys"] + }, + "name_id_format": { + "type": "string", + "enum": [ + "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", + "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" + ] + } + }, + "required": ["id", "entity_id"] + }, + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": ["id"] + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": ["id"] + } + } + }, + "required": ["items"] } } } @@ -10139,6 +21476,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_config_read"] } ], "summary": "Lists all SSO providers", @@ -10150,7 +21490,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" } }, @@ -10177,7 +21516,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "77777777-7777-4777-8777-777777777777", "type": "string" } @@ -10189,7 +21527,110 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetProviderResponse" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "saml": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "entity_id": { + "type": "string" + }, + "metadata_url": { + "type": "string" + }, + "metadata_xml": { + "type": "string" + }, + "attribute_mapping": { + "type": "object", + "properties": { + "keys": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, + "default": { + "oneOf": [ + { + "type": "object", + "properties": {} + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "array": { + "type": "boolean" + } + } + } + } + }, + "required": ["keys"] + }, + "name_id_format": { + "type": "string", + "enum": [ + "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", + "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" + ] + } + }, + "required": ["id", "entity_id"] + }, + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": ["id"] + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": ["id"] } } } @@ -10210,6 +21651,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_config_read"] } ], "summary": "Gets a SSO provider by its UUID", @@ -10221,7 +21665,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_read"]], "x-oauth-scope": "auth:read" }, "put": { @@ -10246,7 +21689,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "77777777-7777-4777-8777-777777777777", "type": "string" } @@ -10257,7 +21699,77 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateProviderBody" + "type": "object", + "properties": { + "metadata_xml": { + "type": "string" + }, + "metadata_url": { + "type": "string" + }, + "domains": { + "type": "array", + "items": { + "type": "string" + } + }, + "attribute_mapping": { + "type": "object", + "properties": { + "keys": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, + "default": { + "oneOf": [ + { + "type": "object", + "properties": {} + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "array": { + "type": "boolean" + } + } + } + } + }, + "required": ["keys"] + }, + "name_id_format": { + "type": "string", + "enum": [ + "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", + "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" + ] + } + }, + "example": { + "metadata_url": "https://sso.acme.com/metadata.xml", + "domains": ["acme.com", "contractors.acme.com"] + } } } } @@ -10268,7 +21780,110 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateProviderResponse" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "saml": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "entity_id": { + "type": "string" + }, + "metadata_url": { + "type": "string" + }, + "metadata_xml": { + "type": "string" + }, + "attribute_mapping": { + "type": "object", + "properties": { + "keys": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, + "default": { + "oneOf": [ + { + "type": "object", + "properties": {} + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "array": { + "type": "boolean" + } + } + } + } + }, + "required": ["keys"] + }, + "name_id_format": { + "type": "string", + "enum": [ + "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", + "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" + ] + } + }, + "required": ["id", "entity_id"] + }, + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": ["id"] + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": ["id"] } } } @@ -10289,6 +21904,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_config_write"] } ], "summary": "Updates a SSO provider by its UUID", @@ -10300,7 +21918,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" }, "delete": { @@ -10325,7 +21942,6 @@ "in": "path", "schema": { "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "example": "77777777-7777-4777-8777-777777777777", "type": "string" } @@ -10337,7 +21953,110 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteProviderResponse" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "saml": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "entity_id": { + "type": "string" + }, + "metadata_url": { + "type": "string" + }, + "metadata_xml": { + "type": "string" + }, + "attribute_mapping": { + "type": "object", + "properties": { + "keys": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "names": { + "type": "array", + "items": { + "type": "string" + } + }, + "default": { + "oneOf": [ + { + "type": "object", + "properties": {} + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "array": { + "type": "boolean" + } + } + } + } + }, + "required": ["keys"] + }, + "name_id_format": { + "type": "string", + "enum": [ + "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", + "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" + ] + } + }, + "required": ["id", "entity_id"] + }, + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": ["id"] + } + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "required": ["id"] } } } @@ -10358,6 +22077,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["auth_config_write"] } ], "summary": "Removes a SSO provider by its UUID", @@ -10369,7 +22091,6 @@ } ], "x-endpoint-owners": ["auth"], - "x-fga-permissions": [["auth_config_write"]], "x-oauth-scope": "auth:write" } }, @@ -10397,7 +22118,65 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1BackupsResponse" + "type": "object", + "properties": { + "region": { + "type": "string" + }, + "walg_enabled": { + "type": "boolean" + }, + "pitr_enabled": { + "type": "boolean" + }, + "backups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "is_physical_backup": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "COMPLETED", + "FAILED", + "PENDING", + "REMOVED", + "ARCHIVED", + "CANCELLED" + ] + }, + "inserted_at": { + "type": "string" + } + }, + "required": ["id", "is_physical_backup", "status", "inserted_at"] + } + }, + "physical_backup_data": { + "type": "object", + "properties": { + "earliest_physical_backup_date_unix": { + "type": "integer" + }, + "latest_physical_backup_date_unix": { + "type": "integer" + } + } + } + }, + "required": [ + "region", + "walg_enabled", + "pitr_enabled", + "backups", + "physical_backup_data" + ] } } } @@ -10418,6 +22197,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["backups_read"] } ], "summary": "Lists all backups", @@ -10429,7 +22211,6 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_read"]], "x-oauth-scope": "database:read" } }, @@ -10456,7 +22237,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1RestorePitrBody" + "type": "object", + "properties": { + "recovery_time_target_unix": { + "type": "integer", + "minimum": 0, + "format": "int64" + } + }, + "required": ["recovery_time_target_unix"], + "example": { + "recovery_time_target_unix": 1740787200 + } } } } @@ -10478,6 +22270,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["backups_write"] } ], "summary": "Restores a PITR backup for a database", @@ -10489,7 +22284,6 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_write"]], "x-oauth-scope": "database:write" } }, @@ -10516,7 +22310,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1RestorePointPostBody" + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 20 + } + }, + "required": ["name"], + "example": { + "name": "before-upgrade" + } } } } @@ -10527,7 +22331,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1RestorePointResponse" + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["AVAILABLE", "PENDING", "REMOVED", "FAILED"] + }, + "completed_on": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "required": ["name", "status", "completed_on"] } } } @@ -10545,6 +22364,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["backups_write"] } ], "summary": "Initiates a creation of a restore point for a database", @@ -10556,7 +22378,6 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_write"]], "x-internal": true, "x-oauth-scope": "database:write" }, @@ -10592,7 +22413,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1RestorePointResponse" + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["AVAILABLE", "PENDING", "REMOVED", "FAILED"] + }, + "completed_on": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "required": ["name", "status", "completed_on"] } } } @@ -10613,6 +22449,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["backups_read"] } ], "summary": "Get restore points for project", @@ -10624,7 +22463,6 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_read"]], "x-internal": true, "x-oauth-scope": "database:read" } @@ -10652,7 +22490,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1RestoreBackupBody" + "type": "object", + "properties": { + "id": { + "type": "integer" + } + }, + "required": ["id"], + "example": { + "id": 12345 + } } } } @@ -10674,6 +22521,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["backups_write"] } ], "summary": "Restores a physical backup for a database", @@ -10685,7 +22535,6 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_write"]], "x-internal": true, "x-oauth-scope": "database:write" } @@ -10714,7 +22563,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1BackupScheduleResponse" + "type": "object", + "properties": { + "schedule_for": { + "type": "string", + "description": "Time of day to schedule daily backups, in UTC. Format: HH:MM:SS.", + "example": "04:00:00" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp of when the backup schedule was last updated.", + "example": "2026-05-04T14:40:44+00:00" + } + }, + "required": ["schedule_for", "updated_at"] } } } @@ -10723,14 +22586,7 @@ "description": "Unauthorized" }, "402": { - "description": "This feature requires the Enterprise organization plan.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlanGateErrorBody" - } - } - } + "description": "This feature requires the Enterprise organization plan." }, "403": { "description": "Forbidden action" @@ -10748,6 +22604,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["backups_read"] } ], "summary": "Gets the backup schedule for a project", @@ -10764,7 +22623,6 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_read"]], "x-oauth-scope": "database:read" }, "patch": { @@ -10790,7 +22648,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1UpdateBackupScheduleBody" + "type": "object", + "properties": { + "schedule_for": { + "type": "string", + "description": "Time of day to schedule daily backups, in UTC. Format: HH:MM:SS.", + "example": "04:00:00" + } + }, + "required": ["schedule_for"], + "example": { + "schedule_for": "04:00:00" + } } } } @@ -10801,7 +22670,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1BackupScheduleResponse" + "type": "object", + "properties": { + "schedule_for": { + "type": "string", + "description": "Time of day to schedule daily backups, in UTC. Format: HH:MM:SS.", + "example": "04:00:00" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp of when the backup schedule was last updated.", + "example": "2026-05-04T14:40:44+00:00" + } + }, + "required": ["schedule_for", "updated_at"] } } } @@ -10813,14 +22696,7 @@ "description": "Unauthorized" }, "402": { - "description": "This feature requires the Enterprise organization plan.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlanGateErrorBody" - } - } - } + "description": "This feature requires the Enterprise organization plan." }, "403": { "description": "Forbidden action" @@ -10838,6 +22714,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["backups_write"] } ], "summary": "Updates the backup schedule time for a project", @@ -10854,7 +22733,6 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_write"]], "x-oauth-scope": "database:write" } }, @@ -10881,7 +22759,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1UndoBody" + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 20 + } + }, + "required": ["name"], + "example": { + "name": "before-upgrade" + } } } } @@ -10903,6 +22791,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["backups_write"] } ], "summary": "Initiates an undo to a given restore point", @@ -10914,7 +22805,6 @@ } ], "x-endpoint-owners": ["infra"], - "x-fga-permissions": [["backups_write"]], "x-internal": true, "x-oauth-scope": "database:write" } @@ -10942,7 +22832,150 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1ListEntitlementsResponse" + "type": "object", + "properties": { + "entitlements": { + "type": "array", + "items": { + "type": "object", + "properties": { + "feature": { + "type": "object", + "properties": { + "key": { + "type": "string", + "enum": [ + "instances.compute_update_available_sizes", + "instances.read_replicas", + "instances.disk_modifications", + "instances.high_availability", + "instances.orioledb", + "replication.etl", + "storage.max_file_size", + "storage.max_file_size.configurable", + "storage.image_transformations", + "storage.vector_buckets", + "storage.iceberg_catalog", + "storage.purge_cache", + "security.audit_logs_days", + "security.questionnaire", + "security.soc2_report", + "security.iso27001_certificate", + "security.private_link", + "security.enforce_mfa", + "log.retention_days", + "custom_domain", + "vanity_subdomain", + "ipv4", + "pitr.available_variants", + "log_drains", + "audit_log_drains", + "branching_limit", + "branching_persistent", + "auth.mfa_phone", + "auth.mfa_web_authn", + "auth.mfa_enhanced_security", + "auth.hooks", + "auth.platform.sso", + "auth.custom_jwt_template", + "auth.saml_2", + "auth.user_sessions", + "auth.leaked_password_protection", + "auth.advanced_auth_settings", + "auth.performance_settings", + "auth.password_hibp", + "auth.custom_oauth.max_providers", + "backup.retention_days", + "backup.restore_to_new_project", + "backup.schedule", + "function.max_count", + "function.size_limit_mb", + "realtime.max_concurrent_users", + "realtime.max_events_per_second", + "realtime.max_joins_per_second", + "realtime.max_channels_per_client", + "realtime.max_bytes_per_second", + "realtime.max_presence_events_per_second", + "realtime.max_payload_size_in_kb", + "project_scoped_roles", + "security.member_roles", + "project_pausing", + "project_cloning", + "project_restore_after_expiry", + "assistant.advance_model", + "integrations.github_connections", + "dedicated_pooler", + "observability.dashboard_advanced_metrics", + "api.members.invitations", + "api.members.roles" + ] + }, + "type": { + "type": "string", + "enum": ["boolean", "numeric", "set"] + } + }, + "required": ["key", "type"] + }, + "hasAccess": { + "type": "boolean" + }, + "type": { + "type": "string", + "enum": ["boolean", "numeric", "set"] + }, + "config": { + "oneOf": [ + { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"] + }, + { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "value": { + "type": "number" + }, + "unlimited": { + "type": "boolean" + }, + "unit": { + "type": "string" + } + }, + "required": ["enabled", "value", "unlimited", "unit"] + }, + { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "set": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["enabled", "set"] + } + ] + } + }, + "required": ["feature", "hasAccess", "type", "config"] + } + } + }, + "required": ["entitlements"] } } } @@ -10960,6 +22993,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["organization_admin_read"] } ], "summary": "Get entitlements for an organization", @@ -10971,7 +23007,6 @@ } ], "x-endpoint-owners": ["billing"], - "x-fga-permissions": [["organization_admin_read"]], "x-oauth-scope": "organizations:read" } }, @@ -10999,7 +23034,29 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/V1OrganizationMemberResponse" + "type": "object", + "properties": { + "user_id": { + "type": "string" + }, + "user_name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "role_name": { + "type": "string" + }, + "mfa_enabled": { + "type": "boolean" + }, + "avatar_url": { + "type": "string", + "nullable": true + } + }, + "required": ["user_id", "user_name", "role_name", "mfa_enabled", "avatar_url"] } } } @@ -11009,6 +23066,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["members_read"] } ], "summary": "List members of an organization", @@ -11020,7 +23080,6 @@ } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["members_read"]], "x-oauth-scope": "organizations:read" } }, @@ -11046,7 +23105,38 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/V1OrganizationSlugResponse" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "plan": { + "type": "string", + "enum": ["free", "pro", "team", "enterprise", "platform"] + }, + "opt_in_tags": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "AI_SQL_GENERATOR_OPT_IN", + "AI_DATA_GENERATOR_OPT_IN", + "AI_LOG_GENERATOR_OPT_IN" + ] + } + }, + "allowed_release_channels": { + "type": "array", + "items": { + "type": "string", + "enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"] + } + } + }, + "required": ["id", "name", "opt_in_tags", "allowed_release_channels"] } } } @@ -11064,6 +23154,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["organization_admin_read"] } ], "summary": "Gets information about the organization", @@ -11075,7 +23168,6 @@ } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_read"]], "x-oauth-scope": "organizations:read" } }, @@ -11110,7 +23202,118 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationProjectClaimResponse" + "type": "object", + "properties": { + "project": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["ref", "name"] + }, + "preview": { + "type": "object", + "properties": { + "valid": { + "type": "boolean" + }, + "warnings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["key", "message"] + } + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["key", "message"] + } + }, + "info": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["key", "message"] + } + }, + "members_exceeding_free_project_limit": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "limit": { + "type": "number" + } + }, + "required": ["name", "limit"] + } + }, + "source_subscription_plan": { + "type": "string", + "enum": ["free", "pro", "team", "enterprise", "platform"] + }, + "target_subscription_plan": { + "type": "string", + "enum": ["free", "pro", "team", "enterprise", "platform"], + "nullable": true + } + }, + "required": [ + "valid", + "warnings", + "errors", + "info", + "members_exceeding_free_project_limit", + "source_subscription_plan", + "target_subscription_plan" + ] + }, + "expires_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "created_by": { + "type": "string", + "format": "uuid" + } + }, + "required": ["project", "preview", "expires_at", "created_at", "created_by"] } } } @@ -11128,12 +23331,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["organization_admin_write"] } ], "summary": "Gets project details for the specified organization and claim token", "tags": ["Organizations"], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_write"]], "x-internal": true }, "post": { @@ -11177,12 +23382,14 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["organization_admin_write"] } ], "summary": "Claims project for the specified organization", "tags": ["Organizations"], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_write"]], "x-internal": true } }, @@ -11209,7 +23416,6 @@ "description": "Number of projects to skip", "schema": { "minimum": 0, - "maximum": 9007199254740991, "default": 0, "example": 0, "type": "integer" @@ -11267,7 +23473,167 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationProjectsResponse" + "type": "object", + "properties": { + "projects": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "name": { + "type": "string" + }, + "cloud_provider": { + "type": "string" + }, + "region": { + "type": "string" + }, + "is_branch": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "INACTIVE", + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "UNKNOWN", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UPGRADING", + "PAUSING", + "RESTORE_FAILED", + "RESTARTING", + "PAUSE_FAILED", + "RESIZING" + ] + }, + "inserted_at": { + "type": "string" + }, + "databases": { + "type": "array", + "items": { + "type": "object", + "properties": { + "infra_compute_size": { + "type": "string", + "enum": [ + "pico", + "nano", + "micro", + "small", + "medium", + "large", + "xlarge", + "2xlarge", + "4xlarge", + "8xlarge", + "12xlarge", + "16xlarge", + "24xlarge", + "24xlarge_optimized_memory", + "24xlarge_optimized_cpu", + "24xlarge_high_memory", + "48xlarge", + "48xlarge_optimized_memory", + "48xlarge_optimized_cpu", + "48xlarge_high_memory" + ] + }, + "region": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE_HEALTHY", + "ACTIVE_UNHEALTHY", + "COMING_UP", + "GOING_DOWN", + "INIT_FAILED", + "REMOVED", + "RESTORING", + "UNKNOWN", + "INIT_READ_REPLICA", + "INIT_READ_REPLICA_FAILED", + "RESTARTING", + "RESIZING" + ] + }, + "cloud_provider": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["PRIMARY", "READ_REPLICA"] + }, + "disk_volume_size_gb": { + "type": "number" + }, + "disk_type": { + "type": "string", + "enum": ["gp3", "io2"] + }, + "disk_throughput_mbps": { + "type": "number" + }, + "disk_last_modified_at": { + "type": "string" + } + }, + "required": [ + "region", + "status", + "cloud_provider", + "identifier", + "type" + ] + } + } + }, + "required": [ + "ref", + "name", + "cloud_provider", + "region", + "is_branch", + "status", + "inserted_at", + "databases" + ] + } + }, + "pagination": { + "type": "object", + "properties": { + "count": { + "type": "number", + "description": "Total number of projects. Use this to calculate the total number of pages." + }, + "limit": { + "type": "number", + "description": "Maximum number of projects per page" + }, + "offset": { + "type": "number", + "description": "Number of projects skipped in this response" + } + }, + "required": ["count", "limit", "offset"] + } + }, + "required": ["projects", "pagination"] } } } @@ -11288,6 +23654,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["organization_projects_read"] } ], "summary": "Gets all projects for the given organization", @@ -11299,7 +23668,6 @@ } ], "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_projects_read"]], "x-oauth-scope": "projects:read" } } @@ -11353,9 +23721,8 @@ }, "db_port": { "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 + "minimum": 0, + "exclusiveMinimum": true }, "db_user": { "type": "string" @@ -11387,9 +23754,9 @@ "type": "string" }, "reset_on_push": { + "type": "boolean", "description": "This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead.", - "deprecated": true, - "type": "boolean" + "deprecated": true }, "persistent": { "type": "boolean" @@ -11427,8 +23794,7 @@ "properties": { "id": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" }, "name": { "type": "string" @@ -11447,14 +23813,12 @@ }, "pr_number": { "type": "integer", - "format": "int32", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "format": "int32" }, "latest_check_run_id": { + "type": "number", "description": "This field is deprecated and will not be populated.", - "deprecated": true, - "type": "number" + "deprecated": true }, "persistent": { "type": "boolean" @@ -11474,18 +23838,15 @@ }, "created_at": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + "format": "date-time" }, "updated_at": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + "format": "date-time" }, "review_requested_at": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + "format": "date-time" }, "with_data": { "type": "boolean" @@ -11496,8 +23857,7 @@ }, "deletion_scheduled_at": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + "format": "date-time" }, "preview_project_status": { "type": "string", @@ -11684,9 +24044,9 @@ "description": "Name of your project" }, "organization_id": { - "deprecated": true, + "type": "string", "description": "Deprecated: Use `organization_slug` instead.", - "type": "string" + "deprecated": true }, "organization_slug": { "type": "string", @@ -11695,12 +24055,13 @@ "example": "tsrqponmlkjihgfedcba" }, "plan": { - "deprecated": true, - "description": "Subscription Plan is now set on organization level and is ignored in this request", "type": "string", - "enum": ["free", "pro"] + "enum": ["free", "pro"], + "deprecated": true, + "description": "Subscription Plan is now set on organization level and is ignored in this request" }, "region": { + "type": "string", "description": "Region you want your server to reside in. Use region_selection instead.", "deprecated": true, "enum": [ @@ -11722,11 +24083,12 @@ "ca-central-1", "ap-south-1", "sa-east-1" - ], - "type": "string" + ] }, "region_selection": { - "description": "Region selection. Only one of region or region_selection can be specified.", + "discriminator": { + "propertyName": "type" + }, "oneOf": [ { "type": "object", @@ -11777,12 +24139,13 @@ }, "required": ["type", "code"] } - ] + ], + "description": "Region selection. Only one of region or region_selection can be specified." }, "kps_enabled": { + "type": "boolean", "deprecated": true, - "description": "This field is deprecated and is ignored in this request", - "type": "boolean" + "description": "This field is deprecated and is ignored in this request" }, "desired_instance_size": { "description": "Desired instance size. Omit this field to always default to the smallest possible size.", @@ -11810,31 +24173,24 @@ ] }, "template_url": { - "description": "Template URL used to create the project from the CLI.", "type": "string", - "format": "uri" - }, - "release_channel": { - "deprecated": true, - "type": "null" - }, - "postgres_engine": { - "deprecated": true, - "type": "null" + "format": "uri", + "description": "Template URL used to create the project from the CLI." }, "high_availability": { - "description": "[Experimental] Whether to enable high availability for the project.", - "type": "boolean" + "type": "boolean", + "description": "[Experimental] Whether to enable high availability for the project." } }, "required": ["db_pass", "name", "organization_slug"], + "additionalProperties": false, + "hideDefinitions": ["release_channel", "postgres_engine"], "example": { "db_pass": "correct-horse-battery-staple", "name": "acme-prod", "organization_slug": "tsrqponmlkjihgfedcba", "region": "us-east-1" - }, - "additionalProperties": false + } }, "V1ProjectResponse": { "type": "object", @@ -12085,10 +24441,10 @@ } }, "required": ["name"], + "additionalProperties": false, "example": { "name": "Acme" - }, - "additionalProperties": false + } }, "OAuthTokenBody": { "type": "object", @@ -12103,8 +24459,7 @@ }, "client_id": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" }, "client_secret": { "type": "string" @@ -12122,18 +24477,19 @@ "type": "string" }, "assertion": { - "description": "IDJAG assertion JWT for grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer. Beta - available on Team and Enterprise plans only.", - "type": "string" + "type": "string", + "description": "IDJAG assertion JWT for grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer. Beta - available on Team and Enterprise plans only." }, "resource": { - "description": "Resource indicator for MCP (Model Context Protocol) clients", "type": "string", - "format": "uri" + "format": "uri", + "description": "Resource indicator for MCP (Model Context Protocol) clients" }, "scope": { "type": "string" } }, + "additionalProperties": false, "example": { "grant_type": "authorization_code", "client_id": "66666666-6666-4666-8666-666666666666", @@ -12142,8 +24498,7 @@ "code_verifier": "qW0Z6d9pQnW0mL1dK1q9wFq6Yz2nV5rA8jT3mP7sH4c", "redirect_uri": "https://app.acme.com/auth/callback", "scope": "projects:read projects:write" - }, - "additionalProperties": false + } }, "OAuthTokenResponse": { "type": "object", @@ -12152,13 +24507,11 @@ "type": "string" }, "refresh_token": { - "description": "The `urn:ietf:params:oauth:grant-type:jwt-bearer` grant type issues access tokens only, no refresh token is returned and the token cannot be revoked via `/v1/oauth/revoke`.", - "type": "string" + "type": "string", + "description": "The `urn:ietf:params:oauth:grant-type:jwt-bearer` grant type issues access tokens only, no refresh token is returned and the token cannot be revoked via `/v1/oauth/revoke`." }, "expires_in": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "token_type": { "type": "string", @@ -12173,8 +24526,7 @@ "properties": { "client_id": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" }, "client_secret": { "type": "string" @@ -12184,12 +24536,12 @@ } }, "required": ["client_id", "client_secret", "refresh_token"], + "additionalProperties": false, "example": { "client_id": "66666666-6666-4666-8666-666666666666", "client_secret": "sb_secret_live_example_9f4d3a206b2e4a7e8c91", "refresh_token": "oauth_refresh_9f4d3a206b2e4a7e8c91" - }, - "additionalProperties": false + } }, "SnippetList": { "type": "object", @@ -12354,9 +24706,9 @@ "type": "object", "properties": { "favorite": { + "type": "boolean", "deprecated": true, - "description": "Deprecated: Rely on root-level favorite property instead.", - "type": "boolean" + "description": "Deprecated: Rely on root-level favorite property instead." }, "schema_version": { "type": "string" @@ -12599,7 +24951,7 @@ }, "type": { "type": "string", - "enum": ["legacy", "publishable", "secret", null], + "enum": ["legacy", "publishable", "secret"], "nullable": true }, "prefix": { @@ -12619,22 +24971,17 @@ }, "secret_jwt_template": { "type": "object", - "propertyNames": { - "type": "string" - }, "additionalProperties": {}, "nullable": true }, "inserted_at": { "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "nullable": true }, "updated_at": { "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "nullable": true } }, @@ -12668,9 +25015,6 @@ }, "secret_jwt_template": { "type": "object", - "propertyNames": { - "type": "string" - }, "additionalProperties": {}, "nullable": true } @@ -12697,9 +25041,6 @@ }, "secret_jwt_template": { "type": "object", - "propertyNames": { - "type": "string" - }, "additionalProperties": {}, "nullable": true } @@ -12787,37 +25128,6 @@ "notify_url": "https://example.com/webhooks/branches" } }, - "UpdateCustomHostnameResponseJsonValue": { - "description": "Any JSON-serializable value", - "anyOf": [ - { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ], - "nullable": true - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" - } - }, - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" - } - } - ] - }, "UpdateCustomHostnameResponse": { "type": "object", "properties": { @@ -12843,13 +25153,13 @@ "errors": { "type": "array", "items": { - "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" + "description": "Any JSON-serializable value" } }, "messages": { "type": "array", "items": { - "$ref": "#/components/schemas/UpdateCustomHostnameResponseJsonValue" + "description": "Any JSON-serializable value" } }, "result": { @@ -12945,8 +25255,8 @@ "properties": { "custom_hostname": { "type": "string", - "minLength": 1, - "maxLength": 253 + "maxLength": 253, + "minLength": 1 } }, "required": ["custom_hostname"], @@ -12954,6 +25264,40 @@ "custom_hostname": "docs.example.com" } }, + "JitStateResponse": { + "discriminator": { + "propertyName": "state" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": ["enabled", "disabled"] + }, + "appliedSuccessfully": { + "type": "boolean" + } + }, + "required": ["state"] + }, + { + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": ["unavailable"] + }, + "unavailableReason": { + "type": "string", + "enum": ["postgres_upgrade_required", "temporarily_unavailable"] + } + }, + "required": ["state", "unavailableReason"] + } + ] + }, "JitAccessRequestRequest": { "type": "object", "properties": { @@ -13015,8 +25359,8 @@ }, "requester_ip": { "default": false, - "description": "Include requester's public IP in the list of addresses to unban.", - "type": "boolean" + "type": "boolean", + "description": "Include requester's public IP in the list of addresses to unban." }, "identifier": { "type": "string" @@ -13051,14 +25395,9 @@ } } }, - "example": { - "dbAllowedCidrs": ["203.0.113.0/24"], - "dbAllowedCidrsV6": ["2001:db8::/32"] - }, "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." }, "old_config": { - "description": "Populated when a new config has been received, but not registered as successfully applied to a project.", "type": "object", "properties": { "dbAllowedCidrs": { @@ -13077,7 +25416,8 @@ "example": { "dbAllowedCidrs": ["203.0.113.0/24"], "dbAllowedCidrsV6": ["2001:db8::/32"] - } + }, + "description": "Populated when a new config has been received, but not registered as successfully applied to a project." }, "status": { "type": "string", @@ -13085,13 +25425,11 @@ }, "updated_at": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + "format": "date-time" }, "applied_at": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + "format": "date-time" } }, "required": ["entitlement", "config", "status"] @@ -13194,7 +25532,6 @@ "description": "At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`." }, "old_config": { - "description": "Populated when a new config has been received, but not registered as successfully applied to a project.", "type": "object", "properties": { "dbAllowedCidrs": { @@ -13213,17 +25550,16 @@ "required": ["address", "type"] } } - } + }, + "description": "Populated when a new config has been received, but not registered as successfully applied to a project." }, "updated_at": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + "format": "date-time" }, "applied_at": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + "format": "date-time" }, "status": { "type": "string", @@ -13236,26 +25572,21 @@ "type": "object", "properties": { "root_key": { - "type": "string", - "description": "The pgsodium root key: 32 bytes, hex-encoded (64 characters)." + "type": "string" } }, - "required": ["root_key"], - "example": { - "root_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" - } + "required": ["root_key"] }, "UpdatePgsodiumConfigBody": { "type": "object", "properties": { "root_key": { - "type": "string", - "description": "The pgsodium root key: 32 bytes, hex-encoded (64 characters)." + "type": "string" } }, "required": ["root_key"], "example": { - "root_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" + "root_key": "MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=" } }, "PostgrestConfigWithJWTSecretResponse": { @@ -13265,26 +25596,20 @@ "type": "string" }, "max_rows": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "db_extra_search_path": { "type": "string" }, "db_pool": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "If `null`, the value is automatically configured based on compute size.", - "nullable": true + "nullable": true, + "description": "If `null`, the value is automatically configured based on compute size." }, "db_pool_acquisition_timeout": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "If `null`, the value is automatically configured to 10.", - "nullable": true + "nullable": true, + "description": "If `null`, the value is automatically configured to 10." }, "jwt_secret": { "type": "string" @@ -13336,26 +25661,20 @@ "type": "string" }, "max_rows": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "db_extra_search_path": { "type": "string" }, "db_pool": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "If `null`, the value is automatically configured based on compute size.", - "nullable": true + "nullable": true, + "description": "If `null`, the value is automatically configured based on compute size." }, "db_pool_acquisition_timeout": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "If `null`, the value is automatically configured to 10.", - "nullable": true + "nullable": true, + "description": "If `null`, the value is automatically configured to 10." } }, "required": [ @@ -13370,9 +25689,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "ref": { "type": "string" @@ -13413,7 +25730,6 @@ "required": ["name", "value"] }, "CreateSecretBody": { - "maxItems": 100, "type": "array", "items": { "type": "object", @@ -13510,36 +25826,6 @@ }, "required": ["status"] }, - "PlanGateErrorBody": { - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "Human-readable explanation of the plan gate" - }, - "error": { - "description": "Present on entitlement denials. Other errors with this status code (validation, billing state) carry only message.", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Machine-readable marker for plan-gated denials", - "enum": ["entitlement_required"] - }, - "feature": { - "type": "string", - "description": "Entitlement feature key that failed the check" - }, - "upgrade_url": { - "description": "Billing page URL for the organization, present when the org is resolvable", - "type": "string" - } - }, - "required": ["code", "feature"] - } - }, - "required": ["message"] - }, "VanitySubdomainBody": { "type": "object", "properties": { @@ -13669,7 +25955,7 @@ "validation_errors": { "type": "array", "items": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -13780,16 +26066,8 @@ "enum": ["user_defined_objects_in_internal_schemas"] }, "obj_type": { - "anyOf": [ - { - "type": "string", - "enum": ["table"] - }, - { - "type": "string", - "enum": ["function"] - } - ] + "type": "string", + "enum": ["table", "function"] }, "schema_name": { "type": "string" @@ -13839,6 +26117,9 @@ "warnings": { "type": "array", "items": { + "discriminator": { + "propertyName": "type" + }, "oneOf": [ { "type": "object", @@ -14030,7 +26311,7 @@ "enum": ["COMING_UP", "ACTIVE_HEALTHY", "UNHEALTHY"] }, "info": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -14062,9 +26343,7 @@ "type": "boolean" }, "connected_cluster": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" } }, "required": [ @@ -14096,8 +26375,7 @@ "properties": { "id": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" }, "algorithm": { "type": "string", @@ -14112,16 +26390,14 @@ }, "created_at": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + "format": "date-time" }, "updated_at": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + "format": "date-time" } }, - "required": ["id", "algorithm", "status", "public_jwk", "created_at", "updated_at"], + "required": ["id", "algorithm", "status", "created_at", "updated_at"], "additionalProperties": false }, "CreateSigningKeyBody": { @@ -14136,27 +26412,29 @@ "enum": ["in_use", "standby"] }, "private_jwk": { + "discriminator": { + "propertyName": "kty" + }, "oneOf": [ { "type": "object", "properties": { "kid": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { - "minItems": 2, - "maxItems": 2, "type": "array", "items": { "type": "string", "enum": ["sign", "verify"] - } + }, + "minItems": 2, + "maxItems": 2 }, "ext": { "type": "boolean", @@ -14204,21 +26482,20 @@ "properties": { "kid": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { - "minItems": 2, - "maxItems": 2, "type": "array", "items": { "type": "string", "enum": ["sign", "verify"] - } + }, + "minItems": 2, + "maxItems": 2 }, "ext": { "type": "boolean", @@ -14254,21 +26531,20 @@ "properties": { "kid": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { - "minItems": 2, - "maxItems": 2, "type": "array", "items": { "type": "string", "enum": ["sign", "verify"] - } + }, + "minItems": 2, + "maxItems": 2 }, "ext": { "type": "boolean", @@ -14301,21 +26577,20 @@ "properties": { "kid": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" }, "use": { "type": "string", "enum": ["sig"] }, "key_ops": { - "minItems": 2, - "maxItems": 2, "type": "array", "items": { "type": "string", "enum": ["sign", "verify"] - } + }, + "minItems": 2, + "maxItems": 2 }, "ext": { "type": "boolean", @@ -14341,11 +26616,11 @@ } }, "required": ["algorithm"], + "additionalProperties": false, "example": { "algorithm": "RS256", "status": "standby" - }, - "additionalProperties": false + } }, "SigningKeysResponse": { "type": "object", @@ -14357,8 +26632,7 @@ "properties": { "id": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" }, "algorithm": { "type": "string", @@ -14373,16 +26647,14 @@ }, "created_at": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + "format": "date-time" }, "updated_at": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + "format": "date-time" } }, - "required": ["id", "algorithm", "status", "public_jwk", "created_at", "updated_at"], + "required": ["id", "algorithm", "status", "created_at", "updated_at"], "additionalProperties": false } } @@ -14399,29 +26671,25 @@ } }, "required": ["status"], + "additionalProperties": false, "example": { "status": "standby" - }, - "additionalProperties": false + } }, "AuthConfigResponse": { "type": "object", "properties": { "api_max_request_duration": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "db_max_pool_size": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "db_max_pool_size_unit": { "type": "string", - "enum": ["connections", "percent", null], + "enum": ["connections", "percent"], "nullable": true }, "disable_signup": { @@ -14894,8 +27162,6 @@ }, "jwt_exp": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "mailer_allow_unverified_email_sign_ins": { @@ -14907,14 +27173,10 @@ "nullable": true }, "mailer_otp_exp": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "mailer_otp_length": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "mailer_secure_email_change_enabled": { @@ -15055,8 +27317,6 @@ }, "mfa_max_enrolled_factors": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "mfa_totp_enroll_enabled": { @@ -15099,9 +27359,7 @@ "nullable": true }, "mfa_phone_otp_length": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "mfa_phone_template": { "type": "string", @@ -15109,8 +27367,6 @@ }, "mfa_phone_max_frequency": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "nimbus_oauth_client_id": { @@ -15131,8 +27387,6 @@ }, "password_min_length": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "password_required_characters": { @@ -15141,51 +27395,36 @@ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", - "", - null + "" ], "nullable": true }, "rate_limit_anonymous_users": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "rate_limit_email_sent": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "rate_limit_sms_sent": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "rate_limit_token_refresh": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "rate_limit_verify": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "rate_limit_otp": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "rate_limit_web3": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "refresh_token_rotation_enabled": { @@ -15214,7 +27453,7 @@ }, "security_captcha_provider": { "type": "string", - "enum": ["turnstile", "hcaptcha", null], + "enum": ["turnstile", "hcaptcha"], "nullable": true }, "security_captcha_secret": { @@ -15227,8 +27466,6 @@ }, "security_refresh_token_reuse_interval": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "security_update_password_require_reauthentication": { @@ -15261,8 +27498,6 @@ }, "sms_max_frequency": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "sms_messagebird_access_key": { @@ -15275,18 +27510,14 @@ }, "sms_otp_exp": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "sms_otp_length": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "sms_provider": { "type": "string", - "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage", null], + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], "nullable": true }, "sms_template": { @@ -15300,7 +27531,6 @@ "sms_test_otp_valid_until": { "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", "nullable": true }, "sms_textlocal_api_key": { @@ -15354,7 +27584,6 @@ "smtp_admin_email": { "type": "string", "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", "nullable": true }, "smtp_host": { @@ -15363,8 +27592,6 @@ }, "smtp_max_frequency": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "smtp_pass": { @@ -15401,9 +27628,7 @@ "type": "boolean" }, "custom_oauth_max_providers": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" } }, "required": [ @@ -15667,7 +27892,6 @@ "smtp_admin_email": { "type": "string", "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", "nullable": true }, "smtp_host": { @@ -15877,7 +28101,7 @@ }, "security_captcha_provider": { "type": "string", - "enum": ["turnstile", "hcaptcha", null], + "enum": ["turnstile", "hcaptcha"], "nullable": true }, "security_captcha_secret": { @@ -15969,8 +28193,7 @@ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789", "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~", - "", - null + "" ], "nullable": true }, @@ -16022,7 +28245,7 @@ }, "sms_provider": { "type": "string", - "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage", null], + "enum": ["messagebird", "textlocal", "twilio", "twilio_verify", "vonage"], "nullable": true }, "sms_messagebird_access_key": { @@ -16041,7 +28264,6 @@ "sms_test_otp_valid_until": { "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", "nullable": true }, "sms_textlocal_api_key": { @@ -16550,19 +28772,15 @@ }, "db_max_pool_size": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "db_max_pool_size_unit": { "type": "string", - "enum": ["connections", "percent", null], + "enum": ["connections", "percent"], "nullable": true }, "api_max_request_duration": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "mfa_totp_enroll_enabled": { @@ -16671,8 +28889,7 @@ "properties": { "id": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" }, "type": { "type": "string" @@ -16730,37 +28947,6 @@ }, "required": ["available_versions"] }, - "ListProjectAddonsResponseJsonValue": { - "description": "Any JSON-serializable value", - "anyOf": [ - { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ], - "nullable": true - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" - } - }, - { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" - } - } - ] - }, "ListProjectAddonsResponse": { "type": "object", "properties": { @@ -16786,7 +28972,7 @@ "type": "object", "properties": { "id": { - "anyOf": [ + "oneOf": [ { "type": "string", "enum": [ @@ -16864,7 +29050,7 @@ "required": ["description", "type", "interval", "amount"] }, "meta": { - "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" + "description": "Any JSON-serializable value" } }, "required": ["id", "name", "price"] @@ -16900,7 +29086,7 @@ "type": "object", "properties": { "id": { - "anyOf": [ + "oneOf": [ { "type": "string", "enum": [ @@ -16978,7 +29164,7 @@ "required": ["description", "type", "interval", "amount"] }, "meta": { - "$ref": "#/components/schemas/ListProjectAddonsResponseJsonValue" + "description": "Any JSON-serializable value" } }, "required": ["id", "name", "price"] @@ -16995,7 +29181,7 @@ "type": "object", "properties": { "addon_variant": { - "anyOf": [ + "oneOf": [ { "type": "string", "enum": [ @@ -17067,8 +29253,7 @@ }, "created_by": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" } }, "required": ["token_alias", "expires_at", "created_at", "created_by"] @@ -17090,8 +29275,7 @@ }, "created_by": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" } }, "required": ["token", "token_alias", "expires_at", "created_at", "created_by"] @@ -17105,6 +29289,7 @@ "type": "object", "properties": { "name": { + "type": "string", "enum": [ "unindexed_foreign_keys", "auth_users_exposed", @@ -17135,8 +29320,7 @@ "leaked_service_key", "no_backup_admin", "vulnerable_postgres_version" - ], - "type": "string" + ] }, "title": { "type": "string" @@ -17220,7 +29404,7 @@ "items": {} }, "error": { - "anyOf": [ + "oneOf": [ { "type": "string" }, @@ -17277,8 +29461,7 @@ "properties": { "timestamp": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|))$" + "format": "date-time" }, "total_auth_requests": { "type": "number" @@ -17303,7 +29486,7 @@ } }, "error": { - "anyOf": [ + "oneOf": [ { "type": "string" }, @@ -17366,7 +29549,7 @@ } }, "error": { - "anyOf": [ + "oneOf": [ { "type": "string" }, @@ -17439,7 +29622,6 @@ "ttl_seconds": { "type": "integer", "minimum": 1, - "maximum": 9007199254740991, "format": "int64" } }, @@ -17618,12 +29800,12 @@ } }, "required": ["name"], - "additionalProperties": {} + "additionalProperties": true } } }, "required": ["name", "schemas"], - "additionalProperties": {} + "additionalProperties": true } } }, @@ -17656,8 +29838,7 @@ "properties": { "user_id": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" }, "user_roles": { "type": "array", @@ -17680,9 +29861,7 @@ "type": "object", "properties": { "cidr": { - "type": "string", - "format": "cidrv4", - "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" + "type": "string" } }, "required": ["cidr"] @@ -17694,9 +29873,7 @@ "type": "object", "properties": { "cidr": { - "type": "string", - "format": "cidrv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" + "type": "string" } }, "required": ["cidr"] @@ -17722,18 +29899,8 @@ "minLength": 1 }, "rhost": { - "anyOf": [ - { - "type": "string", - "format": "ipv4", - "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$" - }, - { - "type": "string", - "format": "ipv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$" - } - ] + "type": "string", + "minLength": 1 } }, "required": ["role", "rhost"], @@ -17747,8 +29914,7 @@ "properties": { "user_id": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" }, "user_role": { "type": "object", @@ -17769,9 +29935,7 @@ "type": "object", "properties": { "cidr": { - "type": "string", - "format": "cidrv4", - "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" + "type": "string" } }, "required": ["cidr"] @@ -17783,9 +29947,7 @@ "type": "object", "properties": { "cidr": { - "type": "string", - "format": "cidrv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" + "type": "string" } }, "required": ["cidr"] @@ -17808,14 +29970,13 @@ "items": { "type": "array", "items": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { "user_id": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" }, "primary_email": { "type": "string", @@ -17848,9 +30009,7 @@ "type": "object", "properties": { "cidr": { - "type": "string", - "format": "cidrv4", - "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" + "type": "string" } }, "required": ["cidr"] @@ -17862,9 +30021,7 @@ "type": "object", "properties": { "cidr": { - "type": "string", - "format": "cidrv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" + "type": "string" } }, "required": ["cidr"] @@ -17893,8 +30050,7 @@ }, "invite_id": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" }, "expires_at": { "type": "string" @@ -17920,9 +30076,7 @@ "type": "object", "properties": { "cidr": { - "type": "string", - "format": "cidrv4", - "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" + "type": "string" } }, "required": ["cidr"] @@ -17934,9 +30088,7 @@ "type": "object", "properties": { "cidr": { - "type": "string", - "format": "cidrv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" + "type": "string" } }, "required": ["cidr"] @@ -17965,9 +30117,8 @@ "properties": { "user_id": { "type": "string", - "minLength": 1, "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "minLength": 1 }, "roles": { "type": "array", @@ -17990,9 +30141,7 @@ "type": "object", "properties": { "cidr": { - "type": "string", - "format": "cidrv4", - "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" + "type": "string" } }, "required": ["cidr"] @@ -18004,9 +30153,7 @@ "type": "object", "properties": { "cidr": { - "type": "string", - "format": "cidrv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" + "type": "string" } }, "required": ["cidr"] @@ -18046,9 +30193,8 @@ "properties": { "email": { "type": "string", - "minLength": 1, "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + "minLength": 1 }, "roles": { "type": "array", @@ -18071,9 +30217,7 @@ "type": "object", "properties": { "cidr": { - "type": "string", - "format": "cidrv4", - "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" + "type": "string" } }, "required": ["cidr"] @@ -18085,9 +30229,7 @@ "type": "object", "properties": { "cidr": { - "type": "string", - "format": "cidrv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" + "type": "string" } }, "required": ["cidr"] @@ -18127,13 +30269,11 @@ "properties": { "email": { "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + "format": "email" }, "invite_id": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" }, "user_roles": { "type": "array", @@ -18156,9 +30296,7 @@ "type": "object", "properties": { "cidr": { - "type": "string", - "format": "cidrv4", - "pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$" + "type": "string" } }, "required": ["cidr"] @@ -18170,9 +30308,7 @@ "type": "object", "properties": { "cidr": { - "type": "string", - "format": "cidrv6", - "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$" + "type": "string" } }, "required": ["cidr"] @@ -18195,9 +30331,8 @@ "properties": { "email": { "type": "string", - "minLength": 1, "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + "minLength": 1 }, "token": { "type": "string", @@ -18227,20 +30362,14 @@ "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, "version": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "created_at": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "format": "int64" }, "updated_at": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "format": "int64" }, "verify_jwt": { @@ -18306,15 +30435,11 @@ "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, "version": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "created_at": { "type": "integer", - "format": "int64", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -18368,20 +30493,14 @@ "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, "version": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "created_at": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "format": "int64" }, "updated_at": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "format": "int64" }, "verify_jwt": { @@ -18441,7 +30560,7 @@ "required": ["entrypoint_path"] } }, - "required": ["file", "metadata"], + "required": ["metadata"], "example": { "file": ["./supabase/functions/hello-world/index.ts"], "metadata": { @@ -18468,21 +30587,15 @@ "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, "version": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "created_at": { "type": "integer", - "format": "int64", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "format": "int64" }, "updated_at": { "type": "integer", - "format": "int64", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "format": "int64" }, "verify_jwt": { "type": "boolean" @@ -18519,20 +30632,14 @@ "enum": ["ACTIVE", "REMOVED", "THROTTLED"] }, "version": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "created_at": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "format": "int64" }, "updated_at": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "format": "int64" }, "verify_jwt": { @@ -18604,27 +30711,24 @@ "type": "object", "properties": { "attributes": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { "iops": { "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 + "minimum": 0, + "exclusiveMinimum": true }, "size_gb": { "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 + "minimum": 0, + "exclusiveMinimum": true }, "throughput_mibps": { "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 + "minimum": 0, + "exclusiveMinimum": true }, "type": { "type": "string", @@ -18638,15 +30742,13 @@ "properties": { "iops": { "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 + "minimum": 0, + "exclusiveMinimum": true }, "size_gb": { "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 + "minimum": 0, + "exclusiveMinimum": true }, "type": { "type": "string", @@ -18667,27 +30769,27 @@ "type": "object", "properties": { "attributes": { + "discriminator": { + "propertyName": "type" + }, "oneOf": [ { "type": "object", "properties": { "iops": { "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 + "minimum": 0, + "exclusiveMinimum": true }, "size_gb": { "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 + "minimum": 0, + "exclusiveMinimum": true }, "throughput_mibps": { "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 + "minimum": 0, + "exclusiveMinimum": true }, "type": { "type": "string", @@ -18701,15 +30803,13 @@ "properties": { "iops": { "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 + "minimum": 0, + "exclusiveMinimum": true }, "size_gb": { "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 + "minimum": 0, + "exclusiveMinimum": true }, "type": { "type": "string", @@ -18760,24 +30860,24 @@ "properties": { "growth_percent": { "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991, - "description": "Growth percentage for disk autoscaling", - "nullable": true + "minimum": 0, + "exclusiveMinimum": true, + "nullable": true, + "description": "Growth percentage for disk autoscaling" }, "min_increment_gb": { "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991, - "description": "Minimum increment size for disk autoscaling in GB", - "nullable": true + "minimum": 0, + "exclusiveMinimum": true, + "nullable": true, + "description": "Minimum increment size for disk autoscaling in GB" }, "max_size_gb": { "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991, - "description": "Maximum limit the disk size will grow to in GB", - "nullable": true + "minimum": 0, + "exclusiveMinimum": true, + "nullable": true, + "description": "Maximum limit the disk size will grow to in GB" } }, "required": ["growth_percent", "min_increment_gb", "max_size_gb"] @@ -18787,8 +30887,6 @@ "properties": { "fileSizeLimit": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "format": "int64" }, "features": { @@ -18829,18 +30927,15 @@ }, "maxNamespaces": { "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 + "minimum": 0 }, "maxTables": { "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 + "minimum": 0 }, "maxCatalogs": { "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 + "minimum": 0 } }, "required": ["enabled", "maxNamespaces", "maxTables", "maxCatalogs"] @@ -18853,13 +30948,11 @@ }, "maxBuckets": { "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 + "minimum": 0 }, "maxIndexes": { "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 + "minimum": 0 } }, "required": ["enabled", "maxBuckets", "maxIndexes"] @@ -18916,9 +31009,9 @@ "properties": { "fileSizeLimit": { "type": "integer", - "format": "int64", "minimum": 0, - "maximum": 536870912000 + "maximum": 536870912000, + "format": "int64" }, "features": { "type": "object", @@ -18958,18 +31051,15 @@ }, "maxNamespaces": { "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 + "minimum": 0 }, "maxTables": { "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 + "minimum": 0 }, "maxCatalogs": { "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 + "minimum": 0 } }, "required": ["enabled", "maxNamespaces", "maxTables", "maxCatalogs"] @@ -18982,13 +31072,11 @@ }, "maxBuckets": { "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 + "minimum": 0 }, "maxIndexes": { "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 + "minimum": 0 } }, "required": ["enabled", "maxBuckets", "maxIndexes"] @@ -19006,6 +31094,7 @@ "required": ["upstreamTarget"] } }, + "additionalProperties": false, "example": { "fileSizeLimit": 10485760, "features": { @@ -19013,24 +31102,19 @@ "enabled": true } } - }, - "additionalProperties": false + } }, "V1PgbouncerConfigResponse": { "type": "object", "properties": { "default_pool_size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "ignore_startup_parameters": { "type": "string" }, "max_client_conn": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "pool_mode": { "type": "string", @@ -19040,24 +31124,16 @@ "type": "string" }, "server_idle_timeout": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "server_lifetime": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "query_wait_timeout": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "reserve_pool_size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" } } }, @@ -19081,9 +31157,7 @@ "type": "string" }, "db_port": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "db_name": { "type": "string" @@ -19097,14 +31171,10 @@ }, "default_pool_size": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "max_client_conn": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "pool_mode": { @@ -19137,9 +31207,9 @@ "nullable": true }, "pool_mode": { - "description": "Dedicated pooler mode for the project", "type": "string", - "enum": ["transaction", "session"] + "enum": ["transaction", "session"], + "description": "Dedicated pooler mode for the project" } }, "example": { @@ -19152,8 +31222,6 @@ "properties": { "default_pool_size": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, "nullable": true }, "pool_mode": { @@ -19224,11 +31292,6 @@ "minimum": 10, "maximum": 2147483640 }, - "max_logical_replication_workers": { - "type": "integer", - "minimum": 0, - "maximum": 262143 - }, "max_parallel_maintenance_workers": { "type": "integer", "minimum": 0, @@ -19245,9 +31308,7 @@ "maximum": 1024 }, "max_replication_slots": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "max_slot_wal_keep_size": { "type": "string" @@ -19258,18 +31319,11 @@ "max_standby_streaming_delay": { "type": "string" }, - "max_sync_workers_per_subscription": { - "type": "integer", - "minimum": 0, - "maximum": 262143 - }, "max_wal_size": { "type": "string" }, "max_wal_senders": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "max_worker_processes": { "type": "integer", @@ -19374,11 +31428,6 @@ "minimum": 10, "maximum": 2147483640 }, - "max_logical_replication_workers": { - "type": "integer", - "minimum": 0, - "maximum": 262143 - }, "max_parallel_maintenance_workers": { "type": "integer", "minimum": 0, @@ -19395,9 +31444,7 @@ "maximum": 1024 }, "max_replication_slots": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "max_slot_wal_keep_size": { "type": "string" @@ -19408,18 +31455,11 @@ "max_standby_streaming_delay": { "type": "string" }, - "max_sync_workers_per_subscription": { - "type": "integer", - "minimum": 0, - "maximum": 262143 - }, "max_wal_size": { "type": "string" }, "max_wal_senders": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "max_worker_processes": { "type": "integer", @@ -19464,82 +31504,82 @@ "type": "boolean" } }, + "additionalProperties": false, "example": { "max_connections": 120, "shared_buffers": "256MB", "work_mem": "4MB", "statement_timeout": "60000ms" - }, - "additionalProperties": false + } }, "RealtimeConfigResponse": { "type": "object", "properties": { "private_only": { "type": "boolean", - "description": "Whether to only allow private channels", - "nullable": true + "nullable": true, + "description": "Whether to only allow private channels" }, "connection_pool": { "type": "integer", "minimum": 1, "maximum": 100, - "description": "Sets connection pool size for Realtime Authorization", - "nullable": true + "nullable": true, + "description": "Sets connection pool size for Realtime Authorization" }, "max_concurrent_users": { "type": "integer", "minimum": 1, "maximum": 50000, - "description": "Sets maximum number of concurrent users rate limit", - "nullable": true + "nullable": true, + "description": "Sets maximum number of concurrent users rate limit" }, "max_events_per_second": { "type": "integer", "minimum": 1, "maximum": 50000, - "description": "Sets maximum number of events per second rate per channel limit", - "nullable": true + "nullable": true, + "description": "Sets maximum number of events per second rate per channel limit" }, "max_bytes_per_second": { "type": "integer", "minimum": 1, "maximum": 10000000, - "description": "Sets maximum number of bytes per second rate per channel limit", - "nullable": true + "nullable": true, + "description": "Sets maximum number of bytes per second rate per channel limit" }, "max_channels_per_client": { "type": "integer", "minimum": 1, "maximum": 10000, - "description": "Sets maximum number of channels per client rate limit", - "nullable": true + "nullable": true, + "description": "Sets maximum number of channels per client rate limit" }, "max_joins_per_second": { "type": "integer", "minimum": 1, "maximum": 5000, - "description": "Sets maximum number of joins per second rate limit", - "nullable": true + "nullable": true, + "description": "Sets maximum number of joins per second rate limit" }, "max_presence_events_per_second": { "type": "integer", "minimum": 1, "maximum": 5000, - "description": "Sets maximum number of presence events per second rate limit", - "nullable": true + "nullable": true, + "description": "Sets maximum number of presence events per second rate limit" }, "max_payload_size_in_kb": { "type": "integer", "minimum": 1, "maximum": 10000, - "description": "Sets maximum number of payload size in KB rate limit", - "nullable": true + "nullable": true, + "description": "Sets maximum number of payload size in KB rate limit" }, "suspend": { "type": "boolean", - "description": "Disables the Realtime service for this project when true. Set to false to re-enable it.", - "nullable": true + "nullable": true, + "description": "Disables the Realtime service for this project when true. Set to false to re-enable it." }, "presence_enabled": { "type": "boolean", @@ -19624,12 +31664,12 @@ "description": "Whether to enable presence" } }, + "additionalProperties": false, "example": { "private_only": false, "max_concurrent_users": 1000, "max_channels_per_client": 100 - }, - "additionalProperties": false + } }, "CreateProviderBody": { "type": "object", @@ -19669,7 +31709,7 @@ } }, "default": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": {} @@ -19733,6 +31773,9 @@ "saml": { "type": "object", "properties": { + "id": { + "type": "string" + }, "entity_id": { "type": "string" }, @@ -19760,7 +31803,7 @@ } }, "default": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": {} @@ -19795,13 +31838,16 @@ ] } }, - "required": ["entity_id"] + "required": ["id", "entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { + "id": { + "type": "string" + }, "domain": { "type": "string" }, @@ -19811,7 +31857,8 @@ "updated_at": { "type": "string" } - } + }, + "required": ["id"] } }, "created_at": { @@ -19837,6 +31884,9 @@ "saml": { "type": "object", "properties": { + "id": { + "type": "string" + }, "entity_id": { "type": "string" }, @@ -19864,7 +31914,7 @@ } }, "default": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": {} @@ -19899,13 +31949,16 @@ ] } }, - "required": ["entity_id"] + "required": ["id", "entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { + "id": { + "type": "string" + }, "domain": { "type": "string" }, @@ -19915,7 +31968,8 @@ "updated_at": { "type": "string" } - } + }, + "required": ["id"] } }, "created_at": { @@ -19940,6 +31994,9 @@ "saml": { "type": "object", "properties": { + "id": { + "type": "string" + }, "entity_id": { "type": "string" }, @@ -19967,7 +32024,7 @@ } }, "default": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": {} @@ -20002,13 +32059,16 @@ ] } }, - "required": ["entity_id"] + "required": ["id", "entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { + "id": { + "type": "string" + }, "domain": { "type": "string" }, @@ -20018,7 +32078,8 @@ "updated_at": { "type": "string" } - } + }, + "required": ["id"] } }, "created_at": { @@ -20063,7 +32124,7 @@ } }, "default": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": {} @@ -20112,6 +32173,9 @@ "saml": { "type": "object", "properties": { + "id": { + "type": "string" + }, "entity_id": { "type": "string" }, @@ -20139,7 +32203,7 @@ } }, "default": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": {} @@ -20174,13 +32238,16 @@ ] } }, - "required": ["entity_id"] + "required": ["id", "entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { + "id": { + "type": "string" + }, "domain": { "type": "string" }, @@ -20190,7 +32257,8 @@ "updated_at": { "type": "string" } - } + }, + "required": ["id"] } }, "created_at": { @@ -20211,6 +32279,9 @@ "saml": { "type": "object", "properties": { + "id": { + "type": "string" + }, "entity_id": { "type": "string" }, @@ -20238,7 +32309,7 @@ } }, "default": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": {} @@ -20273,13 +32344,16 @@ ] } }, - "required": ["entity_id"] + "required": ["id", "entity_id"] }, "domains": { "type": "array", "items": { "type": "object", "properties": { + "id": { + "type": "string" + }, "domain": { "type": "string" }, @@ -20289,7 +32363,8 @@ "updated_at": { "type": "string" } - } + }, + "required": ["id"] } }, "created_at": { @@ -20319,9 +32394,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "is_physical_backup": { "type": "boolean" @@ -20341,14 +32414,10 @@ "type": "object", "properties": { "earliest_physical_backup_date_unix": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" }, "latest_physical_backup_date_unix": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" } } } @@ -20361,7 +32430,6 @@ "recovery_time_target_unix": { "type": "integer", "minimum": 0, - "maximum": 9007199254740991, "format": "int64" } }, @@ -20396,7 +32464,6 @@ "completed_on": { "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "nullable": true } }, @@ -20406,9 +32473,7 @@ "type": "object", "properties": { "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "integer" } }, "required": ["id"], @@ -20421,14 +32486,12 @@ "properties": { "schedule_for": { "type": "string", - "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?$", "description": "Time of day to schedule daily backups, in UTC. Format: HH:MM:SS.", "example": "04:00:00" }, "updated_at": { "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", "description": "Timestamp of when the backup schedule was last updated.", "example": "2026-05-04T14:40:44+00:00" } @@ -20440,7 +32503,6 @@ "properties": { "schedule_for": { "type": "string", - "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?$", "description": "Time of day to schedule daily backups, in UTC. Format: HH:MM:SS.", "example": "04:00:00" } @@ -20557,7 +32619,7 @@ "enum": ["boolean", "numeric", "set"] }, "config": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -20650,6 +32712,7 @@ "opt_in_tags": { "type": "array", "items": { + "type": "string", "enum": [ "AI_SQL_GENERATOR_OPT_IN", "AI_DATA_GENERATOR_OPT_IN", @@ -20754,7 +32817,7 @@ }, "target_subscription_plan": { "type": "string", - "enum": ["free", "pro", "team", "enterprise", "platform", null], + "enum": ["free", "pro", "team", "enterprise", "platform"], "nullable": true } }, @@ -20776,8 +32839,7 @@ }, "created_by": { "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + "format": "uuid" } }, "required": ["project", "preview", "expires_at", "created_at", "created_by"] diff --git a/apps/docs/spec/transforms/api_v2_openapi_deparsed.json b/apps/docs/spec/transforms/api_v2_openapi_deparsed.json index 5e43a87b163d9..7b21a0596db02 100644 --- a/apps/docs/spec/transforms/api_v2_openapi_deparsed.json +++ b/apps/docs/spec/transforms/api_v2_openapi_deparsed.json @@ -33,7 +33,222 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListLogDrainsResponse" + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["log_drain"], + "description": "Resource type." + }, + "id": { + "type": "string" + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "config": { + "oneOf": [ + { + "type": "object", + "properties": { + "url": { + "type": "string", + "nullable": true + }, + "schema": { + "type": "string" + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "hostname": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "postgres" + }, + { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "http": { + "type": "string", + "enum": ["http1", "http2"] + }, + "gzip": { + "type": "boolean" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false, + "title": "webhook" + }, + { + "type": "object", + "properties": { + "project_id": { + "type": "string" + }, + "dataset_id": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "bigquery" + }, + { + "type": "object", + "properties": { + "api_key": { + "type": "string" + }, + "region": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "datadog" + }, + { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false, + "title": "loki" + }, + { + "type": "object", + "properties": { + "dsn": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "sentry" + }, + { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "api_token": { + "type": "string" + }, + "dataset_name": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "axiom" + }, + { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "tls": { + "default": false, + "type": "boolean" + }, + "structured_data": { + "type": "string" + }, + "cipher_key": { + "type": "string" + }, + "ca_cert": { + "type": "string" + }, + "client_cert": { + "type": "string" + }, + "client_key": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "syslog" + } + ] + }, + "backend_type": { + "type": "string", + "enum": [ + "postgres", + "bigquery", + "clickhouse", + "webhook", + "datadog", + "loki", + "sentry", + "s3", + "axiom", + "last9", + "otlp", + "syslog" + ] + } + }, + "required": ["name", "config", "backend_type"] + } + }, + "required": ["type", "id", "attributes"] + } + } + }, + "required": ["data"] } } } @@ -54,6 +269,9 @@ "security": [ { "bearer": [] + }, + { + "fga_permissions": ["analytics_config_read"] } ], "summary": "List project log drains", @@ -65,7 +283,6 @@ } ], "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_config_read"]], "x-oauth-scope": "analytics_config:read" }, "post": { @@ -90,19561 +307,512 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateLogDrainRequestOpenApi" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LogDrainResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "402": { - "description": "This feature requires the Pro, Team, or Enterprise organization plan.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlanGateErrorBodyV2" - } - } - } - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to create a log drain" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "Create a log drain for a project", - "tags": ["Analytics"], - "x-allowed-plans": ["Pro", "Team", "Enterprise"], - "x-badges": [ - { - "name": "Only available on Pro, Team, Enterprise", - "position": "before" - }, - { - "name": "OAuth scope: analytics_config:write", - "position": "after" - } - ], - "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_config_write"]], - "x-oauth-scope": "analytics_config:write" - } - }, - "/v2/projects/{ref}/analytics/log-drains/{id}": { - "put": { - "operationId": "v2-update-log-drain", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - }, - { - "name": "id", - "required": true, - "in": "path", - "description": "Log drains identifier", - "schema": { - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateLogDrainRequestOpenApi" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LogDrainResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to update log drain" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "Update a project log drain", - "tags": ["Analytics"], - "x-badges": [ - { - "name": "OAuth scope: analytics_config:write", - "position": "after" - } - ], - "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_config_write"]], - "x-oauth-scope": "analytics_config:write" - }, - "delete": { - "operationId": "v2-delete-log-drain", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - }, - { - "name": "id", - "required": true, - "in": "path", - "description": "Log drains identifier", - "schema": { - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to delete a log drain" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "Delete a project log drain", - "tags": ["Analytics"], - "x-badges": [ - { - "name": "OAuth scope: analytics_config:write", - "position": "after" - } - ], - "x-endpoint-owners": ["analytics"], - "x-fga-permissions": [["analytics_config_write"]], - "x-oauth-scope": "analytics_config:write" - } - }, - "/v2/projects/{ref}/transfers/previews": { - "post": { - "operationId": "v2-preview-a-project-transfer", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2TransferProjectBody" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2PreviewProjectTransferResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "Previews transferring a project to a different organizations, shows eligibility and impact", - "tags": ["Projects"], - "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["project_admin_read"]] - } - }, - "/v2/projects/{ref}/transfers": { - "post": { - "operationId": "v2-transfer-a-project", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2TransferProjectBody" - } - } - } - }, - "responses": { - "200": { - "description": "" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "Transfers a project to a different organization", - "tags": ["Projects"], - "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_write"]] - } - }, - "/v2/projects/{ref}/private-link/associations": { - "get": { - "operationId": "v2-list-private-link-associations", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2ListPrivateLinkAssociationsResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to retrieve AWS accounts for project" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "List AWS accounts attached to the project PrivateLink share", - "tags": ["Projects"], - "x-endpoint-owners": ["platform-networking", "management-api"], - "x-fga-permissions": [["project_admin_read"]] - }, - "post": { - "description": "Adds an AWS account to the project's PrivateLink configuration and schedules the AWS resources to be created.", - "operationId": "v2-create-private-link-association", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2CreatePrivateLinkAssociationRequest" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2PrivateLinkAssociationResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "402": { - "description": "This feature requires the Team, or Enterprise organization plan.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlanGateErrorBodyV2" - } - } - } - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to add AWS account to PrivateLink share" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "Add an AWS account to the project PrivateLink share", - "tags": ["Projects"], - "x-allowed-plans": ["Team", "Enterprise"], - "x-badges": [ - { - "name": "Only available on Team, Enterprise", - "position": "before" - } - ], - "x-endpoint-owners": ["platform-networking", "management-api"], - "x-fga-permissions": [["project_admin_write"]] - } - }, - "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}": { - "delete": { - "description": "Removes an AWS account from the project's PrivateLink configuration (targeting the primary database). Cleans up the associated AWS resources.", - "operationId": "v2-delete-private-link-association", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - }, - { - "name": "aws_account_id", - "required": true, - "in": "path", - "description": "AWS account ID used in PrivateLink association", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to remove AWS account from PrivateLink share" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "Remove an AWS account from the project PrivateLink share", - "tags": ["Projects"], - "x-endpoint-owners": ["platform-networking", "management-api"], - "x-fga-permissions": [["project_admin_write"]] - } - }, - "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}/database/{database_identifier}": { - "delete": { - "description": "Removes an AWS account from the project's PrivateLink configuration for the given read replica. Cleans up the associated AWS resources.", - "operationId": "v2-delete-private-link-association-for-database", - "parameters": [ - { - "name": "ref", - "required": true, - "in": "path", - "description": "Project ref", - "schema": { - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst", - "type": "string" - } - }, - { - "name": "aws_account_id", - "required": true, - "in": "path", - "description": "AWS account ID used in PrivateLink association", - "schema": { - "type": "string" - } - }, - { - "name": "database_identifier", - "required": true, - "in": "path", - "description": "Identifier of the read replica this PrivateLink association targets", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to remove AWS account from PrivateLink share" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "Remove an AWS account from a specific database PrivateLink share", - "tags": ["Projects"], - "x-endpoint-owners": ["platform-networking", "management-api"], - "x-fga-permissions": [["project_admin_write"]] - } - }, - "/v2/organizations/{slug}/members": { - "get": { - "description": "Returns a cursor-paginated list of organization members including their roles and project-scoped permissions.", - "operationId": "v2-list-organization-members", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "description": "Organization slug", - "schema": { - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba", - "type": "string" - } - }, - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "properties": { - "size": { - "type": "integer", - "minimum": 1, - "maximum": 100 - }, - "after": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "before": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - } - }, - "type": "object" - }, - "style": "deepObject" - }, - { - "name": "filter", - "required": false, - "in": "query", - "schema": { - "properties": { - "username": { - "type": "string" - }, - "primary_email": { - "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - } - }, - "type": "object" - }, - "style": "deepObject" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2ListMembersResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "List members of an organization", - "tags": ["Organizations"], - "x-badges": [ - { - "name": "OAuth scope: organizations:read", - "position": "after" - } - ], - "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["members_read"]], - "x-oauth-scope": "organizations:read" - } - }, - "/v2/organizations/{slug}/members/{user_id}/roles": { - "patch": { - "description": "Assigns an org-wide role when projects is omitted, or creates a project-scoped assignment when projects is provided. Uses an org-level role template id from GET /v2/organizations/{slug}/roles. Stale role assignments are automatically cleaned up: if a role no longer has any projects, it is deleted; overlapping project assignments in other roles are automatically removed to avoid duplication.", - "operationId": "v2-assign-organization-member-role", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "description": "Organization slug", - "schema": { - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba", - "type": "string" - } - }, - { - "name": "user_id", - "required": true, - "in": "path", - "schema": { - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2AssignOrganizationMemberRoleRequest" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationMemberRoleResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "402": { - "description": "This feature requires the Enterprise organization plan.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlanGateErrorBodyV2" - } - } - } - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - }, - "500": { - "description": "Failed to assign organization member role" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "Assign or change an organization member role", - "tags": ["Organizations"], - "x-allowed-plans": ["Enterprise"], - "x-badges": [ - { - "name": "Only available on Enterprise", - "position": "before" - } - ], - "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_admin_write"]] - } - }, - "/v2/organizations/{slug}/roles": { - "get": { - "description": "Returns a list of org-level roles for the organization.", - "operationId": "v2-list-organization-roles", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "description": "Organization slug", - "schema": { - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba", - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2ListRolesResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "List roles of an organization", - "tags": ["Organizations"], - "x-badges": [ - { - "name": "OAuth scope: organizations:read", - "position": "after" - } - ], - "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["members_read"]], - "x-oauth-scope": "organizations:read" - } - }, - "/v2/organizations/{slug}/members/invitations": { - "post": { - "description": "Creates member invitations for an organization. Each invitation can have different role and project scope settings.", - "operationId": "v2-create-organization-invitations", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "description": "Organization slug", - "schema": { - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba", - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2CreateInvitationsRequest" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2CreateInvitationsResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "402": { - "description": "This feature requires the Enterprise organization plan.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlanGateErrorBodyV2" - } - } - } - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "Creates organization invitations", - "tags": ["Organizations Members Invitations"], - "x-allowed-plans": ["Enterprise"], - "x-badges": [ - { - "name": "OAuth scope: organizations:write", - "position": "after" - }, - { - "name": "Only available on Enterprise", - "position": "before" - } - ], - "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["members_write"]], - "x-oauth-scope": "organizations:write" - }, - "delete": { - "description": "Bulk delete member invitations for an organization by email address.", - "operationId": "v2-delete-organization-invitations", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "description": "Organization slug", - "schema": { - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba", - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2DeleteInvitationsRequest" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2DeleteInvitationsResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "402": { - "description": "This feature requires the Enterprise organization plan.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlanGateErrorBodyV2" - } - } - } - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "Deletes organization invitations by email", - "tags": ["Organizations Members Invitations"], - "x-allowed-plans": ["Enterprise"], - "x-badges": [ - { - "name": "OAuth scope: organizations:write", - "position": "after" - }, - { - "name": "Only available on Enterprise", - "position": "before" - } - ], - "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["members_write"]], - "x-oauth-scope": "organizations:write" - } - }, - "/v2/organizations/{slug}/projects": { - "get": { - "description": "Returns a cursor-paginated list of projects for the specified organization, including their databases.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the number of projects returned per page.", - "operationId": "v2-list-organization-projects", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "description": "Organization slug", - "schema": { - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba", - "type": "string" - } - }, - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "properties": { - "size": { - "type": "integer", - "minimum": 1, - "maximum": 100 - }, - "after": { - "type": "string", - "minLength": 1 - }, - "before": { - "type": "string", - "minLength": 1 - } - }, - "type": "object" - }, - "style": "deepObject" - }, - { - "name": "sort", - "required": false, - "in": "query", - "description": "Sort order by creation time: `inserted_at` (oldest first) or `-inserted_at` (newest first). Defaults to `inserted_at`.", - "schema": { - "example": "-inserted_at", - "type": "string", - "enum": ["inserted_at", "-inserted_at"] - } - }, - { - "name": "search", - "required": false, - "in": "query", - "description": "Case-insensitive substring match on the project name.", - "schema": { - "minLength": 1, - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2ListProjectsResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "List projects of an organization", - "tags": ["Organizations"], - "x-badges": [ - { - "name": "OAuth scope: projects:read", - "position": "after" - } - ], - "x-endpoint-owners": ["management-api"], - "x-fga-permissions": [["organization_projects_read"]], - "x-oauth-scope": "projects:read" - } - }, - "/v2/organizations/{slug}/integrations/github/connections": { - "get": { - "description": "Returns a cursor-paginated list of the GitHub connections of the organization's projects.\n\nUse `page[after]` and `page[before]` to navigate pages and `page[size]` to control the page size.\nPaging walks the organization projects, so a page holds at most `page[size]` connections and can hold fewer (or none) when some of its projects are not connected.\nFollow `links.next` until it is `null` rather than stopping on a short page.\n\nUse `filter[project_ref]` to narrow the list down to a single project.", - "operationId": "v2-list-organization-github-connections", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "description": "Organization slug", - "schema": { - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba", - "type": "string" - } - }, - { - "name": "page", - "required": false, - "in": "query", - "schema": { - "properties": { - "size": { - "type": "integer", - "minimum": 1, - "maximum": 100 - }, - "after": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - }, - "before": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - } - }, - "type": "object" - }, - "style": "deepObject" - }, - { - "name": "filter", - "required": false, - "in": "query", - "schema": { - "properties": { - "project_ref": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - } - }, - "type": "object" - }, - "style": "deepObject" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/V2ListGitHubConnectionsResponse" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden action" - }, - "429": { - "description": "Rate limit exceeded" - } - }, - "security": [ - { - "bearer": [] - } - ], - "summary": "List GitHub connections of an organization", - "tags": ["Organizations"], - "x-badges": [ - { - "name": "OAuth scope: projects:read", - "position": "after" - } - ], - "x-endpoint-owners": ["management-api", "dev-workflows"], - "x-fga-permissions": [["organization_projects_read"]], - "x-oauth-scope": "projects:read" - } - }, - "/v2/projects/{ref}/webhooks/endpoints": { - "get": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "query", - "name": "page[offset]", - "schema": { - "default": "0", - "type": "string", - "pattern": "^\\d+$" - }, - "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend." - }, - { - "in": "query", - "name": "page[limit]", - "schema": { - "default": "20", - "type": "string", - "pattern": "^\\d+$" - }, - "description": "Up to how many records to return." - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "Collection of endpoints", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "links": { - "type": "object", - "properties": { - "first": { - "description": "URL path to the first page if available.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "prev": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "URL path to the previous page.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0" - }, - "next": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "URL path to the next page.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20" - }, - "last": { - "description": "URL path to the last page if available.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": ["prev", "next"] - } - }, - "required": ["data", "links"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "List endpoints", - "description": "List all Webhook endpoints based on a project's ref or an organization's slug." - }, - "post": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - } - ], - "tags": ["Project webhooks"], - "responses": { - "201": { - "description": "Created endpoint", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Create endpoint", - "description": "Create new endpoint configuration to subscribe to specific webhook events.", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "default": true, - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "signing_secret": { - "type": "string", - "minLength": 8, - "maxLength": 64, - "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." - } - }, - "required": ["url", "event_types", "signing_secret"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] - } - } - } - } - }, - "delete": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "Deleted endpoints", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Delete all endpoints", - "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op." - } - }, - "/v2/projects/{ref}/webhooks/endpoints/{id}": { - "get": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "Endpoint details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "not_found.endpoint" - }, - "message": { - "type": "string", - "const": "Not Found: Endpoint not found" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Get endpoint", - "description": "Get details of a specific endpoint." - }, - "patch": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "Updated endpoint details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "not_found.endpoint" - }, - "message": { - "type": "string", - "const": "Not Found: Endpoint not found" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Update endpoint", - "description": "Update endpoint's configuration.", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "signing_secret": { - "type": "string", - "minLength": 8, - "maxLength": 64, - "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." - } - } - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] - } - } - } - } - }, - "delete": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "Deleted endpoint details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "not_found.endpoint" - }, - "message": { - "type": "string", - "const": "Not Found: Endpoint not found" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Delete endpoint", - "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op." - } - }, - "/v2/projects/{ref}/webhooks/endpoints/{id}/deliveries": { - "get": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - }, - { - "in": "query", - "name": "page[before]", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param." - }, - { - "in": "query", - "name": "page[after]", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param." - }, - { - "in": "query", - "name": "page[size]", - "schema": { - "default": "20", - "type": "string", - "pattern": "^\\d+$" - }, - "description": "Up to how many records to return." - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "List of deliveries", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "delivery", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." - }, - "event_id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of the event, which triggered the delivery (UUID v7)." - }, - "status": { - "type": "string", - "enum": ["pending", "success", "failure", "skipped"], - "description": "Status of the delivery attempt." - }, - "response_code": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "HTTP status code of the response, `0` if unavailable." - }, - "response_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "HTTP headers of the response, `{}` if unavailable." - }, - "response_body": { - "anyOf": [ - { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "string" - }, - "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." - }, - { - "type": "string", - "description": "String representation of an HTTP body of the response." - } - ] - }, - { - "type": "null" - } - ] - }, - "attempt_timestamp": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of the attempt." - } - }, - "required": [ - "id", - "event_id", - "status", - "response_code", - "response_headers", - "response_body", - "attempt_timestamp" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "links": { - "type": "object", - "properties": { - "first": { - "description": "URL path to the first page if available.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "prev": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "URL path to the previous page.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7" - }, - "next": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "URL path to the next page.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4" - }, - "last": { - "description": "URL path to the last page if available.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": ["prev", "next"] - } - }, - "required": ["data", "links"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "not_found.endpoint" - }, - "message": { - "type": "string", - "const": "Not Found: Endpoint not found" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "List deliveries", - "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed." - } - }, - "/v2/projects/{ref}/webhooks/endpoints/{id}/test": { - "post": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Project webhooks"], - "responses": { - "201": { - "description": "Event published", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "event", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an event (UUID v7)." - } - }, - "required": ["type", "id"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.endpoint.test.disabled" - }, - "message": { - "type": "string", - "const": "Bad Request: Endpoint is disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "EndpointTestDisabled" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.endpoint.test.wrong_event_type" - }, - "message": { - "type": "string", - "const": "Bad Request: Provided event type is not subscribed to by the endpoint" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "EndpointTestWrongEventType" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "EndpointTestDisabled": { - "value": { - "error": { - "code": "bad_request.endpoint.test.disabled", - "message": "Bad Request: Endpoint is disabled", - "description": "Endpoint is disabled, to send test event endpoint must first be enabled." - } - } - }, - "EndpointTestWrongEventType": { - "value": { - "error": { - "code": "bad_request.endpoint.test.wrong_event_type", - "message": "Bad Request: Provided event type is not subscribed to by the endpoint", - "description": "Only event types that the endpoint is subscribed to can be specified." - } - } - }, - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "not_found.endpoint" - }, - "message": { - "type": "string", - "const": "Not Found: Endpoint not found" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Send test event", - "description": "Publish a test event to verify the endpoint is working.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "event", - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "type": { - "description": "Webhook event type.", - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "project.v1.paused", - "project.v1.created", - "project.v1.restored", - "project.v1.transferred", - "project.v1.removed", - "project.v1.restarted", - "project.v1.status.changed", - "project.v1.backup.started", - "project.v1.branch.created", - "project.v1.branch.updated", - "project.v1.branch.removed", - "organization.v1.member.invitation.created", - "organization.v1.member.invitation.canceled", - "organization.v1.member.added", - "organization.v1.member.removed", - "organization.v1.member.role.assigned", - "organization.v1.member.role.removed", - "organization.v1.member.role.updated", - "organization.v1.billing.plan.upgraded", - "organization.v1.billing.plan.downgraded", - "project.v1.branch.deleted" - ] - } - }, - "required": ["type"] - } - }, - "required": ["type", "attributes"] - } - } - } - } - } - } - } - }, - "/v2/projects/{ref}/webhooks/deliveries/{id}": { - "get": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of a delivery (UUID v7)." - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "Delivery details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "delivery", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." - }, - "event_id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of the event, which triggered the delivery (UUID v7)." - }, - "status": { - "type": "string", - "enum": ["pending", "success", "failure", "skipped"], - "description": "Status of the delivery attempt." - }, - "response_code": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "HTTP status code of the response, `0` if unavailable." - }, - "response_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "HTTP headers of the response, `{}` if unavailable." - }, - "response_body": { - "anyOf": [ - { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "string" - }, - "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." - }, - { - "type": "string", - "description": "String representation of an HTTP body of the response." - } - ] - }, - { - "type": "null" - } - ] - }, - "attempt_timestamp": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of the attempt." - }, - "event": { - "type": "object", - "properties": { - "type": { - "description": "Webhook event type.", - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "project.v1.paused", - "project.v1.created", - "project.v1.restored", - "project.v1.transferred", - "project.v1.removed", - "project.v1.restarted", - "project.v1.status.changed", - "project.v1.backup.started", - "project.v1.branch.created", - "project.v1.branch.updated", - "project.v1.branch.removed", - "organization.v1.member.invitation.created", - "organization.v1.member.invitation.canceled", - "organization.v1.member.added", - "organization.v1.member.removed", - "organization.v1.member.role.assigned", - "organization.v1.member.role.removed", - "organization.v1.member.role.updated", - "organization.v1.billing.plan.upgraded", - "organization.v1.billing.plan.downgraded", - "project.v1.branch.deleted" - ] - }, - "payload": { - "type": "object", - "properties": { - "organization_slug": { - "type": "string", - "pattern": "^[\\w-]+$", - "description": "Organization slug", - "example": "tsrqponmlkjihgfedcba" - }, - "project_ref": { - "anyOf": [ - { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - }, - { - "type": "null" - } - ] - } - }, - "required": ["organization_slug", "project_ref"], - "additionalProperties": {}, - "description": "Final data sent to the consumer." - }, - "timestamp": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of event publication." - } - }, - "required": ["type", "payload", "timestamp"] - } - }, - "required": [ - "id", - "event_id", - "status", - "response_code", - "response_headers", - "response_body", - "attempt_timestamp", - "event" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "DeliveryNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "not_found.delivery" - }, - "message": { - "type": "string", - "const": "Not Found: Delivery not found" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.delivery", - "message": "Not Found: Delivery not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Get delivery", - "description": "Get details of a specific delivery attempt." - } - }, - "/v2/projects/{ref}/webhooks/deliveries/{id}/retry": { - "post": { - "operationId": "allV2ProjectsByRefWebhooks", - "parameters": [ - { - "in": "path", - "name": "ref", - "schema": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "example": "abcdefghijklmnopqrst" - }, - "required": true, - "description": "Project ref" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of a delivery (UUID v7)." - } - ], - "tags": ["Project webhooks"], - "responses": { - "200": { - "description": "Delivery details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "event", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an event (UUID v7)." - } - }, - "required": ["type", "id"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "DeliveryNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "not_found.delivery" - }, - "message": { - "type": "string", - "const": "Not Found: Delivery not found" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.delivery", - "message": "Not Found: Delivery not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Retry delivery", - "description": "Retry delivering the same event again.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds." - } - }, - "/v2/organizations/{slug}/webhooks/endpoints": { - "get": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "query", - "name": "page[offset]", - "schema": { - "default": "0", - "type": "string", - "pattern": "^\\d+$" - }, - "description": "Offset for offset-based pagination.\n\nOffset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend." - }, - { - "in": "query", - "name": "page[limit]", - "schema": { - "default": "20", - "type": "string", - "pattern": "^\\d+$" - }, - "description": "Up to how many records to return." - } - ], - "tags": ["Organization webhooks"], - "responses": { - "200": { - "description": "Collection of endpoints", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "links": { - "type": "object", - "properties": { - "first": { - "description": "URL path to the first page if available.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "prev": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "URL path to the previous page.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0" - }, - "next": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "URL path to the next page.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20" - }, - "last": { - "description": "URL path to the last page if available.", - "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": ["prev", "next"] - } - }, - "required": ["data", "links"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "List endpoints", - "description": "List all Webhook endpoints based on a project's ref or an organization's slug." - }, - "post": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - } - ], - "tags": ["Organization webhooks"], - "responses": { - "201": { - "description": "Created endpoint", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Create endpoint", - "description": "Create new endpoint configuration to subscribe to specific webhook events.", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "default": true, - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "signing_secret": { - "type": "string", - "minLength": 8, - "maxLength": 64, - "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." - } - }, - "required": ["url", "event_types", "signing_secret"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] - } - } - } - } - }, - "delete": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - } - ], - "tags": ["Organization webhooks"], - "responses": { - "200": { - "description": "Deleted endpoints", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Delete all endpoints", - "description": "Delete all endpoints including all events and deliveries.\n\nAny in-flight webhooks will result in a no-op." - } - }, - "/v2/organizations/{slug}/webhooks/endpoints/{id}": { - "get": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Organization webhooks"], - "responses": { - "200": { - "description": "Endpoint details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "not_found.endpoint" - }, - "message": { - "type": "string", - "const": "Not Found: Endpoint not found" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Get endpoint", - "description": "Get details of a specific endpoint." - }, - "patch": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Organization webhooks"], - "responses": { - "200": { - "description": "Updated endpoint details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "not_found.endpoint" - }, - "message": { - "type": "string", - "const": "Not Found: Endpoint not found" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Update endpoint", - "description": "Update endpoint's configuration.", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "attributes": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "signing_secret": { - "type": "string", - "minLength": 8, - "maxLength": 64, - "description": "Secret key to use when signing. All events will be signed according to the [Standard Webhooks](https://www.standardwebhooks.com/) specification." - } - } - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] - } - } - } - } - }, - "delete": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Organization webhooks"], - "responses": { - "200": { - "description": "Deleted endpoint details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "endpoint", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an endpoint (UUID v7)." - }, - "url": { - "type": "string", - "format": "uri", - "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", - "example": "https://mydomain.com/path/to/handler" - }, - "enabled": { - "type": "boolean", - "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." - }, - "description": { - "anyOf": [ - { - "type": "string", - "maxLength": 512 - }, - { - "type": "null" - } - ], - "description": "Optional description for the endpoint." - }, - "event_types": { - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "*" - ], - "description": "Webhook event type." - } - }, - "required": ["type"] - }, - "description": "List of subscribed events for which to receive the webhook event.", - "example": [ - { - "type": "v1.project.paused" - } - ] - }, - "custom_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string", - "pattern": "^[a-zA-Z0-9-]+$" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", - "example": { - "Authorization": "Bearer example_token" - } - }, - "created_by": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "ID of the user who created the endpoint." - }, - "created_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of endpoint's creation." - } - }, - "required": [ - "id", - "url", - "enabled", - "description", - "event_types", - "created_by", - "created_at" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "not_found.endpoint" - }, - "message": { - "type": "string", - "const": "Not Found: Endpoint not found" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "Delete endpoint", - "description": "Delete the endpoint including all events and deliveries\n\nAny in-flight webhooks will result in a no-op." - } - }, - "/v2/organizations/{slug}/webhooks/endpoints/{id}/deliveries": { - "get": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - }, - { - "in": "query", - "name": "page[before]", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "description": "Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param." - }, - { - "in": "query", - "name": "page[after]", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "description": "Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param." - }, - { - "in": "query", - "name": "page[size]", - "schema": { - "default": "20", - "type": "string", - "pattern": "^\\d+$" - }, - "description": "Up to how many records to return." - } - ], - "tags": ["Organization webhooks"], - "responses": { - "200": { - "description": "List of deliveries", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "delivery", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." - }, - "attributes": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." - }, - "event_id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of the event, which triggered the delivery (UUID v7)." - }, - "status": { - "type": "string", - "enum": ["pending", "success", "failure", "skipped"], - "description": "Status of the delivery attempt." - }, - "response_code": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "HTTP status code of the response, `0` if unavailable." - }, - "response_headers": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "string" - } - }, - { - "type": "null" - } - ], - "description": "HTTP headers of the response, `{}` if unavailable." - }, - "response_body": { - "anyOf": [ - { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "string" - }, - "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." - }, - { - "type": "string", - "description": "String representation of an HTTP body of the response." - } - ] - }, - { - "type": "null" - } - ] - }, - "attempt_timestamp": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of the attempt." - } - }, - "required": [ - "id", - "event_id", - "status", - "response_code", - "response_headers", - "response_body", - "attempt_timestamp" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "links": { - "type": "object", - "properties": { - "first": { - "description": "URL path to the first page if available.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "prev": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "URL path to the previous page.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7" - }, - "next": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "URL path to the next page.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4" - }, - "last": { - "description": "URL path to the last page if available.", - "example": "/v2/organizations/slug/webhooks/endpoints/{id}/deliveries?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": ["prev", "next"] - } - }, - "required": ["data", "links"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "not_found.endpoint" - }, - "message": { - "type": "string", - "const": "Not Found: Endpoint not found" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } - } - } - } - } - }, - "summary": "List deliveries", - "description": "List all deliveries for a specific endpoint in descending order (newest first).\n\nDeliveries which has expired are no longer available and will not be listed." - } - }, - "/v2/organizations/{slug}/webhooks/endpoints/{id}/test": { - "post": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of an endpoint (UUID v7)." - } - ], - "tags": ["Organization webhooks"], - "responses": { - "201": { - "description": "Event published", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "event", - "description": "Resource type." - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an event (UUID v7)." - } - }, - "required": ["type", "id"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.endpoint.test.disabled" - }, - "message": { - "type": "string", - "const": "Bad Request: Endpoint is disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "EndpointTestDisabled" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.endpoint.test.wrong_event_type" - }, - "message": { - "type": "string", - "const": "Bad Request: Provided event type is not subscribed to by the endpoint" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "EndpointTestWrongEventType" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidRef" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "EndpointTestDisabled": { - "value": { - "error": { - "code": "bad_request.endpoint.test.disabled", - "message": "Bad Request: Endpoint is disabled", - "description": "Endpoint is disabled, to send test event endpoint must first be enabled." - } - } - }, - "EndpointTestWrongEventType": { - "value": { - "error": { - "code": "bad_request.endpoint.test.wrong_event_type", - "message": "Bad Request: Provided event type is not subscribed to by the endpoint", - "description": "Only event types that the endpoint is subscribed to can be specified." - } - } - }, - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } - } - } - } - }, - "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["log_drain"], + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "name": { "type": "string" }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } - } - } - } - }, - "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { + "description": { + "type": "string" + }, + "config": { + "oneOf": [ + { "type": "object", "properties": { - "href": { - "type": "string" + "url": { + "type": "string", + "nullable": true }, - "rel": { + "schema": { "type": "string" }, - "title": { - "type": "string" + "username": { + "type": "string", + "nullable": true }, - "type": { - "type": "string" + "password": { + "type": "string", + "nullable": true }, - "describedby": { - "type": "string" + "port": { + "type": "number", + "nullable": true }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} + "hostname": { + "type": "string" } }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" + "additionalProperties": false, + "title": "postgres" }, - "additionalProperties": { + { "type": "object", "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { + "url": { "type": "string" }, - "describedby": { - "type": "string" + "http": { + "type": "string", + "enum": ["http1", "http2"] }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "EndpointNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "not_found.endpoint" - }, - "message": { - "type": "string", - "const": "Not Found: Endpoint not found" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.endpoint", - "message": "Not Found: Endpoint not found" - } - } - } - } - } - } - }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" + "gzip": { + "type": "boolean" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false, + "title": "webhook" }, - "meta": { + { "type": "object", - "propertyNames": { - "type": "string" + "properties": { + "project_id": { + "type": "string" + }, + "dataset_id": { + "type": "string" + } }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" + "additionalProperties": false, + "title": "bigquery" }, - "rel": { - "type": "string" + { + "type": "object", + "properties": { + "api_key": { + "type": "string" + }, + "region": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "datadog" }, - "title": { - "type": "string" + { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false, + "title": "loki" }, - "type": { - "type": "string" + { + "type": "object", + "properties": { + "dsn": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "sentry" }, - "describedby": { - "type": "string" + { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "api_token": { + "type": "string" + }, + "dataset_name": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "axiom" }, - "meta": { + { "type": "object", - "propertyNames": { - "type": "string" + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "tls": { + "default": false, + "type": "boolean" + }, + "structured_data": { + "type": "string" + }, + "cipher_key": { + "type": "string" + }, + "ca_cert": { + "type": "string" + }, + "client_cert": { + "type": "string" + }, + "client_key": { + "type": "string" + } }, - "additionalProperties": {} + "additionalProperties": false, + "title": "syslog" } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" + ] }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" + "backend_type": { + "type": "string", + "enum": [ + "postgres", + "bigquery", + "clickhouse", + "webhook", + "datadog", + "loki", + "sentry", + "s3", + "axiom", + "last9", + "otlp", + "syslog" + ] } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" + }, + "required": ["name", "config", "backend_type"] } - } + }, + "required": ["type", "attributes"] } - } + }, + "required": ["data"] } } - }, - "500": { - "description": "GenericInternalServerError", + } + }, + "responses": { + "201": { + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "error": { + "data": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { + "type": { "type": "string", - "const": "Internal Server Error" + "enum": ["log_drain"], + "description": "Resource type." }, - "description": { + "id": { "type": "string" }, - "links": { + "attributes": { "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "config": { + "oneOf": [ + { + "type": "object", + "properties": { + "url": { + "type": "string", + "nullable": true + }, + "schema": { + "type": "string" + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "hostname": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "postgres" + }, + { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "http": { + "type": "string", + "enum": ["http1", "http2"] + }, + "gzip": { + "type": "boolean" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false, + "title": "webhook" + }, + { + "type": "object", + "properties": { + "project_id": { + "type": "string" + }, + "dataset_id": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "bigquery" }, - "additionalProperties": {} - } + { + "type": "object", + "properties": { + "api_key": { + "type": "string" + }, + "region": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "datadog" + }, + { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false, + "title": "loki" + }, + { + "type": "object", + "properties": { + "dsn": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "sentry" + }, + { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "api_token": { + "type": "string" + }, + "dataset_name": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "axiom" + }, + { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "tls": { + "default": false, + "type": "boolean" + }, + "structured_data": { + "type": "string" + }, + "cipher_key": { + "type": "string" + }, + "ca_cert": { + "type": "string" + }, + "client_cert": { + "type": "string" + }, + "client_key": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "syslog" + } + ] }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" + "backend_type": { + "type": "string", + "enum": [ + "postgres", + "bigquery", + "clickhouse", + "webhook", + "datadog", + "loki", + "sentry", + "s3", + "axiom", + "last9", + "otlp", + "syslog" + ] + } }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } + "required": ["name", "config", "backend_type"] } }, - "required": ["code", "message"] + "required": ["type", "id", "attributes"] } }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" - } - } - } + "required": ["data"] } } } + }, + "401": { + "description": "Unauthorized" + }, + "402": { + "description": "This feature requires the Pro, Team, or Enterprise organization plan." + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to create a log drain" } }, - "summary": "Send test event", - "description": "Publish a test event to verify the endpoint is working.\n\nWhich event type to use can be specified in the request body, otherwise\nit will use any matching type the endpoint is listening for.\n\nThe event will contain `is_test: true` in it's payload.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds.", + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["analytics_config_write"] + } + ], + "summary": "Create a log drain for a project", + "tags": ["Analytics"], + "x-allowed-plans": ["Pro", "Team", "Enterprise"], + "x-badges": [ + { + "name": "Only available on Pro, Team, Enterprise", + "position": "before" + }, + { + "name": "OAuth scope: analytics_config:write", + "position": "after" + } + ], + "x-endpoint-owners": ["analytics"], + "x-oauth-scope": "analytics_config:write" + } + }, + "/v2/projects/{ref}/analytics/log-drains/{id}": { + "put": { + "operationId": "v2-update-log-drain", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + }, + { + "name": "id", + "required": true, + "in": "path", + "description": "Log drains identifier", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -19657,103 +825,216 @@ "properties": { "type": { "type": "string", - "const": "event", + "enum": ["log_drain"], "description": "Resource type." }, "attributes": { "type": "object", "properties": { - "type": { - "description": "Webhook event type.", + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "config": { + "oneOf": [ + { + "type": "object", + "properties": { + "url": { + "type": "string", + "nullable": true + }, + "schema": { + "type": "string" + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "hostname": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "postgres" + }, + { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "http": { + "type": "string", + "enum": ["http1", "http2"] + }, + "gzip": { + "type": "boolean" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false, + "title": "webhook" + }, + { + "type": "object", + "properties": { + "project_id": { + "type": "string" + }, + "dataset_id": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "bigquery" + }, + { + "type": "object", + "properties": { + "api_key": { + "type": "string" + }, + "region": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "datadog" + }, + { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false, + "title": "loki" + }, + { + "type": "object", + "properties": { + "dsn": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "sentry" + }, + { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "api_token": { + "type": "string" + }, + "dataset_name": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "axiom" + }, + { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "tls": { + "default": false, + "type": "boolean" + }, + "structured_data": { + "type": "string" + }, + "cipher_key": { + "type": "string" + }, + "ca_cert": { + "type": "string" + }, + "client_cert": { + "type": "string" + }, + "client_key": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "syslog" + } + ] + }, + "backend_type": { "type": "string", "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "project.v1.paused", - "project.v1.created", - "project.v1.restored", - "project.v1.transferred", - "project.v1.removed", - "project.v1.restarted", - "project.v1.status.changed", - "project.v1.backup.started", - "project.v1.branch.created", - "project.v1.branch.updated", - "project.v1.branch.removed", - "organization.v1.member.invitation.created", - "organization.v1.member.invitation.canceled", - "organization.v1.member.added", - "organization.v1.member.removed", - "organization.v1.member.role.assigned", - "organization.v1.member.role.removed", - "organization.v1.member.role.updated", - "organization.v1.billing.plan.upgraded", - "organization.v1.billing.plan.downgraded", - "project.v1.branch.deleted" + "postgres", + "bigquery", + "clickhouse", + "webhook", + "datadog", + "loki", + "sentry", + "s3", + "axiom", + "last9", + "otlp", + "syslog" ] } }, - "required": ["type"] + "required": ["backend_type"] } }, "required": ["type", "attributes"] } - } + }, + "required": ["data"] } } } - } - } - }, - "/v2/organizations/{slug}/webhooks/deliveries/{id}": { - "get": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of a delivery (UUID v7)." - } - ], - "tags": ["Organization webhooks"], + }, "responses": { "200": { - "description": "Delivery details", + "description": "", "content": { "application/json": { "schema": { @@ -19764,1061 +1045,715 @@ "properties": { "type": { "type": "string", - "const": "delivery", + "enum": ["log_drain"], "description": "Resource type." }, "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." + "type": "string" }, "attributes": { "type": "object", "properties": { - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of a delivery (UUID v7)." - }, - "event_id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of the event, which triggered the delivery (UUID v7)." - }, - "status": { - "type": "string", - "enum": ["pending", "success", "failure", "skipped"], - "description": "Status of the delivery attempt." + "name": { + "type": "string" }, - "response_code": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "description": "HTTP status code of the response, `0` if unavailable." + "description": { + "type": "string" }, - "response_headers": { - "anyOf": [ + "config": { + "oneOf": [ { "type": "object", - "propertyNames": { - "type": "string" + "properties": { + "url": { + "type": "string", + "nullable": true + }, + "schema": { + "type": "string" + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "hostname": { + "type": "string" + } }, - "additionalProperties": { - "type": "string" - } + "additionalProperties": false, + "title": "postgres" }, { - "type": "null" - } - ], - "description": "HTTP headers of the response, `{}` if unavailable." - }, - "response_body": { - "anyOf": [ - { - "anyOf": [ - { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "http": { + "type": "string", + "enum": ["http1", "http2"] + }, + "gzip": { + "type": "boolean" + }, + "headers": { "type": "object", - "propertyNames": { - "type": "string" - }, "additionalProperties": { "type": "string" - }, - "description": "Parsed JSON representation of an HTTP body of the response, `{}` if unavailable." + } + } + }, + "additionalProperties": false, + "title": "webhook" + }, + { + "type": "object", + "properties": { + "project_id": { + "type": "string" }, - { - "type": "string", - "description": "String representation of an HTTP body of the response." + "dataset_id": { + "type": "string" } - ] + }, + "additionalProperties": false, + "title": "bigquery" }, { - "type": "null" - } - ] - }, - "attempt_timestamp": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of the attempt." - }, - "event": { - "type": "object", - "properties": { - "type": { - "description": "Webhook event type.", - "type": "string", - "enum": [ - "v1.project.paused", - "v1.project.created", - "v1.project.restored", - "v1.project.transferred", - "v1.project.removed", - "v1.project.restarted", - "v1.project.status.changed", - "v1.project.backup.started", - "v1.project.branch.created", - "v1.project.branch.updated", - "v1.project.branch.removed", - "v1.organization.member.invitation.created", - "v1.organization.member.invitation.canceled", - "v1.organization.member.added", - "v1.organization.member.removed", - "v1.organization.member.role.assigned", - "v1.organization.member.role.removed", - "v1.organization.member.role.updated", - "v1.organization.billing.plan.upgraded", - "v1.organization.billing.plan.downgraded", - "project.v1.paused", - "project.v1.created", - "project.v1.restored", - "project.v1.transferred", - "project.v1.removed", - "project.v1.restarted", - "project.v1.status.changed", - "project.v1.backup.started", - "project.v1.branch.created", - "project.v1.branch.updated", - "project.v1.branch.removed", - "organization.v1.member.invitation.created", - "organization.v1.member.invitation.canceled", - "organization.v1.member.added", - "organization.v1.member.removed", - "organization.v1.member.role.assigned", - "organization.v1.member.role.removed", - "organization.v1.member.role.updated", - "organization.v1.billing.plan.upgraded", - "organization.v1.billing.plan.downgraded", - "project.v1.branch.deleted" - ] + "type": "object", + "properties": { + "api_key": { + "type": "string" + }, + "region": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "datadog" }, - "payload": { + { "type": "object", "properties": { - "organization_slug": { + "url": { + "type": "string" + }, + "username": { "type": "string", - "pattern": "^[\\w-]+$", - "description": "Organization slug", - "example": "tsrqponmlkjihgfedcba" + "nullable": true }, - "project_ref": { - "anyOf": [ - { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - }, - { - "type": "null" - } - ] + "password": { + "type": "string", + "nullable": true + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } } }, - "required": ["organization_slug", "project_ref"], - "additionalProperties": {}, - "description": "Final data sent to the consumer." + "additionalProperties": false, + "title": "loki" }, - "timestamp": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "Timestamp of event publication." - } - }, - "required": ["type", "payload", "timestamp"] - } - }, - "required": [ - "id", - "event_id", - "status", - "response_code", - "response_headers", - "response_body", - "attempt_timestamp", - "event" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_slug" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" + { + "type": "object", + "properties": { + "dsn": { + "type": "string" + } }, - "meta": { - "type": "object", - "propertyNames": { + "additionalProperties": false, + "title": "sentry" + }, + { + "type": "object", + "properties": { + "domain": { "type": "string" }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "bad_request.invalid_ref" - }, - "message": { - "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { + "api_token": { "type": "string" }, - "additionalProperties": {} - } + "dataset_name": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "axiom" }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } + { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "tls": { + "default": false, + "type": "boolean" + }, + "structured_data": { + "type": "string" + }, + "cipher_key": { + "type": "string" + }, + "ca_cert": { + "type": "string" + }, + "client_cert": { + "type": "string" + }, + "client_key": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "syslog" + } + ] + }, + "backend_type": { + "type": "string", + "enum": [ + "postgres", + "bigquery", + "clickhouse", + "webhook", + "datadog", + "loki", + "sentry", + "s3", + "axiom", + "last9", + "otlp", + "syslog" + ] } }, - "required": ["code", "message"], - "title": "InvalidRef" + "required": ["name", "config", "backend_type"] } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } + }, + "required": ["type", "id", "attributes"] } }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } + "required": ["data"] } } } }, "401": { - "description": "GenericUnauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to update log drain" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["analytics_config_write"] + } + ], + "summary": "Update a project log drain", + "tags": ["Analytics"], + "x-badges": [ + { + "name": "OAuth scope: analytics_config:write", + "position": "after" + } + ], + "x-endpoint-owners": ["analytics"], + "x-oauth-scope": "analytics_config:write" + }, + "delete": { + "operationId": "v2-delete-log-drain", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + }, + { + "name": "id", + "required": true, + "in": "path", + "description": "Log drains identifier", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to delete a log drain" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["analytics_config_write"] + } + ], + "summary": "Delete a project log drain", + "tags": ["Analytics"], + "x-badges": [ + { + "name": "OAuth scope: analytics_config:write", + "position": "after" + } + ], + "x-endpoint-owners": ["analytics"], + "x-oauth-scope": "analytics_config:write" + } + }, + "/v2/projects/{ref}/transfers/previews": { + "post": { + "operationId": "v2-preview-a-project-transfer", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["project_transfer_input"], + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "target_organization_slug": { "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] } }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" + "required": ["target_organization_slug"] } - } + }, + "required": ["type", "attributes"] } - } + }, + "required": ["data"] } } - }, - "403": { - "description": "Multiple error responses", + } + }, + "responses": { + "200": { + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "error": { - "oneOf": [ - { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["project_transfer_result"], + "description": "Resource type." + }, + "attributes": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" + "valid": { + "type": "boolean" }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { + "warnings": { + "type": "array", + "items": { "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { + "properties": { + "key": { "type": "string" }, - "describedby": { + "message": { "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} } }, - "required": ["href"] + "required": ["key", "message"] } }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { + "errors": { "type": "array", "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.access_disabled" - }, - "message": { - "type": "string", - "const": "Forbidden: Access disabled" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { "type": "object", "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { + "key": { "type": "string" }, - "describedby": { + "message": { "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} } }, - "required": ["href"] + "required": ["key", "message"] } }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { + "info": { "type": "array", "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "AccessDisabled" - } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } - } - }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } - } - } - } - }, - "404": { - "description": "DeliveryNotFound", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "not_found.delivery" - }, - "message": { - "type": "string", - "const": "Not Found: Delivery not found" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { "type": "object", - "propertyNames": { - "type": "string" + "properties": { + "key": { + "type": "string" + }, + "message": { + "type": "string" + } }, - "additionalProperties": {} + "required": ["key", "message"] } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" + } }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } + "required": ["valid", "warnings", "errors", "info"] } }, - "required": ["code", "message"] + "required": ["type", "attributes"] } }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.delivery", - "message": "Not Found: Delivery not found" - } - } - } + "required": ["data"] } } } }, - "408": { - "description": "GenericRequestTimeout", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "request_timeout" - }, - "message": { - "type": "string", - "const": "Request Timeout" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["project_admin_read"] + } + ], + "summary": "Previews transferring a project to a different organizations, shows eligibility and impact", + "tags": ["Projects"], + "x-endpoint-owners": ["management-api"] + } + }, + "/v2/projects/{ref}/transfers": { + "post": { + "operationId": "v2-transfer-a-project", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["project_transfer_input"], + "description": "Resource type." }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" + "attributes": { + "type": "object", + "properties": { + "target_organization_slug": { + "type": "string" + } + }, + "required": ["target_organization_slug"] } - } + }, + "required": ["type", "attributes"] } - } + }, + "required": ["data"] } } + } + }, + "responses": { + "200": { + "description": "" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" }, "429": { - "description": "GenericTooManyRequests", + "description": "Rate limit exceeded" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["organization_admin_write"] + } + ], + "summary": "Transfers a project to a different organization", + "tags": ["Projects"], + "x-endpoint-owners": ["management-api"] + } + }, + "/v2/projects/{ref}/private-link/associations": { + "get": { + "operationId": "v2-list-private-link-associations", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["private_link_association"], + "description": "Resource type." + }, + "id": { "type": "string" }, - "additionalProperties": { + "attributes": { "type": "object", "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" + "aws_account_id": { + "type": "string", + "minLength": 12, + "maxLength": 12, + "pattern": "^\\d{12}$", + "description": "The AWS account ID this PrivateLink share is associated with." }, - "type": { - "type": "string" + "account_name": { + "type": "string", + "description": "Human-readable name for the AWS account." }, - "describedby": { - "type": "string" + "status": { + "type": "string", + "enum": [ + "CREATING", + "READY", + "ASSOCIATION_REQUEST_EXPIRED", + "ASSOCIATION_ACCEPTED", + "CREATION_FAILED", + "DELETING" + ], + "description": "\n - `CREATING`: The PrivateLink resources and the Association are in the process of being created. The PrivateLink Share cannot be accepted yet.\n - `READY`: The PrivateLink resources have been created and the PrivateLink Share can be accepted for the duration of 12h after sharing. See `shared_at`.\n - `ASSOCIATION_REQUEST_EXPIRED`: The PrivateLink Share has not been accepted within the 12h time limit. This association can now be deleted.\n - `ASSOCIATION_ACCEPTED`: The PrivateLink Share was successfully accepted.\n - `CREATION_FAILED`: The PrivateLink resources failed to create. This likely means something went wrong on Supabase's and and support should be contacted.\n - `DELETING`: The PrivateLink resources and the Association are in the process of being deleted. The PrivateLink Share cannot be accepted yet.\n" }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} + "shared_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending." } }, - "required": ["href"] + "required": ["aws_account_id", "status", "shared_at"] } }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" + "required": ["type", "id", "attributes"] } } - } + }, + "required": ["data"] } } } }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } + "description": "Failed to retrieve AWS accounts for project" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["project_admin_read"] + } + ], + "summary": "List AWS accounts attached to the project PrivateLink share", + "tags": ["Projects"], + "x-endpoint-owners": ["platform-networking", "management-api"] + }, + "post": { + "description": "Adds an AWS account to the project's PrivateLink configuration and schedules the AWS resources to be created.", + "operationId": "v2-create-private-link-association", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["private_link_association"], + "description": "Resource type." }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" + "attributes": { + "type": "object", + "properties": { + "aws_account_id": { + "type": "string", + "minLength": 12, + "maxLength": 12, + "pattern": "^\\d{12}$", + "description": "The AWS account ID to add to the project PrivateLink share." + }, + "account_name": { + "type": "string", + "maxLength": 128, + "description": "Optional human-readable name for the AWS account." + } + }, + "required": ["aws_account_id"] } - } + }, + "required": ["type", "attributes"] } - } + }, + "required": ["data"] } } } }, - "summary": "Get delivery", - "description": "Get details of a specific delivery attempt." - } - }, - "/v2/organizations/{slug}/webhooks/deliveries/{id}/retry": { - "post": { - "operationId": "allV2OrganizationsBySlugWebhooks", - "parameters": [ - { - "in": "path", - "name": "slug", - "schema": { - "type": "string", - "pattern": "^[\\w-]+$", - "example": "tsrqponmlkjihgfedcba" - }, - "required": true, - "description": "Organization slug" - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - }, - "required": true, - "description": "Identifier of a delivery (UUID v7)." - } - ], - "tags": ["Organization webhooks"], "responses": { - "200": { - "description": "Delivery details", + "201": { + "description": "", "content": { "application/json": { "schema": { @@ -20829,568 +1764,718 @@ "properties": { "type": { "type": "string", - "const": "event", + "enum": ["private_link_association"], "description": "Resource type." }, "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "description": "Identifier of an event (UUID v7)." - } - }, - "required": ["type", "id"] - } - }, - "required": ["data"] - } - } - } - }, - "400": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { + "type": "string" + }, + "attributes": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "code": { + "aws_account_id": { "type": "string", - "const": "bad_request.invalid_slug" + "minLength": 12, + "maxLength": 12, + "pattern": "^\\d{12}$", + "description": "The AWS account ID this PrivateLink share is associated with." }, - "message": { + "account_name": { "type": "string", - "const": "Bad Request: Invalid organization slug" - }, - "description": { - "type": "string" + "description": "Human-readable name for the AWS account." }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "InvalidSlug" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { + "status": { "type": "string", - "const": "bad_request.invalid_ref" + "enum": [ + "CREATING", + "READY", + "ASSOCIATION_REQUEST_EXPIRED", + "ASSOCIATION_ACCEPTED", + "CREATION_FAILED", + "DELETING" + ], + "description": "\n - `CREATING`: The PrivateLink resources and the Association are in the process of being created. The PrivateLink Share cannot be accepted yet.\n - `READY`: The PrivateLink resources have been created and the PrivateLink Share can be accepted for the duration of 12h after sharing. See `shared_at`.\n - `ASSOCIATION_REQUEST_EXPIRED`: The PrivateLink Share has not been accepted within the 12h time limit. This association can now be deleted.\n - `ASSOCIATION_ACCEPTED`: The PrivateLink Share was successfully accepted.\n - `CREATION_FAILED`: The PrivateLink resources failed to create. This likely means something went wrong on Supabase's and and support should be contacted.\n - `DELETING`: The PrivateLink resources and the Association are in the process of being deleted. The PrivateLink Share cannot be accepted yet.\n" }, - "message": { + "shared_at": { "type": "string", - "const": "Bad Request: Invalid project ref" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } + "format": "date-time", + "nullable": true, + "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending." } }, - "required": ["code", "message"], - "title": "InvalidRef" + "required": ["aws_account_id", "status", "shared_at"] } - ] + }, + "required": ["type", "id", "attributes"] } }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } + "required": ["data"] + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "402": { + "description": "This feature requires the Team, or Enterprise organization plan." + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to add AWS account to PrivateLink share" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["project_admin_write"] + } + ], + "summary": "Add an AWS account to the project PrivateLink share", + "tags": ["Projects"], + "x-allowed-plans": ["Team", "Enterprise"], + "x-badges": [ + { + "name": "Only available on Team, Enterprise", + "position": "before" + } + ], + "x-endpoint-owners": ["platform-networking", "management-api"] + } + }, + "/v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}": { + "delete": { + "description": "Removes an AWS account from the project's PrivateLink configuration. Cleans up the associated AWS resources.", + "operationId": "v2-delete-private-link-association", + "parameters": [ + { + "name": "ref", + "required": true, + "in": "path", + "description": "Project ref", + "schema": { + "minLength": 20, + "maxLength": 20, + "pattern": "^[a-z]+$", + "example": "abcdefghijklmnopqrst", + "type": "string" + } + }, + { + "name": "aws_account_id", + "required": false, + "in": "path", + "description": "AWS account ID used in PrivateLink association", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to remove AWS account from PrivateLink share" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["project_admin_write"] + } + ], + "summary": "Remove an AWS account from the project PrivateLink share", + "tags": ["Projects"], + "x-endpoint-owners": ["platform-networking", "management-api"] + } + }, + "/v2/organizations/{slug}/members": { + "get": { + "description": "Returns a cursor-paginated list of organization members including their roles and project-scoped permissions.", + "operationId": "v2-list-organization-members", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba", + "type": "string" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "properties": { + "size": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "required": false }, - "examples": { - "InvalidSlug": { - "value": { - "error": { - "code": "bad_request.invalid_slug", - "message": "Bad Request: Invalid organization slug" - } - } - }, - "InvalidRef": { - "value": { - "error": { - "code": "bad_request.invalid_ref", - "message": "Bad Request: Invalid project ref" - } - } - } + "after": { + "type": "string", + "format": "uuid", + "required": false + }, + "before": { + "type": "string", + "format": "uuid", + "required": false } - } + }, + "type": "object" } }, - "401": { - "description": "GenericUnauthorized", + { + "name": "filter", + "required": false, + "in": "query", + "schema": { + "properties": { + "username": { + "type": "string", + "required": false + }, + "primary_email": { + "type": "string", + "format": "email", + "required": false + } + }, + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "unauthorized" - }, - "message": { - "type": "string", - "const": "Unauthorized" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["organization_member"], + "description": "Resource type." }, - "additionalProperties": { + "id": { + "type": "string", + "format": "uuid" + }, + "attributes": { "type": "object", "properties": { - "href": { - "type": "string" + "username": { + "type": "string", + "nullable": true, + "description": "Member's username" }, - "rel": { - "type": "string" + "primary_email": { + "type": "string", + "nullable": true, + "description": "Member's primary email" }, - "title": { - "type": "string" + "mfa_enabled": { + "type": "boolean", + "description": "Whether Multi-Factor Authentication is enabled for this member" }, - "type": { - "type": "string" + "is_sso_user": { + "type": "boolean", + "description": "Whether this member is a Single Sign-On user" }, - "describedby": { - "type": "string" + "avatar_url": { + "type": "string", + "nullable": true, + "description": "Member's avatar URL" }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Role name. For project-scoped roles this is the base role name.", + "example": "developer" + }, + "scope": { + "type": "string", + "enum": ["organization", "project"], + "description": "Whether this role applies org-wide or is scoped to specific projects for the user." + }, + "projects": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["ref", "name"] + }, + "description": "Project refs this role is scoped to. Empty array for org-level roles." + } + }, + "required": ["name", "scope", "projects"] }, - "additionalProperties": {} + "description": "Roles assigned to this member. Includes both org-level and project-scoped roles." } }, - "required": ["href"] + "required": [ + "username", + "primary_email", + "mfa_enabled", + "is_sso_user", + "avatar_url", + "roles" + ] } }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} + "required": ["type", "id", "attributes"] + } + }, + "links": { + "type": "object", + "properties": { + "first": { + "type": "string", + "nullable": true, + "description": "URL path to the first page if available.", + "example": "/v2/organizations/my-org/members?page[size]=10" }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } + "prev": { + "type": "string", + "nullable": true, + "description": "URL path to the previous page.", + "example": "/v2/organizations/my-org/members?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7" + }, + "next": { + "type": "string", + "nullable": true, + "description": "URL path to the next page.", + "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4" + }, + "last": { + "type": "string", + "nullable": true, + "description": "URL path to the last page if available.", + "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295" } }, - "required": ["code", "message"] + "required": ["prev", "next"] } }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "unauthorized", - "message": "Unauthorized" - } - } - } + "required": ["data", "links"] } } } }, + "401": { + "description": "Unauthorized" + }, "403": { - "description": "Multiple error responses", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "forbidden.permission_denied" - }, - "message": { - "type": "string", - "const": "Forbidden: Permission denied" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["members_read"] + } + ], + "summary": "List members of an organization", + "tags": ["Organizations"], + "x-badges": [ + { + "name": "OAuth scope: organizations:read", + "position": "after" + } + ], + "x-endpoint-owners": ["management-api"], + "x-oauth-scope": "organizations:read" + } + }, + "/v2/organizations/{slug}/members/{user_id}/roles": { + "patch": { + "description": "Assigns an org-wide role when projects is omitted, or creates a project-scoped assignment when projects is provided. Uses an org-level role template id from GET /v2/organizations/{slug}/roles. Stale role assignments are automatically cleaned up: if a role no longer has any projects, it is deleted; overlapping project assignments in other roles are automatically removed to avoid duplication.", + "operationId": "v2-assign-organization-member-role", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba", + "type": "string" + } + }, + { + "name": "user_id", + "required": true, + "in": "path", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["organization_member_role"], + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": ["owner", "administrator", "developer", "read-only"], + "description": "Role name to assign. Must be one of: owner, administrator, developer, read-only. Must be on a Team or Enterprise plan to use the read-only role.", + "example": "developer" + }, + "projects": { + "type": "array", + "items": { "type": "object", - "propertyNames": { - "type": "string" + "properties": { + "ref": { + "type": "string", + "description": "Project ref", + "example": "abcjuqabhgwjjutfvtpa" + } }, - "additionalProperties": {} + "required": ["ref"] }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"], - "title": "PermissionDenied" + "minItems": 1, + "description": "The projects to assign a project-scoped role for. If omitted, assigns an org-wide role." + } }, - { + "required": ["role"] + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["organization_member_role"], + "description": "Resource type." + }, + "attributes": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "code": { + "name": { "type": "string", - "const": "forbidden.access_disabled" + "description": "Role name. For project-scoped assignments this is the base role name.", + "example": "developer" }, - "message": { + "scope": { "type": "string", - "const": "Forbidden: Access disabled" + "enum": ["organization", "project"], + "description": "Whether this role applies org-wide or is scoped to specific projects for the user." }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { + "projects": { + "type": "array", + "items": { "type": "object", "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { + "ref": { "type": "string" }, - "describedby": { + "name": { "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} } }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" + "required": ["ref", "name"] }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } + "description": "Project refs this role is scoped to. Empty array for org-level roles." } }, - "required": ["code", "message"], - "title": "AccessDisabled" + "required": ["name", "scope", "projects"] } - ] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "PermissionDenied": { - "value": { - "error": { - "code": "forbidden.permission_denied", - "message": "Forbidden: Permission denied" - } + }, + "required": ["type", "attributes"] } }, - "AccessDisabled": { - "value": { - "error": { - "code": "forbidden.access_disabled", - "message": "Forbidden: Access disabled" - } - } - } + "required": ["data"] } } } }, - "404": { - "description": "DeliveryNotFound", + "401": { + "description": "Unauthorized" + }, + "402": { + "description": "This feature requires the Enterprise organization plan." + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + }, + "500": { + "description": "Failed to assign organization member role" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["organization_admin_write"] + } + ], + "summary": "Assign or change an organization member role", + "tags": ["Organizations"], + "x-allowed-plans": ["Enterprise"], + "x-badges": [ + { + "name": "Only available on Enterprise", + "position": "before" + } + ], + "x-endpoint-owners": ["management-api"] + } + }, + "/v2/organizations/{slug}/roles": { + "get": { + "description": "Returns a list of org-level roles for the organization.", + "operationId": "v2-list-organization-roles", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "not_found.delivery" - }, - "message": { - "type": "string", - "const": "Not Found: Delivery not found" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["organization_role"], + "description": "Resource type." }, - "additionalProperties": { + "id": {}, + "attributes": { "type": "object", "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { + "name": { + "type": "string", + "description": "Role name.", + "example": "developer" + } + }, + "required": ["name"] + } + }, + "required": ["type", "attributes"] + } + } + }, + "required": ["data"] + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["members_read"] + } + ], + "summary": "List roles of an organization", + "tags": ["Organizations"], + "x-badges": [ + { + "name": "OAuth scope: organizations:read", + "position": "after" + } + ], + "x-endpoint-owners": ["management-api"], + "x-oauth-scope": "organizations:read" + } + }, + "/v2/organizations/{slug}/members/invitations": { + "post": { + "description": "Creates member invitations for an organization. Each invitation can have different role and project scope settings.", + "operationId": "v2-create-organization-invitations", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "description": "Organization slug", + "schema": { + "pattern": "^[\\w-]+$", + "example": "tsrqponmlkjihgfedcba", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["organization_invitation"], + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "role": { + "type": "string", + "enum": ["owner", "administrator", "developer", "read-only"], + "description": "Role name to assign. Must be on a Team or Enterprise plan to use the read-only role.", + "example": "developer" + }, + "projects": { + "type": "array", + "items": { "type": "object", - "propertyNames": { - "type": "string" + "properties": { + "ref": { + "type": "string", + "description": "Project ref", + "example": "abcjuqabhgwjjutfvtpa" + } }, - "additionalProperties": {} - } + "required": ["ref"] + }, + "minItems": 1, + "description": "The projects to limit a user to. If omitted, user will have org-wide access with the provided role." }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" + "require_sso": { + "type": "boolean" + } }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } + "required": ["email", "role"] } }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } + "required": ["type", "attributes"] + }, + "minItems": 1, + "maxItems": 50 } }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "not_found.delivery", - "message": "Not Found: Delivery not found" - } - } - } - } + "required": ["data"] } } - }, - "408": { - "description": "GenericRequestTimeout", + } + }, + "responses": { + "201": { + "description": "", "content": { "application/json": { "schema": { @@ -21403,21 +2488,16 @@ "type": "string" }, "code": { - "type": "string", - "const": "request_timeout" + "type": "string" }, "message": { - "type": "string", - "const": "Request Timeout" + "type": "string" }, "description": { "type": "string" }, "links": { "type": "object", - "propertyNames": { - "type": "string" - }, "additionalProperties": { "type": "object", "properties": { @@ -21438,9 +2518,6 @@ }, "meta": { "type": "object", - "propertyNames": { - "type": "string" - }, "additionalProperties": {} } }, @@ -21449,234 +2526,137 @@ }, "meta": { "type": "object", - "propertyNames": { - "type": "string" - }, "additionalProperties": {} }, "issues": { "type": "array", "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "request_timeout", - "message": "Request Timeout" - } - } - } - } - } - } - }, - "429": { - "description": "GenericTooManyRequests", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "too_many_requests" - }, - "message": { - "type": "string", - "const": "Too Many Requests" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { "type": "object", "properties": { - "href": { + "id": { "type": "string" }, - "rel": { + "code": { "type": "string" }, - "title": { + "message": { "type": "string" }, - "type": { + "description": { "type": "string" }, - "describedby": { - "type": "string" + "links": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "additionalProperties": {} + } + }, + "required": ["href"] + } }, "meta": { "type": "object", - "propertyNames": { - "type": "string" + "properties": { + "email": { + "type": "string", + "format": "email" + } }, - "additionalProperties": {} + "required": ["email"] } }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" + "required": ["code", "message", "meta"] } } }, "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "too_many_requests", - "message": "Too Many Requests" - } - } - } - } - } - } - }, - "500": { - "description": "GenericInternalServerError", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string", - "const": "internal_server_error" - }, - "message": { - "type": "string", - "const": "Internal Server Error" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["organization_invitation"], + "description": "Resource type." }, - "additionalProperties": { + "id": {}, + "attributes": { "type": "object", "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} + "email": { + "type": "string", + "format": "email" } }, - "required": ["href"] + "required": ["email"] } }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "required": ["code", "message"] - } - }, - "required": ["error"], - "$defs": { - "APIErrorObject": { - "$ref": "#/components/schemas/APIErrorObject" - } - } - }, - "examples": { - "Default example": { - "value": { - "error": { - "code": "internal_server_error", - "message": "Internal Server Error" + "required": ["type", "attributes"] } } - } + }, + "required": ["data"] } } } + }, + "401": { + "description": "Unauthorized" + }, + "402": { + "description": "This feature requires the Enterprise organization plan." + }, + "403": { + "description": "Forbidden action" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "security": [ + { + "bearer": [] + }, + { + "fga_permissions": ["members_write"] } - }, - "summary": "Retry delivery", - "description": "Retry delivering the same event again.\n\nThis endpoint is heavy rate-limited to allow for 10 request within 60 seconds." + ], + "summary": "Creates organization invitations", + "tags": ["Organizations Members Invitations"], + "x-allowed-plans": ["Enterprise"], + "x-badges": [ + { + "name": "OAuth scope: organizations:write", + "position": "after" + }, + { + "name": "Only available on Enterprise", + "position": "before" + } + ], + "x-endpoint-owners": ["management-api"], + "x-oauth-scope": "organizations:write" } } }, @@ -21699,8 +2679,8 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["log_drain"] + "enum": ["log_drain"], + "description": "Resource type." }, "id": { "type": "string" @@ -21715,7 +2695,7 @@ "type": "string" }, "config": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -21915,8 +2895,8 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["log_drain"] + "enum": ["log_drain"], + "description": "Resource type." }, "attributes": { "type": "object", @@ -21928,7 +2908,7 @@ "type": "string" }, "config": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -22127,8 +3107,8 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["log_drain"] + "enum": ["log_drain"], + "description": "Resource type." }, "id": { "type": "string" @@ -22143,7 +3123,7 @@ "type": "string" }, "config": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -22334,27 +3314,6 @@ }, "required": ["data"] }, - "PlanGateErrorBodyV2": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "HTTP status-derived error code, e.g. \"payment_required\"" - }, - "message": { - "type": "string", - "description": "Human-readable explanation of the plan gate" - } - }, - "required": ["code", "message"], - "description": "Plan-gate error object" - } - }, - "required": ["error"] - }, "UpdateLogDrainRequestOpenApi": { "type": "object", "properties": { @@ -22363,8 +3322,8 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["log_drain"] + "enum": ["log_drain"], + "description": "Resource type." }, "attributes": { "type": "object", @@ -22376,7 +3335,7 @@ "type": "string" }, "config": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -22516,260 +3475,50 @@ "minimum": 0, "maximum": 65535 }, - "tls": { - "default": false, - "type": "boolean" - }, - "structured_data": { - "type": "string" - }, - "cipher_key": { - "type": "string" - }, - "ca_cert": { - "type": "string" - }, - "client_cert": { - "type": "string" - }, - "client_key": { - "type": "string" - } - }, - "additionalProperties": false, - "title": "syslog" - } - ] - }, - "backend_type": { - "type": "string", - "enum": [ - "postgres", - "bigquery", - "clickhouse", - "webhook", - "datadog", - "loki", - "sentry", - "s3", - "axiom", - "last9", - "otlp", - "syslog" - ] - } - }, - "required": ["backend_type"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] - }, - "V2TransferProjectBody": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Resource type.", - "enum": ["project_transfer_input"] - }, - "attributes": { - "type": "object", - "properties": { - "target_organization_slug": { - "type": "string" - } - }, - "required": ["target_organization_slug"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] - }, - "V2PreviewProjectTransferResponse": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Resource type.", - "enum": ["project_transfer_result"] - }, - "attributes": { - "type": "object", - "properties": { - "valid": { - "type": "boolean" - }, - "warnings": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["key", "message"] - } - }, - "errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["key", "message"] - } - }, - "info": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "required": ["key", "message"] - } - } - }, - "required": ["valid", "warnings", "errors", "info"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] - }, - "V2ListPrivateLinkAssociationsResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Resource type.", - "enum": ["private_link_association"] - }, - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "aws_account_id": { - "type": "string", - "minLength": 12, - "maxLength": 12, - "pattern": "^\\d{12}$", - "description": "The AWS account ID this PrivateLink share is associated with." - }, - "account_name": { - "description": "Human-readable name for the AWS account.", - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "CREATING", - "READY", - "ASSOCIATION_REQUEST_EXPIRED", - "ASSOCIATION_ACCEPTED", - "CREATION_FAILED", - "DELETING" - ], - "description": "\n - `CREATING`: The PrivateLink resources and the Association are in the process of being created. The PrivateLink Share cannot be accepted yet.\n - `READY`: The PrivateLink resources have been created and the PrivateLink Share can be accepted for the duration of 12h after sharing. See `shared_at`.\n - `ASSOCIATION_REQUEST_EXPIRED`: The PrivateLink Share has not been accepted within the 12h time limit. This association can now be deleted.\n - `ASSOCIATION_ACCEPTED`: The PrivateLink Share was successfully accepted.\n - `CREATION_FAILED`: The PrivateLink resources failed to create. This likely means something went wrong on Supabase's and and support should be contacted.\n - `DELETING`: The PrivateLink resources and the Association are in the process of being deleted. The PrivateLink Share cannot be accepted yet.\n" - }, - "shared_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending.", - "nullable": true - }, - "database_type": { - "type": "string", - "enum": ["PRIMARY", "READ_REPLICA"], - "description": "Whether this PrivateLink share targets the primary database or a read replica." - }, - "database_identifier": { - "type": "string", - "description": "Identifier of the database this PrivateLink share targets - the project ref for the primary, or the read replica identifier." - } - }, - "required": [ - "aws_account_id", - "status", - "shared_at", - "database_type", - "database_identifier" - ] - } - }, - "required": ["type", "id", "attributes"] - } - } - }, - "required": ["data"] - }, - "V2CreatePrivateLinkAssociationRequest": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Resource type.", - "enum": ["private_link_association"] - }, - "attributes": { - "type": "object", - "properties": { - "aws_account_id": { - "type": "string", - "minLength": 12, - "maxLength": 12, - "pattern": "^\\d{12}$", - "description": "The AWS account ID to add to the project PrivateLink share." + "tls": { + "default": false, + "type": "boolean" + }, + "structured_data": { + "type": "string" + }, + "cipher_key": { + "type": "string" + }, + "ca_cert": { + "type": "string" + }, + "client_cert": { + "type": "string" + }, + "client_key": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "syslog" + } + ] }, - "account_name": { - "description": "Optional human-readable name for the AWS account.", + "backend_type": { "type": "string", - "maxLength": 128 - }, - "database_identifier": { - "description": "Identifier of the read replica this PrivateLink share should target. Omit to target the primary database.", - "type": "string" + "enum": [ + "postgres", + "bigquery", + "clickhouse", + "webhook", + "datadog", + "loki", + "sentry", + "s3", + "axiom", + "last9", + "otlp", + "syslog" + ] } }, - "required": ["aws_account_id"] + "required": ["backend_type"] } }, "required": ["type", "attributes"] @@ -22777,7 +3526,7 @@ }, "required": ["data"] }, - "V2PrivateLinkAssociationResponse": { + "V2TransferProjectBody": { "type": "object", "properties": { "data": { @@ -22785,197 +3534,25 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["private_link_association"] - }, - "id": { - "type": "string" + "enum": ["project_transfer_input"], + "description": "Resource type." }, "attributes": { "type": "object", "properties": { - "aws_account_id": { - "type": "string", - "minLength": 12, - "maxLength": 12, - "pattern": "^\\d{12}$", - "description": "The AWS account ID this PrivateLink share is associated with." - }, - "account_name": { - "description": "Human-readable name for the AWS account.", + "target_organization_slug": { "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "CREATING", - "READY", - "ASSOCIATION_REQUEST_EXPIRED", - "ASSOCIATION_ACCEPTED", - "CREATION_FAILED", - "DELETING" - ], - "description": "\n - `CREATING`: The PrivateLink resources and the Association are in the process of being created. The PrivateLink Share cannot be accepted yet.\n - `READY`: The PrivateLink resources have been created and the PrivateLink Share can be accepted for the duration of 12h after sharing. See `shared_at`.\n - `ASSOCIATION_REQUEST_EXPIRED`: The PrivateLink Share has not been accepted within the 12h time limit. This association can now be deleted.\n - `ASSOCIATION_ACCEPTED`: The PrivateLink Share was successfully accepted.\n - `CREATION_FAILED`: The PrivateLink resources failed to create. This likely means something went wrong on Supabase's and and support should be contacted.\n - `DELETING`: The PrivateLink resources and the Association are in the process of being deleted. The PrivateLink Share cannot be accepted yet.\n" - }, - "shared_at": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", - "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending.", - "nullable": true - }, - "database_type": { - "type": "string", - "enum": ["PRIMARY", "READ_REPLICA"], - "description": "Whether this PrivateLink share targets the primary database or a read replica." - }, - "database_identifier": { - "type": "string", - "description": "Identifier of the database this PrivateLink share targets - the project ref for the primary, or the read replica identifier." } }, - "required": [ - "aws_account_id", - "status", - "shared_at", - "database_type", - "database_identifier" - ] + "required": ["target_organization_slug"] } }, - "required": ["type", "id", "attributes"] + "required": ["type", "attributes"] } }, "required": ["data"] }, - "V2ListMembersResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Resource type.", - "enum": ["organization_member"] - }, - "id": { - "type": "string", - "format": "uuid", - "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$" - }, - "attributes": { - "type": "object", - "properties": { - "username": { - "type": "string", - "description": "Member's username", - "nullable": true - }, - "primary_email": { - "type": "string", - "description": "Member's primary email", - "nullable": true - }, - "mfa_enabled": { - "type": "boolean", - "description": "Whether Multi-Factor Authentication is enabled for this member" - }, - "is_sso_user": { - "type": "boolean", - "description": "Whether this member is a Single Sign-On user" - }, - "avatar_url": { - "type": "string", - "description": "Member's avatar URL", - "nullable": true - }, - "roles": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Role name. For project-scoped roles this is the base role name.", - "example": "developer" - }, - "scope": { - "type": "string", - "enum": ["organization", "project"], - "description": "Whether this role applies org-wide or is scoped to specific projects for the user." - }, - "projects": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ref": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["ref", "name"] - }, - "description": "Project refs this role is scoped to. Empty array for org-level roles." - } - }, - "required": ["name", "scope", "projects"] - }, - "description": "Roles assigned to this member. Includes both org-level and project-scoped roles." - } - }, - "required": [ - "username", - "primary_email", - "mfa_enabled", - "is_sso_user", - "avatar_url", - "roles" - ] - } - }, - "required": ["type", "id", "attributes"] - } - }, - "links": { - "type": "object", - "properties": { - "first": { - "type": "string", - "description": "URL path to the first page if available.", - "example": "/v2/organizations/my-org/members?page[size]=10", - "nullable": true - }, - "prev": { - "type": "string", - "description": "URL path to the previous page.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7", - "nullable": true - }, - "next": { - "type": "string", - "description": "URL path to the next page.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4", - "nullable": true - }, - "last": { - "type": "string", - "description": "URL path to the last page if available.", - "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", - "nullable": true - } - }, - "required": ["prev", "next"] - } - }, - "required": ["data", "links"] - }, - "V2AssignOrganizationMemberRoleRequest": { + "V2PreviewProjectTransferResponse": { "type": "object", "properties": { "data": { @@ -22983,85 +3560,62 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["organization_member_role"] + "enum": ["project_transfer_result"], + "description": "Resource type." }, "attributes": { "type": "object", "properties": { - "role": { - "type": "string", - "enum": ["owner", "administrator", "developer", "read-only"], - "description": "Role name to assign. Must be one of: owner, administrator, developer, read-only. Must be on a Team or Enterprise plan to use the read-only role.", - "example": "developer" + "valid": { + "type": "boolean" }, - "projects": { - "description": "The projects to assign a project-scoped role for. If omitted, assigns an org-wide role.", - "minItems": 1, + "warnings": { "type": "array", "items": { "type": "object", "properties": { - "ref": { - "type": "string", - "description": "Project ref", - "example": "abcjuqabhgwjjutfvtpa" + "key": { + "type": "string" + }, + "message": { + "type": "string" } }, - "required": ["ref"] + "required": ["key", "message"] } - } - }, - "required": ["role"] - } - }, - "required": ["type", "attributes"] - } - }, - "required": ["data"] - }, - "OrganizationMemberRoleResponse": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Resource type.", - "enum": ["organization_member_role"] - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Role name. For project-scoped assignments this is the base role name.", - "example": "developer" }, - "scope": { - "type": "string", - "enum": ["organization", "project"], - "description": "Whether this role applies org-wide or is scoped to specific projects for the user." + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": ["key", "message"] + } }, - "projects": { + "info": { "type": "array", "items": { "type": "object", "properties": { - "ref": { + "key": { "type": "string" }, - "name": { + "message": { "type": "string" } }, - "required": ["ref", "name"] - }, - "description": "Project refs this role is scoped to. Empty array for org-level roles." + "required": ["key", "message"] + } } }, - "required": ["name", "scope", "projects"] + "required": ["valid", "warnings", "errors", "info"] } }, "required": ["type", "attributes"] @@ -23069,7 +3623,7 @@ }, "required": ["data"] }, - "V2ListRolesResponse": { + "V2ListPrivateLinkAssociationsResponse": { "type": "object", "properties": { "data": { @@ -23079,291 +3633,365 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["organization_role"] + "enum": ["private_link_association"], + "description": "Resource type." + }, + "id": { + "type": "string" }, "attributes": { "type": "object", "properties": { - "name": { + "aws_account_id": { "type": "string", - "description": "Role name.", - "example": "developer" + "minLength": 12, + "maxLength": 12, + "pattern": "^\\d{12}$", + "description": "The AWS account ID this PrivateLink share is associated with." + }, + "account_name": { + "type": "string", + "description": "Human-readable name for the AWS account." + }, + "status": { + "type": "string", + "enum": [ + "CREATING", + "READY", + "ASSOCIATION_REQUEST_EXPIRED", + "ASSOCIATION_ACCEPTED", + "CREATION_FAILED", + "DELETING" + ], + "description": "\n - `CREATING`: The PrivateLink resources and the Association are in the process of being created. The PrivateLink Share cannot be accepted yet.\n - `READY`: The PrivateLink resources have been created and the PrivateLink Share can be accepted for the duration of 12h after sharing. See `shared_at`.\n - `ASSOCIATION_REQUEST_EXPIRED`: The PrivateLink Share has not been accepted within the 12h time limit. This association can now be deleted.\n - `ASSOCIATION_ACCEPTED`: The PrivateLink Share was successfully accepted.\n - `CREATION_FAILED`: The PrivateLink resources failed to create. This likely means something went wrong on Supabase's and and support should be contacted.\n - `DELETING`: The PrivateLink resources and the Association are in the process of being deleted. The PrivateLink Share cannot be accepted yet.\n" + }, + "shared_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending." } }, - "required": ["name"] + "required": ["aws_account_id", "status", "shared_at"] } }, - "required": ["type", "attributes"] + "required": ["type", "id", "attributes"] } } }, "required": ["data"] }, - "V2CreateInvitationsRequest": { + "V2CreatePrivateLinkAssociationRequest": { "type": "object", "properties": { "data": { - "minItems": 1, - "maxItems": 50, - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Resource type.", - "enum": ["organization_invitation"] - }, - "attributes": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - }, - "role": { - "type": "string", - "enum": ["owner", "administrator", "developer", "read-only"], - "description": "Role name to assign. Must be on a Team or Enterprise plan to use the read-only role.", - "example": "developer" - }, - "projects": { - "description": "The projects to limit a user to. If omitted, user will have org-wide access with the provided role.", - "minItems": 1, - "type": "array", - "items": { - "type": "object", - "properties": { - "ref": { - "type": "string", - "description": "Project ref", - "example": "abcjuqabhgwjjutfvtpa" - } - }, - "required": ["ref"] - } - }, - "require_sso": { - "type": "boolean" - } - }, - "required": ["email", "role"] - } + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["private_link_association"], + "description": "Resource type." }, - "required": ["type", "attributes"] - } + "attributes": { + "type": "object", + "properties": { + "aws_account_id": { + "type": "string", + "minLength": 12, + "maxLength": 12, + "pattern": "^\\d{12}$", + "description": "The AWS account ID to add to the project PrivateLink share." + }, + "account_name": { + "type": "string", + "maxLength": 128, + "description": "Optional human-readable name for the AWS account." + } + }, + "required": ["aws_account_id"] + } + }, + "required": ["type", "attributes"] } }, "required": ["data"] }, - "V2CreateInvitationsResponse": { + "V2PrivateLinkAssociationResponse": { "type": "object", "properties": { - "error": { + "data": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string" - }, - "message": { - "type": "string" + "type": { + "type": "string", + "enum": ["private_link_association"], + "description": "Resource type." }, - "description": { + "id": { "type": "string" }, - "links": { + "attributes": { "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "additionalProperties": {} - } + "properties": { + "aws_account_id": { + "type": "string", + "minLength": 12, + "maxLength": 12, + "pattern": "^\\d{12}$", + "description": "The AWS account ID this PrivateLink share is associated with." }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "description": { - "type": "string" - }, - "links": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "describedby": { - "type": "string" - }, - "meta": { - "type": "object", - "additionalProperties": {} - } - }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - } - }, - "required": ["email"] - } + "account_name": { + "type": "string", + "description": "Human-readable name for the AWS account." }, - "required": ["code", "message", "meta"] - } - } - }, - "required": ["code", "message"] - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Resource type.", - "enum": ["organization_invitation"] - }, - "attributes": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - } + "status": { + "type": "string", + "enum": [ + "CREATING", + "READY", + "ASSOCIATION_REQUEST_EXPIRED", + "ASSOCIATION_ACCEPTED", + "CREATION_FAILED", + "DELETING" + ], + "description": "\n - `CREATING`: The PrivateLink resources and the Association are in the process of being created. The PrivateLink Share cannot be accepted yet.\n - `READY`: The PrivateLink resources have been created and the PrivateLink Share can be accepted for the duration of 12h after sharing. See `shared_at`.\n - `ASSOCIATION_REQUEST_EXPIRED`: The PrivateLink Share has not been accepted within the 12h time limit. This association can now be deleted.\n - `ASSOCIATION_ACCEPTED`: The PrivateLink Share was successfully accepted.\n - `CREATION_FAILED`: The PrivateLink resources failed to create. This likely means something went wrong on Supabase's and and support should be contacted.\n - `DELETING`: The PrivateLink resources and the Association are in the process of being deleted. The PrivateLink Share cannot be accepted yet.\n" }, - "required": ["email"] - } - }, - "required": ["type", "attributes"] - } + "shared_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time and date at which the AWS Resource Share Association was requested from Supabase. `null` means that the association was not yet requested while the PrivateLink Association is pending." + } + }, + "required": ["aws_account_id", "status", "shared_at"] + } + }, + "required": ["type", "id", "attributes"] } }, "required": ["data"] }, - "V2DeleteInvitationsRequest": { + "V2ListMembersResponse": { "type": "object", "properties": { "data": { - "minItems": 1, - "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["organization_invitation"] + "enum": ["organization_member"], + "description": "Resource type." + }, + "id": { + "type": "string", + "format": "uuid" }, "attributes": { "type": "object", "properties": { - "email": { + "username": { + "type": "string", + "nullable": true, + "description": "Member's username" + }, + "primary_email": { + "type": "string", + "nullable": true, + "description": "Member's primary email" + }, + "mfa_enabled": { + "type": "boolean", + "description": "Whether Multi-Factor Authentication is enabled for this member" + }, + "is_sso_user": { + "type": "boolean", + "description": "Whether this member is a Single Sign-On user" + }, + "avatar_url": { "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + "nullable": true, + "description": "Member's avatar URL" + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Role name. For project-scoped roles this is the base role name.", + "example": "developer" + }, + "scope": { + "type": "string", + "enum": ["organization", "project"], + "description": "Whether this role applies org-wide or is scoped to specific projects for the user." + }, + "projects": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["ref", "name"] + }, + "description": "Project refs this role is scoped to. Empty array for org-level roles." + } + }, + "required": ["name", "scope", "projects"] + }, + "description": "Roles assigned to this member. Includes both org-level and project-scoped roles." } }, - "required": ["email"] + "required": [ + "username", + "primary_email", + "mfa_enabled", + "is_sso_user", + "avatar_url", + "roles" + ] } }, - "required": ["type", "attributes"] + "required": ["type", "id", "attributes"] } + }, + "links": { + "type": "object", + "properties": { + "first": { + "type": "string", + "nullable": true, + "description": "URL path to the first page if available.", + "example": "/v2/organizations/my-org/members?page[size]=10" + }, + "prev": { + "type": "string", + "nullable": true, + "description": "URL path to the previous page.", + "example": "/v2/organizations/my-org/members?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7" + }, + "next": { + "type": "string", + "nullable": true, + "description": "URL path to the next page.", + "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4" + }, + "last": { + "type": "string", + "nullable": true, + "description": "URL path to the last page if available.", + "example": "/v2/organizations/my-org/members?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295" + } + }, + "required": ["prev", "next"] } }, - "required": ["data"] + "required": ["data", "links"] }, - "V2DeleteInvitationsResponse": { + "V2AssignOrganizationMemberRoleRequest": { "type": "object", "properties": { "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Resource type.", - "enum": ["organization_invitation"] - }, - "attributes": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email", - "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - } + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["organization_member_role"], + "description": "Resource type." + }, + "attributes": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": ["owner", "administrator", "developer", "read-only"], + "description": "Role name to assign. Must be one of: owner, administrator, developer, read-only. Must be on a Team or Enterprise plan to use the read-only role.", + "example": "developer" }, - "required": ["email"] - } + "projects": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ref": { + "type": "string", + "description": "Project ref", + "example": "abcjuqabhgwjjutfvtpa" + } + }, + "required": ["ref"] + }, + "minItems": 1, + "description": "The projects to assign a project-scoped role for. If omitted, assigns an org-wide role." + } + }, + "required": ["role"] + } + }, + "required": ["type", "attributes"] + } + }, + "required": ["data"] + }, + "OrganizationMemberRoleResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["organization_member_role"], + "description": "Resource type." }, - "required": ["type", "attributes"] - } + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Role name. For project-scoped assignments this is the base role name.", + "example": "developer" + }, + "scope": { + "type": "string", + "enum": ["organization", "project"], + "description": "Whether this role applies org-wide or is scoped to specific projects for the user." + }, + "projects": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": ["ref", "name"] + }, + "description": "Project refs this role is scoped to. Empty array for org-level roles." + } + }, + "required": ["name", "scope", "projects"] + } + }, + "required": ["type", "attributes"] } }, "required": ["data"] }, - "V2ListProjectsResponse": { + "V2ListRolesResponse": { "type": "object", "properties": { "data": { @@ -23373,184 +4001,29 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["project"] - }, - "id": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" + "enum": ["organization_role"], + "description": "Resource type." }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Project name" - }, - "status": { - "type": "string", - "enum": [ - "INACTIVE", - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "UNKNOWN", - "GOING_DOWN", - "INIT_FAILED", - "REMOVED", - "RESTORING", - "UPGRADING", - "PAUSING", - "RESTORE_FAILED", - "RESTARTING", - "PAUSE_FAILED", - "RESIZING" - ], - "description": "Project status" - }, - "cloud_provider": { - "type": "string", - "description": "Cloud provider hosting the project" - }, - "region": { - "type": "string", - "description": "Region the project is hosted in" - }, - "inserted_at": { - "type": "string", - "description": "When the project was created" - }, - "databases": { - "type": "array", - "items": { - "type": "object", - "properties": { - "cloud_provider": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "region": { - "type": "string", - "nullable": true - }, - "status": { - "type": "string", - "enum": [ - "ACTIVE_HEALTHY", - "ACTIVE_UNHEALTHY", - "COMING_UP", - "GOING_DOWN", - "INIT_FAILED", - "REMOVED", - "RESTORING", - "UNKNOWN", - "INIT_READ_REPLICA", - "INIT_READ_REPLICA_FAILED", - "RESTARTING", - "RESIZING" - ] - }, - "type": { - "type": "string", - "enum": ["PRIMARY", "READ_REPLICA"] - }, - "infra_compute_size": { - "type": "string", - "enum": [ - "pico", - "nano", - "micro", - "small", - "medium", - "large", - "xlarge", - "2xlarge", - "4xlarge", - "8xlarge", - "12xlarge", - "16xlarge", - "24xlarge", - "24xlarge_optimized_memory", - "24xlarge_optimized_cpu", - "24xlarge_high_memory", - "48xlarge", - "48xlarge_optimized_memory", - "48xlarge_optimized_cpu", - "48xlarge_high_memory" - ] - }, - "disk_volume_size_gb": { - "type": "number" - }, - "disk_type": { - "type": "string", - "enum": ["gp3", "io2"] - }, - "disk_throughput_mbps": { - "type": "number" - }, - "disk_last_modified_at": { - "type": "string" - } - }, - "required": ["cloud_provider", "identifier", "region", "status", "type"] - }, - "description": "The project's databases including compute and disk attributes." + "id": {}, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Role name.", + "example": "developer" } }, - "required": [ - "name", - "status", - "cloud_provider", - "region", - "inserted_at", - "databases" - ] + "required": ["name"] } }, - "required": ["type", "id", "attributes"] + "required": ["type", "attributes"] } - }, - "links": { - "type": "object", - "properties": { - "first": { - "type": "string", - "description": "URL path to the first page if available.", - "example": "/v2/organizations/my-org/projects?page[size]=10", - "nullable": true - }, - "prev": { - "type": "string", - "description": "URL path to the previous page.", - "example": "/v2/organizations/my-org/projects?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7", - "nullable": true - }, - "next": { - "type": "string", - "description": "URL path to the next page.", - "example": "/v2/organizations/my-org/projects?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4", - "nullable": true - }, - "last": { - "type": "string", - "description": "URL path to the last page if available.", - "example": "/v2/organizations/my-org/projects?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", - "nullable": true - } - }, - "required": ["prev", "next"] } }, - "required": ["data", "links"] + "required": ["data"] }, - "V2ListGitHubConnectionsResponse": { + "V2CreateInvitationsRequest": { "type": "object", "properties": { "data": { @@ -23560,212 +4033,192 @@ "properties": { "type": { "type": "string", - "description": "Resource type.", - "enum": ["github_connection"] - }, - "id": { - "type": "string", - "description": "Connection id.", - "example": "7" + "enum": ["organization_invitation"], + "description": "Resource type." }, "attributes": { "type": "object", "properties": { - "inserted_at": { + "email": { "type": "string", - "description": "When the connection was created" + "format": "email" }, - "updated_at": { + "role": { "type": "string", - "description": "When the connection was last updated" + "enum": ["owner", "administrator", "developer", "read-only"], + "description": "Role name to assign. Must be on a Team or Enterprise plan to use the read-only role.", + "example": "developer" }, - "installation_id": { - "type": "number", - "description": "GitHub App installation id" + "projects": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ref": { + "type": "string", + "description": "Project ref", + "example": "abcjuqabhgwjjutfvtpa" + } + }, + "required": ["ref"] + }, + "minItems": 1, + "description": "The projects to limit a user to. If omitted, user will have org-wide access with the provided role." }, - "workdir": { - "type": "string", - "description": "Directory within the repository the project lives in" + "require_sso": { + "type": "boolean" + } + }, + "required": ["email", "role"] + } + }, + "required": ["type", "attributes"] + }, + "minItems": 1, + "maxItems": 50 + } + }, + "required": ["data"] + }, + "V2CreateInvitationsResponse": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "description": { + "type": "string" + }, + "links": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" }, - "supabase_changes_only": { - "type": "boolean", - "description": "Whether branches are only created for changes under `supabase/`" + "rel": { + "type": "string" + }, + "title": { + "type": "string" }, - "branch_limit": { - "type": "number", - "description": "Maximum number of preview branches" + "type": { + "type": "string" }, - "new_branch_per_pr": { - "type": "boolean", - "description": "Whether a preview branch is created for every pull request" + "describedby": { + "type": "string" }, - "project": { + "meta": { "type": "object", - "properties": { - "id": { - "type": "number" - }, - "ref": { - "type": "string", - "minLength": 20, - "maxLength": 20, - "pattern": "^[a-z]+$", - "description": "Project ref", - "example": "abcdefghijklmnopqrst" - }, - "name": { - "type": "string" - } - }, - "required": ["id", "ref", "name"], - "description": "The connected Supabase project" + "additionalProperties": {} + } + }, + "required": ["href"] + } + }, + "meta": { + "type": "object", + "additionalProperties": {} + }, + "issues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "description": { + "type": "string" }, - "repository": { + "links": { "type": "object", - "properties": { - "id": { - "type": "number" + "additionalProperties": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "describedby": { + "type": "string" + }, + "meta": { + "type": "object", + "additionalProperties": {} + } }, - "name": { - "type": "string" - } - }, - "required": ["id", "name"], - "description": "The connected GitHub repository" + "required": ["href"] + } }, - "user": { + "meta": { "type": "object", "properties": { - "id": { - "type": "number" - }, - "username": { - "type": "string" - }, - "primary_email": { + "email": { "type": "string", - "nullable": true + "format": "email" } }, - "required": ["id", "username", "primary_email"], - "description": "The user who created the connection, if still known", - "nullable": true + "required": ["email"] } }, - "required": [ - "inserted_at", - "updated_at", - "installation_id", - "workdir", - "supabase_changes_only", - "branch_limit", - "new_branch_per_pr", - "project", - "repository", - "user" - ] + "required": ["code", "message", "meta"] } - }, - "required": ["type", "id", "attributes"] - } - }, - "links": { - "type": "object", - "properties": { - "first": { - "type": "string", - "description": "URL path to the first page if available.", - "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10", - "nullable": true - }, - "prev": { - "type": "string", - "description": "URL path to the previous page.", - "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10&page[before]=019adf7d-4513-74c5-bb9a-f1bc0f7a95d7", - "nullable": true - }, - "next": { - "type": "string", - "description": "URL path to the next page.", - "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10&page[after]=019adf7d-4513-7062-b292-78b86cc470a4", - "nullable": true - }, - "last": { - "type": "string", - "description": "URL path to the last page if available.", - "example": "/v2/organizations/my-org/integrations/github/connections?page[size]=10&page[after]=019adf7d-4513-71ba-b264-21900edb4295", - "nullable": true } }, - "required": ["prev", "next"] - } - }, - "required": ["data", "links"] - }, - "APIErrorObject": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "description": { - "type": "string" + "required": ["code", "message"] }, - "links": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { + "data": { + "type": "array", + "items": { "type": "object", "properties": { - "href": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "title": { - "type": "string" - }, "type": { - "type": "string" - }, - "describedby": { - "type": "string" + "type": "string", + "enum": ["organization_invitation"], + "description": "Resource type." }, - "meta": { + "id": {}, + "attributes": { "type": "object", - "propertyNames": { - "type": "string" + "properties": { + "email": { + "type": "string", + "format": "email" + } }, - "additionalProperties": {} + "required": ["email"] } }, - "required": ["href"] - } - }, - "meta": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "issues": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIErrorObject" + "required": ["type", "attributes"] } } }, - "required": ["code", "message"] + "required": ["data"] } } } From bc95a2f19a9f41533bc0e14e89fd57bc4fb29d5a Mon Sep 17 00:00:00 2001 From: "kemal.earth" <606977+kemaldotearth@users.noreply.github.com> Date: Fri, 31 Jul 2026 16:20:37 +0100 Subject: [PATCH 08/12] fix(studio): edge func exec time formatting in reports (#48539) ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Fixes Edge Function Execution Time chart within our observability reports time formatting. This also fixes the non-hovered state which would lose the `ms` formatting. | Before | After | |--------|--------| | cleanshot_2026-07-29_at_02 15
53_2x | Screenshot 2026-07-31 at 14 30
48 | ## Summary by CodeRabbit * **New Features** * Improved execution-time chart formatting with clearer millisecond values, thousands separators, and configurable precision. * Chart highlights now support custom value formatting alongside existing number, percentage, and byte formats. * **Bug Fixes** * Non-finite execution-time values now display safely as `0ms`. --- .../components/ui/Charts/Charts.utils.tsx | 18 ++++++++++++ .../components/ui/Charts/ComposedChart.tsx | 4 +++ .../data/reports/v2/edge-functions.config.ts | 7 +++-- .../components/ui/Charts/Charts.utils.test.ts | 29 +++++++++++++++++++ 4 files changed, 55 insertions(+), 3 deletions(-) diff --git a/apps/studio/components/ui/Charts/Charts.utils.tsx b/apps/studio/components/ui/Charts/Charts.utils.tsx index 613c8ecc2665d..82f228e88d115 100644 --- a/apps/studio/components/ui/Charts/Charts.utils.tsx +++ b/apps/studio/components/ui/Charts/Charts.utils.tsx @@ -73,6 +73,24 @@ export const compactNumberFormatter = (num: number): string => { return new Intl.NumberFormat('en', { notation: 'compact', maximumFractionDigits: 1 }).format(num) } +/** + * Formats a duration in milliseconds with thousands separators and a unit suffix. + * + * @example + * millisecondFormatter(123) // "123ms" + * millisecondFormatter(90000) // "90,000ms" + * millisecondFormatter(1234.56) // "1,235ms" + * millisecondFormatter(1234.56, 2) // "1,234.56ms" + */ +export const millisecondFormatter = (value: number, precision = 0) => { + if (!Number.isFinite(value)) return '0ms' + + return `${value.toLocaleString('en-US', { + minimumFractionDigits: precision, + maximumFractionDigits: precision, + })}ms` +} + /** * Formats a percentage, trimming decimals at 100. * diff --git a/apps/studio/components/ui/Charts/ComposedChart.tsx b/apps/studio/components/ui/Charts/ComposedChart.tsx index b778bd848bc09..90b1babe16ed4 100644 --- a/apps/studio/components/ui/Charts/ComposedChart.tsx +++ b/apps/studio/components/ui/Charts/ComposedChart.tsx @@ -220,6 +220,10 @@ export function ComposedChart({ return value } + if (typeof format === 'function') { + return format(value) + } + if (shouldFormatBytes) { const bytesValue = isNetworkChart ? Math.abs(value) : value const formatted = isMemoryChart diff --git a/apps/studio/data/reports/v2/edge-functions.config.ts b/apps/studio/data/reports/v2/edge-functions.config.ts index a4c72987276cb..9d5d53d5f7c0b 100644 --- a/apps/studio/data/reports/v2/edge-functions.config.ts +++ b/apps/studio/data/reports/v2/edge-functions.config.ts @@ -12,6 +12,7 @@ import { isUnixMicro, unixMicroToIsoTimestamp, } from '@/components/interfaces/Settings/Logs/Logs.utils' +import { millisecondFormatter } from '@/components/ui/Charts/Charts.utils' import type { AnalyticsInterval } from '@/data/analytics/constants' import { analyticsLiteral, @@ -290,10 +291,10 @@ export const edgeFunctionReports = ({ defaultChartStyle: 'line', titleTooltip: 'Average execution time for edge functions.', YAxisProps: { - width: 50, - tickFormatter: (value: number) => `${value}ms`, + width: 68, + tickFormatter: (value: number) => millisecondFormatter(value), }, - format: (value: unknown) => `${Number(value).toFixed(0)}ms`, + format: (value: unknown) => millisecondFormatter(Number(value)), dataProvider: async () => { const sql = METRIC_SQL.ExecutionTime(interval, filters) const rawData = await fetchLogs(projectRef, sql, startDate, endDate) diff --git a/apps/studio/tests/components/ui/Charts/Charts.utils.test.ts b/apps/studio/tests/components/ui/Charts/Charts.utils.test.ts index caa6f1aec734b..e3ab934afcea2 100644 --- a/apps/studio/tests/components/ui/Charts/Charts.utils.test.ts +++ b/apps/studio/tests/components/ui/Charts/Charts.utils.test.ts @@ -5,6 +5,7 @@ import { compactNumberFormatter, formatPercentage, isFloat, + millisecondFormatter, numberFormatter, precisionFormatter, useStacked, @@ -138,6 +139,34 @@ describe('compactNumberFormatter', () => { }) }) +describe('millisecondFormatter', () => { + it('appends the ms unit', () => { + expect(millisecondFormatter(0)).toBe('0ms') + expect(millisecondFormatter(123)).toBe('123ms') + }) + + it('adds thousands separators', () => { + expect(millisecondFormatter(1000)).toBe('1,000ms') + expect(millisecondFormatter(90000)).toBe('90,000ms') + expect(millisecondFormatter(1_234_567)).toBe('1,234,567ms') + }) + + it('rounds to whole milliseconds by default', () => { + expect(millisecondFormatter(1234.56)).toBe('1,235ms') + expect(millisecondFormatter(0.4)).toBe('0ms') + }) + + it('respects an explicit precision', () => { + expect(millisecondFormatter(1234.56, 2)).toBe('1,234.56ms') + expect(millisecondFormatter(84.3, 2)).toBe('84.30ms') + }) + + it('falls back to 0ms for non-finite values', () => { + expect(millisecondFormatter(NaN)).toBe('0ms') + expect(millisecondFormatter(Infinity)).toBe('0ms') + }) +}) + test('useStacked', () => { const { result } = renderHook(() => useStacked({ From 8565fd6b2a330a38b1d276c5f505cb16c34fd6ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 31 Jul 2026 11:40:18 -0400 Subject: [PATCH 09/12] chore(deps): bump actions/labeler from 6.0.1 to 6.2.0 (#48083) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/labeler](https://github.com/actions/labeler) from 6.0.1 to 6.2.0.
Release notes

Sourced from actions/labeler's releases.

v6.2.0

What's Changed

Bug Fix

Dependency Updates

Full Changelog: https://github.com/actions/labeler/compare/v6.1.0...v6.2.0

v6.1.0

Enhancements

  • Add changed-files-labels-limit and max-files-changed configuration options to cap the number of labels added by @​bluca in actions/labeler#923

Bug Fixes

Dependency Updates

New Contributors

Full Changelog: https://github.com/actions/labeler/compare/v6...v6.1.0

Commits
  • b8dd2d9 Bump @​typescript-eslint/eslint-plugin from 8.59.1 to 8.61.1 (#942)
  • 53affe8 Bump js-yaml to 4.2.0, apply npm audit fix, and add undici override for 0 vul...
  • f612d9a Fix: Improve PR number validation and warning messages in input handling (#939)
  • f27b608 chore: upgrade dependencies (@​actions/core, @​actions/github, js-yaml, minimat...
  • c5dadc2 Add 'changed-files-labels-limit' and 'max-files-changed' configs to allow cap...
  • e52e4fb Bump minimatch from 10.0.1 to 10.2.3 (#926)
  • 77a4082 Fix: Preserve manually added labels during workflow run and refine label sync...
  • 25abb3c Improve Labeler Action Documentation and Error Handling for Permissions (#897)
  • 395c8cf Bump brace-expansion from 1.1.11 to 1.1.12 and document breaking changes in v...
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/labeler&package-manager=github_actions&previous-version=6.0.1&new-version=6.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/label_prs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/label_prs.yml b/.github/workflows/label_prs.yml index 7bd90fd102e72..9e9ac01756e90 100644 --- a/.github/workflows/label_prs.yml +++ b/.github/workflows/label_prs.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - id: label - uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1 + uses: actions/labeler@b8dd2d9be0f68b860e7dae5dae7d772984eacd6d # v6.2.0 - name: Comment when api-deploy-required is auto-applied if: contains(steps.label.outputs.new-labels, 'api-deploy-required') From e1ed157d9a27a66f5e16a0b953225122cd4d889e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 31 Jul 2026 11:47:36 -0400 Subject: [PATCH 10/12] chore(deps): bump actions/stale from 9.0.0 to 10.4.0 (#48082) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/stale](https://github.com/actions/stale) from 9.0.0 to 10.4.0.
Release notes

Sourced from actions/stale's releases.

v10.4.0

What's Changed

Bug Fix

Dependency Updates

New Contributors

Full Changelog: https://github.com/actions/stale/compare/v10.3.0...v10.4.0

v10.3.0

What's Changed

Bug Fix

Dependency Updates

New Contributors

Full Changelog: https://github.com/actions/stale/compare/v10...v10.3.0

v10.2.0

What's Changed

Bug Fix

Dependency Updates

New Contributors

Full Changelog: https://github.com/actions/stale/compare/v10...v10.2.0

v10.1.1

What's Changed

Bug Fix

Improvement

Dependency Upgrades

... (truncated)

Commits
  • 1e223db Bump undici to 6.27.0 via override, clean up stale license files, and version...
  • 9461cb1 fix: only-issue-types does not affect PRs (#1338)
  • eb5cf3a chore: upgrade dependencies and bump version to 10.3.0 (#1335)
  • db5d06a Enhancement: ignore stale labeling events (#1311)
  • b5d41d4 build(deps-dev): bump lodash from 4.17.21 to 4.17.23 (#1313)
  • dcd2b94 Fix punycode and url.parse Deprecation Warnings (#1312)
  • d6f8a33 build(deps-dev): bump js-yaml from 4.1.0 to 4.1.1 (#1304)
  • a21a081 Fix checking state cache (fix #1136), also switch to octokit methods (#1152)
  • 9971854 build(deps): bump actions/checkout from 4 to 6 (#1306)
  • 5611b9d build(deps): bump actions/publish-action from 0.3.0 to 0.4.0 (#1291)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/stale&package-manager=github_actions&previous-version=9.0.0&new-version=10.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 1050707fc7490..168b1191370c2 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Label Stale Issues - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 + uses: actions/stale@1e223db275d687790206a7acac4d1a11bd6fe629 # v10.4.0 with: days-before-issue-stale: 30 stale-issue-message: 'After 30 days of inactivity, this issue has been marked as stale. Commenting (or other activity) will remove the stale label.' From f758ff132e382964ebe3f81c16439580dd9bd6d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 31 Jul 2026 15:49:23 +0000 Subject: [PATCH 11/12] chore(deps): bump docker/login-action from 2.2.0 to 4.4.0 (#48084) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [docker/login-action](https://github.com/docker/login-action) from 2.2.0 to 4.4.0.
Release notes

Sourced from docker/login-action's releases.

v4.4.0

Full Changelog: https://github.com/docker/login-action/compare/v4.3.0...v4.4.0

v4.3.0

Full Changelog: https://github.com/docker/login-action/compare/v4.2.0...v4.3.0

v4.2.0

Full Changelog: https://github.com/docker/login-action/compare/v4.1.0...v4.2.0

v4.1.0

... (truncated)

Commits
  • af1e73f Merge pull request #1034 from docker/dependabot/npm_and_yarn/aws-sdk-dependen...
  • da722bd [dependabot skip] chore: update generated content
  • 2916ad6 build(deps): bump the aws-sdk-dependencies group across 1 directory with 2 up...
  • ca0a662 Merge pull request #1035 from crazy-max/fix-registry-auth-empty-mask
  • c455755 chore: update generated content
  • 4835190 skip empty registry-auth secret mask
  • 992421c Merge pull request #1033 from docker/dependabot/github_actions/docker/bake-ac...
  • b249b43 Merge pull request #1032 from docker/dependabot/github_actions/docker/bake-ac...
  • 1b67977 build(deps): bump docker/bake-action from 7.2.0 to 7.3.0
  • 9d49d6a build(deps): bump docker/bake-action/subaction/matrix
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/login-action&package-manager=github_actions&previous-version=2.2.0&new-version=4.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> --- .github/workflows/mirror.yml | 4 ++-- .github/workflows/publish_image.yml | 6 +++--- .github/workflows/studio-e2e-test.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 7ed452065a1a9..c517dc08bfe80 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -29,10 +29,10 @@ jobs: with: role-to-assume: ${{ secrets.PROD_AWS_ROLE }} aws-region: us-east-1 - - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + - uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0 with: registry: public.ecr.aws - - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + - uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/publish_image.yml b/.github/workflows/publish_image.yml index e40a023c52ccb..487fa98341634 100644 --- a/.github/workflows/publish_image.yml +++ b/.github/workflows/publish_image.yml @@ -46,7 +46,7 @@ jobs: - uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0 - name: Login to DockerHub - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -83,7 +83,7 @@ jobs: tags: | type=raw,value=${{ needs.settings.outputs.image_version }}_${{ env.arch }} - - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + - uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -115,7 +115,7 @@ jobs: steps: - uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0 - - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + - uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.github/workflows/studio-e2e-test.yml b/.github/workflows/studio-e2e-test.yml index 890ee7d2be283..9573189273d52 100644 --- a/.github/workflows/studio-e2e-test.yml +++ b/.github/workflows/studio-e2e-test.yml @@ -93,7 +93,7 @@ jobs: with: role-to-assume: ${{ secrets.PROD_AWS_ROLE }} aws-region: us-east-1 - - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + - uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0 if: steps.filter.outputs.studio == 'true' && !github.event.pull_request.head.repo.fork with: registry: public.ecr.aws From e241a21a9ac48d2e80a50e775e25ca7dfbc68141 Mon Sep 17 00:00:00 2001 From: ChloeGarciaMillerand Date: Fri, 31 Jul 2026 18:05:41 +0200 Subject: [PATCH 12/12] fix: ESLint errors relating to accessibility in table editor, API Key and Access Token (#48479) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Added aria-label attributes and Tooltip to buttons ## What is the current behavior? alt attributes and Tooltip were missing ## What is the new behavior? Buttons have now aria-label attributes and Tooltip. ## Additional context No visual changes have been made. ## Summary by CodeRabbit * **Accessibility Improvements** * Added tooltips and improved accessible labeling for filter removal, sort controls, and action menu triggers. * Enhanced “More actions”/“More options” tooltips and aria-labels for API keys and access tokens. * Updated token scope selection and token banner close actions to use clearer tooltip messaging. * Wrapped panel close control with a tooltip and added an aria-label for clearer screen reader support. --- .../components/header/filter/FilterRow.tsx | 20 +++++++----- .../grid/components/header/sort/SortRow.tsx | 25 +++++++++------ .../interfaces/APIKeys/APIKeyRow.tsx | 31 ++++++++++++------- .../AccessTokenNewBanner.tsx | 20 +++++++----- .../AccessTokens/Classic/NewTokenButton.tsx | 24 +++++++++----- .../ForeignRowSelector/ForeignRowSelector.tsx | 15 +++++++-- 6 files changed, 91 insertions(+), 44 deletions(-) diff --git a/apps/studio/components/grid/components/header/filter/FilterRow.tsx b/apps/studio/components/grid/components/header/filter/FilterRow.tsx index 6881a292dd062..09283e041eda1 100644 --- a/apps/studio/components/grid/components/header/filter/FilterRow.tsx +++ b/apps/studio/components/grid/components/header/filter/FilterRow.tsx @@ -1,6 +1,6 @@ import { ChevronDown, X } from 'lucide-react' import { KeyboardEvent, memo } from 'react' -import { Button, Input } from 'ui' +import { Button, Input, Tooltip, TooltipContent, TooltipTrigger } from 'ui' import { FilterOperatorOptions } from './Filter.constants' import { DropdownControl } from '@/components/grid/components/common/DropdownControl' @@ -93,12 +93,18 @@ const FilterRow = ({ filter, filterIdx, onChange, onDelete, onKeyDown }: FilterR } onKeyDown={onKeyDown} /> - - -