POST /data

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.

application/json

Body

Data to be created

  • name string Required

    The name of the data (e.g., "user_info", "example").

  • value object Required

    The value of the data, which can be a string, number, boolean, array, or any JSON object.

  • createdBy string Required

    The user who created the data

Responses

  • 201 application/json

    Data successfully created

    Hide response attributes Show response attributes object
    • message string
    • name string
    • value object
  • 400 application/json

    Invalid input

    Hide response attribute Show response attribute object
    • error string
  • 500 application/json

    Internal server error

    Hide response attribute Show response attribute object
    • error string
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
{
  "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"
}