Direct Inward Dialing: +1 408 916 9393
This API helps you raise a workflow request to add users to a specific AD group from 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 | Domain in which this operation has to be performed. |
inputData | Details about the workflow request to be raised. It must also contain the details about the user and the group to which it has to be added. You can also specify the duration after which the users can be removed from that group. | |
Yes | Specify the title of the request under Subject. | |
Yes | Specify the action as ADD_USERS_TO_GROUP under RequestAction. | |
Yes | Specify the user accounts to be added to the group(s). | |
Optional | Specify the priority of the task. | |
Optional | Provide a suitable Description. | |
Yes | Enter the sAMAccountName of the groups to which the users have to be added. | |
Optional | Specify the duration after which you wish to remove these users from the groups. 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. | |
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 | Date and time should be in the format: YYYY-MM-DD hh:mm:ss. Eg: 2019-07-31 15:09:00 |
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_USERS_TO_GROUP", "Subject":"Add to Group", "accounts":[{"sAMAccountName":"john"}], "groups":[{"sAMAccountName":"manager"}], "durationType":"date", "duration":"2020-09-14 18:00:00"}]
Response:
[{"Subject":"Add to Group","requestId":6305,"statusMessage":"Successfully created the request.","status":"1"}]