Skip to main content

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.

Where To Find Valid Select Headers

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

  1. Fetch Record Fields: Add the select-record: fields header to retrieve all fields for a record.

    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'
  2. Fetch Field Defintions Include select-field: definition to 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 Headers

    You will see in this above example the usage of both a select-record header and a select-field header. The select-field header becomes available because we use select-record: fields. This will return the related fields on the record, allowing us to use select-field and request each field's fielddefinition.

  3. 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-fields

    select-record-fields is a unique select header that won't return the _links attribute of the record object.

Example 2: Fetch Master File Data

  1. 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 masterfilelatestversion is considered a fileversion, hence we can use the linked key select-fileversion to request additional details. For example, fetch the thumbnail of the masterfilelatestversion:

    --header 'select-fileversion: thumbnail'
  1. Fetch Public Links Public Links are accessible through record and file version select 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.