Skip to main content

An entry definition in the Management API contains a mixture of standard properties and properties that have been defined by the content type that an entry is based on.

Get an entry

Gets an existing entry by its id or by passing an EntryGetOptions object as an argument.

get(idOrOptions: string | EntryGetOptions): Promise<Entry>

Returns

A Promise that will resolve with an Entry object.

Example

JavaScript
client.entries.get('bd8f92eb-d137-49d8-9e7a-560078a8a530')
  .then(result => {      
    console.log('API call result: ', result);              
  })
  .catch(error => {
    console.log('API call fetch error: ', error);      
});

client.entries.get({
    id: 'bd8f92eb-d137-49d8-9e7a-560078a8a530',
    versionStatus: 'published'
  })
  .then(result => {      
    console.log('API call result: ', result);              
  })
  .catch(error => {
    console.log('API call fetch error: ', error);      
});

client.entries.get({
    id: 'bd8f92eb-d137-49d8-9e7a-560078a8a530',
    version: '1.2',
    language: 'fr-FR'
  })
  .then(result => {      
    console.log('API call result: ', result);              
  })
  .catch(error => {
    console.log('API call fetch error: ', error);      
});

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