Media API

The Media API allows the CMS to create and search media entities of various different types

The endpoints are as follows

/api/media/bundles
/api/media/search
/api/media/create
/api/media/upload

Bundles

The bundles endpoint gives you a list of available bundles for the media entities, this includes JW Player, Twitter etc

https://indy-api-dev.brightsites.co.uk/api/media/bundles

Search

The search endpoint has the following query parameters and returns an array of matching entities

Query ParametersDescription
bundleThe bundle to filter by
qThe search query
idThe ID of a specific entity
limitItems to get
offsetWhere to start from
workflowTidThe ID of the workflow term attached to the image
// Example calls
https://indy-api-dev.brightsites.co.uk/api/media/search?bundle=remote_image&q=Football&limit=10&offset=0
https://indy-api-dev.brightsites.co.uk/api/media/search?id=123

Creating Media Entities

The different bundles have different POST fields, images have the most and are listed below

Query ParametersDescription
bundleThe Bundle
captionThe Caption
copyrightThe Copyright
creditThe Credit
descriptionThe Description
image_idThe ID of the image from any remote system, this is a string field
titleThe Title
doNotReuse1 or 0, whether or not to allow the image to be reused
altThe Alt
notesNotes is a JSON field
field_extra_media_infoAnother JSON Field
agency_idThe Agency id for a remote agency
imageThe Image file to upload to S3

The other bundles only have bundle and id as this is all that's needed

// Example calls
https://indy-api-dev.brightsites.co.uk/api/media/create

Upload to S3 only and don't create a media entity

I'm not sure what the old CMS used this for but you can also just upload an image to S3 via the API

This endpoint accepts only bundle and the image

// Example calls
https://indy-api-dev.brightsites.co.uk/api/media/upload