Media items
A media item is an uploaded asset, plus the description and metadata associated with it. It aligns with the data model. You can use query attributes to control the set of items returned. Before you start working with media items, you must authenticate.
The base URL for uploading media assets is https://mms-upload.sitecorecloud.io and the base URL for retrieving media assets is https://mms-delivery.sitecorecloud.io.
Search and filter attributes are applicable when working with the Delivery API only.
Get a list of media items
Use this method to retrieve a list of media items. If you don't specify any filtering attributes, you will retrieve all available media items.
Other request examples
You can include query parameters to control the set of items returned as shown in the following examples.
Example of an ID query for a single item
Example of an ID query for multiple items
Example of a search query
Example of a sortBy query:
Get all references to a media item
Use this method to get a list of all content items that reference a specific media item. This request uses the linkedTo query attribute and retrieves all the items that reference the media item with the ID travelLuxuryInn.
Get a media item using the ID
Use this method to retrieve a media item with a specific ID. For a list of media item IDs, run the GET api/content/v1/types method or open the media item details page. This request returns a media item with the ID of travelJapan2Weeks.
Create a media item
Use this method to create a media item.
The fileId is auto-generated for a media item when you generate the upload link. You cannot change this identifier.
Update a media item
Use this method to update the description for a media item with a specific ID. This request updates the description of the media item with the ID 1hMfKvVIcE2yBcKuN3_8vg.
Delete a media item
Use this method to delete a media item with a specific ID. If the media item is published, you must unpublish it first. This request deletes a media item with the ID MR60hv5QGkupyb2NNRJRmA.
You can use query attributes with media items.
Publish a media item
Use this method to publish a specific media item. This request publishes a media item with the ID 1hMfKvVIcE2yBcKuN3_8vg.
Unpublish a media item
Use this method to unpublish a specific media item. This request unpublishes a media item with the ID 1hMfKvVIcE2yBcKuN3_8vg.