Direct Inward Dialing: +1 408 916 9393
This API enables you to delete any computer object from your Active Directory.
Request URL format: http://<hostname>:<port>/RestAPI/DeleteComputer
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 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 | Name of the domain in which the computers are present. |
inputFormat | Yes | Details of each computer to be deleted. 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: |
Response:
The response will be a JSON array string which contains the list of JSONObjects.
Parameter name | Description |
sAMAccountName | sAMAccountName of the computer. |
objectGUID | objectGUID of the computer. |
objectSID | objectSID of the computer. |
distinguishedName | distinguishedName of the computer. |
userPrincipalName | Name of the computer. |
ouName | Name of the container from where the computer is deleted. |
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/DeleteComputer?AuthToken=3187f9d3-da6b-4bc2-aaff-a73495753b8d&PRODUCT_NAME=MODULE_NAME&domainName=test.com&inputFormat=[{sAMAccountName:Test-Computer-1$}]
Response:
[ { "sAMAccountName": "Test-Computer-1$", "objectGUID": "{240F79D8-03EE-47D6-B4BF-B9CF88BA1540}", "objectSID": "S-1-5-21-2058198098-2931619084-4035890149-135517", "distinguishedName": "CN=Test-Computer-1,OU=Computer,DC=test,DC=com", "userPrincipalName": "Test-Computer-1", "ouName": "OU=Computer,DC=test,DC=com", "statusMessage": "Successfully Deleted the computer.", "status": "1" } ]
Technician-based create group limit
The total number of computers that technicians can delete in a day using the delete computer API depends on the total number of licensed help desk technicians (HDTs) in ADManager Plus.
If an API is used to delete five AD computers, and three of them are successfully found while two fail, it will be considered as three API calls. The maximum number of API calls an HDT can make is 50/day, irrespective of the tasks the HDT performs. If you have two HDT licenses, the total number of API calls that you can make is 100/day.
As the per day API call limit is not task-specific, you can perform any operation but the total number of API calls should not exceed 100. That is, an HDT can perform a variety of operations like user creation, OU creation, password reset, etc., but the number of API calls for all the tasks put together should not exceed 100.
Note:
Reserved characters include ; /? : @ = &
Unsafe characters include < > # % { } | \ ^ ~ [ ] ` "'