This endpoint can be used to create an arbitrary object. UNIVERSECLOUD data is an abstraction on top of MongoDB, so you might feel confident using this endpoint if you already know working with MongoDB.
Body
-
this parameter can be used to use a different item field other then the original field (userId). This field is used to map data objects to sub accounts.
Default value is
userId. -
used to prevent double entries. (e.g you want unique users (e-mails) in your collection)
-
you can provide any data you want for creating your data object
POST
/data/{collectionName}
curl \
--request POST 'https://api.universecloud.io/data/users' \
--header "X-Api-Key: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"age":30,"name":"foo bar"}'
Request examples
{
"age": 30,
"name": "foo bar"
}
Response examples (200)
{
"_id": "64a1cc789f556f7ce46c576b",
"age": 30,
"name": "foo bar",
"userId": "auth0|63dfc22f977173187654321"
}