Namespaces
ovok.content
Search and manage managed content items by type and language.
- Stable unknown
- Release candidate since 0.4.49-rc.4
- Development since 0.4.49-dev.517+4645a0a
The older managed-content routes under cms: items grouped by type and language, with a key for each item. Use it to read and edit content. For published delivery to apps, prefer ovok.cms.
Search and read items
const found = await ovok.content.search('blog', 'en');
const item = await ovok.content.retrieve('blog', 'en', 'welcome');typeis a content type such asblog,video,audio,templateorexport-template.searchtakes an optional query as its third argument. It returns the server's search envelope, not aPagePromise.- Calls
GET cms/{type}/{language}andGET cms/{type}/{language}/{key}.
Create, replace and delete
await ovok.content.create('blog', 'en', body);
await ovok.content.update('blog', 'en', 'welcome', body);
await ovok.content.delete('blog', 'en', 'welcome');updateis a full replace (PUT).bodyhas the same shape for create and update.
Pair translations
const pairs = await ovok.content.map('blog', 'de');- Pairs each default-language item with its translation in the given language.
Copy from the parent project
await ovok.content.copyFromParent('blog', 'en', 'welcome');
await ovok.content.copyAllFromParent('blog', 'en');- Both resolve to
{ success }. They only make sense for a child project.
Reference
- content API reference: every method and type.
- ovok.cms
- Errors and retries
Last updated on