Skip to main content
Version: Next

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

ParameterTypeConstraintsDescriptionExample
project_idinteger> 0, requiredProject ID associated with the resource2
provider_idintegerS3 provider ID1
resource_idintegerResource ID16
statusstring[]ok / disabled / blockedCDN status for bucketsok
querystringBucket name filtermedia
limitinteger> 0Number of items per page50
offsetstring> 0Pagination offset0

Response Parameters

JSON body

ParameterTypeDescription
countintegerTotal number of buckets
nextstringURL to next page
previousstringURL to previous page
resultsobject[]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"
}