POST
/
api
/
v1
/
buckets
Create a new bucket
curl --request POST \
  --url https://app.miget.com/api/v1/buckets \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "<string>",
  "miget_id": 123,
  "visibility": "private_access",
  "disk_size": 0.1
}
'
{
  "uuid": "<string>",
  "name": "<string>",
  "label": "<string>",
  "state": "<string>",
  "visibility": "<string>",
  "s3_endpoint": "<string>",
  "region_code": "<string>",
  "usage_bytes": 123,
  "quota_bytes": 123,
  "usage_percentage": 123,
  "object_count": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "miget": {
    "uuid": "<string>",
    "name": "<string>",
    "state": "<string>",
    "labels": [
      "<string>"
    ],
    "total_disk_size": 123,
    "total_ram_size": 123,
    "total_cpu_size": 123,
    "total_used_disk_size": 123,
    "total_used_ram_size": 123,
    "total_used_cpu_size": 123,
    "available_cpu_size": 123,
    "available_disk_size": 123,
    "available_ram_size": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "plan": {
      "name": "<string>",
      "code_name": "<string>",
      "description": "<string>",
      "ram_size": 123,
      "disk_size": 123,
      "cpu_size": 123,
      "unit_price": 123
    },
    "components": [
      {
        "name": "<string>",
        "code_name": "<string>",
        "unit_price": 123
      }
    ]
  },
  "public_endpoint": "<string>",
  "policy": "<string>",
  "acl": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token for authentication. Format: 'Bearer {token}'

Headers

X-Workspace-Id
string

Workspace ID (uses default workspace if not provided)

Body

application/json

Create a new bucket

label
string
required

Bucket label (display name)

miget_id
integer<int32>
required

Resource (Miget) ID to attach the bucket to

visibility
string
default:private_access

Bucket visibility: 'public_access' or 'private_access'

disk_size
number<float>
default:0.1

Disk allocation in GiB

Response

Create a new bucket

Api_V1_Entities_Bucket model

uuid
string
required

Unique bucket identifier

name
string
required

Bucket name (used in S3 operations)

label
string
required

Display label

state
string
required

Current state (pending, active, failed, blocked)

visibility
string
required

Access visibility (public_access, private_access)

s3_endpoint
string
required

S3 endpoint URL

region_code
string
required

Region code where bucket is located

usage_bytes
integer<int32>
required

Current storage usage in bytes

quota_bytes
integer<int32>
required

Storage quota in bytes

usage_percentage
number<float>
required

Storage usage percentage

object_count
integer<int32>
required

Total number of objects in bucket

created_at
string<date-time>
required

Creation timestamp

updated_at
string<date-time>
required

Last update timestamp

miget
object
required

Api_V1_Entities_Resource model

public_endpoint
string

Public HTTPS endpoint (only for public buckets)

policy
string

S3-compatible bucket policy (JSON string)

acl
string

S3-compatible access control list (JSON string)