Lodol Docs

PostgreSQL

API actions for the PostgreSQL integration.

PostgreSQL

Browse tables, add, look up, update, or delete rows, and run custom SQL queries in your PostgreSQL database.


Delete rows

Delete rows from a PostgreSQL table that match the values you specify.

Parameters

ParameterTypeRequiredDescription
tablestringYesTable containing the rows to delete.
matchobjectYesFields and values that identify which rows to delete (for example, status: active).
schemastringNoSchema containing the table (defaults to public).

Response

{
  "rows": [
    {}
  ]
}

Add a row

Add a new row to a PostgreSQL table and return the saved row.

Parameters

ParameterTypeRequiredDescription
tablestringYesTable to add the row to.
recordobjectYesThe fields and values for the new row.
schemastringNoSchema containing the table (defaults to public).

Response

{
  "record": {}
}

List columns for a table

List the column names and data types for a PostgreSQL table.

Parameters

ParameterTypeRequiredDescription
tablestringYesName of the table to look at.
schemastringNoSchema containing the table (defaults to public).

Response

{
  "columns": [
    {}
  ]
}

List tables in a schema

List the tables in a PostgreSQL schema (a named group of tables).

Parameters

ParameterTypeRequiredDescription
schemastringNoName of the schema to list tables from (defaults to public).

Response

{
  "tables": [
    {}
  ]
}

Run custom SQL

Run a custom SQL query you write, with optional values to fill in its placeholders.

Parameters

ParameterTypeRequiredDescription
querystringYesThe SQL query to run.
parametersarrayNoOptional list of values to fill in the query's placeholders, in order.

Response

{
  "result": [
    {}
  ]
}

Look up rows

Look up rows in a PostgreSQL table, with optional filters and a limit on how many rows to return.

Parameters

ParameterTypeRequiredDescription
tablestringYesName of the table to look in.
columnsarrayNoOptional list of column names to return.
filtersobjectNoOnly return rows whose values exactly match these fields (for example, status: active).
limitnumberNoMaximum number of rows to return.
schemastringNoSchema containing the table (defaults to public).

Response

{
  "rows": [
    {}
  ]
}

Update rows

Update rows in a PostgreSQL table that match the values you specify.

Parameters

ParameterTypeRequiredDescription
tablestringYesTable containing the rows to update.
matchobjectYesFields and values that identify which rows to update (for example, status: active).
updatesobjectYesFields to update on matching rows.
schemastringNoSchema containing the table (defaults to public).

Response

{
  "rows": [
    {}
  ]
}

On this page