close

Filter

loading table of contents...

Headless Server Developer Manual / Version 2110

Table Of Contents

12.1 Media Endpoint URLs

The media endpoint consists of the following distinct endpoints:

  • Endpoint for images with crops and width

  • Endpoint for images with crops and width, format transformation and SEO file name

  • Endpoint for generic media files

Endpoint for images with crops and width

The first endpoint to request images provides access to all existing crops plus its width. The structure of the URI template is as follows:

/caas/v1/media/{mediaId}/{propertyName}/{hash}/{cropName}/{width}</code>

Crop name and width can be retrieved along with the query for the uriTemplate and must replace the placeholders 'cropName' and 'width'. Trying to request non-existing crop names or width will result in an HTTP 404 Not Found Error.

Endpoint for images with crops and width, format transformation and SEO file name

The second endpoint to request images additionally supports image format transformation and SEO friendly file naming. The structure of the URI template is as follows:

/caas/v1/media/{mediaId}/{propertyName}/{hash}/{cropName}/{width}/{filename}

The file name, including one of the supported image formats, can simply be appended to the endpoint above. Currently supported image formats are 'jpg', 'jpeg', 'png' and 'gif'. Requesting an unsupported format, for example, 'webp' will result in an HTTP 400 Bad Request Error. The file name can actually be anything, since the image is identified by its hash and crop name. This allows naming images following a SEO-friendly approach.

Endpoint for generic media files

The third endpoint is the most generic. It provides access to any media file which is managed by the CMS. The structure of the URI template is as follows:

/caas/v1/media/{mediaId}/{propertyPath}/{hash}

You can comfortably explore the described endpoints using the Swagger UI provided with the overview page.

Placeholders of the media endpoints
mediaId

The content ID of the media/picture.

propertyName

The name of the property, where the blob is stored, usually data.

propertyPath

The name of the property where the blob is stored or the full property path, in case the blob ist stored in a struct.

hash

The hash of the blob. Usually queried via GraphQL.

cropName

A name of an existing crop for a blob. Usually queried via GraphQL.

width

An existing width belonging to the crop name. Usually queried via GraphQL.

filename

The file name of a picture, optionally with a file suffix. Usually queried via graphql.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.