Overview

There are several service lines that operate on the same principle. The end points are slightly different but the parameters are the same and depending on the configuration the possibilities are identical. All the details are available in the DAM & DATA API section. This page describes the general principle of accessing resources, individually, in lists, in trees, etc.

All parameters and resources are not described in this page. For an exhaustive list of parameters and resources, consult the API documentation (ReDoc or Swagger) of the server on which you want to invoke an end point.

Types of services

The API is divided into service types:

Table of contents

Get a resource

The access to a resource can be done by its identifier.

Get a resource by its unique identifier

GET /api/rest/{type of service}/{uniq identifier}

For example, to get an asset with uniq identifer xypoj1eouw7fj5n8mwdaxwjeyc from DAM : GET /api/rest/dam/xypoj1eouw7fj5n8mwdaxwjeyc.

The result is a JSON object composed of several sections:

The general form of the resource at the $.resource.data path is an object whose properties are the properties of the resource. There are several categories of properties:

(info) See examples and a sample resource here.

Get a resource by identifier

GET /api/rest/{type of service}/{name of the resource type}/{identifier}

The identifier of a resource is unique for the type of resource it is part of. This is why it is necessary to specify in the URI the name of the resource type in addition to the access URI by a unique identifier.

For example, to get a resource with id 42 from the ressource productcode within the type of service DATA: /api/rest/data/productcode/1.

For the DAM service type, it is necessary to indicate that you want to access a resource directly via the additional data path (following the type of service dam, and preceding the name of the resource type).

For example, to get an asset with id 1 from DAM : GET /api/rest/dam/data/asset/1.

The resource obtained will be exactly the same as with access by unique identifier.

The unique identifier can also be used instead of the identifier in the resource type. For example, /api/rest/dam/data/asset/78j1ko1ds3my1. You can omit the resource type, especially if you don't know it.. The /api/rest/dam/data/78j1ko1ds3my1 URI will give exactly the same result as the previous URI (because this unique identifier is that of an asset).

(info) See examples and a sample resource here.

Get a resource list

Get list

This service allows you to obtain a list of resources, or to search for resources matching a query by criteria, or full text expression.

Infinite list

GET /api/rest/{type of service}/{name of the resource type}

This end point retrieves the list of resources of the specified type. For example, to get the list of assets : /api/rest/dam/data/asset. To get the list of resources from type productcode within the type of service DATA: /api/rest/data/productcode.

The result is a JSON object very similar to the one obtained when requesting a resource by its identifier. The sections are:

(info) See a sample resource here.

Get all the resource of a type

It is not possible to retrieve all resources of the specified type. You can retrieve a fixed maximum (see Limitation in the number of elements in a list). To be able to retrieve the following ones, we use the same end point specifying that we want those after the last resource obtained, using a token. To find out if you did not get all the resources matching the query, just look at the HATEOAS links section.

Here is an example (here, it is the response obtained for a call to /api/rest/dam/data/asset, without any particular parameter):

"links": {
		"moreResultsToken": "a9b312e9f7e0270b5bf16573ec32eb8f",
		"nextResultsToken": "a9b312e9f7e0270b5bf16573ec32eb8f",
		"previousResultsToken": null,
		"href": "https://club-wed.wedia-group.com/api/rest/dam/data/asset",
		"previous": null,
		"next": "https://club-wed.wedia-group.com/api/rest/dam/data/asset?after=a9b312e9f7e0270b5bf16573ec32eb8f",
		"more": "https://club-wed.wedia-group.com/api/rest/dam/data/asset?after=a9b312e9f7e0270b5bf16573ec32eb8f"
}	

Paginated list

GET /api/rest/{type of service}/{name of the resource type}/list

The results for a paginated list are the same as for an infinite list, except that instead of tokens and URIs allowing you to get next or previous, you will get the page positions in the existing set of resources, and URIs allowing you to get the next or previous page.

The counters are also slightly different:

(info) See a sample resource here.

For the same reasons as for an infinite list, it is not always possible to determine the total number of resources, but if it is, you can also get a link to the last page.

Here is an example (here, it is the response obtained for a call to /api/rest/dam/data/asset/list, without any particular parameter):

