Lodol Docs

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

ParameterTypeRequiredDescription
function_namestringYesThe name of the database function to run.
paramsobjectNoThe 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

ParameterTypeRequiredDescription
tablestringYesThe name of the table to delete rows from.
matchobjectYesOnly 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

ParameterTypeRequiredDescription
tablestringYesThe name of the table to add the row to.
rowobjectYesThe 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

ParameterTypeRequiredDescription
tablestringYesThe name of the table to read from.
columnsstringNoThe columns to include, separated by commas (for example, 'name, email'). Leave blank to return all columns.
matchobjectNoOnly 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.
limitnumberNoThe 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

ParameterTypeRequiredDescription
tablestringYesThe name of the table to update.
matchobjectYesOnly update rows where these columns exactly equal these values, given as column-and-value pairs (for example, {"id": 42}).
updatesobjectYesThe columns to change and their new values, given as column-and-value pairs (for example, {"status": "done"}).

Response

{
  "rows": [
    {
      "id": 3,
      "status": "done"
    }
  ]
}

On this page