Here is the detailed description of the “Save” endpoint in Gyxi DB.
For a full overview of the API, please see the documentation here:
https://api.gyxi.com
—
The Save endpoint saves a single item in Gyxi.
Here is the URL to call the Save endpoint.
POST https://germany-save.gyxi.com/[databaseId]/[type]/[partitionBy]
germany can be replaced with another region.
[databaseId] should be the short name of your database.
[type] is the type of data you are saving, like a class name or table name.
[partitionBy] is the name of a field in the data you are saving. The content of this field will be the partition of the data you are inserting.
The data you are saving must contain a property called “id”. This can never be changed, so it should probably not be “email” or something like that. If you have no suitable id property in your data, then it is recommended that you save it on a guid.
For example, maybe your company is a European company headquartered in Germany, so you choose to save your data there. Now you want to register an Employee that just started in the London department.
The URL might look like this:
POST https://germany-save.gyxi.com/mydb/employee/department
The contents might look like this:
{
"id": "1"
"name": "Paul McCartney",
"department": "London"
}
In this case, your database is called mydb.
This call is saving an item in the employee type (table). It is indicated that we must use the contents of the department field as partition.
Because the department field contains the value London, it means that London is the partition for this item.