Xeonr Developer Docs
API SpecificationBuckets

Create bucket

POST
/uplim.api.v1.BucketsService/CreateBucket

Creates a new storage bucket with the specified configuration and destination settings.

Authorization

OAuth2 upl:bucket:manage
AuthorizationBearer <token>

OAuth 2.0 authorization

In: header

Scope: upl:bucket:manage

Header Parameters

Connect-Protocol-Version*number

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

bucketName?string

Name for the new bucket

Formathostname
Length3 <= length <= 64
aliases?aliases

Optional aliases for the bucket

Itemsitems <= 8
description?string

Optional description of the bucket

Lengthlength <= 128
destination?string

Destination for the bucket

Value in"BUCKET_DESTINATION_UNSPECIFIED" | "BUCKET_DESTINATION_DEFAULT" | "BUCKET_DESTINATION_S3_BUCKET" | "BUCKET_DESTINATION_S3_SERVER"
destinationConfig?|
portalConfig?

Portal configuration for the bucket

[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://uploads-api.xeonr.io/uplim.api.v1.BucketsService/CreateBucket" \  -H "Connect-Protocol-Version: 1" \  -H "Content-Type: application/json" \  -d '{}'
{
  "bucket": {
    "bucketId": "string",
    "bucketName": "string",
    "url": "string",
    "uploadCount": 0,
    "usedSpaceBytes": 0,
    "totalSpaceBytes": 0,
    "aliases": [
      "string"
    ],
    "isPrimary": true,
    "createdAt": "2023-01-15T01:30:15.01Z",
    "updatedAt": "2023-01-15T01:30:15.01Z",
    "type": "BUCKET_TYPE_UNSPECIFIED",
    "destination": "BUCKET_DESTINATION_UNSPECIFIED",
    "destinationConfig": {
      "s3Bucket": {
        "bucketName": "example.com",
        "region": "string",
        "roleArn": "string"
      }
    },
    "primaryAlias": "string",
    "portalConfig": {
      "cdnMode": true
    }
  }
}
{
  "code": "not_found",
  "message": "string",
  "details": [
    {
      "type": "string",
      "value": "string",
      "debug": {}
    }
  ]
}