POST /data/{entity}
To add data and records to a generic Entity
This API can be used to add records in a generic Gemini Entity. The API support both a single record and also a list of record to insert. This could be useful for example if the data driver you choose supports transactions, and you want to insert records in a single one.
Request
Endpoint
{entity} is the Entity name according to the name provided in the schema
Body
The request body is always a JSON containing the record actual data inside the data field. The nested object inside the data field should follow the entity definition and the fields data types. Take a look at the fields documentation to see examples and specific field syntax.
Add a Single Record
Add a List of Records
Responses
Gemini responses always contains a proper HTTP status code, and a JSON body with a status text, the data inserted and a meta object that holds metadata about the response.
Lets take a look by using some real examples and the following schema:
200 - Success
Success response contains the data inserted (record or list or records) and some useful metadata, for example the last update time in both ISO and unix format.
400 - Bad Request
Bad request errors means that the record cannot be inserted due to some errors in the entity record validation: for example an already existent logical key or a validation error, or an error during the data fields conversion.
Last updated