create_content
Initialize a new blank content record from a content definition (entity) template.
create_content
Initialize a new blank content record from a content definition (entity) template.
Initialize a blank content record from a content definition (entity) template. The returned
record's contentId is what you feed to update_content to populate it; properties carries
the entity's default field values.
content_definition_id is the entity id from the entity map (reference/schema.md).
Safety class: C · API type: admin · Min version: —
Confinement
Class C: creates a content record against an arbitrary content definition (shared/global entity) - non-prod only. Pair with update_content to populate, then delete_content to tear down.
Signatures
def create_content(sdk, content_definition_id, language_id=None):
"""Create a blank content record from a content definition; return the template (or None)."""
return sdk.create_content(content_definition_id, language_id)
export async function createContent(sdk, contentDefinitionId, languageId = null) {
// Create a blank content record from a content definition; return the template (or null).
return await sdk.createContent(contentDefinitionId, languageId);
}
Parameters
| Parameter (Python) | Parameter (JS) | Type | Required | Notes |
|---|---|---|---|---|
sdk | sdk | Nomad_SDK | yes | |
content_definition_id | contentDefinitionId | str | yes | the entity id from reference/schema.md (Entities table) |
language_id | languageId | str | None | no | None for the default language variant |
Returns
dict | None — the new blank record {contentId, contentDefinitionId, properties{...defaults}}; None on failure. Populate it via update_content.
Errors
- 401 unauthenticated
- 404 content definition not found
See also: Python ↔ JS naming map · Return shapes.
