tridion-sites-extensions-api-docs

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

ItemsService.create() method

Creates an object based on a specified request model and saves it to the database. For versioned items, a check-in is performed by default. 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 create({ requestModel, autoCheckIn, }: {
        requestModel: IdentifiableObject;
        autoCheckIn?: boolean;
    }): CancelablePromise<IdentifiableObject>;

Parameters

Parameter Type Description
{ requestModel, autoCheckIn, } { requestModel: IdentifiableObject; autoCheckIn?: boolean; }  

Returns:

CancelablePromise<IdentifiableObject>

IdentifiableObject The request has completed and has resulted in one or more new resources being created.

Exceptions

ApiError