POST /ws/rest/service/v1 /dm/permission/{projectNumber}/node/{node_path}
Purpose
This service provides the ability to add/update permissions of a node.
Input
Path parameters:
projectnumber: (Optional) project number(if not given, default is company workspace)
node_path : full node_path of the required node.
POST body is a 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 'status', 'data', 'message'
Example:
To add permission of a node test3 under node path "/test2" of project b1 give input as follows:
URL: http://<host>:<port>/ws/rest/service/v1/dm/permission/b1/node/test2/test3
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
}
}
]
}
Response in case of success:
[{
"message":
[ "given permissions are added successfully"
],
"status":200
}]
Response in case of error:
[{
"message":
[ "Invalid user name or user does not have permission to the current project"
],
"status":1076
}]