Insert data into database (REST API)
Changed onInsert new rows into your database using REST API.
Authentication: Requires auth user access token
Auto-set user_id: If your table has a trigger using auth.uid(), user_id will be automatically set to the authenticated user
Security: Row-Level Security policies are enforced
Request
- Base URLhttps://api.volcano.dev
- AuthHTTP bearer
Path parameters
Database name (unique within project, lowercase letters, numbers, and underscores only)
Request body
Table name
Column values to insert. JSON objects and arrays are stored as JSON, so send them to json or jsonb columns. For a Postgres array column, send an array literal string such as "{a,b}".
Example request
{
"table": "posts",
"values": {
"title": "My New Post",
"content": "This is the content",
"status": "draft"
}
}Response
Insert successful
Rows returned by a data API request. RLS-filtered unless the request was made with a service key.
Result rows
Number of rows returned
Changes
- breaking
added the new path request parameter
databaseName - breaking
added the new required request property
table - breaking
added the new required request property
values
19 more changes in this revision
- breaking