API Reference

Query SeaTable with SQL

SeaTable offers a SQL like interface that supports SELECT, INSERT, UPDATE and DELETE statements.

If you are familiar with SQL, you will have no difficulties to use this endpoint because typical SQL-statements are supported.

This endpoint is the most powerful one that SeaTable can offer and it does not differentiate between the two SeaTable backend (normal and big data). Also the metadata of the table is returned.

📘

INSERT and big data

New rows (INSERT statement) are always added to the big data backend. An error message will be returned, if the big data backend is not activated for the target base.

The complete SQL Reference can be found documentation in the developer manual.

Here are some example requests for a fictitious table Family with the columns name, age and birthday:

  • SELECT * FROM Family LIMIT 3
  • SELECT name, age, birthday FROM Family
  • SELECT name, age FROM Family ORDER BY name
  • INSERT INTO Family (Name,Age) VALUES ('Name', 23)
  • SELECT * FROM Family WHERE Name=? AND Age=?

SELECT does not support column keys. You can only limit the output by column names.

📘

Avoid SQL injection

If you use ? in your SQL-statement, you have to provide values to replace the placeholders with parameters. This protects against SQL injections.

🚧

Max and default return limit

  • The request returns a maximum of 10 000 rows, even if you specify a higher limit in your SQL-statement.
  • If you don't specify a limit, max 100 rows are returned.
Path Params
string
required

The unique identifier of a base. Sometimes also called dtable_uuid.

Body Params
string
required

SQL-Query to get rows from base.

boolean

Determines if the columns are returned as their keys (false by default) or their names (true).

parameters
array

Parameters in SQL clause to avoid sql injection. Only needed, if you use ? in the SQL statement. The parameters will replace the ? according to their order in the array.

parameters
boolean

Show rows from normal and Big Data backend (false by default) or limit the output only to the normal backend (true).

Response

Language
Credentials
URL
Click Try It! to start a request and see the response here! Or choose an example:
application/json