Allows the creation of new data with a flexible schema. The data can contain any variable name and value. The createdBy field is required to track who created the entry.
POST
/data
curl \
--request POST 'https://api.kartsriv.com/v1/data' \
--header "Content-Type: application/json" \
--data '"{\n \"name\": \"user_info\",\n \"value\": {\"age\": 25, \"location\": \"NYC\"},\n \"createdBy\": \"admin\"\n}\n"'
Request examples
A typical user_info data entry.
{
"name": "user_info",
"value": {"age": 25, "location": "NYC"},
"createdBy": "admin"
}
{
"name": "example",
"value": "some string data",
"createdBy": "test-user"
}
Response examples (201)
{
"message": "Data received successfully",
"name": "user_info",
"value": {
"age": 25,
"location": "NYC"
}
}
Response examples (400)
{
"error": "Invalid data input"
}
Response examples (500)
{
"error": "Failed to store data"
}