Skip to main content

branch_configs

Creates, updates, deletes, gets or lists a branch_configs resource.

Overview​

Namebranch_configs
TypeResource
Idsupabase.branches.branch_configs

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
db_hoststring
db_passstring
db_portinteger
db_userstring
jwt_secretstring
postgres_enginestring
postgres_versionstring
refstring
release_channelstring
statusstring (INACTIVE, ACTIVE_HEALTHY, ACTIVE_UNHEALTHY, COMING_UP, UNKNOWN, GOING_DOWN, INIT_FAILED, REMOVED, RESTORING, UPGRADING, PAUSING, RESTORE_FAILED, RESTARTING, PAUSE_FAILED, RESIZING)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbranch_id_or_ref, refFetches configurations of the specified database branch

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
branch_id_or_refBranch ref or deprecated branch ID
refstringSupabase 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 = '<ref>'. A WHERE value always takes precedence over the environment. (x-stackQL-envVar: SUPABASE_PROJECT_ID)

SELECT examples​

Fetches configurations of the specified database branch

SELECT
db_host,
db_pass,
db_port,
db_user,
jwt_secret,
postgres_engine,
postgres_version,
ref,
release_channel,
status
FROM supabase.branches.branch_configs
WHERE branch_id_or_ref = '{{ branch_id_or_ref }}' -- required
AND ref = '{{ ref }}' -- required unless SUPABASE_PROJECT_ID is set
;