"links": {
		"href": "https://club-wed.wedia-group.com/api/rest/dam/data/asset/list",
		"first": "https://club-wed.wedia-group.com/api/rest/dam/data/asset/list?from=1&max=50",
		"previous": null,
		"next": "https://club-wed.wedia-group.com/api/rest/dam/data/asset/list?from=51&max=50",
		"last": null
}

Get a list of resources in tree form

Get a tree

Some types of resources are configured to be presentable in a hierarchical, tree-like form. This is the case for example with thesauri.

Get the resources in tree form

The request is the same as for obtaining a list (so we can obtain a tree in infinite or paginated mode). It is enough to indicate in addition some parameters:

This service allows to use the lists in order to obtain trees, which makes it possible to benefit from all the possibilities of the lists to obtain a tree. On the other hand, the calculations can be very long, especially for very large trees. In this case, it is preferable to use the optimized tree service which has much less options but is much faster. In particular, use it when filling in selection lists or filters.

Get a tree from a specific resource

To get the subtree from a particular resource, you just have to specify in the uri the identifier, or the unique identifier of the resource. For example, to get the tree of geographic location ressources from the location "Africa": /api/rest/dam/data/assetgeography/2?depth=-1 or /api/rest/dam/data/783if7sieq1dudd8znndsc8catn37xj1hfd5p5a?depth=-1.

(info) See a sample resource here.

Presentation of the results

The information in the pivot property is slightly different in the case of a tree. In addition to its identifier and name, you will get a technical property $children which presents in array form the children of the resource.

The $treepath property contains the breadcrump, either as a name array or as a resource array if treepathprops was used to get specific properties

Optimized tree service

This end point allows you to obtain a tree more quickly than with the list service.

The keyword mode

The keyword mode provides the best performance for tree retrieval. However, it has limited possibilities compared to other ways of obtaining a tree:

To activate the keyword mode, specify the keywords=true parameter. For example, /api/rest/dam/data/assetgeography/tree?keywords=true.

By default, the depth is 0, so you will only get the first level of the tree. Use this parameter to get more. For example, to get all the levels, /api/rest/dam/data/assetgeography/tree?keywords=true&depth=-1.

(info) See a sample resource here.

The hybrid mode

This mode uses the same system to obtain the tree, but allows to obtain the same information that we would obtain in list. It has an intermediate performance. It is not recommended to use this mode for large volume trees, especially if there are many properties exposed for each resource. As an indication, the average ratios are 100 for the list mode, 1 for the keywords mode, and 15 to 30 for the hybrid mode.

It is still preferable to the list mode if you don't need full text search or sorting on several properties, but you need to get all properties of each resource.

Full text search

Full text search is not supported by this service. Instead, a string search is available, in keyword mode only.

Use the find parameter in this way:

(info) See a sample resource here.

Get suggestions

The search can be used to get suggestions. Typically, we pass in the find parameter the beginning of a word and we get the corresponding search suggestions. For example, pass "cub" and you get "cub", "cuba", "cube", "cubaa", "cuban", "cubana".

Standard suggestions

To obtain the suggestions, we use the infinite list end point, specifying the suggest (or suggestions) parameter:

The general form of the answer is therefore very similar to that of an infinite list but there is additional technical information qualifying the suggestions. See description for more details.

Search: full text and query

The full text search

Specify the phrase you are looking for in the find parameter.

note

The parameter find is not supported by the service for accessing a resource by its identifier.

The parameter find is not supported by the service for accessing a resource by its identifier.

For the optimized tree service, the find parameter is treated differently

The fulltextInFile parameter enables full text search inside files. For example, /api/dam/asset?find=landscape&fulltextInFile=true.

The fulltextMode parameter allows you to change the search mode:

The query search

It is possible to search by criteria, using the query parameter. The syntax of this parameter is described in the Request Language chapter. The query applies to all resources. Also in the case of a tree: to apply the query only to the highest level resources, use the rootquery parameter. In the case of multi resource type queries, the query is applied to all resource types. To apply a specific query to a type, suffix the parameter name with the name of the resource. For example, to make a search on asset libraries with specific query on legacy library : /api/dam/asset?query={"status":"published"}&query_legacy={"status":"archived"}.

