Get a Single Media Library Entry
Required scope:
public-api:read
Description
Fetch a Media Library Entries by itsid
.Endpoint
GET api/v1/mediaLibrary/:id
Response
Patch a Media Library Entry
Required scope:
public-api:write
Description
Patch a Media Library Entry by its id
.
Use Cases
- Enhancing MediaLibraryEntries. For example, update the metadata after transcoding a video or analyzing the media with an external service.
- When having a separate DAM - update Livingdocs Media Library Entry
Endpoint
PATCH api/v1/mediaLibrary/:id
Parameters
Name | Type | Required | Notes |
---|---|---|---|
version | string | current mediaLibraryEntry version. When set on update the version is checked. | |
patches | array | x | an array of patches to execute. Each entry is an object with the following keys: operation setMetadataProperty , replaceAsset , revokeAsset , archive or removeAsset (Added in: release-2024-01 )propertyName string of the propertyName (only for setMetadataProperty) value string or object for the new value. If set to null or value is not set it will remove the property for setMetadataProperty. required for replaceAsset operation. locale string of the asset to be removed (only in multilingual setups for removeAsset) |
Example Request
{
"version": "1",
"patches": [
{
// update a single metadata property
"operation": "setMetadataProperty",
"propertyName": "title",
"value": "updated title"
},
{
// replace the asset
"operation": "replaceAsset",
"value": {
// the file with this key should exist in the configured storage
key: '2021/11/23/my-new-file.png',
url: 'https://example.com/my-new-file.png',
size: 10000,
width: 1000,
height: 800,
filename: 'my-new-file.png',
mimeType: 'image/png'
}
},
{
// revoke the asset
"operation": "revokeAsset"
},
{
// archives a Media Library Entry
"operation": "archive"
},
{
// removes a translated asset (the default locale asset cannot be removed)
"operation": "removeAsset",
"locale": "en"
}
]
}
Response
Get Media Library Entries
Required scope:
public-api:read
Description
Fetch multiple Media Library Entries by theirid
s or externalId
sEndpoint
GET api/v1/mediaLibrary?ids=
GET api/v1/mediaLibrary?externalId=&systemName=
Response
Get Incoming Publication References for a Media Library Entry
Required scope:
public-api:read
Description
This endpoint returns all publications which link to this Media Library Entry (via content or metadata)
Use Cases
- Useful to know if the Media Library Entry is in use when revoking or archiving
Endpoint
GET api/v1/mediaLibrary/:mediaId/incomingDocumentReferences
Parameters
Name | Type | Required | Notes |
---|---|---|---|
:mediaId | string | x | |
?limit | integer | A limit for how much published documents to retrieve. Defaults to 100. Max. 100. | |
?offset | integer | An offset into the query. Useful when getting more than 100 results (pagination). |
Response
Get Incoming Media References for a Media Library Entry
Required scope:
public-api:read
Description
This endpoint returns all Media Library Entries which link to this Media Library Entry (via metadata)Endpoint
GET api/v1/mediaLibrary/:mediaId/incomingMediaReferences
Parameters
Name | Type | Required | Notes |
---|---|---|---|
:mediaId | string | x | |
?limit | integer | A limit for how much published documents to retrieve. Defaults to 100. Max. 100. | |
?offset | integer | An offset into the query. Useful when getting more than 100 results (pagination). |