Skip to content

Make an asset public

PUT
/assets/management/v1/assets/{id}/visibility
curl --request PUT \
--url https://api.ebitex.io/assets/management/v1/assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/visibility \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "visibility": "example" }'

Makes a private asset public. This is one way: a public link may already be cached or shared, so there is no call to make an asset private again; delete the asset to revoke it. Making an image public counts against the plan’s public-image allowance.

Uses the same limits as the Assets app: storage and public-image quotas, the per-type size limits, and the same checks on what a file really is (the declared type is ignored). A request that would go over a quota answers 403 quota_exceeded.

Key: an Assets management key with assets.management.write.

id
required
string format: uuid
Media typeapplication/json
object
visibility
required
string
Examplegenerated
{
"visibility": "example"
}

OK

validation_failed: visibility is not private or public. visibility_transition_not_supported: the asset is already public.

missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.

payment_required: the organization’s subscription needs attention.

scope_denied: the key is not an Assets management key. permission_denied: a read key was used for a write. app_not_available: Assets is not enabled for the organization. origin_denied or ip_denied: the key was used from an origin or address outside its restrictions.

not_found: there is no such asset in the organization.

too_many_failed_authentications: too many bad keys from this address; rate_limited: too many requests from the organization. Retry-After says how long to wait.