Using these suffixed parameters is essential when a criterion uses a property specific to one type of resource that does not exist in the others.

note

Note that services can be configured to give access to only part of the existing resources. It is not possible with this parameter to extend the set of accessible resources, only to restrict it.

Note that services can be configured to give access to only part of the existing resources. It is not possible with this parameter to extend the set of accessible resources, only to restrict it.

Sorting resources

To sort the results, use the orderby parameter. This is a list of sorting criteria separated by commas and whose importance goes from left to right: first we sort on the leftmost, then on the second leftmost, then the third and so on. A criterion can take the form of:

The optimized tree service allows only one sorting criteria

Sort by relevance

The sortByRelevance parameter allows you to choose if you want a sort by relevance or not. If relevance sorting is activated, the most relevant results are presented first.

Combine full text and query

It is of course possible to combine the two types of search in the same query.

Filter resource properties

Resources are configured so that certain properties are exposed or exposable via the API:

You can restrict the number of properties exposed for a resource by using:

Multi-resource access

It is possible to get an infinite list (so to search) on several types of resources at once. It is necessary that if a query is used (query parameter), it is valid for all the resources. It is possible to specify a different query for each type of resource (See The query search).

Search in any resources

To search in any resources (of the same service type only), it is enough to indicate the comma-separated list of names in the URI of the infinite list endpoint, where the name of the single resource is usually indicated.

For example, /api/rest/dam/data/asset,legacy to process asset and legacy libraries.

Search in any libraries

All libraries can be specifically searched in a single query, in the DAM service type only, using the URI / /api/rest/dam/asset. Typically, environments have three basic libraries: asset, brand and legacy. The URI /api/rest/dam/asset therefore corresponds to /api/rest/dam/data/asset,brand,legacy.

Search for assets of a specific nature

Instead of asset, you can indicate the specific nature you are looking for. For example, /api/rest/dam/image searches for images among all the libraries. Use the name of the nature (only root), which you can get by api/rest/dam/data/assetnature?props=name&lang=en&query={primarytype: {e:null}}. Other examples:

Accessing children

If a resource type has a multiple link property, we can get the resources linked to a resource directly without asking the main resource.

Its URI is of the form /api/rest/{type of service}{/resource name}/{id of resource}/{property name}. We can repeat the end, for each child of the resource, to obtain its children.

For example, if we want to get the children for the field books of the resource of type bookcase and id 2417, we’ll use the URI /api/rest/data/bookcase/2417/books. If resource of type book has a multiple child to a resource of type page, by the field pages, we’ll use the URI /api/rest/data/bookcase/2417/books/127/pages to get the pages of the book with id 127. And so on.

To get the children in an infinite list, use the nextToken parameter, and from for a paginated list.

Querying children of topmost property

It is possible to filter the lists of resources linked to the topmost property by passing a query in the parameter childQuery, suffixed with the name of the property. For example, for the property location, user childQuery_location.

Counting

With the list services (infinite or paginated) you can get only the counters (number of occurrences) without the data of each resource with the parameter withData set to false. For example /api/rest/dam/data/asset?withData=false.

Aggregates

Aggregates are counters of the same value of a metadata. For example, if a resource has a location property, giving the geographic location, asking for the aggregates on that resource will give you the number of resources with each separate location value, so the number of resources in France, Italy, Thailand, etc.

These counters take into account the search criteria of the query (full text and query).

Aggregates in lists

To get the aggregates, use the parameter withAggregates=true. You can also set withData to false to avoid getting the resources themselves. For example, /api/rest/dam/asset?withAggregates=true&withData=false. Aggregates can be requested for infinite lists, paginated lists and even trees.

You can filter the information of aggregate sections by the parameter aggfields. See details on the use of this parameter in chapter Filter fields and resource properties just below.

(info) See a sample resource here.

Parameters

Limits

Specific aggregate service for filters

This service allows to obtain aggregates for complex queries from combinable filters (and, or...).
To see the details of the use of this service, see the chapter Filter aggregates.

Filter fields and resource properties

The aggfields parameter allows (like the props parameter) to filter the information exposed for each aggregate value, but also the fields for which you want to get aggregates. The syntax is quite similar but nevertheless different.

