Zum Inhalt springen

Ingest rows into a live-dataset table

POST
/api/ingest/{collectionName}/{tableName}
curl --request POST \
--url https://firma.company-gpt.com/companygpt/rag/api/api/ingest/example/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "rows": [ {} ] }'

Insert rows into a “live” dataset table. Requires admin (write) access to the collection. Rows are validated and coerced against the table’s schema; invalid rows are rejected individually rather than failing the whole request. Capped at 10,000 rows and 64 MiB per request.

collectionName
required
string

Collection’s technical name

tableName
required
string
Media typeapplication/json
object
rows
required
Array<object>
<= 10000 items
object
key
additional properties
any
Examplegenerated
{
"rows": [
{}
]
}

Empty rows array — nothing to insert

Media typeapplication/json
object
inserted
required
integer
rejected
required
integer
errors
required
Array<object>
object
index
required

0-based index into the request’s “rows” array

integer
error
required
string
Examplegenerated
{
"inserted": 1,
"rejected": 1,
"errors": [
{
"index": 1,
"error": "example"
}
]
}

Rows processed (individual row failures are reported in “errors”, not as an HTTP error)

Media typeapplication/json
object
inserted
required
integer
rejected
required
integer
errors
required
Array<object>
object
index
required

0-based index into the request’s “rows” array

integer
error
required
string
Examplegenerated
{
"inserted": 1,
"rejected": 1,
"errors": [
{
"index": 1,
"error": "example"
}
]
}

Invalid table name, malformed body, or more than 10,000 rows

Unauthorized

Admin access required to ingest data

Dataset (or table) not found — also returned for any collection that is not a live dataset