The following article will show how to update the showcase category and content cover images via the API endpoints.
🔔Note: To apply via the admin pages, see the Report & Category Cover Images section in the article Showcase: Getting Started


🔔See: API: Application Programming Interfaces article to familiarise yourself with API's in Content Catalyst.
Before you start.
All images updated via the API endpoints require base64 encoded file versions of the images.
The usual validation of JPG or PNG only is applied, along with the file size limit of 2MB.
Update Category Cover Endpoints
The relevant endpoints for updating the Category covers are found in the V1 Documentation 'Categories' dropdown list.
GET /categories/{id}/showcase-image
Gets the showcase image for a category
PUT /categories/{id}/showcase-image
Updates the showcase image for a category
DELETE /categories/{id}/showcase-image
Deletes the showcase image for a category
Category ID's
GET/categories
In the response body of the Get Categories query, a list of IDs will be produced.
For example:
Content / Report Cover Endpoints
The relevant endpoints for updating the content/report covers are found via the V1 Documentation 'Products' dropdown list.
GET /Libraries/reports/products/{productCode}/showcase-image
Get the showcase image for a product/report
PUT /Libraries/reports/products/{productCode}/showcase-image
Update the showcase image for a product/report
DELETE /Libraries/reports/products/{productCode}/showcase-image
Delete the showcase image for a product/report
Example: Get image details
Using the Get endpoint returns an image URL that allows users to download the file; it does not return the binary information of the image file itself.
This endpoint uses either report ID or Category ID, depending on which endpoint is used.
The following example shows how to get the showcase image for a category cover.
Select the query:
GET /categories/{id}/showcase-image
Add the ID of the category in the ID parameter.
Select 'Execute' to run the endpoint.
If no image is available, the following statement will appear.
If an image is found, a link will be generated allowing this image to be downloaded.
Example: Add a new image cover to a category.
The following example shows how to add a new showcase category cover.
Select the query:
Add the ID of the category in the ID parameter.
In the query 'body' section, replace the "string" value with the encoded base 64 payload of the image you want to add. Ensure to wrap the payload in quotation marks.
Select Execute to run the endpoint.
If the response is successful, the category cover will be updated.
Refresh the showcase page, and the image will be updated.
Example: Add a new image cover to a product/report.
The following example shows adding a new product/report cover image.
Select the query:
PUT /Libraries/reports/products/{productCode}/showcase-image.
Add the report ID in the ProductCode parameter.
In the query 'body' section, replace the "string" value with the encoded base 64 payload of the image you want to add. Ensure to wrap the payload in quotation marks.
Select Execute to run the endpoint.
Refresh the showcase page, and the image will be updated.
🔔Note: For more information on the Showcase page sections, see Showcase: Available Sections