Using Select Headers in Aprimo
Select Headers let you retrieve related object data in a single API request, avoiding multiple calls or managing GUIDs. For example, when fetching a record, you can include Metadata Fields or Master File details directly in the response. This guide provides examples to help you get started.
When making a request to the Aprimo DAM REST API, use the {Accept: application/hal+json} header. This will return a _links attribute in the response that shows that objects valid select headers.
Example 1: Fetch Record Fields
-
Fetch Record Fields: Add the
select-record: fieldsheader to retrieve allfieldsfor arecord.curl --location --request GET 'https://{aprimoTenant}.dam.aprimo.com/api/core/record/{recordID}' \
--header 'Authorization: Bearer {accessToken}' \
--header 'API-VERSION: 1' \
--header 'select-record: fields' \
--header 'Accept: application/hal+json' -
Fetch Field Defintions Include
select-field: definitionto get field configuration details.curl --location --request GET 'https://{aprimoTenant}.dam.aprimo.com/api/core/record/{recordID}' \
--header 'Authorization: Bearer {accessToken}' \
--header 'API-VERSION: 1' \
--header 'select-record: fields' \
--header 'select-field: definition' \
--header 'Accept: application/hal+json'Nested Select HeadersYou will see in this above example the usage of both a
select-recordheader and aselect-fieldheader. Theselect-fieldheader becomes available because we useselect-record: fields. This will return the relatedfieldson the record, allowing us to useselect-fieldand request each field'sfielddefinition. -
Fetch Specific Fields If you know field IDs or names, use select-record-fields to limit the response.
curl --location --request GET 'https://{aprimoTenant}.dam.aprimo.com/api/core/record/{recordID}' \
--header 'Authorization: Bearer {accessToken}' \
--header 'API-VERSION: 1' \
--header 'select-record: fields' \
--header 'select-record-fields: 295B1779-A381-4018-BE1D-B29E3458B41C, MyField, DummyField' \
--header 'Accept: application/hal+json'select-record-fieldsselect-record-fieldsis a unique select header that won't return the_linksattribute of therecordobject.
Example 2: Fetch Master File Data
-
Fetch Master File Latest Version To get the latest master file details (e.g., file size, name), use
select-record: masterfilelatestversion.curl --location --request GET 'https://{aprimoTenant}.dam.aprimo.com/api/core/record/{recordID}' \
--header 'Authorization: Bearer {accessToken}' \
--header 'API-VERSION: 1' \
--header 'Accept: application/hal+json' \
--header 'select-record: masterfilelatestversion'A
masterfilelatestversionis considered afileversion, hence we can use the linked keyselect-fileversionto request additional details. For example, fetch the thumbnail of themasterfilelatestversion:--header 'select-fileversion: thumbnail'
Example 3: Fetch Public Links
-
Fetch Public Links Public Links are accessible through
recordandfile versionselect headers. Use the following headers to retrieve them:curl --location --request GET 'https://{aprimoTenant}.dam.aprimo.com/api/core/record/{recordID}' \
--header 'Authorization: Bearer {accessToken}' \
--header 'API-VERSION: 1' \
--header 'Accept: application/hal+json' \
--header 'select-record: masterfilelatestversion' \
--header 'select-fileversion: publiclinks'
This guide demonstrates common patterns with Select Headers. Explore _links in API responses to identify additional options for your integration needs.