Presentation of the aggregates

Aggregates are found in the section at path $.response.aggregates in the form of a JSON object, each property of which is a field, the value of which is an array of counters.

For each counter, we find:

note

Note that when no value is assigned to the field, the data section always presents only an id at 0, whatever the configuration and the aggfields parameter.

Note that when no value is assigned to the field, the data section always presents only an id at 0, whatever the configuration and the aggfields parameter.

See more details here.

Get binaries

See the documentation to get binaries

Groups

The infinite list service has a grouping option. It is possible to structure the data in groups determined by one or more properties. A group is therefore made up of a header, the grouping value, and a list of resources, those that have this value for the grouping property or properties. The groups themselves can be grouped. You can't group by any property. See in the headers, or in the configuration of the service, which properties allow grouping. Grouping on a property requires that the sorting be done on that property.

The grouping is done by the parameters group and grouplevel.

Another type of grouping is available from version 2023.4.0 (see extended groupings).

The group parameter

This parameter defines the groups.

For example, group=coverage,created asc:10;status desc, which first groups on coverage and creation date, with a maximum of 10 results, then groups according to status, with a descending sort. This defines 2 levels of grouping.

See sample

dof instead of equals

By default, a group level will contain all the resources (up to a specified maximum), which have the same value for the properties of the selectors defining this level. If the name of a property is preceded by the character >, the grouping operator is dof (descendant of) instead of equals. That is, we will get all the resources that have the same parent (this implies that the property in question should be a thesaurus, or a tree).

grouping by date field

It is possible to group according to a date field when the property is of type date, by preceding the name of this property by one of the following field selectors:

For example, (m)created, will give a group of resources created in January, one of those created in February, one of those created in March, etc.

When we group on a field, we necessarily group on the higher order fields. For example, if we group by month, we will have groups by month of each year, not just 12 groups by month that cover all the years.

grouping by string beginning

It is possible to group according to a part of a character string, by preceding the name of the property with a defined formula as shown below:

By example, if the definition is (@1)name, all resources whose name begins with A, all resources whose name begins with B, all resources whose name begins with C, etc

strings starting with numbers

Digits are treated like any other character. You can group all values that start with a digit into a separate group (all assets whose property starts with a digit are part of a single group), by adding a # to the end of the parameter. For example (@1#)name, to get resources whose name begins with a digit, then resources whose name begins with A, then resources whose name begins with B, then resources whose name begins with C, etc.

The grouplevel parameter

This is a number that determines the level of the group you want to obtain (it must be less than the number of levels requested), which allows you to obtain a subgroup directly.

Extended groupings

Since

The group parameter can be used to define a grouping system based on aggregates. It is no longer necessary to sort the main data. But you are limited to a single grouping level for each property.

Only the group parameter is used, but it is always combined with the other parameters. The query parameter (and derivatives) serves as a data filter, props lists the properties of asset to return, while the max parameter indicates the maximum number of data items (including groups), etc.

The group parameter

This parameter defines the groups. It’s a JSON object, with at least a property groups to define groups. This property can have two forms: array or object.

Array form

In this form, each array element defines a grouping, via a JSON object. A property of this object, groupId, defines a grouping identifier that enables the results of this grouping to be retrieved in the response. The other properties describe how to group, and are detailed in section Grouping properties below. If no identifier is specified with property groupId, an automatic identifier will be assigned.

Object form

In this form, the object properties are the group identifiers and the associated value a JSON object that describes the grouping properties as shown in section Grouping properties below.

Other properties at root

Grouping properties

There are different ways to describe a grouping.

By property

In this mode, we indicate the asset property by which we want to group, using the prop property.

For example, if you want to group assets by assetnature:

{
   "prop": "assetnature"
}

By metadata type

It is possible to specify the type of metadata (i.e. the type of grouping property, or nature), using type property (or nature property).

For example, if you want to group assets by assetkeyword nature:

{
   "type": "assetkeyword"
}

Please note that if there are several properties of this nature, the service will return an error to indicate that it cannot determine which property should be used. In this case, you'll need to specify the property name. You can specify both, but this will require a type check.

By UUID of metadata instances

