Documentation > Access API > AssetController > accessapi/Asset/Create



Request Information

URI Parameters

None.

Body Parameters

AssetCreateRequest

NameDescriptionType
destinationFolderId

System.Int32
devTemplateLanguage

System.Int32
modelId

System.Int32
newName

System.String
subtype

System.Int32
templateId

System.Int32
type

System.Int32
workflowId

System.Int32

Request Formats

application/json

Sample:
//Example Requests for creating the various file/folder types:

//Folder Types

/**Site Root Folder**/
{"destinationFolderId":"43177","newName":"aTestSiteRoot","type":"4", "subtype":"128"}

/**Project Folder**/
{"destinationFolderId":"43177","newName":"aTestProj","type":"4", "subtype":"32"}

/**Library Folder**/ //Note: Destination folder must be a Project without an existing Library
{"destinationFolderId":"43270","newName":"aTestLibFolder","type":"4", "subtype":"64"}

/**Template Folder**/
{"destinationFolderId":"43181","newName":"aTemplateFolder","type":"4", "subtype":"256"}

/**Template**/
{"destinationFolderId":"43181","newName":"aTestTemplate","type":"4", "subtype":"512"}

/**Model Folder**/
{"destinationFolderId":"43270","newName":"aTestModelFolder","type":"4", "subtype":"4096"}

/**Workflow Folder**/
{"destinationFolderId":"43270","newName":"aTestWrkFlowFolder","type":"4", "subtype":"1024"}

//File Types

/**Template File**/ // input.aspx, output.aspx, etc...
{"destinationFolderId":"43242","newName":"aTemplateFile","type":"2", "devTemplateLanguage": "1", "subtype":"17"}

/**Library File**/ //Note: Name must end with ".cs"
{"destinationFolderId":"43179","newName":"aTestClass.cs","type":"2", "devTemplateLanguage": "1", "subtype":"17"}

/**C# Developer Template File**/
{"destinationFolderId":"43177","newName":"aCSharpDevTemplateFile","type":"2", "devTemplateLanguage": "1", "subtype":"1"}

/**VB Developer Template File**/
{"destinationFolderId":"43177","newName":"aCSharpDevTemplateFile","type":"2", "devTemplateLanguage": "0", "subtype":"1"}

/**Empty File**/ //Note: a Template ID must be provided
{"destinationFolderId":"43177","newName":"aEmptyFile","type":"2", "templateId":"43201", "devTemplateLanguage": "-1"}



Response Information

Resource Description

Connect with Crownpeak