Skip to main content
Browse Documentation

Entries

Created by Alex Pop, last modified by Simon Horan on 22 Jan 2020

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

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);      
});