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
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | Table containing the rows to delete. |
match | object | Yes | Fields and values that identify which rows to delete (for example, status: active). |
schema | string | No | Schema 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
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | Table to add the row to. |
record | object | Yes | The fields and values for the new row. |
schema | string | No | Schema 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
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | Name of the table to look at. |
schema | string | No | Schema 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
| Parameter | Type | Required | Description |
|---|---|---|---|
schema | string | No | Name 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
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The SQL query to run. |
parameters | array | No | Optional 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
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | Name of the table to look in. |
columns | array | No | Optional list of column names to return. |
filters | object | No | Only return rows whose values exactly match these fields (for example, status: active). |
limit | number | No | Maximum number of rows to return. |
schema | string | No | Schema containing the table (defaults to public). |
Response
{
"rows": [
{}
]
}Update rows
Update rows in a PostgreSQL table that match the values you specify.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | Table containing the rows to update. |
match | object | Yes | Fields and values that identify which rows to update (for example, status: active). |
updates | object | Yes | Fields to update on matching rows. |
schema | string | No | Schema containing the table (defaults to public). |
Response
{
"rows": [
{}
]
}