GET /ws/rest/service/v1/dm/permission/{projectNumber}/node/{node_path}/user/{username}?usertype={usertype}
Purpose:
This service allows user to retrieve permissions of a node by node_path, project number, user/group name and userType(either 'U' for user, 'PG' for group)
Input:
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
Request body:
{
"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
}
}
]
}
Output:
JSON object containing permissions data
Example:
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
usertype is either 'U' for user or 'PG' for project group.
Response in case of success:
"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}}]}
Response in case of error:
{
"message": ["Invalid user Type. Type is mandatory to identify either a user or a group"],
"status": 1075
}