Add Node Permissions by Node Path and Project Number
POST /ws/rest/service/v1 /dm/permission/{projectNumber}/node/{node_path}
Purpose
This service provides the ability to add/update permissions of a node.
Request Parameters
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.:
Sample Request
To add permission of a node test3 under node path "/test2" of project b1 send a request in the following format.
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 Format
A JSON object is returned in the following format.
{
"data": [],
"message": [],
"status": <REST status code value>
}
Sample Success Response
[{
"message":[ "given permissions are added successfully"],
"status":200
}]
Sample Failed Response
[{
"message":[ "Invalid user name or user does not have permission to the current project"],
"status":1076
}]