Object Storage

List Object Storage Buckets

get
https://api.linode.com/v4beta/object-storage/buckets
BETA

Returns a paginated list of all Object Storage Buckets that you own.

This endpoint is available for convenience. It is recommended that instead you use the more fully-featured S3 API directly.

Beta: This endpoint is in beta. Please make sure to prepend all requests with /v4beta instead of /v4, and be aware that this endpoint may receive breaking updates in the future. This notice will be removed when this endpoint is out of beta.

Authorizations

Personal Access Token
OAuth: ( object_storage:read_only)

Request Samples

curl -H "Authorization: Bearer $TOKEN" \
  https://api.linode.com/v4beta/object-storage/buckets/

Response Samples

{
  "data": [
    {
      "created": "2019-01-01T01:23:45.000Z",
      "label": "example-bucket",
      "size": 123,
      "region": "us-east",
      "hostname": "example-bucket.us-east-1.linodeobjects.com",
      "cluster": "us-east-1",
      "objects": 4
    }
  ],
  "page": 1,
  "pages": 1,
  "results": 1
}

Responses

200: A paginated list of buckets you own.

data
array of objects
created
string

When this bucket was created.

label
string

The name of this bucket.

size
integer

The size of this bucket, in bytes.

region
string

The ID of the Region this bucket exists in.

hostname
string

The hostname where this bucket can be accessed. This hostname can be accessed through a browser if the bucket is made public.

cluster
string

The ID of the Object Storage Cluster this bucket is in.

objects
integer

The number of objects in this bucket.

page
integer
pages
integer
results
integer

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.

Create Object Storage Bucket

post
https://api.linode.com/v4beta/object-storage/buckets
BETA

Creates an Object Storage Bucket in the cluster specified. If the bucket already exists and is owned by you, this endpoint will return a 200 response with that bucket as if it had just been created.

This endpoint is available for convenience. It is recommended that instead you use the more fully-featured S3 API directly.

Beta: This endpoint is in beta. Please make sure to prepend all requests with /v4beta instead of /v4, and be aware that this endpoint may receive breaking updates in the future. This notice will be removed when this endpoint is out of beta.

Authorizations

Personal Access Token
OAuth: ( object_storage:read_write)

Request Body Schema

cluster
Required
string

The ID of the Object Storage Cluster where this bucket should be created.

label
Required
string ^[a-z0-09][a-z0-9-]*[a-z0-9]?$

The name for this bucket. Must be unique in the cluster you are creating the bucket in, or an error will be returned.

acl
string
Enum: "private""public-read""authenticated-read""public-read-write"

The Access Control Level of the bucket using a canned ACL string. For more fine-grained control of ACLs, use the S3 API directly.

cors_enabled
boolean

If true, the bucket will be created with CORS enabled for all origins. For more fine-grained controls of CORS, use the S3 API directly.

Request Samples

curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    -X POST -d '{
      "label": "example-bucket",
      "cluster": "us-east-1",
      "cors_enabled": true,
      "acl": "private",
    }' \
  https://api.linode.com/v4beta/object-storage/buckets/

Response Samples

{
  "label": "example-bucket",
  "created": "2019-01-01T01:23:45.000Z",
  "size": 123,
  "region": "us-east",
  "hostname": "example-bucket.us-east-1.linodeobjects.com",
  "cluster": "us-east-1",
  "objects": 4
}

Responses

200: The bucket created successfully.

label
string

The name of this bucket.

created
string <date-time>

When this bucket was created.

size
integer

The size of this bucket, in bytes.

region
string

The ID of the Region this bucket exists in.

hostname
string

The hostname where this bucket can be accessed. This hostname can be accessed through a browser if the bucket is made public.

cluster
string

The ID of the Object Storage Cluster this bucket is in.

objects
integer

The number of objects in this bucket.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.