Skip to navigation

Update CDN distribution

Changes a CDN distribution’s name, origin, or cache policy. Requires scope: cdn.write.

# Example request with curl (set IBEE_API_TOKEN to a platform API token and WORKSPACE_ID to the workspace first).
# DISTRIBUTION_ID: CDN distribution ID
curl -X PATCH "https://api.ibee.ai/v1/cdn/distributions/$DISTRIBUTION_ID?workspace_id=$WORKSPACE_ID" \
-H "Authorization: Bearer $IBEE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "<name>", "cache_policy": "static-assets"}'

Authentication

AuthorizationBearer

IBEE platform API token. Production tokens start with ibee_prod_key_; development tokens start with ibee_dev_key_. Use a token only with its matching gateway environment.

Path parameters

distribution_idstringRequired>=1 character
CDN distribution ID.

Query parameters

workspace_idstringRequiredformat: "^[1-9][0-9]*$">=1 character

The positive numeric workspace ID to scope this request to. Zero, negative, and non-numeric values are rejected.

Request

This endpoint expects an object.
namestringOptional1-128 characters
New display name.
cache_policyenumOptional

New caching behaviour.

  • static-assets: long-term caching for immutable assets; 1 year at the CDN, browsers revalidate.
  • media: medium-term caching for video and audio; 30 days at the CDN.
  • short: short-term caching for frequently changing content; 1 hour at the CDN.
  • no-cache: no caching, for dynamic responses.
Allowed values:
enabledbooleanOptional
Whether the distribution serves traffic.

Response

Distribution updated successfully.
idstring
Unique ID of the distribution.
namestring
Display name of the distribution.
origin_typeenum
  • bucket: an Object Storage bucket.
  • custom: a custom origin.
Allowed values:
origin_idstring
Bucket name or custom origin ID.
cache_policystring

Caching behaviour in effect.

  • static-assets: long-term caching for immutable assets; 1 year at the CDN, browsers revalidate.
  • media: medium-term caching for video and audio; 30 days at the CDN.
  • short: short-term caching for frequently changing content; 1 hour at the CDN.
  • no-cache: no caching, for dynamic responses.
enabledboolean
Whether the distribution serves traffic.
statusenum
  • active: serving.
  • deploying: configuration is being rolled out to the edge.
  • disabled: turned off.
  • failed: deployment failed.
  • deleted: removed.
Allowed values:
default_domainstring

Hostname IBEE assigned to the distribution, for example dl-abc123.cdn.ibee.ai.

default_urlstringformat: "uri"

https:// URL of default_domain.

custom_domainslist of strings
Custom hostnames attached to the distribution.
created_atdatetime

When the distribution was created (ISO 8601).

updated_atdatetime or nullOptional

When the distribution was last changed (ISO 8601).

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
413
Content Too Large Error
422
Unprocessable Entity Error
423
Locked Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error
504
Gateway Timeout Error