Supabase
API actions for the Supabase integration.
Supabase
Read and write rows in your Supabase tables and run your database functions.
Call a database function
Run one of your Supabase database functions (a saved routine you can call by name).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
function_name | string | Yes | The name of the database function to run. |
params | object | No | The inputs to pass to the function, given as name-and-value pairs (for example, {"user_id": 42}). Leave blank if the function takes no inputs. |
Response
{
"result": {}
}Delete rows from a table
Delete rows in a Supabase table that match your conditions.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | The name of the table to delete rows from. |
match | object | Yes | Only delete rows where these columns exactly equal these values, given as column-and-value pairs (for example, {"id": 42}). |
Response
{
"rows": [
{
"id": 4
}
]
}Insert row into a table
Insert a new row into a Supabase table.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | The name of the table to add the row to. |
row | object | Yes | The new row's columns and values, given as column-and-value pairs (for example, {"name": "Ada", "email": "ada@example.com"}). |
Response
{
"row": {
"id": 2,
"name": "Inserted row"
}
}List rows from a table
Get rows from a Supabase table, with optional filters to narrow the results.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | The name of the table to read from. |
columns | string | No | The columns to include, separated by commas (for example, 'name, email'). Leave blank to return all columns. |
match | object | No | Only return rows where these columns exactly equal these values, given as column-and-value pairs (for example, {"status": "active"}). Leave blank to return every row. |
limit | number | No | The most rows to return. Leave blank to return all matching rows. |
Response
{
"rows": [
{
"id": 1,
"name": "Sample"
}
]
}Update rows in a table
Update rows in a Supabase table that match your conditions.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | The name of the table to update. |
match | object | Yes | Only update rows where these columns exactly equal these values, given as column-and-value pairs (for example, {"id": 42}). |
updates | object | Yes | The columns to change and their new values, given as column-and-value pairs (for example, {"status": "done"}). |
Response
{
"rows": [
{
"id": 3,
"status": "done"
}
]
}