Latenode LogoLatenode

Table endpoints

This page collects requests that work the same way for any table: get fields, read a list of rows or a single row, and create, update, move, and delete a row. Take the real field names and IDs from your database's API docs: each table has its own item in the menu there.

In the examples below, {table_id} is the table ID and {row_id} is the row ID. Each request passes the token in the Authorization: Token YOUR_DATABASE_TOKEN header and runs over HTTPS. Where to get a token: Get an API token.

Fields

In the database docs, each field has its ID, name, type, compatible filters, and the value format for writing.

Common cases:

  • text: a single-line value;
  • single select: an integer or text (option ID or its value); null clears the selection; if you pass text, the first matching option is used;
  • date: date and time in ISO format;
  • link to another table: an array of row IDs or primary field values; when updating, pass all links at once, an empty array removes all links; a string with comma-separated names becomes an array; you can also pass a single ID;
  • file: an array of objects that contain at least the file name; a comma-separated list of names and the file upload response also work;
  • read-only lookup field: an array of values and row IDs; it can't be changed by a request.

List fields

The field list is available if the token has read, create, or update permission.

curl \
-X GET \
-H "Authorization: Token YOUR_DATABASE_TOKEN" \
"https://table.latenode.com/api/database/fields/table/{table_id}/"

Each field in the response has at least:

PropertyWhat it is
idPrimary key. With the field_ prefix, it's the column name, for example field_1.
nameField name.
table_idTable ID.
orderOrder. The first field has 0.
primaryPrimary field. It can't be deleted, and its value should describe the row.
typeField type.
read_onlyIf true, the cell value can't be changed.
descriptionField description.

Additional properties depend on the type and may differ in the general response.

List rows

GET on the rows endpoint returns a page of rows. By default, it's the first page.

curl \
-X GET \
-H "Authorization: Token YOUR_DATABASE_TOKEN" \
"https://table.latenode.com/api/database/rows/table/{table_id}/?user_field_names=true"

The response has count, next, previous, and results. In results, each row has id, order, and field values.

Query parameters:

ParameterPurpose
pagePage number. Default: 1.
sizeRows per page. Default: 100.
user_field_namesIf the value is y, yes, true, t, on, 1, or an empty string, the response uses real field names. Otherwise keys look like field_ plus the ID, for example field_1. In that case order_by, include, and exclude also expect names instead of IDs.
searchKeeps rows whose data contains this text. Default: empty string.
order_bySort by fields, comma-separated. Default: id. + or no sign: ascending. -: descending. Example with names: order_by=Name,-Status. If a name starts with + or -, add another sign, for example +-Name. Put a name with a comma in quotes. Escape a quote inside a name with \. Without user_field_names, use field_1,-field_2.
filtersA JSON filter tree. If passed, filter__{field}__{filter} and filter_type are ignored. See Filters.
filter__{field}__{filter}Short filter. Example: filter__Name__equal=test. If there is no field with that name, the search uses field_id. Without user_field_names: filter__field_1__equal=test.
filter_typeAND (default) or OR. Makes sense when there are two or more short filters.
includeWhich fields to return. Default: all. Comma-separated list of names or field_1,field_2.
excludeWhich fields to remove from the response. Same format as include.
view_idView ID. Its filters and sorting are added to the request. The ID is shown in the view's context menu: the number in parentheses after the name. If order_by is set, the view's sorting isn't applied. Short filter__ filters are applied together with the view filters.
{link_row_field}__joinField values from the linked table. Parameter name: the link field name plus the __join suffix. Value: comma-separated fields of the linked table. You can't get a link field of the linked table this way.

Get a row

Returns a single row by its ID.

curl \
-X GET \
-H "Authorization: Token YOUR_DATABASE_TOKEN" \
"https://table.latenode.com/api/database/rows/table/{table_id}/{row_id}/?user_field_names=true"

row_id in the path: which row to get. The optional user_field_names parameter works the same as in the row list.

Create a row

curl \
-X POST \
-H "Authorization: Token YOUR_DATABASE_TOKEN" \
-H "Content-Type: application/json" \
"https://table.latenode.com/api/database/rows/table/{table_id}/?user_field_names=true" \
--data '{
  "Name": "string"
}'

Optional query parameters: user_field_names (as above), before (ID of the row to insert the new one before), send_webhook_events.

send_webhook_events triggers webhooks after the operation if the value is y, yes, true, t, on, 1, or an empty string. Webhooks are sent by default.

In the body, pass only the fields you want to fill in. Key names depend on user_field_names.

Update a row

curl \
-X PATCH \
-H "Authorization: Token YOUR_DATABASE_TOKEN" \
-H "Content-Type: application/json" \
"https://table.latenode.com/api/database/rows/table/{table_id}/{row_id}/?user_field_names=true" \
--data '{
  "Name": "string"
}'

row_id in the path: which row to update. Query parameters: user_field_names and send_webhook_events.

For a link field, pass the full list of IDs on every update. An empty array removes all links.

Move a row

curl \
-X PATCH \
-H "Authorization: Token YOUR_DATABASE_TOKEN" \
"https://table.latenode.com/api/database/rows/table/{table_id}/{row_id}/move/?user_field_names=true"

before_id places the row before the row with this ID. If before_id isn't passed, the row moves to the end. The send_webhook_events parameter works the same as when creating a row.

Delete a row

curl \
-X DELETE \
-H "Authorization: Token YOUR_DATABASE_TOKEN" \
"https://table.latenode.com/api/database/rows/table/{table_id}/{row_id}/"

send_webhook_events is optional and on by default.

Need Help? Ask the community

If something on this page is missing or unclear, post on the Latenode community forum. Our team and other users usually reply quickly.

0/100
0/2000