organization_projects
Creates, updates, deletes, gets or lists an organization_projects resource.
Overview​
| Name | organization_projects |
| Type | Resource |
| Id | supabase.projects.organization_projects |
Fields​
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
name | string | |
cloud_provider | string | |
databases | array | |
inserted_at | string | |
is_branch | boolean | |
ref | string | |
region | string | |
status | string | (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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | slug, ref | offset, limit, search, sort, statuses | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
ref | string | 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 = '<ref>'. A WHERE value always takes precedence over the environment. (x-stackQL-envVar: SUPABASE_PROJECT_ID) |
slug | string | Organization slug |
limit | integer | Number of projects to return per page |
offset | integer | Number of projects to skip |
search | string | Search projects by name |
sort | string | Sort order for projects |
statuses | string | A comma-separated list of project statuses to filter by. The following values are supported: ACTIVE_HEALTHY, INACTIVE. |
SELECT examples​
- list
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 }}'
;