Skip to main content

organization_projects

Creates, updates, deletes, gets or lists an organization_projects resource.

Overview​

Nameorganization_projects
TypeResource
Idsupabase.projects.organization_projects

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestring
cloud_providerstring
databasesarray
inserted_atstring
is_branchboolean
refstring
regionstring
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
listselectslug, refoffset, limit, search, sort, statusesReturns a paginated list of projects for the specified organization.<br /><br />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.

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
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)
slugstringOrganization slug
limitintegerNumber of projects to return per page
offsetintegerNumber of projects to skip
sortstringSort order for projects
statusesstringA comma-separated list of project statuses to filter by. The following values are supported: ACTIVE_HEALTHY, INACTIVE.

SELECT examples​

Returns a paginated list of projects for the specified organization.<br /><br />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.

SELECT
name,
cloud_provider,
databases,
inserted_at,
is_branch,
ref,
region,
status
FROM supabase.projects.organization_projects
WHERE slug = '{{ slug }}' -- required
AND ref = '{{ ref }}' -- required unless SUPABASE_PROJECT_ID is set
AND offset = '{{ offset }}'
AND limit = '{{ limit }}'
AND search = '{{ search }}'
AND sort = '{{ sort }}'
AND statuses = '{{ statuses }}'
;