API reference

List content

Fetch published lists and singletons with the Content API.

Use content.list to load entries.

Singleton

const settings = await elmapi.content.list('site-settings', {
  state: 'published',
});
// One object: settings.fields['site-name']

Repeating collection

const articles = await elmapi.content.list('doc-articles', {
  state: 'published',
  sort: 'sort-order:asc',
});
// Top-level array of entries when paginate is omitted

Filtering

const guides = await elmapi.content.list('doc-articles', {
  state: 'published',
  where: {
    // Filter by related category uuid when supported by your query
  },
});

Always read custom values from entry.fields, not a top-level data property.