POST /ws/rest/service/v1/dm/folder/create
Purpose
This service allows the user to create folders under a parent folder. Supports folder creation under different parent folders.
Input
Form Data (content type : application/x-www-form-urlencoded)
- projectnumber (String) Optional. Not required for company level.
- data (JSON String) Required: List of field and values for the folder attribute form.
- Path: Specify the full parent path where folder has to created.
- Name: Name of the folder to create: "Folder1"
- Path and Name are required fields, other fields are optional/required based on the attribute form design.
Example
To create a folder "REST Folder" under "/Project Documents/Folder112" then data should as below
projectnumber:TestProj-C
data:[ {"Path":"/Folder112","Name":"REST Folder","Owner":"Company Administrator","Creation Date":"01/01/2016","% Complete":"100","Comments":"Fold 1" } ]
Folder names should be 255 characters or less. Names that will not be supported are those that contain non-printable ascii, / or \, names with trailing spaces, and the special names “.” and “..”.
Output
JSON object containing 'status', 'data', 'message'
Data contains list of fields defined in the folder attribute form. Mandatory to have "Path", the full parent path where folder has to created and "Name" (the name of the folder to create) parameters. Other fields are optional/required based on the attribute form design.
Example:
Successful folder creation:
{
"data":
[
{
"Path":"/Folder112/Folder112",
"Creation Date":"01/01/2016",
"Owner":"Company Administrator",
"Comments":"Fold 1",
"% Complete":"100",
"Name":"REST Folder",
"node_id":"2003150"
}
],
"message":
[
{
"message":"OK"
}
],
"status":200
}
Failure Condition:
{
"data":
[
{
"Path":"/Folder112/Folder112",
"Creation Date":"01/01/2016",
"Owner":"Company Administrator",
"Comments":"Fold 1",
"% Complete":"100",
"Name":"REST Folder"
}
],
"message":
[
{
"message":"Folder with given name already exists"
}
],
"status":1043
}