Bucket List
This method retrieves a list of buckets for a project
Request Parameters
GET /api/clients/v1/s3Buckets/
Headers
- Content-Type: application/json
- Authorization: Bearer
$access_token
Query Parameters
| Parameter | Type | Constraints | Description | Example |
|---|---|---|---|---|
| project_id | integer | > 0, required | Project ID associated with the resource | 2 |
| provider_id | integer | S3 provider ID | 1 | |
| resource_id | integer | Resource ID | 16 | |
| status | string[] | ok / disabled / blocked | CDN status for buckets | ok |
| query | string | Bucket name filter | media | |
| limit | integer | > 0 | Number of items per page | 50 |
| offset | string | > 0 | Pagination offset | 0 |
Response Parameters
JSON body
| Parameter | Type | Description |
|---|---|---|
| count | integer | Total number of buckets |
| next | string | URL to next page |
| previous | string | URL to previous page |
| results | object[] | List of buckets |
200 OK
List of buckets
{
"count": 2,
"next": "http://testserver/api/clients/v1/s3Buckets?resource_id=16&status=ok&query=media",
"previous": null,
"results": [
{
"id": 42,
"name": "multimedia",
"status": "ok",
"resource_id": 16,
"last_cache_cleanup": null,
"headers": []
},
{
"id": 46,
"name": "media",
"status": "ok",
"resource_id": 16,
"last_cache_cleanup": "2024-01-01T17:17:17Z",
"headers": [
{
"key": "X-MEDIA-TYPE",
"value": ".pptx"
}
]
}
]
}
400 Bad Request
Invalid or missing required query parameters
{
"project_id": [
"This field is required."
]
}
401 Unauthorized
Authentication credentials missing or invalid
{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid or expired"
}
]
}
403 Forbidden
Only buckets from resources associated with the current user's project are accessible
{
"detail": "Only participants can view this project's buckets"
}