tridion-sites-extensions-api-docs

Home > @tridion-sites/open-api-client > ItemsService > getDefaultModel

ItemsService.getDefaultModel() method

Gets a default model for the specified model type. The returned model can be used for item creation. This operation returns an instance of ‘IdentifiableObject’ type, as implemented by one of the following:<ul class="model-list"><li>ApprovalStatus</li><li>Bundle</li><li>BusinessProcessType</li><li>Category</li><li>Component</li><li>ComponentTemplate</li><li>Folder</li><li>Group</li><li>Keyword</li><li>MultimediaType</li><li>Page</li><li>PageTemplate</li><li>Publication</li><li>Schema</li><li>SearchFolder</li><li>StructureGroup</li><li>TargetGroup</li><li>TargetType</li><li>TemplateBuildingBlock</li><li>TridionProcessDefinition</li><li>User</li></ul>

Signature:

static getDefaultModel({ modelType, containerId, }: {
        modelType: 'Bundle' | 'SearchFolder' | 'Schema' | 'Page' | 'PageTemplate' | 'Component' | 'ComponentTemplate' | 'Folder' | 'Keyword' | 'StructureGroup' | 'TemplateBuildingBlock' | 'Publication' | 'Category' | 'Group' | 'ProcessDefinition' | 'BusinessProcessType' | 'MultimediaType' | 'TargetType' | 'User' | 'TargetGroup' | 'ApprovalStatus';
        containerId?: string;
    }): CancelablePromise<IdentifiableObject>;

Parameters

Parameter Type Description
{ modelType, containerId, } { modelType: ‘Bundle’ | ‘SearchFolder’ | ‘Schema’ | ‘Page’ | ‘PageTemplate’ | ‘Component’ | ‘ComponentTemplate’ | ‘Folder’ | ‘Keyword’ | ‘StructureGroup’ | ‘TemplateBuildingBlock’ | ‘Publication’ | ‘Category’ | ‘Group’ | ‘ProcessDefinition’ | ‘BusinessProcessType’ | ‘MultimediaType’ | ‘TargetType’ | ‘User’ | ‘TargetGroup’ | ‘ApprovalStatus’; containerId?: string; }  

Returns:

CancelablePromise<IdentifiableObject>

IdentifiableObject The request was successful.

Exceptions

ApiError