Create Bucket

Create a bucket owned by the authenticated user.

Authentication

Requires X-Glue-Authentication.

Request Body

1{
2  "name": "my-new-bucket",
3  "description": "Optional bucket description"
4}
Field Type Required Description
name string no Letters, digits, _, and -, up to 64 characters. If empty, the generated bucket ID is used.
description string no Description up to 4096 characters.

Request

1curl -X POST "https://api.hola.cloud/v1/buckets" \
2  -H 'X-Glue-Authentication: {"user":{"id":"user-123"}}' \
3  -H "Content-Type: application/json" \
4  -d '{"name":"my-new-bucket","description":"Optional bucket description"}'

Response

1{
2  "id": "bucket-550e8400-e29b-41d4-a716-446655440000",
3  "project_id": "",
4  "created_timestamp": 1782045600000000000,
5  "owners": ["user-123"],
6  "name": "my-new-bucket",
7  "description": "Optional bucket description"
8}

Error Codes

Status Description
401 Missing or invalid X-Glue-Authentication
409 Bucket already exists
500 Persistence error

Comments

Leave a comment