The id property, a string or an array of strings, indicates the uuid (or uid) of objects to be selected as grouping values. A simple id can be indicated if a sufficient description of the property and nature (by prop and/or type) has also been specified.

Describing a group with a simple string

This string will be considered as a metadata UUID You can also use an array of strings to indicate several UUIDs.

Common properties

These properties describe the characteristics of the grouping and the data returned, for the group in particular. Some of them can be specified in the global section of the group parameter (see Other properties at root above).

Result

To summarize, the response/data section of the main query is an array of sections (JSON Object) made up as follows:

  1. in groupData property, an object to describe the group

  2. in data property, an array with the asset (or any other data) corresponding to the group (having the corresponding metadata)

  3. in nextData, the value of the group parameter that should be specified to obtain the rest of the data for this group, or null, if all the data have already been obtained

  4. some additional data

    1. total: the total number of data that can be obtained for this group

    2. count: the number of data obtained in this response

    3. complete: true if all the data in this group have been obtained (specifically, if there are no more data in this group after the last one obtained in this response)

    4. nextToken: if existing, the token to build a nextData section yourself

In response, at the same level as data, a section group (array) with, for each groups, an object containing these properties

  1. groupId, the ID of the group

  2. nextGroups, the value of the group parameter that should be specified to obtain the rest of the group data, or null, if all the groups have already been obtained

  3. total: the total number of group instances (metadata instances) for this group

  4. count: the number of group instances for this group in the current response

  5. complete: true if all the group instances have been obtained

  6. nextToken: if existing, the token to build a nextGroupssection yourself

In addition, the link section contains sections of the nextData or nextGroups type, grouped together to obtain the rest of the data in a single query if required.

Exemple

Let's take the request https://example.wedia-group.com/api/rest/dam/data/asset. It returns 8140 instances, 50 by 50.

We add the following group parameter:

{
   groups: {
	   location: {
		    prop: location
		 },
		 autor: {
				prop: photograph,
				max: 4
		 }
	 }
}

We require two different groupings

With max=4, author groups will have 4 assets max for each photographer, and location groups will have 3 assets max for each location (3 is the default value).

Here is a summary (simplified) of the response:

{
  "response": {
    "data": [
       {
          "groupdata": { // DATA of group "location" for instance assetgeography/11
            "groupId": location,
            "data": { // DATA describing the instance assetgeography/11
               "id": 11,
			   "$uuid": "783if7sieq1dun6m5bt9p1k8uafr1p93eocgqro",
			   "name": "Latin America and the Caribbean"
            },
            "count": 3, // this means this block contains 3 assets
            "total": 10, // this means there are 10 assets with the location assetgeography/11
            "nextToken": ...,
            "nextData": {
				"groups": { 
					"location": {
						"prop": "location",
						"id": "783if7sieq1dun6m5bt9p1k8uafr1p93eocgqro",
						"dataAfter": "91e8ea74d51d412115659a2abc7910fe"
					}
			  }
			},
			"complete": false // all asset for assetgeography/11 hasn't been get (only 3/10)
		  },
          "data": [ 3 assets with location=assetgeography/11: rnipqec3pw1uh83wrpwtp7ni4w, f1cxjquj5riabqtrji8oh5qbdh, f1cxjquj5riabtmwgib68i5w5w ]
       },
       {
          "groupdata": // DATA of group "location" for instance assetgeography/13
       },
       // then 10 others (for location)
       {
          "groupdata": { // then now, DATA of group "photo" for instance assetauthor/78
             "groupId"; "author", 
             "data": { // DATA describing the instance assetauthor/78
               "id": 78
             },
             "count": 1,
             "total": 1,
             "nextToken": null,
             "nextData": null // there is no more asset for this photographer
             "complete": true
          }
       },
       then 19 others (for author)
    ],
    "groups": [ // a summary of each group
       {
         "groupId": "location",
         "count": 12, // we got 12
         "total": 12, // there are 12 to get
         "nextToken": null,
         "nextGroup": null,
         "complete": true // we get all involved instances of assetgeography
       },
       {
          "groupId": "author",
          "count": 20, // we got 20
          "total": 97, // there are 97 to get
          "nextToken": ...,
          "nextGroups": {
            "groups": {
			  "author": {
				"prop": "photograph",
				"max": 4,
				"groupAfter": "ny8ig5b584wotcasfwh57mezjy"
			  }
			}
          },
          "complete": false // we don't get all involved instances of "assetauthor"
       }
    ]
  }
}

