Support
 
Phone Live Chat
 
Support
 
US: +1 888 720 9500
US: +1 800 443 6694
Intl: +1 925 924 9500
Aus: +1 800 631 268
UK: 0800 028 6590
CN: +86 400 660 8680

Direct Inward Dialing: +1 408 916 9393

 
 
 
 
 
Folder permissions
 

Set folder permissions API

This API helps you raise a workflow request to add folder permissions using your application. 

Request URL (JSON) Format: http://<hostname>:<port>/RestAPI/CreateWorkFlowRequest

Request Parameters:

Parameters Mandatory Description
AuthToken Yes Authentication token that is generated either from the Delegation tab (Delegation > Configuration > Technician Authtokens) or from the My account tab (My Account > Active Authtokens) in the top right corner of the product.
domainName Yes The required domain name.
inputData Details about the workflow request to be raised. 
Yes Specify the title of the request under Subject. 
Yes Specify the action as ADD_FOLDER_PERMISSION under RequestAction. 
Yes Specify the folders whose permissions you wish to set.
Optional Specify the permissions you wish to apply.
Optional Specify the duration after which you wish to apply the permissions. For this, use the durationType and duration attributes. The durationType attribute can have values like minutes, hours, days and dates. The duration attribute is used to specify the number of minutes, hours, days or the exact date. Use the
yyyy-MM-dd HH:mm:ss format to specify the required date. The duration attribute is optional only if the value of durationType attribute is null.  
Yes Specify the user accounts for which you wish to set the permissions.
Optional Specify the priority of the task.
Optional Provide a suitable Description.
PRODUCT_NAME Yes Product name/module name from which the request is being sent; will be needed for auditing.

The following are the combination of values that you can specify to indicate the duration and durationType:

durationType duration
- 0 (Never)
minutes 30
hours 1
hours 2
days 1
date 2019-07-31 15:09:00 DateTime should be in the format: yyyy-MM-dd HH:mm:ss Eg: 2019-07-31 15:09:00
   

The following are the access masks to be used to apply the associated permissions:

Access masks Permissions
2032127 Full control
1245631 Modify
1179817  Read and execute
1179785 Read
1048854 Write
131241  List folder contents
32 Traverse folder/ execute file
1 List folder/ read data
128  Read attributes
Read extended attributes
2 Create file/ write data
256 Write attributes
16  Write extended attributes
64  Delete sub-folders and files
65536 Delete
131072 Read permissions
262144  Write permissions
524288 Take Ownership

Response Parameters:

Parameters Description
Subject Subject of the request
requestId RequestId of the request raised. This is not displayed in the response, if the operation has failed. 
status Status of the operation, where 1 stands for Success and 0 stands for Failure.
statusMessage The response message to be displayed in case of success or failure.

Sample Input / Output

Request:

http://admanager:8080/RestAPI/CreateWorkFlowRequest?AuthToken=244f8f17-041d-4c85-9924-02f7351a6fbb&domainName=admp.local&PRODUCT_NAME=RESTAPI&inputData=[{"RequestAction":"ADD_FOLDER_PERMISSION", "Subject":"Set Folder Permissions", "Priority":"3", Description:"Rest Desc", "accounts":{"user":[{"sAMAccountName":"John"}]}, "folders":{"\\\\admp-dc1\\share":"share"}, "permissions":["1179785", "1048854"], "durationType":"date", "duration":"2020-12-30 23:59:00"}]

Response:

[{"Subject":"Set Folder Permissions","requestId":10204,"statusMessage":"Successfully created the request.","status":"1"}]

ADManager Plus Trusted By

The one-stop solution to Active Directory Management and Reporting
Email Download Link