You can interact with project folders through the API.
The ROOT project folder can be retrieved with the get_root_project_folder method.
client = DSSClient(host, apiKey) root_folder = client.get_root_project_folder()
Alternatively any project folder can be retrieved with its ID with the get_project_folder method.
client = DSSClient(host, apiKey) prj_folder = client.get_project_folder(prj_folder_id)
The name and path of a project folder can be retrived.
name = prj_folder.get_name() path = prj_folder.get_path()
To create a child project folder, use the create_sub_folder method.
newborn_child = prj_folder.create_sub_folder(project_folder_name)
Projects can be created the same way using the create_project method.
new_project = prj_folder.create_project(project_key, project_name, owner)
To move a project folder to another location (into another project folder), use the move_to method.
Similarly projects can be moved to another location (into another project folder), use the move_project_to method.
One can delete an empty project folder with sufficient permissions.
In order to edit its name, or its permissions, one must get the project folder settings beforehand.
pf_settings = prj_folder.get_settings() pf_settings.set_name(new_name) pf_settings.set_owner(new_owner) pf_permissions = pf_settings.get_permissions() pf_permissions.append(new_permission_item) pf_settings.save()