Let’s have a look to nextData just above:

{
  "groups": { 
	"location": {
		"prop": "location",
		"id": "783if7sieq1dun6m5bt9p1k8uafr1p93eocgqro",
		"dataAfter": "91e8ea74d51d412115659a2abc7910fe"
    }
}

If you redo the request https://example.wedia-group.com/api/rest/dam/data/asset with this value for group parameter, you will get the following 3 assets, and if you do it again, you will get other 3, and so on, until you’ll get the last of 10, and a null nextData, and a complete equal to true.

With nextGroups just above, you’ll get the missing assetauthor instances, with their assets, and a nextData for each one where it’s necessary.

In the links section, you’ll get also a summary of groups and data:

Clusters

It is possible to export collection properties in clusters, when they are of tree type (i.e. a property of the collection object is of the same type as the collection itself).

To do this use the clusterdepth parameter:

Limitation in the number of elements in a list

For performance reasons, the number of resources that can be obtained in a response is limited. By default, a maximum number of resources is returned, which can be modified, with an unsurpassable maximum.

Maximum in list

The absolute maximum number of resources in a list is 250. The resource configuration may impose a lower maximum. The default maximum number of resources is 50. You can use the max parameter to change the maximum number of resources you want to get, but it will not exceed the configuration maximum, nor the absolute maximum number.

To get the next ones, use the parameter after or before, for an infinite list, or from for a paginated list.

Maximum for aggregates

The absolute number of aggregates (of value for which we have a counter) that we can obtain is 200. By default it is 20. The parameter corresponding to max for the aggregates is limit.

However, for counters in filters, it is necessary to exceed this limitation. It is therefore possible to deactivate this limit by configuration (see tag ). In this case the absolute maximum is 2,147,483,647.

Maximum for children

The operation for lists of resources linked to the main resource (the size of $children for a multiple link property) is the same as for the maximum number of resources in a list. To change the value, the parameter is maxchildren instead of max.

To get the next ones, you have to use the children end point, using the after or before parameters

The $moreChildren_<propertyname> section (where propertyname is the name of the property) indicates the property's own link section, with counters, tokens (after and before) and HATEOAS links to the children end point. See response sample.

Headers

There are two sections of headers: the section describing the type of resource and the section describing the properties of the resource.

There are three ways to get the headers:

Request parameters

The possible parameters are

Information in the headers

Resource headers

In the response to services, we obtain the following information about the type of resource:

note

In the response to a multi-resource service invocation, we obtain in the resources property a JSON array that lists all the descriptions of each resource

In the response to a multi-resource service invocation, we obtain in the resources property a JSON array that lists all the descriptions of each resource

In addition in the headers, we get

Resource properties headers

The headers section describes the list of available properties, and their description. For link properties, we will recursively have the description of the type of linked resource. This section is a JSON object, each field of which is the name of a property exported for a resource (dataHeaders), editable (updateHeaders), or exported in the data section of the aggregate counters (aggHeaders).

For each property, we will find:

Additional headers may be available for certain types of services (for example, for mass import services)

Aggregates headers

Aggregate headers have the same form as resource property headers and are listed in the same section.

Creation and modification headers

These headers have the same form as the resource property headers and are listed in the same section. Additional information specific to modification and creation is added.

Additional data and technical information

You can get additional information to the resource metadata by using dedicated parameters.

Facets / faces

The facets describe the behavior of the metadata entry fields in the current state of the resource. This allows for example to have editable or mandatory fields, depending on the value entered in another field.

The facets information is boolean:

Get facets information

Use the boolean parameter withFacets to true to get the facet information.

You will then get for each resource, the property $faces whose value is a JSON object, with for each resource property, a JSON object, a JSON object that describes the facets of this property with these boolean properties:

Old deprecated version

This facet data format is called version 2. Originally, the format was slightly different. For each resource property, there was a property with the same name prefixed by $faces-. For example, the face information of the property name was described by the value of the property $faces-name. This way of exposing the faces is called version 1.

To know which version is activated, consult the configuration by the service described in the chapter Get Server and REST API configuration . You can find the version at path $.versions.$faces, in the form V1 or V2, depending on whether version 1 or version 2 is activated. You can also choose the version you want with the parameter facetsVersion. For example facetsVersion=1 (or facetsVersion=V1), to get the information in version 1 format.

Get the faces for a future version of metadata

If you need to know the facets for metadata values without saving them first, use the create or modify service in simulation mode. See the doc...

Get resources by applying facets

You can request a resource by applying the facets, which will disable the exposure of non-viewable properties according to the facets. For this, use the parameter facets.

status and workflow actions

You can obtain the possible actions for changing the workflow state for each resource with the parameter workflows=true. The section that lists the workflow actions is then in the $workflowActions property. See

Workflows (change status, or get possible workflow actions) to get description of this section.

Versions (workcopy)

When the resource supports the notion of working copy, we always get the current version of a resource (the working version) by default (look at the resource headers to see if working copy is supported).

The parameter withVersions=true will add to each resource a section in the property $versions the list of versions, as an array where each version is a JSON object with the following properties:

The parameter withVersionData=true allows to expose the resources in the form they would have by a direct access.

When a resource is of the working copy type, we can obtain all the resources in a list, without taking this notion into account, by using the parameter queryVersions=false .

Accessing a new work copy

To get the working copy of a resource (and create it if it doesn't exist), use the following end point:

Rights

You can find out what rights the current user has on each resource, in particular whether he has the right to modify or delete the resource.

Quick access

The following parameters allow a quick test of the modification and deletion rights:

The default value of these parameters is false, unless the withRights parameter is passed: it then sets the default value. So you just have to pass withRights=true to get both $canEdit and $canDelete.

If the value of the parameter is deep (instead of true), then we get the rights on the linked resources as well. The inheritance of the value of withRights to withEditRights and withDeleteRights is the same. If the value is explicitly specified, then the inheritance is cancelled. For example withRights=deep&withDeleteRights=true will give you modify rights on all resources, including those linked to properties of those resources, but delete rights only on resources of the main type.

Testing domains and actions

The rscSecurity parameter allows to get the rights on the resources types, as for example, if the current user has the right to create a resource of the current type. The security parameter allows to get the rights on the resources, like for example the right to modify a particular resource.

These parameters not only allow to test the standard CRUD rights, but also the specific domains and actions created specifically.

The parameter value (the parameter can have several values to test several actions) is composed of two parts, separated by a slash (/):

The value of a parameter can be a comma separated list of fields/actions. Thus security=update,delete is equivalent to security=update&security=delete.

Variations

Variations are the different versions available of the same binary media (preview, wartermarked asset, low resolution, square version...).

Parameters variations and players

The parameter variations is used to retrieve the list of existing variations for each resource. The parameter players parameter is used to retrieve the list of existing players for these variations.

These parameters can have the following values:

Parameters variation and player

The parameter variation is used to indicate the list of variations (identifiers separated by commas) that we want to obtain.

The parameter player is used to indicate the list of players (identifiers separated by commas) that we want to obtain. If the parameter is missing and needed, the value of the parameter variation is used.

If the parameter variation is provided, we will also export for each resource a property variation that gives the identifier of the variation obtained by preferential choice in the indicated list (the first one that is available for the resource, in order from left to right). The same goes for the property player which will indicate the preferred player chosen in the parameter player.

Parameters variationFilter and playerFilter

The parameter variationFilter is only taken into account if the variation parameter is indicated. The parameter playerFilter is only taken into account if the player parameter is indicated. It is a boolean which when true indicates that we want to use the first matching variation (or player) of the associated list as a filter. In this case, the list of variations is not exported, but only the one that corresponds to this filter.

For example, with variation=poster,thumbnailSmall&variationFilter=true, we will get the poster variation description for assets that support this poster variation, otherwise we will get the thumbnailSmall variation.

Limitations

For services that return several resources (e.g. list), you can only get the list of variation identifiers (not the information for each variation), or only one variation (so use the filter mode).

Special case of mass import resources

Mass import services export specific information, which is described in the section dedicated to this service.