POST /data/{collectionName}/index

Create an index on a collection to query faster on specific fields

Path parameters

  • collectionName string Required

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

application/json

Body

  • indexField string Required

    defines the field you want to create the index on

  • sort string
  • unique boolean
POST /data/{collectionName}/index
curl \
 --request POST 'https://api.universecloud.io/data/users/index' \
 --header "X-Api-Key: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"indexField":"createdAt","sort":"desc","unique":true}'
Request examples
{
  "indexField": "createdAt",
  "sort": "desc",
  "unique": true
}