Direct Inward Dialing: +1 408 916 9393
Use this API to move a computer object in Active Directory from your application.
Request URL format: http://<hostname>:<port>/RestAPI/MoveComputer
Request parameters:
Parameter name | Mandatory | Description |
PRODUCT_NAME | Yes | Product name or module name from which the request is being sent; will be needed for auditing. |
AuthToken | Yes | Authentication token obtained using the Generate AuthToken API. |
domainName | Yes | Name of the domain in which the computer accounts are present. |
inputFormat | Yes | Details of each computer account to be moved. This attribute should be a JSONArray string and must be in the format mentioned below:
[<JSONObject>, <JSONObject>, <JSONObject>]; JSONObject: The key/value pair of LDAP attributes and the values.
NOTE: You can specify any of the following attributes as search criteria to locate computer objects using REST API requests:
|
targetOU | Yes | Name of the OU to which the computers are being moved. |
Response:
The response will be a JSON array string which contains the list of JSONObjects.
Parameter name | Description |
destinationOUName | Name of the OU to which the users are moved. |
sAMAccountName | sAMAccountName of the computer. |
objectGUID | objectGUID of the computer. |
objectSID | objectSID of the computer. |
distinguishedName | distinguishedName of the computer. |
userPrincipalName | userPrincipalName of the computer. |
ouName | Name of the container from where the computer is moved. |
statusMessage | Contains the appropriate message if an issue or error occurs while processing the request. |
status | Contains 1 or 0, indicating whether the operation is a success or failure. |
Sample input/output:
Request
http://admanager:8080/RestAPI/MoveComputer?AuthToken=3187f9d3-da6b-4bc2-aaff-a73495753b8d&PRODUCT_NAME=MODULE_NAME&domainName=test.com&inputFormat=[{sAMAccountName:Test-Computer-1$}]&targetOU=OU=TestComputers,DC=test,DC=com
Response:
[ { "destinationOUName": "OU=TestComputers,DC=test,DC=com", "sAMAccountName": "Test-Computer-1$", "objectGUID": "{2C9BE8C0-224D-4DA9-B5E6-01C422839747}", "objectSID": "S-1-5-21-2058198098-2931619084-4035890149-134969", "distinguishedName": "CN=Test-Computer-1,OU=Computers,DC=test,DC=com", "userPrincipalName": "Test-Computer-1", "ouName": "OU=Computers,DC=test,DC=com", "statusMessage": "Successfully Modified", "status": "1" } ]