Get Node Permissions by Node Path, Project Number, and User or Group
GET /ws/rest/service/v1/dm/permission/{projectNumber}/node/{node_path}/user/{username}?usertype={usertype}
Purpose
This REST service retrieves permissions of a node by node_path, project number, user/group name and userType (either, 'U' for user, 'PG' for group).
Request Parameters
Path parameters:
- projectnumber: (Optional) project number (if not given, default is company workspace)
- node_path: full node_path of the required node.
- username: user/group name. If it is user, user login name should be given; if its group, group name should be given.
- usertype: QueryParameter: 'U' for user, 'PG' for group.
- POST body is JSON
Sample Request
To get the permissions of node "test3" under path "/test2" of projectnumber b1 for a given group "Asset Managers", give the URL as follows.
http://<host>:port>/ws/rest/service/v1/dm/permission/b1/node/test2/test3/user/Asset%20Managers?usertype=PG
The usertype is 'U' for user or 'PG' for project group.
Response Format
A JSON object is returned containing permissions data.
Sample Success Response
"Inheritance": false,
"ApplyToAllSubFolders": false,
"UserPermission": [
{
"Type": "PG",
"GroupName": "Asset Managers",
"FullName": "Asset Managers",
"DocumentPermission": {
"View": 1,
"Move": 1,
"Copy": 1,
"Delete": 1,
"Download": 1,
"ModifyProperties": 1,
"ModifyPermissions": 1,
"AddComments": 1,
"Revise": 1
},
"FolderPermission": {
"View": 1,
"Move": 1,
"Copy": 1,
"Delete": 1,
"ModifyProperties": 1,
"ModifyPermissions": 1,
"CreateSubFolders": 1,
"AddDocuments": 1}
}
]
}
Sample Failed Response
{
"message": ["Invalid user Type. Type is mandatory to identify either a user or a group"],
"status": 1075
}