Skip to main content
Version: Next

Clear Bucket Cache

This method clears the cache for a specified bucket. This may be necessary when modifying or deleting files from your bucket.

Request Parameters

POST /api/clients/v1/s3Buckets/{id}/clearCache/

Path

ParameterTypeConstraintsDescriptionExample
idinteger> 0, requiredBucket ID46

Response Parameters

JSON body

ParameterTypeDescription
idintegerBucket ID
namestringBucket name
statusstringCDN status for the bucket
resource_idintegerResource ID
last_cache_cleanupstringLast cache cleanup time for the bucket
headersobject[]List of additional HTTP headers
headers.keystringHeader name
headers.valuestringHeader value
200 OK

Bucket object

{
"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 path parameters

{
"id": [
"A valid integer 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

Bucket cache clearing is only permitted for project participants associated with the bucket

{
"detail": "Only project participants can view this project's buckets"
}
404 Not Found

Bucket with specified ID not found

{
"detail": "Bucket not found"
}