Skip to main content

Resolve an entry link

Log in to add to favourites

Page last updated 06 November 2024

Call the entries.resolve() method in our delivery client to get an entry or a list of entries with all content fields resolved

Call signatures

TypeScript
resolve(entry: Entry, fields?: string[]): Promise<Entry>;

resolve(entryArray: Entry[], fields?: string[]): Promise<Entry[]>;

resolve(pagedListOfEntries: PagedList<Entry>, fields?: string[]): Promise<PagedList<Entry>>;

Parameters

NameTypeDescription
entryEntryAn entry object containing the sys.id of the entry to resolve
entryArrayEntry [...]An array of entry objects as above
pagedListOfEntriesPagedList<Entry>A paged list containing entry objects as above
fieldsstring [...]The ids of the fields inside the entry containing linked content to resolve

Returns

A Promise that will resolve with an Entry, an Entry array, or a Paged List of Entry

Example

JavaScript
client.entries
  .get('<entry_id>')
  .then(function (entry) {
    // This is pointless as we will be resolving the entry we
    // have just returned with the call to .get()
    console.log(client.entries.resolve(entry, ["actor", "studio"]));
  });

client.entries
  .list('<content_type_id>')
  .then(function (entryList) {
    entryList.items.forEach(item => (
      //
      console.log(client.entries.resolve(item))
    ))
  });

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request