Skip to main content
Version: v1

Enable CDN for Bucket

This method enables CDN for a bucket

info

CDN is automatically activated when a bucket is added

Request Parameters

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

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": null,
"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

Only project participants can enable CDN for buckets associated with the project

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

Bucket with specified ID not found

{
"detail": "Bucket not found"
}