Entry Get Options
Log in to add to favouritesEntry Get Options is a structure that is used to describe details for requesting an entry.
Properties
Name | Type | Description |
---|---|---|
id | string | The id of the entry. |
language | string | The language variation to return for each entry. |
linkDepth | number | The depth at which to resolve the full entry data for a linked entry or asset, with a maximum depth value of 10. |
fields | string [...] | An array of field ids to restrict the fields returned for an entry. |
fieldLinkDepths | { string: number } | Object containing field paths to resolve linked entries for and the link depth to resolve the field to |
Example
// Get only the title and overview fields of the French variation with a link depth of 2
ContensisClient.entries
.get({
id: '<entry_id>',
language: 'fr-FR',
linkDepth: 2,
fields: ['title', 'overview']
})
.then(function (entry) {
console.log(entry.title);
console.log(entry.overview);
});