Sets
Return an individual image from a set, including images nested inside another set, or return the set's metadata in one of five formats. Sets also support the same SEO-friendly URL paths as single images.
Base URL pattern
The parameters on this page are appended to a Dynamic Media image URL. For the URL pattern and how parameters chain together, see the Media Delivery API guide.
Sets are named groupings of assets. The Set API allows you to retrieve individual elements or full metadata from a set.
Retrieving set imagesLink copied!
Return first elementLink copied!
Returns the first element of the set as an image. For video sets, the thumbnail is returned. Standard image transformation parameters can be applied.
Return nth elementLink copied!
Returns the nth element of the set as an image. Indexing starts at 1.
The element index is part of the URL path - edit it directly in the URL bar below to step through the set:
Return nested nth elementLink copied!
Returns the nth element from within a nested set.
Set metadataLink copied!
Returns the contents of a set in the requested format.
Common query parameters for all metadata formats:
| Parameter | Description |
|---|---|
qual | Whether URLs in the response are fully qualified. Default: true |
qry | Query string appended to all set element URLs. Supports transformation template names. |
deep | Whether nested set structure is included in the response. Default: false |
JSONP formatLink copied!
Returns set data as JSON wrapped in a JSONP callback.
Additional parameters:
| Parameter | Description |
|---|---|
func | Name of the JSONP callback function |
arg | Optional argument passed to the callback function |
ExampleLink copied!
JSON formatLink copied!
Returns set data as JSON.
ExampleLink copied!
XML formatLink copied!
Returns set data as XML.
ExampleLink copied!
Text formatLink copied!
Returns set element URLs in plain text.
ExampleLink copied!
HTML formatLink copied!
Returns set elements as an HTML <ul> list with each element in a <li> tag.
Additional parameters:
| Parameter | Description |
|---|---|
ulCls | CSS class applied to <ul> tags |
liCls | CSS class applied to <li> tags |
size | When true, adds original width and height attributes to <img> tags |
ExampleLink copied!
SEO and setsLink copied!
Info
When adding SEO text to a set URL, avoid starting the SEO segment with a number - Dynamic Media will interpret it as a set index. Prefix with a non-numeric character to avoid this.
The following example results in an error because the Media Delivery API interprets "3" as the set index.
Prefix the SEO segment with an underscore so that the URL is interpreted correctly.
SEOLink copied!
The SEO text is included in the request path but does not affect the image returned.