Insert or Upsert Records
POST/v1/rdb/rest/:table
Insert single or multiple records, supports upsert operation
Request
Path Parameters
table stringrequired
Table name
Query Parameters
select string
Return fields, supports * or specified field list
Header Parameters
Prefer string
Preference settings. return=representation returns the inserted data; resolution=merge-duplicates enables upsert and merges (updates) existing rows on primary key or unique constraint conflict (equivalent to ON CONFLICT ... DO UPDATE); resolution=ignore-duplicates enables upsert and skips conflicting rows without modifying existing data (equivalent to ON CONFLICT ... DO NOTHING).
- application/json
Body
required
- MOD1
- MOD2
- Array [
- ]
oneOf
object
object
Responses
- 201
- 400
Insert successful
Response Headers
Content-Range string
Number of affected rows
Preference-Applied string
Applied preference settings
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
- Array [
- ]
oneOf
object
object
[
null
]
Request error
- application/json
- Schema
- Example (from schema)
Schema
code string
Error code
details stringnullable
Error details
hint stringnullable
Error hint
message string
Error message
{
"code": "PGRST106",
"details": null,
"hint": "Only the following schemas are exposed: public",
"message": "Invalid schema: undefined"
}
Loading...