POST /data/{collectionName}

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.

Path parameters

  • collectionName string Required

    defines the collection on which you want to call the operation (e.g users)

application/json

Body

  • authField string

    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.

  • uniqueField string

    used to prevent double entries. (e.g you want unique users (e-mails) in your collection)

  • * string | number | boolean | object | array Additional properties

    you can provide any data you want for creating your data object

Responses

  • 200 application/json

    success

    Hide response attribute Show response attribute object
    • * string | number | boolean | object | array Additional properties
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"
}