diff --git a/providers/src/supabase/v00.00.00000/provider.yaml b/providers/src/supabase/v00.00.00000/provider.yaml new file mode 100644 index 00000000..6f8277a9 --- /dev/null +++ b/providers/src/supabase/v00.00.00000/provider.yaml @@ -0,0 +1,138 @@ +id: supabase +name: supabase +version: v00.00.00000 +providerServices: + advisors: + id: advisors:v00.00.00000 + name: advisors + preferred: true + service: + $ref: supabase/v00.00.00000/services/advisors.yaml + title: advisors API + version: v00.00.00000 + description: Advisors related endpoints + analytics: + id: analytics:v00.00.00000 + name: analytics + preferred: true + service: + $ref: supabase/v00.00.00000/services/analytics.yaml + title: analytics API + version: v00.00.00000 + description: Analytics related endpoints + billing: + id: billing:v00.00.00000 + name: billing + preferred: true + service: + $ref: supabase/v00.00.00000/services/billing.yaml + title: billing API + version: v00.00.00000 + description: Billing related endpoints + branches: + id: branches:v00.00.00000 + name: branches + preferred: true + service: + $ref: supabase/v00.00.00000/services/branches.yaml + title: branches API + version: v00.00.00000 + description: supabase branches API + config: + id: config:v00.00.00000 + name: config + preferred: true + service: + $ref: supabase/v00.00.00000/services/config.yaml + title: config API + version: v00.00.00000 + description: supabase config API + database: + id: database:v00.00.00000 + name: database + preferred: true + service: + $ref: supabase/v00.00.00000/services/database.yaml + title: database API + version: v00.00.00000 + description: Database related endpoints + domains: + id: domains:v00.00.00000 + name: domains + preferred: true + service: + $ref: supabase/v00.00.00000/services/domains.yaml + title: domains API + version: v00.00.00000 + description: Domains related endpoints + functions: + id: functions:v00.00.00000 + name: functions + preferred: true + service: + $ref: supabase/v00.00.00000/services/functions.yaml + title: functions API + version: v00.00.00000 + description: supabase functions API + network: + id: network:v00.00.00000 + name: network + preferred: true + service: + $ref: supabase/v00.00.00000/services/network.yaml + title: network API + version: v00.00.00000 + description: supabase network API + organizations: + id: organizations:v00.00.00000 + name: organizations + preferred: true + service: + $ref: supabase/v00.00.00000/services/organizations.yaml + title: organizations API + version: v00.00.00000 + description: Organizations related endpoints + profile: + id: profile:v00.00.00000 + name: profile + preferred: true + service: + $ref: supabase/v00.00.00000/services/profile.yaml + title: profile API + version: v00.00.00000 + description: supabase profile API + projects: + id: projects:v00.00.00000 + name: projects + preferred: true + service: + $ref: supabase/v00.00.00000/services/projects.yaml + title: projects API + version: v00.00.00000 + description: Projects related endpoints + secrets: + id: secrets:v00.00.00000 + name: secrets + preferred: true + service: + $ref: supabase/v00.00.00000/services/secrets.yaml + title: secrets API + version: v00.00.00000 + description: Secrets related endpoints + storage: + id: storage:v00.00.00000 + name: storage + preferred: true + service: + $ref: supabase/v00.00.00000/services/storage.yaml + title: storage API + version: v00.00.00000 + description: >- + Visit + [https://supabase.github.io/storage/](https://supabase.github.io/storage/) + for complete documentation. +config: + auth: + type: bearer + credentialsenvvar: SUPABASE_ACCESS_TOKEN + snake_case_aliases: true diff --git a/providers/src/supabase/v00.00.00000/services/advisors.yaml b/providers/src/supabase/v00.00.00000/services/advisors.yaml new file mode 100644 index 00000000..ddc07b66 --- /dev/null +++ b/providers/src/supabase/v00.00.00000/services/advisors.yaml @@ -0,0 +1,249 @@ +openapi: 3.0.0 +info: + title: advisors API + description: Advisors related endpoints + version: 1.0.0 +paths: + /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: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1ProjectAdvisorsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Gets project performance advisors. + tags: + - Advisors + x-badges: + - name: 'OAuth scope: database:read' + position: after + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - advisors_read + x-oauth-scope: database:read + /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: lint_type + required: false + in: query + schema: + example: sql + type: string + enum: + - sql + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1ProjectAdvisorsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Gets project security advisors. + tags: + - Advisors + x-badges: + - name: 'OAuth scope: database:read' + position: after + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - advisors_read + x-oauth-scope: database:read +components: + schemas: + V1ProjectAdvisorsResponse: + type: object + properties: + lints: + type: array + items: + type: object + properties: + name: + enum: + - unindexed_foreign_keys + - auth_users_exposed + - auth_rls_initplan + - no_primary_key + - unused_index + - multiple_permissive_policies + - policy_exists_rls_disabled + - rls_enabled_no_policy + - duplicate_index + - security_definer_view + - function_search_path_mutable + - rls_disabled_in_public + - extension_in_public + - rls_references_user_metadata + - materialized_view_in_api + - foreign_table_in_api + - unsupported_reg_types + - auth_otp_long_expiry + - auth_otp_short_length + - ssl_not_enforced + - log_connections_not_enabled + - network_restrictions_not_set + - password_requirements_min_length + - pitr_not_enabled + - auth_leaked_password_protection + - auth_insufficient_mfa_options + - auth_password_policy_missing + - leaked_service_key + - no_backup_admin + - vulnerable_postgres_version + - db_not_reachable + - db_connection_failing + - db_connection_limit_reached + - instance_telemetry_lost + - instance_db_down + - instance_alert_firing + - log_service_error_rate_high + - project_not_active + - advisor_check_unavailable + type: string + title: + type: string + level: + type: string + enum: + - ERROR + - WARN + - INFO + facing: + type: string + enum: + - EXTERNAL + categories: + type: array + items: + type: string + enum: + - PERFORMANCE + - SECURITY + - HEALTH + x-ignore-array-items-must-be-objects: true + description: + type: string + detail: + type: string + remediation: + type: string + metadata: + type: object + properties: + schema: + type: string + name: + type: string + entity: + type: string + type: + enum: + - table + - view + - materialized view + - foreign table + - auth + - function + - extension + - compliance + - health + type: string + fkey_name: + type: string + fkey_columns: + x-ignore-array-items-must-be-objects: true + type: array + items: + type: number + cache_key: + type: string + observed_at: + type: string + format: date-time + pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + required: + - name + - title + - level + - facing + - categories + - description + - detail + - remediation + - cache_key + additionalProperties: {} + required: + - lints + x-stackQL-resources: + performance_lints: + id: supabase.advisors.performance_lints + name: performance_lints + title: Performance Lints + methods: + list: + operation: + $ref: '#/paths/~1advisors~1performance/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.lints + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/performance_lints/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + security_lints: + id: supabase.advisors.security_lints + name: security_lints + title: Security Lints + methods: + list: + operation: + $ref: '#/paths/~1advisors~1security/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.lints + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/security_lints/methods/list' + insert: [] + update: [] + delete: [] + replace: [] +servers: + - url: https://api.supabase.com/v1/projects/{ref} + variables: + ref: + description: Supabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = ''. A WHERE value always takes precedence over the environment. + x-stackQL-envVar: SUPABASE_PROJECT_ID diff --git a/providers/src/supabase/v00.00.00000/services/analytics.yaml b/providers/src/supabase/v00.00.00000/services/analytics.yaml new file mode 100644 index 00000000..c88b9be1 --- /dev/null +++ b/providers/src/supabase/v00.00.00000/services/analytics.yaml @@ -0,0 +1,537 @@ +openapi: 3.0.0 +info: + title: analytics API + description: Analytics related endpoints + version: 1.0.0 +paths: + /analytics/endpoints/logs.all: + get: + deprecated: true + description: | + Executes a SQL query on the project's logs. + + Either the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided. + If both are not provided, only the last 1 minute of logs will be queried. + The 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. + + Note: Unless the `sql` parameter is provided, only edge_logs will be queried. See the [log query docs](https://supabase.com/docs/guides/monitoring-and-debugging/logs#logs-explorer) for all available sources. + operationId: v1-get-project-logs-all + parameters: + - name: sql + required: false + in: query + description: Custom SQL query to execute on the logs. See [querying logs](https://supabase.com/docs/guides/monitoring-and-debugging/logs#querying-with-the-logs-explorer) for more details. + schema: + example: select event_message from edge_logs limit 10 + type: string + - name: iso_timestamp_start + required: false + in: query + schema: + format: date-time + pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: '2025-03-01T00:00:00Z' + type: string + - name: iso_timestamp_end + required: false + in: query + schema: + format: date-time + pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: '2025-03-01T23:59:59Z' + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/AnalyticsResponse' + '401': + description: Unauthorized + '402': + description: Usage exceeded. Enable additional usage to continue querying + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Gets project's logs + tags: + - Analytics + x-badges: + - name: 'OAuth scope: analytics:read' + position: after + x-endpoint-owners: + - observability + x-fga-permissions: + - - analytics_logs_read + x-oauth-scope: analytics:read + /analytics/endpoints/logs: + get: + deprecated: false + description: | + Executes an SQL or LQL query on the project's unified logs stream. + + Either the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided. + If both are not provided, only the last 1 minute of logs will be queried. + The 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. + + Filter by the `source` column to specify specific log sources, such as edge_logs, postgres_logs, etc. + + Note: SQL must be written in **ClickHouse SQL dialect**. + operationId: v1-get-project-logs + parameters: + - name: sql + required: false + in: query + description: Custom SQL query to execute on the logs. See [querying logs](https://supabase.com/docs/guides/monitoring-and-debugging/logs#querying-with-the-logs-explorer) for more details. + schema: + example: select event_message from edge_logs limit 10 + type: string + - name: iso_timestamp_start + required: false + in: query + schema: + format: date-time + pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: '2025-03-01T00:00:00Z' + type: string + - name: iso_timestamp_end + required: false + in: query + schema: + format: date-time + pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + example: '2025-03-01T23:59:59Z' + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/AnalyticsResponse' + '401': + description: Unauthorized + '402': + description: Usage exceeded. Enable additional usage to continue querying + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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: + - observability + x-fga-permissions: + - - analytics_logs_read + x-oauth-scope: analytics:read + /analytics/endpoints/usage.api-counts: + get: + operationId: v1-get-project-usage-api-count + parameters: + - name: interval + required: false + in: query + schema: + example: 1day + type: string + enum: + - 15min + - 30min + - 1hr + - 3hr + - 1day + - 3day + - 7day + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1GetUsageApiCountResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to get project's usage api counts + security: + - bearer: [] + summary: Gets project's usage api counts + tags: + - Analytics + x-endpoint-owners: + - observability + x-fga-permissions: + - - analytics_usage_read + /analytics/endpoints/usage.api-requests-count: + get: + operationId: v1-get-project-usage-request-count + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1GetUsageApiRequestsCountResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to get project's usage api requests count + security: + - bearer: [] + summary: Gets project's usage api requests count + tags: + - Analytics + x-endpoint-owners: + - observability + x-fga-permissions: + - - analytics_usage_read + /analytics/endpoints/functions.combined-stats: + get: + operationId: v1-get-project-function-combined-stats + parameters: + - name: interval + required: true + in: query + schema: + 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: '' + content: + application/json: + schema: + $ref: '#/components/schemas/AnalyticsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to get project's function combined statistics + security: + - bearer: [] + summary: Gets a project's function combined statistics + tags: + - Analytics + x-endpoint-owners: + - observability + x-fga-permissions: + - - analytics_usage_read + /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: [] + responses: + '200': + description: Prometheus / OpenMetrics text exposition + content: + text/plain: + schema: + type: string + application/openmetrics-text: + schema: + type: string + '400': + description: Project must be active and healthy, or metrics are not available for this project + '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: + - observability + x-fga-permissions: + - - analytics_logs_read + x-oauth-scope: analytics:read +components: + schemas: + AnalyticsResponse: + type: object + properties: + result: + type: array + items: {} + error: + type: string + 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 + V1GetUsageApiCountResponse: + type: object + properties: + result: + type: array + 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|))$ + 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: + type: string + 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 + V1GetUsageApiRequestsCountResponse: + type: object + properties: + result: + type: array + items: + type: object + properties: + count: + type: number + required: + - count + error: + type: string + 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 + x-stackQL-resources: + all_logs: + id: supabase.analytics.all_logs + name: all_logs + title: All Logs + methods: + get: + operation: + $ref: '#/paths/~1analytics~1endpoints~1logs.all/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/all_logs/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + logs: + id: supabase.analytics.logs + name: logs + title: Logs + methods: + get: + operation: + $ref: '#/paths/~1analytics~1endpoints~1logs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/logs/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + api_counts: + id: supabase.analytics.api_counts + name: api_counts + title: Api Counts + methods: + get: + operation: + $ref: '#/paths/~1analytics~1endpoints~1usage.api-counts/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/api_counts/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + api_request_counts: + id: supabase.analytics.api_request_counts + name: api_request_counts + title: Api Request Counts + methods: + get: + operation: + $ref: '#/paths/~1analytics~1endpoints~1usage.api-requests-count/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/api_request_counts/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + function_stats: + id: supabase.analytics.function_stats + name: function_stats + title: Function Stats + methods: + get: + operation: + $ref: '#/paths/~1analytics~1endpoints~1functions.combined-stats/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/function_stats/methods/get' + insert: [] + update: [] + delete: [] + replace: [] +servers: + - url: https://api.supabase.com/v1/projects/{ref} + variables: + ref: + description: Supabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = ''. A WHERE value always takes precedence over the environment. + x-stackQL-envVar: SUPABASE_PROJECT_ID diff --git a/providers/src/supabase/v00.00.00000/services/billing.yaml b/providers/src/supabase/v00.00.00000/services/billing.yaml new file mode 100644 index 00000000..4b6d6c57 --- /dev/null +++ b/providers/src/supabase/v00.00.00000/services/billing.yaml @@ -0,0 +1,430 @@ +openapi: 3.0.0 +info: + title: billing API + description: Billing related endpoints + version: 1.0.0 +paths: + /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: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ListProjectAddonsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to list project addons + security: + - bearer: [] + 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: [] + 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: + - bearer: [] + summary: Apply or update billing addons, including compute instance size + tags: + - Billing + x-endpoint-owners: + - billing + x-fga-permissions: + - - infra_add_ons_write + /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: addon_variant + required: true + in: path + schema: + 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: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to remove project addon + security: + - bearer: [] + summary: Remove billing addons or revert compute instance sizing + tags: + - Billing + x-endpoint-owners: + - billing + x-fga-permissions: + - - infra_add_ons_write +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: + 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 + - 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: + $ref: '#/components/schemas/ListProjectAddonsResponseJsonValue' + 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: + 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 + - 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: + $ref: '#/components/schemas/ListProjectAddonsResponseJsonValue' + required: + - id + - name + - price + required: + - type + - name + - variants + required: + - selected_addons + - available_addons + ApplyProjectAddonBody: + type: object + properties: + addon_variant: + 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 + 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 + ListProjectAddonsResponseJsonValue: + description: Any JSON-serializable value + anyOf: + - type: string + - type: number + - type: boolean + nullable: true + type: array + items: + $ref: '#/components/schemas/ListProjectAddonsResponseJsonValue' + additionalProperties: + $ref: '#/components/schemas/ListProjectAddonsResponseJsonValue' + x-stackQL-resources: + addons: + id: supabase.billing.addons + name: addons + title: Addons + methods: + list: + operation: + $ref: '#/paths/~1billing~1addons/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.selected_addons + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1billing~1addons/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1billing~1addons~1{addon_variant}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/addons/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/addons/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/addons/methods/delete' + replace: [] +servers: + - url: https://api.supabase.com/v1/projects/{ref} + variables: + ref: + description: Supabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = ''. A WHERE value always takes precedence over the environment. + x-stackQL-envVar: SUPABASE_PROJECT_ID diff --git a/providers/src/supabase/v00.00.00000/services/branches.yaml b/providers/src/supabase/v00.00.00000/services/branches.yaml new file mode 100644 index 00000000..684094e9 --- /dev/null +++ b/providers/src/supabase/v00.00.00000/services/branches.yaml @@ -0,0 +1,1490 @@ +openapi: 3.0.0 +info: + title: branches API + description: supabase branches API + version: 1.0.0 +paths: + /v1/branches/{branch_id_or_ref}: + get: + description: Fetches configurations of the specified database branch + operationId: v1-get-a-branch-config + parameters: + - name: branch_id_or_ref + required: true + in: path + description: Branch ref or deprecated branch ID + schema: + example: abcdefghijklmnopqrst + anyOf: + - type: string + minLength: 20 + maxLength: 20 + pattern: ^[a-z]+$ + 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 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BranchDetailResponse' + '500': + description: Failed to retrieve database branch + 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: + description: Updates the configuration of the specified database branch + operationId: v1-update-a-branch-config + parameters: + - name: branch_id_or_ref + required: true + in: path + description: Branch ref or deprecated branch ID + schema: + example: abcdefghijklmnopqrst + anyOf: + - type: string + minLength: 20 + maxLength: 20 + pattern: ^[a-z]+$ + 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 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateBranchBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BranchResponse' + '500': + description: Failed to update database branch + 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: + description: Deletes the specified database branch. By default, deletes immediately. Use force=false to schedule deletion with 1-hour grace period (only when soft deletion is enabled). + operationId: v1-delete-a-branch + parameters: + - name: branch_id_or_ref + required: true + in: path + description: Branch ref or deprecated branch ID + schema: + example: abcdefghijklmnopqrst + anyOf: + - type: string + minLength: 20 + maxLength: 20 + pattern: ^[a-z]+$ + 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 + - name: force + 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 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BranchDeleteResponse' + '500': + description: Failed to delete database branch + 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 + servers: + - url: https://api.supabase.com + /v1/branches/{branch_id_or_ref}/push: + post: + description: Pushes the specified database branch + operationId: v1-push-a-branch + parameters: + - name: branch_id_or_ref + required: true + in: path + description: Branch ref or deprecated branch ID + schema: + example: abcdefghijklmnopqrst + anyOf: + - type: string + minLength: 20 + maxLength: 20 + pattern: ^[a-z]+$ + 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 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BranchActionBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BranchUpdateResponse' + '500': + description: Failed to push database branch + 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 + servers: + - url: https://api.supabase.com + /v1/branches/{branch_id_or_ref}/merge: + post: + description: Merges the specified database branch + operationId: v1-merge-a-branch + parameters: + - name: branch_id_or_ref + required: true + in: path + description: Branch ref or deprecated branch ID + schema: + example: abcdefghijklmnopqrst + anyOf: + - type: string + minLength: 20 + maxLength: 20 + pattern: ^[a-z]+$ + 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 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BranchActionBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BranchUpdateResponse' + '500': + description: Failed to merge database branch + 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 + servers: + - url: https://api.supabase.com + /v1/branches/{branch_id_or_ref}/reset: + post: + description: Resets the specified database branch + operationId: v1-reset-a-branch + parameters: + - name: branch_id_or_ref + required: true + in: path + description: Branch ref or deprecated branch ID + schema: + example: abcdefghijklmnopqrst + anyOf: + - type: string + minLength: 20 + maxLength: 20 + pattern: ^[a-z]+$ + 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 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BranchActionBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BranchUpdateResponse' + '500': + description: Failed to reset database branch + 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 + servers: + - url: https://api.supabase.com + /v1/branches/{branch_id_or_ref}/restore: + post: + description: Cancels scheduled deletion and restores the branch to active state + operationId: v1-restore-a-branch + parameters: + - name: branch_id_or_ref + required: true + in: path + description: Branch ref or deprecated branch ID + schema: + example: abcdefghijklmnopqrst + anyOf: + - type: string + minLength: 20 + maxLength: 20 + pattern: ^[a-z]+$ + 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 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BranchRestoreResponse' + '500': + description: Failed to restore database branch + 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 + servers: + - url: https://api.supabase.com + /v1/branches/{branch_id_or_ref}/diff: + get: + description: Diffs the specified database branch + operationId: v1-diff-a-branch + parameters: + - name: branch_id_or_ref + required: true + in: path + description: Branch ref or deprecated branch ID + schema: + example: abcdefghijklmnopqrst + anyOf: + - type: string + minLength: 20 + maxLength: 20 + pattern: ^[a-z]+$ + 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 + - name: included_schemas + required: false + in: query + schema: + example: public,auth + type: string + - name: pgdelta + required: false + in: query + description: |- + Use pg-delta instead of Migra for diffing when true. + Boolean string. + + Truthy values: `true`, `1`, `yes`, `on`, `y`, `enabled` + + Falsy values: `false`, `0`, `no`, `off`, `n`, `disabled` + schema: + example: 'true' + type: string + responses: + '200': + content: + text/plain: + schema: + type: string + description: '' + '500': + description: Failed to diff database branch + 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 + servers: + - url: https://api.supabase.com + /actions: + head: + description: Returns the total number of action runs of the specified project. + operationId: v1-count-action-runs + 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 + parameters: + - 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/V1-list-action-runsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to list 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 + /actions/{run_id}: + get: + description: Returns the current status of the specified action run. + operationId: v1-get-action-run + parameters: + - name: run_id + required: true + in: path + description: Action Run ID + schema: + example: run_01hq3q9m7y5q7e4a7x2c8m1p4n + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActionRunResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to get action run status + 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 + /actions/{run_id}/status: + patch: + description: Updates the status of an ongoing action run. + operationId: v1-update-action-run-status + parameters: + - name: run_id + required: true + in: path + description: Action Run ID + schema: + example: run_01hq3q9m7y5q7e4a7x2c8m1p4n + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateRunStatusBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateRunStatusResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to update action run status + 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 + /actions/{run_id}/logs: + get: + description: Returns the logs from the specified action run. + operationId: v1-get-action-run-logs + parameters: + - name: run_id + required: true + in: path + description: Action Run ID + schema: + example: run_01hq3q9m7y5q7e4a7x2c8m1p4n + type: string + responses: + '200': + content: + text/plain: + schema: + type: string + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to get action run logs + 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 + /branches: + get: + description: Returns all database branches of the specified project. + operationId: v1-list-all-branches + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1-list-all-branchesResponse' + '500': + description: Failed to retrieve database branches + 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: + description: Creates a database branch from the specified project. + operationId: v1-create-a-branch + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateBranchBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BranchResponse' + '500': + description: Failed to create database branch + 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: + description: Disables preview branching for the specified project + operationId: v1-disable-preview-branching + parameters: [] + responses: + '200': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to disable preview branching + 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 + /branches/{name}: + get: + description: Fetches the specified database branch by its name. + operationId: v1-get-a-branch + parameters: + - name: name + required: true + in: path + schema: + example: preview-login-page + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BranchResponse' + '500': + description: Failed to fetch database branch + 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 +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 + exclusiveMinimum: true + maximum: 9007199254740991 + minimum: 0 + 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 + UpdateBranchBody: + type: object + properties: + branch_name: + type: string + git_branch: + type: string + reset_on_push: + description: This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead. + deprecated: true + type: boolean + 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 + 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)$ + 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 + latest_check_run_id: + description: This field is deprecated and will not be populated. + deprecated: true + type: number + 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 + pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|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 + pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|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: + - 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 + BranchDeleteResponse: + type: object + properties: + message: + type: string + enum: + - ok + required: + - message + BranchActionBody: + type: object + properties: + migration_version: + type: string + example: + migration_version: '20250312000000' + BranchUpdateResponse: + type: object + properties: + workflow_run_id: + type: string + message: + type: string + enum: + - ok + required: + - workflow_run_id + - message + BranchRestoreResponse: + type: object + properties: + message: + type: string + enum: + - Branch restoration initiated + required: + - message + 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 + 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 + 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 + UpdateRunStatusResponse: + type: object + properties: + message: + type: string + enum: + - ok + required: + - message + CreateBranchBody: + 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 + V1-list-action-runsResponse: + type: object + properties: + v1_list_action_runs: + 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 + V1-list-all-branchesResponse: + type: object + properties: + v1_list_all_branches: + type: array + items: + $ref: '#/components/schemas/BranchResponse' + x-stackQL-resources: + branch_configs: + id: supabase.branches.branch_configs + name: branch_configs + title: Branch Configs + methods: + get: + operation: + $ref: '#/paths/~1v1~1branches~1{branch_id_or_ref}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/branch_configs/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + branches: + id: supabase.branches.branches + name: branches + title: Branches + methods: + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1v1~1branches~1{branch_id_or_ref}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1v1~1branches~1{branch_id_or_ref}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + push: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1v1~1branches~1{branch_id_or_ref}~1push/post' + response: + mediaType: application/json + openAPIDocKey: '201' + merge: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1v1~1branches~1{branch_id_or_ref}~1merge/post' + response: + mediaType: application/json + openAPIDocKey: '201' + reset: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1v1~1branches~1{branch_id_or_ref}~1reset/post' + response: + mediaType: application/json + openAPIDocKey: '201' + restore: + operation: + $ref: '#/paths/~1v1~1branches~1{branch_id_or_ref}~1restore/post' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1branches/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.v1_list_all_branches + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/V1-list-all-branchesResponse' + transform: + body: |- + {{- $wrapped := printf "{\"v1_list_all_branches\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1branches/post' + response: + mediaType: application/json + openAPIDocKey: '201' + disable_branching: + operation: + $ref: '#/paths/~1branches/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1branches~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/branches/methods/get' + - $ref: '#/components/x-stackQL-resources/branches/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/branches/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/branches/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/branches/methods/delete' + replace: [] + action_runs: + id: supabase.branches.action_runs + name: action_runs + title: Action Runs + methods: + list: + operation: + $ref: '#/paths/~1actions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.v1_list_action_runs + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/V1-list-action-runsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"v1_list_action_runs\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + get: + operation: + $ref: '#/paths/~1actions~1{run_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update_status: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1actions~1{run_id}~1status/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/action_runs/methods/get' + - $ref: '#/components/x-stackQL-resources/action_runs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] +servers: + - url: https://api.supabase.com/v1/projects/{ref} + variables: + ref: + description: Supabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = ''. A WHERE value always takes precedence over the environment. + x-stackQL-envVar: SUPABASE_PROJECT_ID diff --git a/providers/src/supabase/v00.00.00000/services/config.yaml b/providers/src/supabase/v00.00.00000/services/config.yaml new file mode 100644 index 00000000..91f2c226 --- /dev/null +++ b/providers/src/supabase/v00.00.00000/services/config.yaml @@ -0,0 +1,4926 @@ +openapi: 3.0.0 +info: + title: config API + description: supabase config API + version: 1.0.0 +paths: + /pgsodium: + get: + operationId: v1-get-pgsodium-config + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/PgsodiumConfigResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve project's pgsodium config + 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: + operationId: v1-update-pgsodium-config + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdatePgsodiumConfigBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/PgsodiumConfigResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to update project's pgsodium config + security: + - bearer: [] + summary: '[Beta] Updates project''s pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.' + 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 + /postgrest: + get: + operationId: v1-get-postgrest-service-config + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/PostgrestConfigWithJWTSecretResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve project's postgrest config + security: + - bearer: [] + summary: Gets project's postgrest config + tags: + - Rest + x-badges: + - name: 'OAuth scope: rest:read' + position: after + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - data_api_config_read + x-oauth-scope: rest:read + patch: + operationId: v1-update-postgrest-service-config + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/V1UpdatePostgrestConfigBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1PostgrestConfigResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to update project's postgrest config + security: + - bearer: [] + summary: Updates project's postgrest config + tags: + - Rest + x-badges: + - name: 'OAuth scope: rest:write' + position: after + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - data_api_config_write + x-oauth-scope: rest:write + /ssl-enforcement: + get: + operationId: v1-get-ssl-enforcement-config + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SslEnforcementResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve project's SSL enforcement config + 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 + - control-plane + x-fga-permissions: + - - database_ssl_config_read + x-oauth-scope: database:read + put: + operationId: v1-update-ssl-enforcement-config + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SslEnforcementRequest' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SslEnforcementResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to update project's SSL enforcement configuration. + 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 + - control-plane + x-fga-permissions: + - - database_ssl_config_write + x-oauth-scope: database:write + /config/auth/signing-keys/legacy: + post: + operationId: v1-create-legacy-signing-key + parameters: [] + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SigningKeyResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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: + operationId: v1-get-legacy-signing-key + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SigningKeyResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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 + /config/auth/signing-keys: + post: + operationId: v1-create-project-signing-key + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateSigningKeyBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SigningKeyResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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: + operationId: v1-get-project-signing-keys + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SigningKeysResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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 + /config/auth/signing-keys/{id}: + get: + operationId: v1-get-project-signing-key + parameters: + - name: id + required: true + in: path + schema: + format: uuid + pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$ + example: 33333333-3333-4333-8333-333333333333 + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SigningKeyResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Get information about a signing key + tags: + - Auth + x-endpoint-owners: + - auth + x-fga-permissions: + - - auth_signing_keys_read + delete: + operationId: v1-remove-project-signing-key + parameters: + - name: id + required: true + in: path + schema: + format: uuid + pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$ + example: 33333333-3333-4333-8333-333333333333 + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SigningKeyResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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: + operationId: v1-update-project-signing-key + parameters: + - name: id + required: true + in: path + schema: + format: uuid + pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$ + example: 33333333-3333-4333-8333-333333333333 + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSigningKeyBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SigningKeyResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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 + /config/auth: + get: + operationId: v1-get-auth-service-config + parameters: [] + responses: + '200': + description: '' + 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: [] + 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: + operationId: v1-update-auth-service-config + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAuthConfigBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/AuthConfigResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to update project's auth config + 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 + /config/auth/third-party-auth: + post: + operationId: v1-create-project-tpa-integration + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateThirdPartyAuthBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ThirdPartyAuth' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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: + operationId: v1-list-project-tpa-integrations + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1-list-project-tpa-integrationsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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 + /config/auth/third-party-auth/{tpa_id}: + delete: + operationId: v1-delete-project-tpa-integration + parameters: + - name: tpa_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: 88888888-8888-4888-8888-888888888888 + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ThirdPartyAuth' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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: + operationId: v1-get-project-tpa-integration + parameters: + - name: tpa_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: 88888888-8888-4888-8888-888888888888 + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ThirdPartyAuth' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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 + /config/storage: + get: + operationId: v1-get-storage-config + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/StorageConfigResponse' + '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: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateStorageConfigBody' + responses: + '200': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to update project's storage config + security: + - bearer: [] + summary: Updates project's storage config + tags: + - Storage + x-endpoint-owners: + - storage + x-fga-permissions: + - - storage_config_write + /config/database/pgbouncer: + get: + operationId: v1-get-project-pgbouncer-config + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $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 + - control-plane + x-fga-permissions: + - - database_read + x-oauth-scope: database:read + /config/database/pooler: + get: + operationId: v1-get-pooler-config + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1-get-pooler-configResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve project's supavisor config + 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: + operationId: v1-update-pooler-config + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $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 + /config/database/postgres: + get: + operationId: v1-get-postgres-config + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $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 + - control-plane + x-fga-permissions: + - - database_config_read + x-oauth-scope: database:read + put: + operationId: v1-update-postgres-config + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdatePostgresConfigBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/PostgresConfigResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to update project's Postgres config + security: + - bearer: [] + summary: Updates project's Postgres config + tags: + - Database + x-badges: + - name: 'OAuth scope: database:write' + position: after + x-endpoint-owners: + - infra + - control-plane + x-fga-permissions: + - - database_config_write + x-oauth-scope: database:write + /config/realtime: + get: + operationId: v1-get-realtime-config + parameters: [] + responses: + '200': + description: Gets project's realtime configuration + content: + application/json: + schema: + $ref: '#/components/schemas/RealtimeConfigResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Gets realtime configuration + tags: + - Realtime + x-endpoint-owners: + - realtime + x-fga-permissions: + - - realtime_config_read + patch: + operationId: v1-update-realtime-config + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateRealtimeConfigBody' + responses: + '204': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Updates realtime configuration + tags: + - Realtime + x-endpoint-owners: + - realtime + x-fga-permissions: + - - realtime_config_write + /config/realtime/shutdown: + post: + operationId: v1-shutdown-realtime + parameters: [] + responses: + '204': + description: Realtime connections shutdown successfully + '401': + description: Unauthorized + '403': + description: Forbidden action + '404': + description: Tenant not found + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Shutdowns realtime connections for a project + tags: + - Realtime + x-endpoint-owners: + - realtime + x-fga-permissions: + - - realtime_config_write + /config/auth/sso/providers: + post: + operationId: v1-create-a-sso-provider + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateProviderBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CreateProviderResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '404': + description: SAML 2.0 support is not enabled for this project + '429': + description: Rate limit exceeded + 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: + operationId: v1-list-all-sso-provider + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ListProvidersResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '404': + description: SAML 2.0 support is not enabled for this project + '429': + description: Rate limit exceeded + 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 + /config/auth/sso/providers/{provider_id}: + get: + operationId: v1-get-a-sso-provider + parameters: + - name: provider_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: 77777777-7777-4777-8777-777777777777 + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/GetProviderResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '404': + description: Either SAML 2.0 was not enabled for this project, or the provider does not exist + '429': + description: Rate limit exceeded + 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: + operationId: v1-update-a-sso-provider + parameters: + - name: provider_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: 77777777-7777-4777-8777-777777777777 + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateProviderBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateProviderResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '404': + description: Either SAML 2.0 was not enabled for this project, or the provider does not exist + '429': + description: Rate limit exceeded + 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: + operationId: v1-delete-a-sso-provider + parameters: + - name: provider_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: 77777777-7777-4777-8777-777777777777 + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteProviderResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '404': + description: Either SAML 2.0 was not enabled for this project, or the provider does not exist + '429': + description: Rate limit exceeded + 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 +components: + schemas: + 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 + UpdatePgsodiumConfigBody: + 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 + PostgrestConfigWithJWTSecretResponse: + type: object + properties: + db_schema: + type: string + max_rows: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + 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 + db_pool_acquisition_timeout: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + description: If `null`, the value is automatically configured to 10. + nullable: true + jwt_secret: + type: string + required: + - db_schema + - max_rows + - db_extra_search_path + - db_pool + - db_pool_acquisition_timeout + 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 + V1PostgrestConfigResponse: + type: object + properties: + db_schema: + type: string + max_rows: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + 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 + db_pool_acquisition_timeout: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + description: If `null`, the value is automatically configured to 10. + nullable: true + required: + - db_schema + - max_rows + - db_extra_search_path + - db_pool + - db_pool_acquisition_timeout + SslEnforcementResponse: + type: object + properties: + currentConfig: + type: object + properties: + database: + type: boolean + required: + - database + appliedSuccessfully: + type: boolean + required: + - currentConfig + - appliedSuccessfully + SslEnforcementRequest: + type: object + properties: + requestedConfig: + type: object + properties: + database: + type: boolean + required: + - database + required: + - requestedConfig + example: + requestedConfig: + database: true + 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)$ + 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))$ + required: + - id + - algorithm + - status + - public_jwk + - created_at + - updated_at + additionalProperties: false + CreateSigningKeyBody: + type: object + properties: + algorithm: + type: string + enum: + - EdDSA + - ES256 + - RS256 + - HS256 + status: + type: string + enum: + - in_use + - standby + private_jwk: + 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)$ + use: + type: string + enum: + - sig + key_ops: + minItems: 2 + maxItems: 2 + type: array + items: + type: string + enum: + - sign + - verify + 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 + crv: + type: string + enum: + - P-256 + x: + type: string + 'y': + type: string + k: + type: string + minLength: 16 + required: + - kty + - 'n' + - e + - d + - p + - q + - dp + - dq + - qi + - crv + - x + - 'y' + - k + additionalProperties: false + required: + - algorithm + example: + algorithm: RS256 + status: standby + additionalProperties: false + SigningKeysResponse: + type: object + properties: + keys: + type: array + 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)$ + 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))$ + required: + - id + - algorithm + - status + - public_jwk + - created_at + - updated_at + additionalProperties: false + required: + - keys + additionalProperties: false + UpdateSigningKeyBody: + type: object + properties: + status: + type: string + enum: + - in_use + - previously_used + - revoked + - standby + required: + - status + 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 + 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 + 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 + 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 + 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 + 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 + 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 + minimum: -9007199254740991 + maximum: 9007199254740991 + mfa_phone_template: + type: string + 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 + 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 + 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 + 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 + - 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 + minimum: -9007199254740991 + maximum: 9007199254740991 + 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 + 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 + 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 + - 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 + pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|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 + 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 + 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 + 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 + 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 + minimum: -9007199254740991 + maximum: 9007199254740991 + 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 + 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 + 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 + 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 + - null + 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:!@#$%^&*()_+-=[]{};'\\:"|<>?,./`~ + - '' + - null + 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 + - null + 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 + pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|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 + 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 + minimum: -9007199254740991 + maximum: 9007199254740991 + 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 + 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 + 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 + 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)$ + 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 + StorageConfigResponse: + type: object + properties: + fileSizeLimit: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + 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 + maximum: 9007199254740991 + maxTables: + type: integer + minimum: 0 + maximum: 9007199254740991 + maxCatalogs: + type: integer + minimum: 0 + maximum: 9007199254740991 + required: + - enabled + - maxNamespaces + - maxTables + - maxCatalogs + vectorBuckets: + type: object + properties: + enabled: + type: boolean + maxBuckets: + type: integer + minimum: 0 + maximum: 9007199254740991 + maxIndexes: + type: integer + minimum: 0 + maximum: 9007199254740991 + 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 + UpdateStorageConfigBody: + type: object + properties: + fileSizeLimit: + type: integer + format: int64 + minimum: 0 + maximum: 536870912000 + 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 + maximum: 9007199254740991 + maxTables: + type: integer + minimum: 0 + maximum: 9007199254740991 + maxCatalogs: + type: integer + minimum: 0 + maximum: 9007199254740991 + required: + - enabled + - maxNamespaces + - maxTables + - maxCatalogs + vectorBuckets: + type: object + properties: + enabled: + type: boolean + maxBuckets: + type: integer + minimum: 0 + maximum: 9007199254740991 + maxIndexes: + type: integer + minimum: 0 + maximum: 9007199254740991 + required: + - enabled + - maxBuckets + - maxIndexes + external: + type: object + properties: + upstreamTarget: + type: string + enum: + - main + - canary + required: + - upstreamTarget + example: + fileSizeLimit: 10485760 + features: + imageTransformation: + enabled: true + additionalProperties: false + V1PgbouncerConfigResponse: + type: object + properties: + default_pool_size: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + ignore_startup_parameters: + type: string + 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 + 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: + 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 + minimum: -9007199254740991 + maximum: 9007199254740991 + db_name: + type: string + connection_string: + type: string + 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: + - identifier + - database_type + - is_using_scram_auth + - db_user + - db_host + - db_port + - db_name + - connection_string + - default_pool_size + - max_client_conn + - pool_mode + UpdateSupavisorConfigBody: + type: object + properties: + default_pool_size: + type: integer + minimum: 0 + maximum: 3000 + nullable: true + pool_mode: + description: Dedicated pooler mode for the project + type: string + enum: + - transaction + - session + example: + default_pool_size: 25 + pool_mode: transaction + UpdateSupavisorConfigResponse: + type: object + properties: + default_pool_size: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + nullable: true + pool_mode: + type: string + required: + - default_pool_size + - pool_mode + 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_logical_replication_workers: + type: integer + minimum: 0 + maximum: 262143 + max_parallel_maintenance_workers: + type: integer + minimum: 0 + maximum: 1024 + max_parallel_workers: + type: integer + minimum: 0 + maximum: 1024 + max_parallel_workers_per_gather: + type: integer + minimum: 0 + maximum: 1024 + max_replication_slots: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + max_slot_wal_keep_size: + type: string + max_standby_archive_delay: + type: string + max_standby_streaming_delay: + type: string + max_sync_workers_per_subscription: + type: integer + minimum: 0 + maximum: 262143 + max_wal_size: + type: string + max_wal_senders: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + max_worker_processes: + type: integer + minimum: 0 + maximum: 262143 + session_replication_role: + type: string + enum: + - origin + - replica + - local + shared_buffers: + type: string + statement_timeout: + type: string + description: 'Default unit: ms' + pattern: ^(-?[0-9]+(?:\.[0-9]+)?)(us|ms|s|min|h|d)?$ + track_commit_timestamp: + type: boolean + wal_keep_size: + type: string + wal_sender_timeout: + type: string + description: 'Default unit: ms' + pattern: ^(-?[0-9]+(?:\.[0-9]+)?)(us|ms|s|min|h|d)?$ + work_mem: + type: string + checkpoint_timeout: + type: string + description: 'Default unit: s' + pattern: ^(-?[0-9]+(?:\.[0-9]+)?)(us|ms|s|min|h|d)?$ + hot_standby_feedback: + type: boolean + 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_logical_replication_workers: + type: integer + minimum: 0 + maximum: 262143 + max_parallel_maintenance_workers: + type: integer + minimum: 0 + maximum: 1024 + max_parallel_workers: + type: integer + minimum: 0 + maximum: 1024 + max_parallel_workers_per_gather: + type: integer + minimum: 0 + maximum: 1024 + max_replication_slots: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + max_slot_wal_keep_size: + type: string + max_standby_archive_delay: + type: string + max_standby_streaming_delay: + type: string + max_sync_workers_per_subscription: + type: integer + minimum: 0 + maximum: 262143 + max_wal_size: + type: string + max_wal_senders: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + max_worker_processes: + type: integer + minimum: 0 + maximum: 262143 + session_replication_role: + type: string + enum: + - origin + - replica + - local + shared_buffers: + type: string + statement_timeout: + type: string + description: 'Default unit: ms' + pattern: ^(-?[0-9]+(?:\.[0-9]+)?)(us|ms|s|min|h|d)?$ + track_commit_timestamp: + type: boolean + wal_keep_size: + type: string + wal_sender_timeout: + type: string + description: 'Default unit: ms' + pattern: ^(-?[0-9]+(?:\.[0-9]+)?)(us|ms|s|min|h|d)?$ + work_mem: + type: string + checkpoint_timeout: + type: string + description: 'Default unit: s' + pattern: ^(-?[0-9]+(?:\.[0-9]+)?)(us|ms|s|min|h|d)?$ + hot_standby_feedback: + type: boolean + restart_database: + type: boolean + 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 + connection_pool: + type: integer + minimum: 1 + maximum: 100 + description: Sets connection pool size for Realtime Authorization + nullable: true + postgres_changes_pool: + type: integer + minimum: 1 + maximum: 100 + description: Sets connection pool size used to create Postgres Changes subscriptions + nullable: true + max_concurrent_users: + type: integer + minimum: 1 + maximum: 50000 + description: Sets maximum number of concurrent users rate limit + nullable: true + max_events_per_second: + type: integer + minimum: 1 + maximum: 50000 + description: Sets maximum number of events per second rate per channel limit + nullable: true + max_bytes_per_second: + type: integer + minimum: 1 + maximum: 10000000 + description: Sets maximum number of bytes per second rate per channel limit + nullable: true + max_channels_per_client: + type: integer + minimum: 1 + maximum: 10000 + description: Sets maximum number of channels per client rate limit + nullable: true + max_joins_per_second: + type: integer + minimum: 1 + maximum: 5000 + description: Sets maximum number of joins per second rate limit + nullable: true + max_presence_events_per_second: + type: integer + minimum: 1 + maximum: 5000 + description: Sets maximum number of presence events per second rate limit + nullable: true + max_payload_size_in_kb: + type: integer + minimum: 1 + maximum: 10000 + description: Sets maximum number of payload size in KB rate limit + nullable: true + suspend: + type: boolean + 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 + required: + - private_only + - connection_pool + - postgres_changes_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 + 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 + postgres_changes_pool: + type: integer + minimum: 1 + maximum: 100 + description: Sets connection pool size used to create Postgres Changes subscriptions + 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 + example: + private_only: false + max_concurrent_users: 1000 + max_channels_per_client: 100 + additionalProperties: false + 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: + anyOf: + - 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 + CreateProviderResponse: + type: object + properties: + id: + type: string + saml: + type: object + properties: + 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: + anyOf: + - 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: + - entity_id + domains: + type: array + items: + type: object + properties: + domain: + type: string + created_at: + type: string + updated_at: + type: string + created_at: + type: string + updated_at: + type: string + required: + - id + ListProvidersResponse: + type: object + properties: + items: + type: array + items: + type: object + properties: + id: + type: string + saml: + type: object + properties: + 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: + anyOf: + - 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: + - entity_id + domains: + type: array + items: + type: object + properties: + domain: + type: string + created_at: + type: string + updated_at: + type: string + created_at: + type: string + updated_at: + type: string + required: + - id + required: + - items + GetProviderResponse: + type: object + properties: + id: + type: string + saml: + type: object + properties: + 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: + anyOf: + - 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: + - entity_id + domains: + type: array + items: + type: object + properties: + domain: + type: string + created_at: + type: string + updated_at: + type: string + created_at: + type: string + updated_at: + type: string + required: + - id + UpdateProviderBody: + type: object + properties: + metadata_xml: + type: string + metadata_url: + type: string + domains: + type: array + items: + type: string + attribute_mapping: + type: object + properties: + keys: + type: object + additionalProperties: + type: object + properties: + name: + type: string + names: + type: array + items: + type: string + default: + anyOf: + - 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 + UpdateProviderResponse: + type: object + properties: + id: + type: string + saml: + type: object + properties: + 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: + anyOf: + - 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: + - entity_id + domains: + type: array + items: + type: object + properties: + domain: + type: string + created_at: + type: string + updated_at: + type: string + created_at: + type: string + updated_at: + type: string + required: + - id + DeleteProviderResponse: + type: object + properties: + id: + type: string + saml: + type: object + properties: + 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: + anyOf: + - 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: + - entity_id + domains: + type: array + items: + type: object + properties: + domain: + type: string + created_at: + type: string + updated_at: + type: string + created_at: + type: string + updated_at: + type: string + required: + - id + V1-list-project-tpa-integrationsResponse: + type: object + properties: + v1_list_project_tpa_integrations: + type: array + items: + $ref: '#/components/schemas/ThirdPartyAuth' + V1-get-pooler-configResponse: + type: object + properties: + v1_get_pooler_config: + type: array + items: + $ref: '#/components/schemas/SupavisorConfigResponse' + x-stackQL-resources: + pgsodium_configs: + id: supabase.config.pgsodium_configs + name: pgsodium_configs + title: Pgsodium Configs + methods: + get: + operation: + $ref: '#/paths/~1pgsodium/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1pgsodium/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/pgsodium_configs/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/pgsodium_configs/methods/update' + delete: [] + replace: [] + postgrest_configs: + id: supabase.config.postgrest_configs + name: postgrest_configs + title: Postgrest Configs + methods: + get: + operation: + $ref: '#/paths/~1postgrest/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1postgrest/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/postgrest_configs/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/postgrest_configs/methods/update' + delete: [] + replace: [] + ssl_enforcement_configs: + id: supabase.config.ssl_enforcement_configs + name: ssl_enforcement_configs + title: Ssl Enforcement Configs + methods: + get: + operation: + $ref: '#/paths/~1ssl-enforcement/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1ssl-enforcement/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + nativeCasing: camel + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/ssl_enforcement_configs/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/ssl_enforcement_configs/methods/update' + delete: [] + replace: [] + legacy_signing_keys: + id: supabase.config.legacy_signing_keys + name: legacy_signing_keys + title: Legacy Signing Keys + methods: + create: + operation: + $ref: '#/paths/~1config~1auth~1signing-keys~1legacy/post' + response: + mediaType: application/json + openAPIDocKey: '201' + get: + operation: + $ref: '#/paths/~1config~1auth~1signing-keys~1legacy/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/legacy_signing_keys/methods/get' + insert: + - $ref: '#/components/x-stackQL-resources/legacy_signing_keys/methods/create' + update: [] + delete: [] + replace: [] + auth_signing_keys: + id: supabase.config.auth_signing_keys + name: auth_signing_keys + title: Auth Signing Keys + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1config~1auth~1signing-keys/post' + response: + mediaType: application/json + openAPIDocKey: '201' + list: + operation: + $ref: '#/paths/~1config~1auth~1signing-keys/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.keys + get: + operation: + $ref: '#/paths/~1config~1auth~1signing-keys~1{id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1config~1auth~1signing-keys~1{id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1config~1auth~1signing-keys~1{id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/auth_signing_keys/methods/get' + - $ref: '#/components/x-stackQL-resources/auth_signing_keys/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/auth_signing_keys/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/auth_signing_keys/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/auth_signing_keys/methods/delete' + replace: [] + auth_configs: + id: supabase.config.auth_configs + name: auth_configs + title: Auth Configs + methods: + get: + operation: + $ref: '#/paths/~1config~1auth/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1config~1auth/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/auth_configs/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/auth_configs/methods/update' + delete: [] + replace: [] + third_party_auth_integrations: + id: supabase.config.third_party_auth_integrations + name: third_party_auth_integrations + title: Third Party Auth Integrations + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1config~1auth~1third-party-auth/post' + response: + mediaType: application/json + openAPIDocKey: '201' + list: + operation: + $ref: '#/paths/~1config~1auth~1third-party-auth/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.v1_list_project_tpa_integrations + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/V1-list-project-tpa-integrationsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"v1_list_project_tpa_integrations\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + delete: + operation: + $ref: '#/paths/~1config~1auth~1third-party-auth~1{tpa_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1config~1auth~1third-party-auth~1{tpa_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/third_party_auth_integrations/methods/get' + - $ref: '#/components/x-stackQL-resources/third_party_auth_integrations/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/third_party_auth_integrations/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/third_party_auth_integrations/methods/delete' + replace: [] + storage_configs: + id: supabase.config.storage_configs + name: storage_configs + title: Storage Configs + methods: + get: + operation: + $ref: '#/paths/~1config~1storage/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1config~1storage/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + nativeCasing: camel + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/storage_configs/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/storage_configs/methods/update' + delete: [] + replace: [] + pgbouncer_configs: + id: supabase.config.pgbouncer_configs + name: pgbouncer_configs + title: Pgbouncer Configs + methods: + get: + operation: + $ref: '#/paths/~1config~1database~1pgbouncer/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/pgbouncer_configs/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + pooler_configs: + id: supabase.config.pooler_configs + name: pooler_configs + title: Pooler Configs + methods: + list: + operation: + $ref: '#/paths/~1config~1database~1pooler/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.v1_get_pooler_config + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/V1-get-pooler-configResponse' + transform: + body: |- + {{- $wrapped := printf "{\"v1_get_pooler_config\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1config~1database~1pooler/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/pooler_configs/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/pooler_configs/methods/update' + delete: [] + replace: [] + postgres_configs: + id: supabase.config.postgres_configs + name: postgres_configs + title: Postgres Configs + methods: + get: + operation: + $ref: '#/paths/~1config~1database~1postgres/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1config~1database~1postgres/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/postgres_configs/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/postgres_configs/methods/update' + delete: [] + replace: [] + realtime_configs: + id: supabase.config.realtime_configs + name: realtime_configs + title: Realtime Configs + methods: + get: + operation: + $ref: '#/paths/~1config~1realtime/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1config~1realtime/patch' + response: + mediaType: application/json + openAPIDocKey: '204' + shutdown: + operation: + $ref: '#/paths/~1config~1realtime~1shutdown/post' + response: + mediaType: application/json + openAPIDocKey: '204' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/realtime_configs/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/realtime_configs/methods/update' + delete: [] + replace: [] + sso_providers: + id: supabase.config.sso_providers + name: sso_providers + title: Sso Providers + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1config~1auth~1sso~1providers/post' + response: + mediaType: application/json + openAPIDocKey: '201' + list: + operation: + $ref: '#/paths/~1config~1auth~1sso~1providers/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.items + get: + operation: + $ref: '#/paths/~1config~1auth~1sso~1providers~1{provider_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1config~1auth~1sso~1providers~1{provider_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1config~1auth~1sso~1providers~1{provider_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sso_providers/methods/get' + - $ref: '#/components/x-stackQL-resources/sso_providers/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/sso_providers/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/sso_providers/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/sso_providers/methods/delete' + replace: [] +servers: + - url: https://api.supabase.com/v1/projects/{ref} + variables: + ref: + description: Supabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = ''. A WHERE value always takes precedence over the environment. + x-stackQL-envVar: SUPABASE_PROJECT_ID diff --git a/providers/src/supabase/v00.00.00000/services/database.yaml b/providers/src/supabase/v00.00.00000/services/database.yaml new file mode 100644 index 00000000..22352827 --- /dev/null +++ b/providers/src/supabase/v00.00.00000/services/database.yaml @@ -0,0 +1,2910 @@ +openapi: 3.0.0 +info: + title: database API + description: Database related endpoints + version: 1.0.0 +paths: + /v1/snippets: + get: + operationId: v1-list-all-snippets + parameters: + - name: project_ref + required: false + in: query + description: Project ref + schema: + minLength: 20 + maxLength: 20 + pattern: ^[a-z]+$ + example: abcdefghijklmnopqrst + type: string + - name: cursor + required: false + in: query + schema: + type: string + - name: limit + required: false + in: query + schema: + type: string + minimum: 1 + maximum: 100 + - name: sort_by + required: false + in: query + schema: + enum: + - name + - inserted_at + type: string + - name: sort_order + required: false + in: query + schema: + enum: + - asc + - desc + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SnippetList' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to list user's SQL snippets + 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: + - control-plane + x-fga-permissions: + - - snippets_read + x-oauth-scope: database:read + servers: + - url: https://api.supabase.com + /v1/snippets/{id}: + get: + operationId: v1-get-a-snippet + parameters: + - name: id + required: true + in: path + schema: + format: uuid + pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$ + example: 44444444-4444-4444-8444-444444444444 + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SnippetResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve SQL snippet + security: + - bearer: [] + summary: Gets a specific SQL snippet + tags: + - Database + x-badges: + - name: 'OAuth scope: database:read' + position: after + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - snippets_read + x-oauth-scope: database:read + servers: + - url: https://api.supabase.com + /jit-access: + get: + operationId: v1-get-jit-access-config + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + state: + type: string + enum: + - enabled + - disabled + appliedSuccessfully: + type: boolean + unavailableReason: + type: string + enum: + - postgres_upgrade_required + - ssl_enforcement_required + - temporarily_unavailable + required: + - state + - unavailableReason + additionalProperties: false + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve project's temporary access configuration. + 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 + - control-plane + x-fga-permissions: + - - project_admin_read + x-oauth-scope: database:read + put: + operationId: v1-update-jit-access-config + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/JitAccessRequestRequest' + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + state: + type: string + enum: + - enabled + - disabled + appliedSuccessfully: + type: boolean + unavailableReason: + type: string + enum: + - postgres_upgrade_required + - ssl_enforcement_required + - temporarily_unavailable + required: + - state + - unavailableReason + additionalProperties: false + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to update project's temporary access configuration. + 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 + - control-plane + x-fga-permissions: + - - project_admin_write + x-oauth-scope: database:write + /types/typescript: + get: + description: Returns the TypeScript types of your schema for use with supabase-js. + operationId: v1-generate-typescript-types + parameters: + - name: included_schemas + required: false + in: query + schema: + default: public + example: public,auth + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TypescriptResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to generate TypeScript types + 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 + /readonly: + get: + operationId: v1-get-readonly-mode-status + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ReadOnlyStatusResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to get project readonly mode status + security: + - bearer: [] + summary: Returns project's readonly mode status + tags: + - Database + x-badges: + - name: 'OAuth scope: database:read' + position: after + x-endpoint-owners: + - control-plane + - infra + - support-tooling + x-fga-permissions: + - - database_readonly_config_read + x-oauth-scope: database:read + /readonly/temporary-disable: + post: + operationId: v1-disable-readonly-mode-temporarily + parameters: [] + 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: [] + 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: + - control-plane + - infra + - support-tooling + x-fga-permissions: + - - database_readonly_config_write + x-oauth-scope: database:write + /cli/login-role: + post: + operationId: v1-create-login-role + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateRoleBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CreateRoleResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to create login role + 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: + operationId: v1-delete-login-roles + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteRolesResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to delete login roles + 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 + /database/migrations: + get: + operationId: v1-list-migration-history + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1-list-migration-historyResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to list database migrations + 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: + operationId: v1-apply-a-migration + parameters: + - 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: + '200': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to apply database migration + 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: + operationId: v1-upsert-a-migration + parameters: + - 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/V1UpsertMigrationBody' + responses: + '200': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to upsert database migration + 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: + operationId: v1-rollback-migrations + parameters: + - 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: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to rollback database migration + 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 + /database/migrations/{version}: + get: + operationId: v1-get-a-migration + parameters: + - name: version + required: true + in: path + schema: + pattern: ^\d+$ + example: '20250312000000' + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1GetMigrationResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to get database migration + 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: + operationId: v1-patch-a-migration + parameters: + - name: version + required: true + in: path + schema: + pattern: ^\d+$ + example: '20250312000000' + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/V1PatchMigrationBody' + responses: + '200': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to patch database migration + 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 + /database/query: + post: + operationId: v1-run-a-query + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/V1RunQueryBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1RunQueryResultRows' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to run sql query + security: + - bearer: [] + summary: '[Beta] Run sql query' + tags: + - Database + x-badges: + - name: 'OAuth scope: database:write' + position: after + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - database_read + - - database_write + x-oauth-scope: database:write + /database/query/read-only: + post: + description: All entity references must be schema qualified. + operationId: v1-read-only-query + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/V1ReadOnlyQueryBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1RunQueryResultRows' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to run read-only sql query + 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: + - control-plane + x-fga-permissions: + - - database_read + x-oauth-scope: database:read + /database/webhooks/enable: + post: + operationId: v1-enable-database-webhook + parameters: [] + 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 + security: + - bearer: [] + summary: '[Beta] Enables Database Webhooks on the project' + tags: + - Database + x-badges: + - name: 'OAuth scope: database:write' + position: after + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - database_webhooks_config_write + x-oauth-scope: database:write + /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: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/GetProjectDbMetadataResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Gets database metadata for the given project. + tags: + - Database + x-badges: + - name: 'OAuth scope: projects:read' + position: after + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - database_read + x-oauth-scope: projects:read + /database/password: + patch: + operationId: v1-update-database-password + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/V1UpdatePasswordBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1UpdatePasswordResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to update database password + security: + - bearer: [] + summary: Updates the database password + tags: + - Database + x-badges: + - name: 'OAuth scope: database:write' + position: after + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - database_config_write + x-oauth-scope: database:write + /database/jit: + get: + description: Mappings of roles a user can assume in the project database + operationId: v1-get-jit-access + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/JitAccessResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to list database jit access + 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: + description: Authorizes the request to assume a role in the project database + operationId: v1-authorize-jit-access + parameters: [] + 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: + - 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: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateJitAccessBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/JitAccessResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to update JIT access + security: + - bearer: [] + summary: Updates a user mapping for JIT access + tags: + - Database + x-endpoint-owners: + - security + x-fga-permissions: + - - database_jit_write + /database/jit/list: + get: + description: Mappings of roles a user can assume in the project database + operationId: v1-list-jit-access + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/JitListAccessResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to list database jit access + security: + - bearer: [] + summary: List all user-id to role mappings for JIT access + tags: + - Database + x-endpoint-owners: + - security + x-fga-permissions: + - - database_jit_write + /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: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/InviteExternalUserJitAccessBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/InviteExternalUserJitResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to invite external user + security: + - bearer: [] + summary: Invites an external user to a database for JIT access + tags: + - Database + x-endpoint-owners: + - security + x-fga-permissions: + - - database_jit_write + /database/jit/invite/accept: + post: + description: Accepts the invitation to JIT database access + operationId: v1-accept-invite-external-jit-access + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AcceptInviteExternalUserJitAccessBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $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 + /database/jit/invite/{invite_id}: + delete: + description: Revokes and deletes the invitation + operationId: v1-delete-invite-external-jit-access + parameters: + - 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 + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to revoke invite for external user + security: + - bearer: [] + 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 + /database/jit/{user_id}: + delete: + description: Remove JIT mappings of a user, revoking all JIT database access + operationId: v1-delete-jit-access + parameters: + - 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: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to remove JIT access + security: + - bearer: [] + summary: Delete JIT access by user-id + tags: + - Database + x-endpoint-owners: + - security + x-fga-permissions: + - - database_jit_write + /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: schema + required: false + in: query + description: The database schema to generate the OpenAPI spec for + schema: + default: public + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + type: string + description: (opaque JSON object) + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to fetch PostgREST OpenAPI spec + security: + - bearer: [] + summary: Get PostgREST OpenAPI spec + tags: + - Database + x-badges: + - name: 'OAuth scope: database:read' + position: after + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - database_read + x-oauth-scope: database:read + /database/backups: + get: + operationId: v1-list-all-backups + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1BackupsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to get backups + 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 + /database/backups/restore-pitr: + post: + operationId: v1-restore-pitr-backup + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/V1RestorePitrBody' + responses: + '201': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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 + /database/backups/restore-point: + post: + operationId: v1-create-restore-point + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/V1RestorePointPostBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1RestorePointResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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 + get: + operationId: v1-get-restore-point + parameters: + - name: name + required: false + in: query + schema: + maxLength: 20 + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1RestorePointResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to get requested restore points + 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 + /database/backups/restore: + post: + operationId: v1-restore-physical-backup + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/V1RestoreBackupBody' + responses: + '201': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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 + /database/backups/schedule: + get: + operationId: v1-get-backup-schedule + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1BackupScheduleResponse' + '401': + description: Unauthorized + '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: [] + summary: Gets the backup schedule for a project + tags: + - Database + x-allowed-plans: + - Enterprise + x-badges: + - name: 'OAuth scope: database:read' + position: after + - name: Only available on Enterprise + position: before + x-endpoint-owners: + - infra + x-fga-permissions: + - - backups_read + x-oauth-scope: database:read + patch: + description: Sets the time at which the daily backup runs. The change takes effect on the next backup window that includes the new time. If the new time has already passed for today, the first backup at the new time will occur the following day. It can only be updated 3 times per 24 hours. + operationId: v1-update-backup-schedule + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/V1UpdateBackupScheduleBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1BackupScheduleResponse' + '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' + '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: [] + summary: Updates the backup schedule time for a project + tags: + - Database + x-allowed-plans: + - Enterprise + x-badges: + - name: 'OAuth scope: database:write' + position: after + - name: Only available on Enterprise + position: before + x-endpoint-owners: + - infra + x-fga-permissions: + - - backups_write + x-oauth-scope: database:write + /database/backups/undo: + post: + operationId: v1-undo + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/V1UndoBody' + responses: + '201': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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 +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 + 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: + deprecated: true + description: 'Deprecated: Rely on root-level favorite property instead.' + type: boolean + 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 + JitAccessRequestRequest: + type: object + properties: + state: + type: string + enum: + - enabled + - disabled + required: + - state + example: + state: enabled + TypescriptResponse: + type: object + properties: + types: + type: string + required: + - types + ReadOnlyStatusResponse: + type: object + properties: + enabled: + type: boolean + override_enabled: + type: boolean + override_active_until: + type: string + required: + - enabled + - override_enabled + - override_active_until + CreateRoleBody: + type: object + properties: + read_only: + type: boolean + required: + - read_only + example: + read_only: true + CreateRoleResponse: + type: object + properties: + role: + type: string + minLength: 1 + password: + type: string + minLength: 1 + ttl_seconds: + type: integer + minimum: 1 + maximum: 9007199254740991 + format: int64 + required: + - role + - password + - ttl_seconds + DeleteRolesResponse: + type: object + properties: + message: + type: string + enum: + - ok + required: + - message + V1ListMigrationsResponse: + type: array + items: + type: object + properties: + version: + type: string + minLength: 1 + name: + type: string + required: + - version + 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; + 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; + 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 + V1PatchMigrationBody: + type: object + properties: + name: + type: string + rollback: + type: string + example: + name: create_widgets_table + rollback: drop table if exists public.widgets; + 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 + V1ReadOnlyQueryBody: + type: object + properties: + query: + type: string + minLength: 1 + parameters: + type: array + items: {} + required: + - query + example: + query: select * from pg_stat_activity limit 1; + 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: {} + required: + - name + - schemas + additionalProperties: {} + required: + - databases + V1UpdatePasswordBody: + type: object + properties: + password: + type: string + minLength: 4 + required: + - password + example: + password: correct-horse-battery-staple + V1UpdatePasswordResponse: + type: object + properties: + message: + type: string + required: + - message + 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_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 + 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 + allowed_cidrs_v6: + 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])$ + required: + - cidr + branches_only: + type: boolean + required: + - role + required: + - user_roles + AuthorizeJitAccessBody: + type: object + properties: + role: + type: string + minLength: 1 + rhost: + 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])$ + required: + - role + - rhost + example: + role: postgres + rhost: 203.0.113.10 + 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_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 + 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 + allowed_cidrs_v6: + 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])$ + required: + - cidr + branches_only: + type: boolean + required: + - role + required: + - user_id + - user_role + 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)$ + 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 + 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 + allowed_cidrs_v6: + 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])$ + 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 + JitListAccessResponse: + type: object + properties: + items: + type: array + items: + anyOf: + - 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)$ + primary_email: + type: string + nullable: true + invite_id: + nullable: true + expires_at: + nullable: true + 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 + 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 + allowed_cidrs_v6: + 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])$ + required: + - cidr + branches_only: + type: boolean + required: + - role + required: + - user_id + - primary_email + - invite_id + - expires_at + - user_roles + - type: object + properties: + user_id: + nullable: true + 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)$ + 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 + 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 + allowed_cidrs_v6: + 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])$ + required: + - cidr + branches_only: + type: boolean + required: + - role + required: + - user_id + - primary_email + - invite_id + - expires_at + - user_roles + required: + - items + 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,}$ + 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 + 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 + allowed_cidrs_v6: + 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])$ + 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 + 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)$ + 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 + 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 + allowed_cidrs_v6: + 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])$ + required: + - cidr + branches_only: + type: boolean + required: + - role + required: + - email + - invite_id + - user_roles + 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,}$ + token: + type: string + minLength: 1 + required: + - email + - token + example: + email: external-user@somedomain.xyz + token: '' + 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 + minimum: -9007199254740991 + maximum: 9007199254740991 + 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 + minimum: -9007199254740991 + maximum: 9007199254740991 + latest_physical_backup_date_unix: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + required: + - region + - walg_enabled + - pitr_enabled + - backups + - physical_backup_data + V1RestorePitrBody: + type: object + properties: + recovery_time_target_unix: + type: integer + minimum: 0 + maximum: 9007199254740991 + format: int64 + required: + - recovery_time_target_unix + example: + recovery_time_target_unix: 1740787200 + V1RestorePointPostBody: + type: object + properties: + name: + type: string + maxLength: 20 + required: + - name + example: + name: before-upgrade + V1RestorePointResponse: + type: object + 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 + required: + - name + - status + - completed_on + V1RestoreBackupBody: + type: object + properties: + id: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + required: + - id + example: + id: 12345 + V1BackupScheduleResponse: + type: object + 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' + required: + - schedule_for + - updated_at + 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 + V1UpdateBackupScheduleBody: + type: object + 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' + required: + - schedule_for + example: + schedule_for: '04:00:00' + V1UndoBody: + type: object + properties: + name: + type: string + maxLength: 20 + required: + - name + example: + name: before-upgrade + V1RunQueryResultRows: + type: object + description: Result of a SQL statement run against the project database. The API returns a bare JSON array of row objects whose keys depend on the statement; the provider presents it as one row whose rows column carries the array (address values with json_extract). + properties: + rows: + type: array + description: The result rows as returned by Postgres, one object per row, keyed by column name. + items: + type: object + additionalProperties: true + V1-list-migration-historyResponse: + type: object + properties: + v1_list_migration_history: + type: array + items: + type: object + properties: + version: + type: string + minLength: 1 + name: + type: string + required: + - version + x-stackQL-resources: + snippets: + id: supabase.database.snippets + name: snippets + title: Snippets + methods: + list: + operation: + $ref: '#/paths/~1v1~1snippets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + config: + pagination: + requestToken: + key: cursor + location: query + responseToken: + key: $.cursor + location: body + get: + operation: + $ref: '#/paths/~1v1~1snippets~1{id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/snippets/methods/get' + - $ref: '#/components/x-stackQL-resources/snippets/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + jit_access_configs: + id: supabase.database.jit_access_configs + name: jit_access_configs + title: Jit Access Configs + methods: + get: + operation: + $ref: '#/paths/~1jit-access/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1jit-access/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/jit_access_configs/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/jit_access_configs/methods/update' + delete: [] + replace: [] + typescript_types: + id: supabase.database.typescript_types + name: typescript_types + title: Typescript Types + methods: + get: + operation: + $ref: '#/paths/~1types~1typescript/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/typescript_types/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + readonly_mode: + id: supabase.database.readonly_mode + name: readonly_mode + title: Readonly Mode + methods: + get: + operation: + $ref: '#/paths/~1readonly/get' + response: + mediaType: application/json + openAPIDocKey: '200' + temporary_disable: + operation: + $ref: '#/paths/~1readonly~1temporary-disable/post' + response: + mediaType: application/json + openAPIDocKey: '201' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/readonly_mode/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + cli_login_roles: + id: supabase.database.cli_login_roles + name: cli_login_roles + title: Cli Login Roles + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1cli~1login-role/post' + response: + mediaType: application/json + openAPIDocKey: '201' + delete: + operation: + $ref: '#/paths/~1cli~1login-role/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/cli_login_roles/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/cli_login_roles/methods/delete' + replace: [] + migrations: + id: supabase.database.migrations + name: migrations + title: Migrations + methods: + list: + operation: + $ref: '#/paths/~1database~1migrations/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.v1_list_migration_history + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/V1-list-migration-historyResponse' + transform: + body: |- + {{- $wrapped := printf "{\"v1_list_migration_history\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1database~1migrations/post' + response: + mediaType: application/json + openAPIDocKey: '200' + upsert: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1database~1migrations/put' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1database~1migrations/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1database~1migrations~1{version}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1database~1migrations~1{version}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/migrations/methods/get' + - $ref: '#/components/x-stackQL-resources/migrations/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/migrations/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/migrations/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/migrations/methods/delete' + replace: [] + queries: + id: supabase.database.queries + name: queries + title: Queries + methods: + run: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1database~1query/post' + response: + mediaType: application/json + openAPIDocKey: '201' + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/V1RunQueryResultRows' + transform: + body: |- + {{- $wrapped := printf "{\"rows\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + run_read_only: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1database~1query~1read-only/post' + response: + mediaType: application/json + openAPIDocKey: '201' + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/V1RunQueryResultRows' + transform: + body: |- + {{- $wrapped := printf "{\"rows\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/queries/methods/run' + update: [] + delete: [] + replace: [] + webhooks: + id: supabase.database.webhooks + name: webhooks + title: Webhooks + methods: + enable: + operation: + $ref: '#/paths/~1database~1webhooks~1enable/post' + response: + mediaType: application/json + openAPIDocKey: '201' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + databases: + id: supabase.database.databases + name: databases + title: Databases + methods: + list: + operation: + $ref: '#/paths/~1database~1context/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.databases + update_password: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1database~1password/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/databases/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + jit_role_mappings: + id: supabase.database.jit_role_mappings + name: jit_role_mappings + title: Jit Role Mappings + methods: + get: + operation: + $ref: '#/paths/~1database~1jit/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/jit_role_mappings/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + jit_access: + id: supabase.database.jit_access + name: jit_access + title: Jit Access + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1database~1jit/post' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1database~1jit/put' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1database~1jit~1list/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.items + delete: + operation: + $ref: '#/paths/~1database~1jit~1{user_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/jit_access/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/jit_access/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/jit_access/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/jit_access/methods/delete' + replace: [] + jit_invites: + id: supabase.database.jit_invites + name: jit_invites + title: Jit Invites + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1database~1jit~1invite/post' + response: + mediaType: application/json + openAPIDocKey: '200' + accept: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1database~1jit~1invite~1accept/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1database~1jit~1invite~1{invite_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/jit_invites/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/jit_invites/methods/delete' + replace: [] + backups: + id: supabase.database.backups + name: backups + title: Backups + methods: + list: + operation: + $ref: '#/paths/~1database~1backups/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.backups + restore_pitr: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1database~1backups~1restore-pitr/post' + response: + mediaType: application/json + openAPIDocKey: '201' + restore: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1database~1backups~1restore/post' + response: + mediaType: application/json + openAPIDocKey: '201' + undo: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1database~1backups~1undo/post' + response: + mediaType: application/json + openAPIDocKey: '201' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/backups/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + restore_points: + id: supabase.database.restore_points + name: restore_points + title: Restore Points + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1database~1backups~1restore-point/post' + response: + mediaType: application/json + openAPIDocKey: '201' + get: + operation: + $ref: '#/paths/~1database~1backups~1restore-point/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/restore_points/methods/get' + insert: + - $ref: '#/components/x-stackQL-resources/restore_points/methods/create' + update: [] + delete: [] + replace: [] + backup_schedules: + id: supabase.database.backup_schedules + name: backup_schedules + title: Backup Schedules + methods: + get: + operation: + $ref: '#/paths/~1database~1backups~1schedule/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1database~1backups~1schedule/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/backup_schedules/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/backup_schedules/methods/update' + delete: [] + replace: [] +servers: + - url: https://api.supabase.com/v1/projects/{ref} + variables: + ref: + description: Supabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = ''. A WHERE value always takes precedence over the environment. + x-stackQL-envVar: SUPABASE_PROJECT_ID diff --git a/providers/src/supabase/v00.00.00000/services/domains.yaml b/providers/src/supabase/v00.00.00000/services/domains.yaml new file mode 100644 index 00000000..489f62be --- /dev/null +++ b/providers/src/supabase/v00.00.00000/services/domains.yaml @@ -0,0 +1,637 @@ +openapi: 3.0.0 +info: + title: domains API + description: Domains related endpoints + version: 1.0.0 +paths: + /custom-hostname: + get: + operationId: v1-get-hostname-config + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCustomHostnameResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve project's custom hostname config + 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 + - control-plane + x-fga-permissions: + - - custom_domain_read + x-oauth-scope: domains:read + delete: + operationId: v1-Delete hostname config + parameters: + - name: remove_addon + required: false + in: query + description: If true, also removes the custom domain add-on from the project subscription. + schema: + type: string + responses: + '200': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to delete project custom hostname configuration + 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 + - control-plane + x-fga-permissions: + - - custom_domain_write + x-oauth-scope: domains:write + /custom-hostname/initialize: + post: + operationId: v1-update-hostname-config + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCustomHostnameBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCustomHostnameResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to update project custom hostname configuration + 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 + - control-plane + x-fga-permissions: + - - custom_domain_write + x-oauth-scope: domains:write + /custom-hostname/reverify: + post: + operationId: v1-verify-dns-config + parameters: [] + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCustomHostnameResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to verify project custom hostname configuration + security: + - bearer: [] + summary: '[Beta] Attempts to verify the DNS configuration for project''s custom hostname configuration' + tags: + - Domains + x-badges: + - name: 'OAuth scope: domains:write' + position: after + x-endpoint-owners: + - infra + - control-plane + x-fga-permissions: + - - custom_domain_write + x-oauth-scope: domains:write + /custom-hostname/activate: + post: + operationId: v1-activate-custom-hostname + parameters: [] + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCustomHostnameResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to activate project custom hostname configuration + 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 + - control-plane + x-fga-permissions: + - - custom_domain_write + x-oauth-scope: domains:write + /vanity-subdomain: + get: + operationId: v1-get-vanity-subdomain-config + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/VanitySubdomainConfigResponse' + '400': + 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: [] + summary: '[Beta] Gets current vanity subdomain config' + tags: + - Domains + x-allowed-plans: + - Pro + - Team + - Enterprise + x-badges: + - name: 'OAuth scope: domains:read' + position: after + - name: Only available on Pro, Team, Enterprise + position: before + x-endpoint-owners: + - infra + - control-plane + x-fga-permissions: + - - vanity_subdomain_read + x-oauth-scope: domains:read + delete: + operationId: v1-deactivate-vanity-subdomain-config + parameters: [] + responses: + '200': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to delete project vanity subdomain configuration + 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 + - control-plane + x-fga-permissions: + - - vanity_subdomain_write + x-oauth-scope: domains:write + /vanity-subdomain/check-availability: + post: + operationId: v1-check-vanity-subdomain-availability + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/VanitySubdomainBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SubdomainAvailabilityResponse' + '400': + 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: [] + summary: '[Beta] Checks vanity subdomain availability' + tags: + - Domains + x-allowed-plans: + - Pro + - Team + - Enterprise + x-badges: + - name: 'OAuth scope: domains:write' + position: after + - name: Only available on Pro, Team, Enterprise + position: before + x-endpoint-owners: + - infra + - control-plane + x-fga-permissions: + - - vanity_subdomain_write + x-oauth-scope: domains:write + /vanity-subdomain/activate: + post: + operationId: v1-activate-vanity-subdomain-config + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/VanitySubdomainBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActivateVanitySubdomainResponse' + '400': + 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: [] + summary: '[Beta] Activates a vanity subdomain for a project.' + tags: + - Domains + x-allowed-plans: + - Pro + - Team + - Enterprise + x-badges: + - name: 'OAuth scope: domains:write' + position: after + - name: Only available on Pro, Team, Enterprise + position: before + x-endpoint-owners: + - infra + - control-plane + x-fga-permissions: + - - vanity_subdomain_write + x-oauth-scope: domains:write +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: + $ref: '#/components/schemas/UpdateCustomHostnameResponseJsonValue' + messages: + type: array + items: + $ref: '#/components/schemas/UpdateCustomHostnameResponseJsonValue' + 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 + UpdateCustomHostnameBody: + type: object + properties: + custom_hostname: + type: string + minLength: 1 + maxLength: 253 + required: + - custom_hostname + example: + custom_hostname: docs.example.com + VanitySubdomainConfigResponse: + type: object + properties: + status: + type: string + enum: + - not-used + - custom-domain-used + - active + custom_domain: + type: string + minLength: 1 + 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 + required: + - vanity_subdomain + example: + vanity_subdomain: acme-prod + SubdomainAvailabilityResponse: + type: object + properties: + available: + type: boolean + required: + - available + ActivateVanitySubdomainResponse: + type: object + properties: + custom_domain: + type: string + required: + - custom_domain + UpdateCustomHostnameResponseJsonValue: + description: Any JSON-serializable value + anyOf: + - type: string + - type: number + - type: boolean + nullable: true + type: array + items: + $ref: '#/components/schemas/UpdateCustomHostnameResponseJsonValue' + additionalProperties: + $ref: '#/components/schemas/UpdateCustomHostnameResponseJsonValue' + x-stackQL-resources: + custom_hostnames: + id: supabase.domains.custom_hostnames + name: custom_hostnames + title: Custom Hostnames + methods: + get: + operation: + $ref: '#/paths/~1custom-hostname/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1custom-hostname/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + initialize: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1custom-hostname~1initialize/post' + response: + mediaType: application/json + openAPIDocKey: '201' + reverify: + operation: + $ref: '#/paths/~1custom-hostname~1reverify/post' + response: + mediaType: application/json + openAPIDocKey: '201' + activate: + operation: + $ref: '#/paths/~1custom-hostname~1activate/post' + response: + mediaType: application/json + openAPIDocKey: '201' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/custom_hostnames/methods/get' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/custom_hostnames/methods/delete' + replace: [] + vanity_subdomains: + id: supabase.domains.vanity_subdomains + name: vanity_subdomains + title: Vanity Subdomains + methods: + get: + operation: + $ref: '#/paths/~1vanity-subdomain/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1vanity-subdomain/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + check_availability: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1vanity-subdomain~1check-availability/post' + response: + mediaType: application/json + openAPIDocKey: '201' + activate: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1vanity-subdomain~1activate/post' + response: + mediaType: application/json + openAPIDocKey: '201' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/vanity_subdomains/methods/get' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/vanity_subdomains/methods/delete' + replace: [] +servers: + - url: https://api.supabase.com/v1/projects/{ref} + variables: + ref: + description: Supabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = ''. A WHERE value always takes precedence over the environment. + x-stackQL-envVar: SUPABASE_PROJECT_ID diff --git a/providers/src/supabase/v00.00.00000/services/functions.yaml b/providers/src/supabase/v00.00.00000/services/functions.yaml new file mode 100644 index 00000000..2d4cccb3 --- /dev/null +++ b/providers/src/supabase/v00.00.00000/services/functions.yaml @@ -0,0 +1,731 @@ +openapi: 3.0.0 +info: + title: functions API + description: supabase functions API + version: 1.0.0 +paths: + /functions: + get: + description: Returns all functions you've previously added to the specified project. + operationId: v1-list-all-functions + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1-list-all-functionsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve project's functions + 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: + 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: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/V1CreateFunctionBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/FunctionResponse' + '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 create project's function + 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: + 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: [] + 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: + - 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 + /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: 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: + '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 + '429': + description: Rate limit exceeded + '500': + description: Failed to deploy function + 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 + /functions/{function_slug}: + get: + description: Retrieves a function with the specified slug and project. + operationId: v1-get-a-function + parameters: + - name: function_slug + required: true + in: path + description: Function slug + schema: + pattern: ^[A-Za-z0-9_-]+$ + example: hello-world + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/FunctionSlugResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve function with given slug + 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: + description: Updates a function with the specified slug and project. + operationId: v1-update-a-function + parameters: + - name: function_slug + required: true + in: path + description: Function slug + schema: + pattern: ^[A-Za-z0-9_-]+$ + example: hello-world + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/V1UpdateFunctionBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/FunctionResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to update function with given slug + 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: + description: Deletes a function with the specified slug from the specified project. + operationId: v1-delete-a-function + parameters: + - name: function_slug + required: true + in: path + description: Function slug + schema: + pattern: ^[A-Za-z0-9_-]+$ + example: hello-world + type: string + responses: + '200': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to delete function with given slug + 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 + /functions/{function_slug}/body: + get: + description: Retrieves a function body for the specified slug and project. + operationId: v1-get-a-function-body + parameters: + - name: function_slug + required: true + in: path + description: Function slug + schema: + pattern: ^[A-Za-z0-9_-]+$ + example: hello-world + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/StreamableFile' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve function body with given slug + 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 +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 + 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 + import_map_path: + type: string + ezbr_sha256: + type: string + required: + - id + - slug + - name + - status + - version + - created_at + - updated_at + 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 + 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 + 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 + 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 + 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 + 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 + import_map_path: + type: string + ezbr_sha256: + type: string + required: + - id + - slug + - name + - status + - version + - created_at + - updated_at + required: + - functions + 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: + - file + - metadata + example: + file: + - ./supabase/functions/hello-world/index.ts + metadata: + entrypoint_path: index.ts + verify_jwt: true + name: Hello World + DeployFunctionResponse: + type: object + properties: + id: + type: string + 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 + 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 + FunctionSlugResponse: + type: object + properties: + id: + type: string + 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 + 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 + 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 + StreamableFile: + type: object + properties: {} + V1-list-all-functionsResponse: + type: object + properties: + v1_list_all_functions: + type: array + items: + $ref: '#/components/schemas/FunctionResponse' + x-stackQL-resources: + edge_functions: + id: supabase.functions.edge_functions + name: edge_functions + title: Edge Functions + methods: + list: + operation: + $ref: '#/paths/~1functions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.v1_list_all_functions + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/V1-list-all-functionsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"v1_list_all_functions\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1functions/post' + response: + mediaType: application/json + openAPIDocKey: '201' + get: + operation: + $ref: '#/paths/~1functions~1{function_slug}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1functions~1{function_slug}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1functions~1{function_slug}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/edge_functions/methods/get' + - $ref: '#/components/x-stackQL-resources/edge_functions/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/edge_functions/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/edge_functions/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/edge_functions/methods/delete' + replace: [] +servers: + - url: https://api.supabase.com/v1/projects/{ref} + variables: + ref: + description: Supabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = ''. A WHERE value always takes precedence over the environment. + x-stackQL-envVar: SUPABASE_PROJECT_ID diff --git a/providers/src/supabase/v00.00.00000/services/network.yaml b/providers/src/supabase/v00.00.00000/services/network.yaml new file mode 100644 index 00000000..afbf9d90 --- /dev/null +++ b/providers/src/supabase/v00.00.00000/services/network.yaml @@ -0,0 +1,519 @@ +openapi: 3.0.0 +info: + title: network API + description: supabase network API + version: 1.0.0 +paths: + /network-bans/retrieve: + post: + operationId: v1-list-all-network-bans + parameters: [] + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/NetworkBanResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve project's network bans + security: + - bearer: [] + summary: '[Beta] Gets project''s network bans' + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:read' + position: after + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - database_network_bans_read + x-oauth-scope: projects:read + /network-bans/retrieve/enriched: + post: + operationId: v1-list-all-network-bans-enriched + parameters: [] + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/NetworkBanResponseEnriched' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve project's enriched network bans + security: + - bearer: [] + summary: '[Beta] Gets project''s network bans with additional information about which databases they affect' + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:read' + position: after + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - database_network_bans_read + x-oauth-scope: projects:read + /network-bans: + delete: + operationId: v1-delete-network-bans + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RemoveNetworkBanRequest' + responses: + '200': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to remove network bans. + security: + - bearer: [] + summary: '[Beta] Remove network bans.' + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:write' + position: after + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - database_network_bans_write + x-oauth-scope: projects:write + /network-restrictions: + get: + operationId: v1-get-network-restrictions + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/NetworkRestrictionsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve project's network restrictions + security: + - bearer: [] + summary: '[Beta] Gets project''s network restrictions' + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:read' + position: after + x-endpoint-owners: + - infra + - control-plane + x-fga-permissions: + - - database_network_restrictions_read + x-oauth-scope: projects:read + patch: + operationId: v1-patch-network-restrictions + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/NetworkRestrictionsPatchRequest' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/NetworkRestrictionsV2Response' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to update project network restrictions + 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 + - control-plane + x-fga-permissions: + - - database_network_restrictions_write + x-oauth-scope: projects:write + /network-restrictions/apply: + post: + operationId: v1-update-network-restrictions + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/NetworkRestrictionsRequest' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/NetworkRestrictionsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to update project network restrictions + security: + - bearer: [] + summary: '[Beta] Updates project''s network restrictions' + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:write' + position: after + x-endpoint-owners: + - infra + - control-plane + x-fga-permissions: + - - database_network_restrictions_write + x-oauth-scope: projects:write +components: + schemas: + NetworkBanResponse: + type: object + properties: + banned_ipv4_addresses: + type: array + items: + type: string + required: + - banned_ipv4_addresses + 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 + RemoveNetworkBanRequest: + type: object + properties: + ipv4_addresses: + type: array + items: + type: string + description: List of IP addresses to unban. + requester_ip: + default: false + description: Include requester's public IP in the list of addresses to unban. + type: boolean + identifier: + type: string + required: + - ipv4_addresses + example: + ipv4_addresses: + - 203.0.113.10 + requester_ip: false + 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 + 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 + dbAllowedCidrsV6: + type: array + items: + type: string + example: + dbAllowedCidrs: + - 203.0.113.0/24 + dbAllowedCidrsV6: + - 2001:db8::/32 + 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))$ + required: + - entitlement + - config + - status + 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 + 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: + 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: object + properties: + address: + type: string + type: + type: string + enum: + - v4 + - v6 + 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))$ + status: + type: string + enum: + - stored + - applied + required: + - entitlement + - config + - status + 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 + x-stackQL-resources: + network_bans: + id: supabase.network.network_bans + name: network_bans + title: Network Bans + methods: + retrieve: + operation: + $ref: '#/paths/~1network-bans~1retrieve/post' + response: + mediaType: application/json + openAPIDocKey: '201' + list: + operation: + $ref: '#/paths/~1network-bans~1retrieve~1enriched/post' + response: + mediaType: application/json + openAPIDocKey: '201' + objectKey: $.banned_ipv4_addresses + delete: + operation: + $ref: '#/paths/~1network-bans/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + config: + requestBodyTranslate: + algorithm: naive + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/network_bans/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/network_bans/methods/delete' + replace: [] + network_restrictions: + id: supabase.network.network_restrictions + name: network_restrictions + title: Network Restrictions + methods: + get: + operation: + $ref: '#/paths/~1network-restrictions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1network-restrictions/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + apply: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1network-restrictions~1apply/post' + response: + mediaType: application/json + openAPIDocKey: '201' + request: + nativeCasing: camel + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/network_restrictions/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/network_restrictions/methods/update' + delete: [] + replace: [] +servers: + - url: https://api.supabase.com/v1/projects/{ref} + variables: + ref: + description: Supabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = ''. A WHERE value always takes precedence over the environment. + x-stackQL-envVar: SUPABASE_PROJECT_ID diff --git a/providers/src/supabase/v00.00.00000/services/organizations.yaml b/providers/src/supabase/v00.00.00000/services/organizations.yaml new file mode 100644 index 00000000..27fb3832 --- /dev/null +++ b/providers/src/supabase/v00.00.00000/services/organizations.yaml @@ -0,0 +1,736 @@ +openapi: 3.0.0 +info: + title: organizations API + description: Organizations related endpoints + version: 1.0.0 +paths: + /v1/organizations: + get: + description: Returns a list of organizations that you currently belong to. + operationId: v1-list-all-organizations + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1-list-all-organizationsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Unexpected error listing organizations + security: + - bearer: [] + summary: List all organizations + tags: + - Organizations + x-badges: + - name: 'OAuth scope: organizations:read' + position: after + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - organizations_read + x-oauth-scope: organizations:read + post: + operationId: v1-create-an-organization + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateOrganizationV1' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationResponseV1' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Unexpected error creating an organization + security: + - bearer: [] + summary: Create an organization + tags: + - Organizations + x-endpoint-owners: + - control-plane + - billing + x-fga-permissions: + - - organizations_create + servers: + - url: https://api.supabase.com + /v1/organizations/{slug}/entitlements: + get: + description: Returns the entitlements available to the organization based on their plan and any overrides. + operationId: v1-get-organization-entitlements + 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/V1ListEntitlementsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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 + servers: + - url: https://api.supabase.com + /v1/organizations/{slug}/members: + get: + operationId: v1-list-organization-members + 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/V1-list-organization-membersResponse' + security: + - bearer: [] + summary: List members of an organization + tags: + - Organizations + x-badges: + - name: 'OAuth scope: organizations:read' + position: after + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - members_read + x-oauth-scope: organizations:read + servers: + - url: https://api.supabase.com + /v1/organizations/{slug}: + get: + operationId: v1-get-an-organization + 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/V1OrganizationSlugResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Gets information about the organization + tags: + - Organizations + x-badges: + - name: 'OAuth scope: organizations:read' + position: after + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - organization_admin_read + x-oauth-scope: organizations:read + servers: + - url: https://api.supabase.com + /v1/organizations/{slug}/project-claim/{token}: + get: + operationId: v1-get-organization-project-claim + parameters: + - name: slug + required: true + in: path + description: Organization slug + schema: + pattern: ^[\w-]+$ + example: tsrqponmlkjihgfedcba + type: string + - name: token + required: true + in: path + schema: + example: 0123456789abcdef0123456789abcdef01234567 + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationProjectClaimResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Gets project details for the specified organization and claim token + tags: + - Organizations + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - organization_admin_write + x-internal: true + post: + operationId: v1-claim-project-for-organization + parameters: + - name: slug + required: true + in: path + description: Organization slug + schema: + pattern: ^[\w-]+$ + example: tsrqponmlkjihgfedcba + type: string + - name: token + required: true + in: path + schema: + example: 0123456789abcdef0123456789abcdef01234567 + type: string + responses: + '204': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Claims project for the specified organization + tags: + - Organizations + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - organization_admin_write + x-internal: true + servers: + - url: https://api.supabase.com +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 + CreateOrganizationV1: + type: object + properties: + name: + type: string + maxLength: 256 + required: + - name + example: + name: Acme + additionalProperties: false + 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 + - integrations.github_push_webhooks_limit + - 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: + anyOf: + - 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 + 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 + 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: + 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 + 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 + - null + 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 + pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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 + V1-list-all-organizationsResponse: + type: object + properties: + v1_list_all_organizations: + type: array + items: + $ref: '#/components/schemas/OrganizationResponseV1' + V1-list-organization-membersResponse: + type: object + properties: + v1_list_organization_members: + type: array + items: + $ref: '#/components/schemas/V1OrganizationMemberResponse' + x-stackQL-resources: + organizations: + id: supabase.organizations.organizations + name: organizations + title: Organizations + methods: + list: + operation: + $ref: '#/paths/~1v1~1organizations/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.v1_list_all_organizations + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/V1-list-all-organizationsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"v1_list_all_organizations\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1v1~1organizations/post' + response: + mediaType: application/json + openAPIDocKey: '201' + get: + operation: + $ref: '#/paths/~1v1~1organizations~1{slug}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/organizations/methods/get' + - $ref: '#/components/x-stackQL-resources/organizations/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/organizations/methods/create' + update: [] + delete: [] + replace: [] + entitlements: + id: supabase.organizations.entitlements + name: entitlements + title: Entitlements + methods: + get: + operation: + $ref: '#/paths/~1v1~1organizations~1{slug}~1entitlements/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/entitlements/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + members: + id: supabase.organizations.members + name: members + title: Members + methods: + list: + operation: + $ref: '#/paths/~1v1~1organizations~1{slug}~1members/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.v1_list_organization_members + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/V1-list-organization-membersResponse' + transform: + body: |- + {{- $wrapped := printf "{\"v1_list_organization_members\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/members/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + project_claims: + id: supabase.organizations.project_claims + name: project_claims + title: Project Claims + methods: + get: + operation: + $ref: '#/paths/~1v1~1organizations~1{slug}~1project-claim~1{token}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + claim: + operation: + $ref: '#/paths/~1v1~1organizations~1{slug}~1project-claim~1{token}/post' + response: + mediaType: application/json + openAPIDocKey: '204' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/project_claims/methods/get' + insert: [] + update: [] + delete: [] + replace: [] +servers: + - url: https://api.supabase.com/v1/projects/{ref} + variables: + ref: + description: Supabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = ''. A WHERE value always takes precedence over the environment. + x-stackQL-envVar: SUPABASE_PROJECT_ID diff --git a/providers/src/supabase/v00.00.00000/services/profile.yaml b/providers/src/supabase/v00.00.00000/services/profile.yaml new file mode 100644 index 00000000..97b9ecf9 --- /dev/null +++ b/providers/src/supabase/v00.00.00000/services/profile.yaml @@ -0,0 +1,66 @@ +openapi: 3.0.0 +info: + title: profile API + description: supabase profile API + version: 1.0.0 +paths: + /v1/profile: + get: + operationId: v1-get-profile + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1ProfileResponse' + security: + - bearer: [] + summary: Gets the user's profile + tags: + - Profile + x-endpoint-owners: + - control-plane + servers: + - url: https://api.supabase.com +components: + schemas: + V1ProfileResponse: + type: object + properties: + gotrue_id: + type: string + primary_email: + type: string + username: + type: string + required: + - gotrue_id + - primary_email + - username + x-stackQL-resources: + profiles: + id: supabase.profile.profiles + name: profiles + title: Profiles + methods: + get: + operation: + $ref: '#/paths/~1v1~1profile/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/profiles/methods/get' + insert: [] + update: [] + delete: [] + replace: [] +servers: + - url: https://api.supabase.com/v1/projects/{ref} + variables: + ref: + description: Supabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = ''. A WHERE value always takes precedence over the environment. + x-stackQL-envVar: SUPABASE_PROJECT_ID diff --git a/providers/src/supabase/v00.00.00000/services/projects.yaml b/providers/src/supabase/v00.00.00000/services/projects.yaml new file mode 100644 index 00000000..469ff409 --- /dev/null +++ b/providers/src/supabase/v00.00.00000/services/projects.yaml @@ -0,0 +1,2572 @@ +openapi: 3.0.0 +info: + title: projects API + description: Projects related endpoints + version: 1.0.0 +paths: + /v1/projects: + get: + description: Returns a list of all projects you've previously created. + operationId: v1-list-all-projects + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1-list-all-projectsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: List all projects + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:read' + position: after + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - projects_read + x-oauth-scope: projects:read + post: + operationId: v1-create-a-project + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/V1CreateProjectBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1ProjectResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Create a project + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:write' + position: after + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - organization_projects_create + x-oauth-scope: projects:write + servers: + - url: https://api.supabase.com + /v1/projects/available-regions: + get: + operationId: v1-get-available-regions + parameters: + - name: organization_slug + required: true + in: query + description: Slug of your organization + schema: + example: tsrqponmlkjihgfedcba + type: string + - name: continent + required: false + in: query + description: 'Continent code to determine regional recommendations: NA (North America), SA (South America), EU (Europe), AF (Africa), AS (Asia), OC (Oceania), AN (Antarctica)' + schema: + example: NA + type: string + enum: + - NA + - SA + - EU + - AF + - AS + - OC + - AN + - name: desired_instance_size + required: false + in: query + description: Desired instance size. Omit this field to always default to the smallest possible size. + schema: + 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 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/RegionsInfo' + security: + - bearer: [] + summary: '[Beta] Gets the list of available regions that can be used for a new project' + tags: + - Projects + x-badges: + - name: 'OAuth scope: organizations:read' + position: after + x-endpoint-owners: + - infra + x-oauth-scope: organizations:read + servers: + - url: https://api.supabase.com + /v1/projects/{ref}: + get: + operationId: v1-get-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: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1ProjectWithDatabaseResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve project + 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: + - control-plane + x-fga-permissions: + - - project_admin_read + x-oauth-scope: projects:read + delete: + operationId: v1-delete-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: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1ProjectRefResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Deletes the given project + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:write' + position: after + x-endpoint-owners: + - control-plane + - infra + - dev-workflows + x-fga-permissions: + - - project_admin_write + x-oauth-scope: projects:write + patch: + operationId: v1-update-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/V1UpdateProjectBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1ProjectRefResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to update project + security: + - bearer: [] + summary: Updates the given project + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:write' + position: after + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - project_admin_write + x-oauth-scope: projects:write + servers: + - url: https://api.supabase.com + /upgrade: + post: + operationId: v1-upgrade-postgres-version + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpgradeDatabaseBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectUpgradeInitiateResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to initiate project upgrade + security: + - bearer: [] + summary: '[Beta] Upgrades the project''s Postgres version' + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:write' + position: after + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - project_admin_write + - database_write + x-oauth-scope: projects:write + /upgrade/eligibility: + get: + operationId: v1-get-postgres-upgrade-eligibility + parameters: [] + responses: + '200': + description: '' + 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: + - control-plane + - infra + x-fga-permissions: + - - project_admin_read + - database_read + x-oauth-scope: projects:read + /upgrade/status: + get: + operationId: v1-get-postgres-upgrade-status + parameters: + - 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: + - control-plane + - infra + x-fga-permissions: + - - project_admin_read + - database_read + x-oauth-scope: projects:read + /read-replicas/setup: + post: + operationId: v1-setup-a-read-replica + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SetUpReadReplicaBody' + responses: + '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' + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to set up read replica + 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: + - control-plane + - infra + x-fga-permissions: + - - infra_read_replicas_write + /read-replicas/remove: + post: + operationId: v1-remove-a-read-replica + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RemoveReadReplicaBody' + responses: + '204': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to remove read replica + security: + - bearer: [] + summary: '[Beta] Remove a read replica' + tags: + - Database + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - infra_read_replicas_write + /health: + get: + operationId: v1-get-services-health + parameters: + - 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: + + - `auth` + - `db` + - `db_postgres_user` + - `pooler` + - `realtime` + - `rest` + - `storage` + - `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 + schema: + minimum: 0 + maximum: 10000 + example: 2000 + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1-get-services-healthResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve project's service health status + security: + - bearer: [] + summary: Gets project's service health status + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:read' + position: after + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - project_admin_read + x-oauth-scope: projects:read + /pause: + post: + operationId: v1-pause-a-project + parameters: [] + responses: + '200': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Pauses the given project + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:write' + position: after + x-endpoint-owners: + - infra + - control-plane + x-fga-permissions: + - - project_admin_write + x-oauth-scope: projects:write + /restart: + post: + operationId: v1-restart-a-project + parameters: [] + responses: + '200': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Restarts the given project + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:write' + position: after + x-endpoint-owners: + - infra + - control-plane + x-fga-permissions: + - - project_admin_write + x-oauth-scope: projects:write + /restore: + get: + operationId: v1-list-available-restore-versions + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/GetProjectAvailableRestoreVersionsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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: + - control-plane + - infra + x-fga-permissions: + - - project_admin_read + x-oauth-scope: projects:read + post: + operationId: v1-restore-a-project + parameters: [] + responses: + '200': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Restores the given project + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:write' + position: after + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - project_admin_write + x-oauth-scope: projects:write + /restore/cancel: + post: + operationId: v1-cancel-a-project-restoration + parameters: [] + responses: + '200': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Cancels the given project restoration + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:write' + position: after + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - project_admin_write + x-oauth-scope: projects:write + /claim-token: + get: + operationId: v1-get-project-claim-token + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectClaimTokenResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Gets project claim token + tags: + - Projects + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - project_admin_read + x-internal: true + post: + operationId: v1-create-project-claim-token + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CreateProjectClaimTokenResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Creates project claim token + tags: + - Projects + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - organization_admin_write + - project_admin_write + x-internal: true + delete: + operationId: v1-delete-project-claim-token + parameters: [] + responses: + '204': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Revokes project claim token + tags: + - Projects + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - organization_admin_write + - project_admin_write + x-internal: true + /config/disk: + get: + operationId: v1-get-database-disk + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DiskResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to get database disk attributes + security: + - bearer: [] + summary: Get database disk attributes + tags: + - Projects + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - infra_disk_config_read + post: + operationId: v1-modify-database-disk + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $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: + - control-plane + - infra + x-fga-permissions: + - - infra_disk_config_write + /config/disk/util: + get: + operationId: v1-get-disk-utilization + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DiskUtilMetricsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to get disk utilization + security: + - bearer: [] + summary: Get disk utilization + tags: + - Projects + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - infra_disk_config_read + /config/disk/autoscale: + get: + operationId: v1-get-project-disk-autoscale-config + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DiskAutoscaleConfig' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to get project disk autoscale config + security: + - bearer: [] + summary: Gets project disk autoscale config + tags: + - Projects + x-endpoint-owners: + - control-plane + - infra + x-fga-permissions: + - - infra_disk_config_read + /v1/organizations/{slug}/projects: + get: + description: |- + Returns a paginated list of projects for the specified organization. + + This endpoint uses offset-based pagination. Use the `offset` parameter to skip a number of projects and the `limit` parameter to control the number of projects returned per page. + operationId: v1-get-all-projects-for-organization + parameters: + - name: slug + required: true + in: path + description: Organization slug + schema: + pattern: ^[\w-]+$ + example: tsrqponmlkjihgfedcba + type: string + - name: offset + required: false + in: query + description: Number of projects to skip + schema: + minimum: 0 + maximum: 9007199254740991 + default: 0 + example: 0 + type: integer + - name: limit + required: false + in: query + description: Number of projects to return per page + schema: + minimum: 1 + maximum: 100 + default: 100 + example: 20 + type: integer + - name: search + required: false + in: query + description: Search projects by name + schema: + example: acme + type: string + - name: sort + required: false + in: query + description: Sort order for projects + schema: + default: name_asc + example: created_desc + type: string + enum: + - name_asc + - name_desc + - created_asc + - created_desc + - name: statuses + required: false + in: query + description: |- + A comma-separated list of project statuses to filter by. + + The following values are supported: `ACTIVE_HEALTHY`, `INACTIVE`. + schema: + example: ACTIVE_HEALTHY,INACTIVE + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationProjectsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve projects + security: + - bearer: [] + summary: Gets all projects for the given organization + tags: + - Projects + x-badges: + - name: 'OAuth scope: projects:read' + position: after + x-endpoint-owners: + - control-plane + x-fga-permissions: + - - organization_projects_read + x-oauth-scope: projects:read + servers: + - url: https://api.supabase.com +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 + V1CreateProjectBody: + type: object + properties: + db_pass: + type: string + description: Database password + name: + type: string + maxLength: 256 + description: Name of your project + organization_id: + deprecated: true + description: 'Deprecated: Use `organization_slug` instead.' + type: string + organization_slug: + type: string + pattern: ^[\w-]+$ + description: Organization slug + 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 + region: + 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 + type: string + region_selection: + description: Region selection. Only one of region or region_selection can be specified. + 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 + kps_enabled: + deprecated: true + 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. + 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: + description: Template URL used to create the project from the CLI. + type: string + format: uri + release_channel: + deprecated: true + nullable: true + postgres_engine: + deprecated: true + nullable: true + high_availability: + description: '[Experimental] Whether to enable high availability for the project.' + type: boolean + required: + - db_pass + - name + - organization_slug + example: + db_pass: correct-horse-battery-staple + name: acme-prod + organization_slug: tsrqponmlkjihgfedcba + region: us-east-1 + additionalProperties: false + V1ProjectResponse: + 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 + 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 + - 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 + - AWS_K8S + - AWS_NIMBUS + status: + type: string + enum: + - capacity + - other + required: + - name + - code + - type + - provider + required: + - smartGroup + - specific + required: + - recommendations + - all + V1ProjectRefResponse: + type: object + properties: + id: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + ref: + type: string + name: + type: string + required: + - id + - ref + - name + V1UpdateProjectBody: + type: object + properties: + name: + type: string + minLength: 1 + maxLength: 256 + required: + - name + example: + name: Acme Platform + 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 + ProjectUpgradeInitiateResponse: + type: object + properties: + tracking_id: + type: string + required: + - tracking_id + ProjectUpgradeEligibilityResponse: + 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: + anyOf: + - 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: + anyOf: + - type: string + enum: + - table + - type: string + enum: + - 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: + 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 + DatabaseUpgradeStatusResponse: + 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 + 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 + 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 + RemoveReadReplicaBody: + type: object + properties: + database_identifier: + type: string + required: + - database_identifier + example: + database_identifier: abcdefghijklmnopqrst-rr-us-west-1-abcde + 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: + type: object + properties: + name: + type: string + enum: + - GoTrue + version: + type: string + description: + type: string + healthy: + type: boolean + deprecated: true + description: Deprecated. Use `status` instead. + db_connected: + type: boolean + replication_connected: + type: boolean + connected_cluster: + type: integer + minimum: -9007199254740991 + maximum: 9007199254740991 + db_schema: + type: string + required: + - name + - version + - description + - healthy + - db_connected + - replication_connected + - connected_cluster + - db_schema + error: + type: string + required: + - name + - healthy + - status + 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 + ProjectClaimTokenResponse: + type: object + properties: + 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)$ + required: + - token_alias + - expires_at + - created_at + - created_by + 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 + pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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 + DiskResponse: + type: object + properties: + attributes: + 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 + type: + type: string + enum: + - gp3 + required: + - iops + - size_gb + - type + last_modified_at: + type: string + required: + - attributes + DiskRequestBody: + type: object + properties: + attributes: + 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 + type: + type: string + enum: + - gp3 + required: + - iops + - size_gb + - type + required: + - attributes + example: + attributes: + type: gp3 + size_gb: 100 + iops: 3000 + throughput_mibps: 125 + 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 + DiskAutoscaleConfig: + type: object + properties: + growth_percent: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + description: Growth percentage for disk autoscaling + nullable: true + minimum: 0 + min_increment_gb: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + description: Minimum increment size for disk autoscaling in GB + nullable: true + minimum: 0 + max_size_gb: + type: integer + exclusiveMinimum: true + maximum: 9007199254740991 + description: Maximum limit the disk size will grow to in GB + nullable: true + minimum: 0 + required: + - growth_percent + - min_increment_gb + - max_size_gb + 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 + V1-list-all-projectsResponse: + type: object + properties: + v1_list_all_projects: + type: array + items: + $ref: '#/components/schemas/V1ProjectWithDatabaseResponse' + V1-get-services-healthResponse: + type: object + properties: + v1_get_services_health: + type: array + items: + $ref: '#/components/schemas/V1ServiceHealthResponse' + x-stackQL-resources: + projects: + id: supabase.projects.projects + name: projects + title: Projects + methods: + list: + operation: + $ref: '#/paths/~1v1~1projects/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.v1_list_all_projects + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/V1-list-all-projectsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"v1_list_all_projects\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1v1~1projects/post' + response: + mediaType: application/json + openAPIDocKey: '201' + get: + operation: + $ref: '#/paths/~1v1~1projects~1{ref}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1v1~1projects~1{ref}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1v1~1projects~1{ref}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + upgrade: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1upgrade/post' + response: + mediaType: application/json + openAPIDocKey: '201' + pause: + operation: + $ref: '#/paths/~1pause/post' + response: + mediaType: application/json + openAPIDocKey: '200' + restart: + operation: + $ref: '#/paths/~1restart/post' + response: + mediaType: application/json + openAPIDocKey: '200' + restore: + operation: + $ref: '#/paths/~1restore/post' + response: + mediaType: application/json + openAPIDocKey: '200' + cancel_restore: + operation: + $ref: '#/paths/~1restore~1cancel/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/projects/methods/get' + - $ref: '#/components/x-stackQL-resources/projects/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/projects/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/projects/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/projects/methods/delete' + replace: [] + available_regions: + id: supabase.projects.available_regions + name: available_regions + title: Available Regions + methods: + get: + operation: + $ref: '#/paths/~1v1~1projects~1available-regions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/available_regions/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + upgrade_eligibility: + id: supabase.projects.upgrade_eligibility + name: upgrade_eligibility + title: Upgrade Eligibility + methods: + get: + operation: + $ref: '#/paths/~1upgrade~1eligibility/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/upgrade_eligibility/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + upgrade_status: + id: supabase.projects.upgrade_status + name: upgrade_status + title: Upgrade Status + methods: + get: + operation: + $ref: '#/paths/~1upgrade~1status/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/upgrade_status/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + read_replicas: + id: supabase.projects.read_replicas + name: read_replicas + title: Read Replicas + methods: + setup: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1read-replicas~1setup/post' + response: + mediaType: application/json + openAPIDocKey: '204' + remove: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1read-replicas~1remove/post' + response: + mediaType: application/json + openAPIDocKey: '204' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + service_health: + id: supabase.projects.service_health + name: service_health + title: Service Health + methods: + list: + operation: + $ref: '#/paths/~1health/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.v1_get_services_health + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/V1-get-services-healthResponse' + transform: + body: |- + {{- $wrapped := printf "{\"v1_get_services_health\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/service_health/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + restore_versions: + id: supabase.projects.restore_versions + name: restore_versions + title: Restore Versions + methods: + list: + operation: + $ref: '#/paths/~1restore/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.available_versions + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/restore_versions/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + claim_tokens: + id: supabase.projects.claim_tokens + name: claim_tokens + title: Claim Tokens + methods: + get: + operation: + $ref: '#/paths/~1claim-token/get' + response: + mediaType: application/json + openAPIDocKey: '200' + create: + operation: + $ref: '#/paths/~1claim-token/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1claim-token/delete' + response: + mediaType: application/json + openAPIDocKey: '204' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/claim_tokens/methods/get' + insert: + - $ref: '#/components/x-stackQL-resources/claim_tokens/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/claim_tokens/methods/delete' + replace: [] + disk_configs: + id: supabase.projects.disk_configs + name: disk_configs + title: Disk Configs + methods: + get: + operation: + $ref: '#/paths/~1config~1disk/get' + response: + mediaType: application/json + openAPIDocKey: '200' + modify: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1config~1disk/post' + response: + mediaType: application/json + openAPIDocKey: '201' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/disk_configs/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + disk_utilization: + id: supabase.projects.disk_utilization + name: disk_utilization + title: Disk Utilization + methods: + get: + operation: + $ref: '#/paths/~1config~1disk~1util/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/disk_utilization/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + disk_autoscale_configs: + id: supabase.projects.disk_autoscale_configs + name: disk_autoscale_configs + title: Disk Autoscale Configs + methods: + get: + operation: + $ref: '#/paths/~1config~1disk~1autoscale/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/disk_autoscale_configs/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + organization_projects: + id: supabase.projects.organization_projects + name: organization_projects + title: Organization Projects + methods: + list: + operation: + $ref: '#/paths/~1v1~1organizations~1{slug}~1projects/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.projects + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/organization_projects/methods/list' + insert: [] + update: [] + delete: [] + replace: [] +servers: + - url: https://api.supabase.com/v1/projects/{ref} + variables: + ref: + description: Supabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = ''. A WHERE value always takes precedence over the environment. + x-stackQL-envVar: SUPABASE_PROJECT_ID diff --git a/providers/src/supabase/v00.00.00000/services/secrets.yaml b/providers/src/supabase/v00.00.00000/services/secrets.yaml new file mode 100644 index 00000000..55d5f57d --- /dev/null +++ b/providers/src/supabase/v00.00.00000/services/secrets.yaml @@ -0,0 +1,756 @@ +openapi: 3.0.0 +info: + title: secrets API + description: Secrets related endpoints + version: 1.0.0 +paths: + /api-keys: + get: + operationId: v1-get-project-api-keys + parameters: + - name: reveal + required: false + in: query + description: |- + Boolean string. + + Truthy values: `true`, `1`, `yes`, `on`, `y`, `enabled` + + Falsy values: `false`, `0`, `no`, `off`, `n`, `disabled` + schema: + example: 'true' + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1-get-project-api-keysResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Get project api keys + tags: + - Secrets + x-badges: + - name: 'OAuth scope: secrets:read' + position: after + x-endpoint-owners: + - auth + - control-plane + x-fga-permissions: + - - api_gateway_keys_read + x-oauth-scope: secrets:read + post: + operationId: v1-create-project-api-key + parameters: + - name: reveal + required: false + in: query + description: |- + Boolean string. + + Truthy values: `true`, `1`, `yes`, `on`, `y`, `enabled` + + Falsy values: `false`, `0`, `no`, `off`, `n`, `disabled` + schema: + example: 'true' + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateApiKeyBody' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKeyResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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 + - control-plane + x-fga-permissions: + - - api_gateway_keys_write + x-oauth-scope: secrets:write + /api-keys/legacy: + get: + operationId: v1-get-project-legacy-api-keys + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyApiKeysResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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 + - control-plane + x-fga-permissions: + - - api_gateway_keys_read + x-oauth-scope: secrets:read + put: + operationId: v1-update-project-legacy-api-keys + parameters: + - name: enabled + required: true + in: query + description: |- + Boolean string. + + Truthy values: `true`, `1`, `yes`, `on`, `y`, `enabled` + + Falsy values: `false`, `0`, `no`, `off`, `n`, `disabled` + schema: + example: 'true' + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/LegacyApiKeysResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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 + - control-plane + x-fga-permissions: + - - api_gateway_keys_write + x-oauth-scope: secrets:write + /api-keys/{id}: + patch: + operationId: v1-update-project-api-key + parameters: + - name: id + required: true + in: path + schema: + format: uuid + pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$ + example: 22222222-2222-4222-8222-222222222222 + type: string + - name: reveal + required: false + in: query + description: |- + Boolean string. + + Truthy values: `true`, `1`, `yes`, `on`, `y`, `enabled` + + Falsy values: `false`, `0`, `no`, `off`, `n`, `disabled` + schema: + example: 'true' + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateApiKeyBody' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKeyResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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 + - control-plane + x-fga-permissions: + - - api_gateway_keys_write + x-oauth-scope: secrets:write + get: + operationId: v1-get-project-api-key + parameters: + - name: id + required: true + in: path + schema: + format: uuid + pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$ + example: 22222222-2222-4222-8222-222222222222 + type: string + - name: reveal + required: false + in: query + description: |- + Boolean string. + + Truthy values: `true`, `1`, `yes`, `on`, `y`, `enabled` + + Falsy values: `false`, `0`, `no`, `off`, `n`, `disabled` + schema: + example: 'true' + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKeyResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + security: + - bearer: [] + summary: Get API key + tags: + - Secrets + x-badges: + - name: 'OAuth scope: secrets:read' + position: after + x-endpoint-owners: + - auth + - control-plane + x-fga-permissions: + - - api_gateway_keys_read + x-oauth-scope: secrets:read + delete: + operationId: v1-delete-project-api-key + parameters: + - name: id + required: true + in: path + schema: + format: uuid + pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$ + example: 22222222-2222-4222-8222-222222222222 + type: string + - name: reveal + required: false + in: query + description: Boolean string, true or false + schema: + example: true + type: string + - name: was_compromised + required: false + in: query + description: Boolean string, true or false + schema: + example: false + type: string + - name: reason + required: false + in: query + schema: + example: rotating_key + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKeyResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + 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 + - control-plane + x-fga-permissions: + - - api_gateway_keys_write + x-oauth-scope: secrets:write + /secrets: + get: + description: Returns all secrets you've previously added to the specified project. + operationId: v1-list-all-secrets + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1-list-all-secretsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to retrieve project's secrets + 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: + description: Creates multiple secrets and adds them to the specified project. + operationId: v1-bulk-create-secrets + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + 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 + description: One secret. The wire body is an array; the provider wraps this object into it (one secret per INSERT). + responses: + '201': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to create project's secrets + 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: + description: Deletes all secrets with the given names from the specified project + operationId: v1-bulk-delete-secrets + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + description: The secret to delete. The wire body is an array of names; the provider wraps this object into it (one secret per DELETE). + properties: + name: + type: string + description: Secret name + required: + - name + responses: + '200': + description: '' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to delete secrets with given names + 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 +components: + schemas: + ApiKeyResponse: + type: object + properties: + api_key: + type: string + nullable: true + id: + type: string + nullable: true + type: + type: string + 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 + pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|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 + 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 + LegacyApiKeysResponse: + type: object + properties: + enabled: + type: boolean + required: + - enabled + 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 + SecretResponse: + type: object + properties: + name: + type: string + value: + type: string + updated_at: + type: string + required: + - name + - value + CreateSecretBody: + maxItems: 100 + 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 + DeleteSecretsBody: + type: array + items: + type: string + example: + - OPENAI_API_KEY + V1-get-project-api-keysResponse: + type: object + properties: + v1_get_project_api_keys: + type: array + items: + $ref: '#/components/schemas/ApiKeyResponse' + V1-list-all-secretsResponse: + type: object + properties: + v1_list_all_secrets: + type: array + items: + $ref: '#/components/schemas/SecretResponse' + x-stackQL-resources: + api_keys: + id: supabase.secrets.api_keys + name: api_keys + title: Api Keys + methods: + list: + operation: + $ref: '#/paths/~1api-keys/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.v1_get_project_api_keys + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/V1-get-project-api-keysResponse' + transform: + body: |- + {{- $wrapped := printf "{\"v1_get_project_api_keys\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api-keys/post' + response: + mediaType: application/json + openAPIDocKey: '201' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1api-keys~1{id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1api-keys~1{id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1api-keys~1{id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/api_keys/methods/get' + - $ref: '#/components/x-stackQL-resources/api_keys/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/api_keys/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/api_keys/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/api_keys/methods/delete' + replace: [] + legacy_api_keys: + id: supabase.secrets.legacy_api_keys + name: legacy_api_keys + title: Legacy Api Keys + methods: + get: + operation: + $ref: '#/paths/~1api-keys~1legacy/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + operation: + $ref: '#/paths/~1api-keys~1legacy/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/legacy_api_keys/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/legacy_api_keys/methods/update' + delete: [] + replace: [] + secrets: + id: supabase.secrets.secrets + name: secrets + title: Secrets + methods: + list: + operation: + $ref: '#/paths/~1secrets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.v1_list_all_secrets + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/V1-list-all-secretsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"v1_list_all_secrets\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1secrets/post' + response: + mediaType: application/json + openAPIDocKey: '201' + request: + transform: + type: golang_template_text_v0.3.0 + body: '[{{ . }}]' + delete: + operation: + $ref: '#/paths/~1secrets/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + transform: + type: golang_template_json_v0.3.0 + body: '[{{ toJson .name }}]' + config: + requestBodyTranslate: + algorithm: naive + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/secrets/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/secrets/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/secrets/methods/delete' + replace: [] +servers: + - url: https://api.supabase.com/v1/projects/{ref} + variables: + ref: + description: Supabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = ''. A WHERE value always takes precedence over the environment. + x-stackQL-envVar: SUPABASE_PROJECT_ID diff --git a/providers/src/supabase/v00.00.00000/services/storage.yaml b/providers/src/supabase/v00.00.00000/services/storage.yaml new file mode 100644 index 00000000..25b2f099 --- /dev/null +++ b/providers/src/supabase/v00.00.00000/services/storage.yaml @@ -0,0 +1,103 @@ +openapi: 3.0.0 +info: + title: storage API + description: Visit [https://supabase.github.io/storage/](https://supabase.github.io/storage/) for complete documentation. + version: 1.0.0 +paths: + /storage/buckets: + get: + operationId: v1-list-all-buckets + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/V1-list-all-bucketsResponse' + '401': + description: Unauthorized + '403': + description: Forbidden action + '429': + description: Rate limit exceeded + '500': + description: Failed to get list of buckets + 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 +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 + V1-list-all-bucketsResponse: + type: object + properties: + v1_list_all_buckets: + type: array + items: + $ref: '#/components/schemas/V1StorageBucketResponse' + x-stackQL-resources: + buckets: + id: supabase.storage.buckets + name: buckets + title: Buckets + methods: + list: + operation: + $ref: '#/paths/~1storage~1buckets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.v1_list_all_buckets + overrideMediaType: application/json + schema_override: + $ref: '#/components/schemas/V1-list-all-bucketsResponse' + transform: + body: |- + {{- $wrapped := printf "{\"v1_list_all_buckets\":%s}" . -}} + {{- $wrapped -}} + type: golang_template_text_v0.3.0 + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/buckets/methods/list' + insert: [] + update: [] + delete: [] + replace: [] +servers: + - url: https://api.supabase.com/v1/projects/{ref} + variables: + ref: + description: Supabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = ''. A WHERE value always takes precedence over the environment. + x-stackQL-envVar: SUPABASE_PROJECT_ID