Create Collection

Creates a new collection in the KVNode.

Authentication

Requires internal authentication. Pass credentials via X-Glue-Authentication header, or apikey and secret headers.

Request Body

1{
2  "name": "users"
3}

Example Request

1curl -X POST "https://api.hola.cloud/v1/collections" \
2  -H "X-Glue-Authentication: YOUR_AUTH_TOKEN" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "name": "users"
6  }'

Example Response

1HTTP/1.1 200 OK
2Content-Type: application/json
1{
2  "ok": true,
3  "collection": "users"
4}

Error Codes

Status Code Description
400 invalid_json Invalid JSON payload
400 missing_collection Collection is required
403 forbidden Missing authentication headers
500 internal_error Internal server error

Comments

Leave a comment