DAM Services

Overview

The DAM Services are the standard endpoint for accessing and updating the DAM resources.

As the datamodel from one DAM to another will change, to accomodate the company’s structure and requirements, these services will adapt from one DAM to another automatically, so you cannot reuse exactly DAM Services from one DAM to another.

To setup how services are generated, the configuration is mostly set up by adding “tags” to the datamodels. This is mostly done by your Wedia Account Manager at project setup. The list of tags can be found here. You can see the result of the automatic generation by the "Debugging the configuration" section (see below).

Endpoints

The general form of endpoints for resources in this category is as follows:

api/rest/dam/data/{resource}{/<optional URI extension>}

See also: https://crossmedia.atlassian.net/wiki/spaces/WD/pages/829718559/DAM+Services#Facade-end-points

Endpoint to retrieve a list of assets and resources

GET api/rest/dam/data/{resource}

This end point allows you to list, search (using fulltext, or structured, SQL-like queries), or get suggestions (autocompletion), or get tree structures (see fast tree service).

This token returns a limited list of resource instances and a token that allows you to go through the next results, still limited, with its token that allows you to get the continuation and so on. If you need paginated results, please use the next endpoint.

To get several resources, use comma-separated list. By example, GET api/rest/dam/data/asset,legacy.

You can find more details on how to use this end point here.

End point to retrieve a paginated list of assets and resources

GET api/rest/dam/data/{resource}/list

This service does the same thing as the service described above, but in the form of a paginated list: an index of the first instance of the desired resource and of the last instance is specified. We can thus obtain an interval of instances called page.

You can find more details on how to use this end point here

End point to retrieve a given asset

GET api/rest/dam/data/{resource}/{id}

You can find more details on how to use this end point here and here (for access with uniq identifier)

End point to retrieve a tree

GET api/rest/dam/data/{resource}/tree{/id}

End point to retrieve aggregates

GET api/rest/dam/data/{resource}/aggs

End point to create a workcopy

GET api/rest/dam/data/{resource}/{id}/workcopy

End point to get binary

GET api/rest/dam/data/{resource}/{id}/$binary

End point to get binary variation

GET api/rest/dam/data/{resource}/{id}/$variation

End point to get binary player

GET api/rest/dam/data/{resource}/{id}/$player

End point to get binary preview (thumbnail)

GET api/rest/dam/data/{resource}/{id}/$preview

End point to assign a collection item

POST api/rest/dam/data/{resource}/{id}/{collectionProperty}

End point to create a resource

POST api/rest/dam/data/{resource}

End points to update a resource

PUT api/rest/dam/data/{resource}/{id}

PATCH api/rest/dam/data/{resource}/{id}

POST api/rest/dam/data/{resource}/{id}/put

POST api/rest/dam/data/{resource}/{id}/patch

POST api/rest/dam/data/{resource}

End point to delete a resource

DELETE api/rest/dam/data/{resource}/{id}

End point to update several resources

PUT api/rest/dam/data/{resource}/{id}

PATCH api/rest/dam/data/{resource}/{id*}

POST api/rest/dam/data/{resource}/{id*}/put

POST api/rest/dam/data/{resource}/{id*}/patch

End point to delete several resources

DELETE api/rest/dam/data/{resource}{/id*}

End point to lock a resource

POST api/rest/dam/data/{resource}/{id}/lock

End point to unlock a resource

POST api/rest/dam/data/{resource}/{id}/unlock

End point to change workflow state of a resource

POST api/rest/dam/data/{resource}/{id}/workflow

End point to change workflow state of several resources

POST api/rest/dam/data/{resource}/{id*}/workflow

End point to retrieve workflow actions

GET api/rest/dam/data/{resource}/workflow

End point to retrieve workflow actions possible on a resource

GET api/rest/dam/data/{resource}/{id}/workflow

In addition

headers

The headers are the description of the properties of the resource: type of data, possibility of modification, information for the display in a GUI, etc.

GET api/rest/dam/data/{resource}/headers

Catalogs

Catalogs provide a list of existing resources and their descriptions

GET api/rest/dam

Facade end points

The DAM category also offers end points facade allowing access to several resources simultaneously.

The general form of end points is as follows:

api/rest/dam{/<URI extension>}

End point to retrieve a cumulative list of all asset collections

GET api/rest/dam/asset to get an infinite list

GET api/rest/dam/asset/list to get a paginated list

End points to retrieve asset collections by media type

You can get asset filtered by media type (image, video, etc)

GET api/rest/dam/asset/{media type} to get an infinite list

GET api/rest/dam/asset/{media type}/list to get a paginated list

Configuration

Debugging automatic configuration generation

You can get the autogeneration log in the "Debugging the configuration" section of the Designer API:

The log (formatted) appears presented as in the example below: the generated resources (as well as those that are explicitly excluded) are shown (1) with the automatically determined configuration properties (2), as well as the automatically selected fields (as well as the excluded fields) with their automatically assigned properties (2), with below the reason(s) for the property value (3).