DCTM Rest Service - Copy ACL + Folders
I need to copy ACL + folders using Rest Webservices from Source -> Destination within same repository but different cabinets. I'm able to implement copy operation using rest services and found that ACL's are not copied to destination folder.
Reason - Folder structure is complex and approx 120 folders need to be copied as part of a Template per project. Creating 120+ folders in run time will cause troubles and process may hangup.
Request you to suggest a better approach/way to handle this.
Comments
-
Honestly i didn't verified that and not worried on other attributes. For now i tried with subject field by adding some text and it's getting copied successfully.
Now using my code I copied the folders to destination and writing a File Operation to iterate thru all folders + subfolders and read the Subject tag (where im adding ACL Name) and planning to overide/apply ACL on destination folders.
Issue faced - Need to find a way to get Absolute Path of folders on DCTMe.g :
folderPath on Documentum = [/Construction Management (CM)/Capital Project/San圣_AR22_111_CN圣]
folderAbsolutePath =C:\Interface\[\Construction Management (CM)\Capital Project\San圣_AR22_111_CN圣]
Any other idea to ease up my job ?
0 -
, we checked the DFC/CS API doc and tested the copy behavior, it is impossible to recursively apply the specified ACL during the copy so far. This looks like a common use case, so we will file a new feature request to the underlying API so that we can add it to REST.
The workaround is as you observed, you need to iterate all sub folders to apply the acl.
0 -
, If you know the root folder URI, you can get its child folder paths, by GET on the link relation "http://identifiers.emc.com/linkrel/folders", with query parameters. Here is an URI example "/repositories/REPO/folders/0b00000580004941/folders?links=false&inline=true&view=r_object_id,object_name,r_folder_path". (get sub folders, inline entries, exclude links, view 3 attributes only).
0 -
Thanks Sir, it would be very useful for folks like me if you can get this feature using REST. Please keep me posted with planned dates of release.
Also if i'm correct there is no way of reading all folders in one shot using URL and pass it to Java FILE Operation , i realized this after few test scenario's.
Even if i read the stream from URL , i can read only the details displayed on page when i use <link rel="http://identifiers.emc.com/linkrel/folders"> but not all folders. Can you suggest any better approach ? Literally I'm stuck
0 -
, your understanding is correct. The REST API lists 1 level of paginated child folders (objects) only, not all descendants. It is a challenge for both client and server to handle a large folder tree in one shot. To iterate all folder descendants in REST API, you need to list folder children level by level (each child folder has the link relation "../folders" as well if the original query parameter is set with links=true).
0 -
Yes, , with effort of our REST engineers, we added it to REST 7.3 at the last minute before feature freezing. Copy now will have an option to specify whether applying the source folder's ACL to the replicated objects. If not (default), the system default ACL will be applied to the replicated objects.
Regards,
William
0 -
Thanks to the Shanghai team for squeezing this in!
Jonathan
0 -
Hi , REST 7.3 is not general available yet, but will come soon. Here just showing you an idea about how to make a JSON copy request.
{
"href":"<to-copy-sysobject-resource-uri>",
"deep-copy":true,"replicate-vd-children":true,
"retain-acl":true,
"properties": {
"object_name":"<new name>", ...
}
}
As the sample indicates, copy in REST 7.3 will have these further improvements:
- replicate virtual document children for a virtual document node
- retain acl for a folder descendants
- copy with new properties
Regards,
William
0 -
My requirement is to create a folder hierarchy template once and deep copy the template folder whenever required so that there is no need of creating the folders everytime but this is not working in documentum rest api version 7.3
Target folder id - 0b000ABC
TEMPLATE folder id - 0b0003XYZ ( this folder contains subfolder)POST http://localhost:8080/dctm-rest/repositories/REPO/objects/0b000ABC
request body
{
"href":"http://localhost:8080/dctm-rest/repositories/REPO/objects/0b0003XYZ",
"deep-copy": true,
"replicate-vd-children": true,
"retain-acl":true,
"properties": {
"object_name":"ABC1",
"r_object_type": "dm_sysobject"
}
}Note : Tried both dm_sysobject and dm_folder options in r_object_type but deep copy is not working
0 -
Below is the correct code and work in Documentum 7.3 rest API
POST http://localhost:8080/dctm-rest/repositories/REPO/folders/[target_folder_id]/objects
{
"href":"http://localhost:8080/dctm-rest/repositories/REPO/folders/[source_folder_id]",
"deep-copy": true,
"replicate-vd-children": true,
"retain-acl":true,
"properties": {
"object_name":"NEW FOLDER NAME"
}
}0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 102 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 124 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax