post

List all buckets

List details about all buckets in the project that the API key belongs to. The results can be paginated. The results can also be filtered using startDate and endDate which are based on the creation date of your buckets.

pagenumber

Jump to a specific page of results.

Example
1
limitnumber

Limit the number of items on a result page.

Example
10
startDatestring

The starting date for filtering buckets based on the date they were created. This attribute accepts ISO 8601 dates in YYYY-MM-DD format.

Format
date
Example
"2024-10-01"
endDatestring

The ending date for filtering buckets based on the date they were created. This attribute accepts ISO 8601 dates in YYYY-MM-DD format.

Format
date
Example
"2024-10-15"

Responses

Request examples

{
  "page": 1,
  "limit": 10,
  "startDate": "2024-10-01",
  "endDate": "2024-10-15"
}

Response examples

Successful response

{
  "success": true,
  "message": "string",
  "data": {
    "docs": [
      {
        "org": "org-a01f25f9ae6340bd970144141d331234",
        "project": "prj-c3b08d852de54d64a4a15c39ad451234",
        "createdBy": "usr-6b5f02d47e6d4682a62262d6174c1234",
        "bucketName": "website-assets",
        "createdAt": "2024-10-11T00:16:38.112Z",
        "updatedAt": "2024-10-12T00:16:38.112Z",
        "bucketId": "bkt-aad2347b90864b3f9c15e8b67ee81234"
      }
    ],
    "pagination": {
      "totalDocs": 15,
      "limit": 20,
      "page": 1,
      "totalPages": 5,
      "pagingCounter": 11,
      "prevPage": 1,
      "nextPage": 3
    }
  }
}
post

Create Bucket

Create a bucket in the project that the API key belongs to.

bucketNamestring

required

Create a bucket using this bucket name. Check out the bucket naming conventions here.

Min Length
1
Max Length
25
Example
"website-assets"
regionstring

required

Create a bucket in this hosting region. Possible value: sa-1.

Enum
  • sa-1
isPrivateboolean

Set to false if you want to allow public access to the objects in this bucket. Defaults to true.

Example
true

Responses

Request examples

{
  "bucketName": "website-assets",
  "region": "sa-1",
  "isPrivate": true
}

Response examples

Successful response

{
  "success": true,
  "message": "A new bucket {bucketName} was created.",
  "data": {
    "org": "org-a01f25f9ae6340bd970144141d331234",
    "project": "prj-c3b08d852de54d64a4a15c39ad451234",
    "createdBy": "usr-6b5f02d47e6d4682a62262d6174c1234",
    "bucketName": "website-assets",
    "createdAt": "2024-10-11T00:16:38.112Z",
    "updatedAt": "2024-10-12T00:16:38.112Z",
    "bucketId": "bkt-aad2347b90864b3f9c15e8b67ee81234"
  }
}
post

Empty Bucket

Remove all objects from a bucket. This is required before you can delete the bucket.

bucketNamestring

required

The name of the storage bucket you want to empty.

Responses

Response examples

Successful response

{
  "success": true,
  "message": "string",
  "data": "string"
}
get

Get Bucket

Retrieve details about a bucket based on its name.

bucketNamestring

required

The name of the storage bucket you want to retrieve.

Responses

Response examples

Successful response

{
  "success": true,
  "message": "string",
  "data": {
    "org": "org-a01f25f9ae6340bd970144141d331234",
    "project": "prj-c3b08d852de54d64a4a15c39ad451234",
    "createdBy": "usr-6b5f02d47e6d4682a62262d6174c1234",
    "bucketName": "website-assets",
    "createdAt": "2024-10-11T00:16:38.112Z",
    "updatedAt": "2024-10-12T00:16:38.112Z",
    "bucketId": "bkt-aad2347b90864b3f9c15e8b67ee81234"
  }
}
delete

Delete Bucket

Delete a bucket. Only empty buckets can be deleted.

bucketNamestring

required

The name of the storage bucket you want to delete.

Responses

Response examples

No content

{
  "success": true,
  "message": "Bucket successfully deleted.",
  "data": "string"
}