Direct Inward Dialing: +1 408 916 9393
This API allows you to locate any computer object in your Active Directory.
Request URL format: http://<hostname>:<port>/RestAPI/SearchComputer
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 search is to be performed. |
range | Yes | Number of computer details to be returned in the request's response. |
startIndex | Yes | Starting index for the computer details result. |
searchText | No | Text to be used in the search. |
refresh | No | Boolean type. On true, the server will refresh and update the changes from AD to ADManager Plus, and then send the updated results. |
sortColumn | No | Name of the column based on which the search result will be sorted. Any one of the columns in the search result can be used to sort the result. |
ascending | No | Boolean type. If true, the search results are arranged in ascending order. If false, the results will be shown in descending order.
Note: By default, the results are in ascending order. |
select | No | LDAP attributes that are to be displayed in the search result. |
filter | No | LDAP attributes to refine the search.
Note: If you want to use filter to search, don't use searchText. |
domainList | No | The domains in which the computer is to be searched for. |
Response:
The response will be a JSON array string which contains the list of JSONObjects.
Parameter name | Description |
count | Total number of computers with the given search criteria. |
ComputerList | JSONArray of the computer details. Each JSONObject in the array represents a computer in the search result. The JSONObject contains the key/value pair of attributes of the computer and their corresponding values. |
statusMessage | Contains the appropriate message if an issue or error occurs while processing the request. |
status | Status of the search operation. Displays SUCCESS on successful completion of the request. |
Sample input/output:
Request
http://admanager:8080/RestAPI/SearchComputer?domainName=test.com&AuthToken=3187f9d3-da6b-4bc2-aaff-a73495753b8d&range=2&startIndex=1&refresh=true&sortColumn=COMPUTER_NAME&ascending=ascending&searchText=Test-Computer
Response:
{ "ComputerList": [ { "COMPUTER_NAME": "Test-Computer-1", "DISTINGUISHED_NAME": "CN=Test-Computer-1,OU=Computers,DC=test,DC=com", "OU_NAME": "Computers", "VERSION": "-", "SID_STRING": "S-1-5-21-2058198098-2931619084-4035890149-134969", "OBJECT_GUID": "{2C9BE8C0-224D-4DA9-B5E6-01C422839747}", "MANAGER": "-", "OPERATING_SYSTEM": "-", "DEPARTMENT": "-", "SAM_ACCOUNT_NAME": "Test-Computer-1$" }, { "COMPUTER_NAME": "Test-Computer-2", "DISTINGUISHED_NAME": "CN=Test-Computer-2,OU=Computer,DC=test,DC=com", "OU_NAME": "Computer", "VERSION": "-", "SID_STRING": "S-1-5-21-2058198098-2931619084-4035890149-8429", "OBJECT_GUID": "{AF4A2A32-374C-4D74-A18A-DAE86AD45DBB}", "MANAGER": "-", "OPERATING_SYSTEM": "-", "DEPARTMENT": "-", "SAM_ACCOUNT_NAME": "Test-Computer-2$" } ], "count": 4, "statusMessage": "", "status": "SUCCESS" }
Request with filter and select parameters
Response
{ "ComputerList": [ { "COMPUTER_NAME": "Test-Computer-1", "DISTINGUISHED_NAME": "CN=Test-Computer-1,OU=Computer,DC=test,DC=com", "SAM_ACCOUNT_NAME": "Test-Computer-1$" }, { "COMPUTER_NAME": "Test-Computer-2", "DISTINGUISHED_NAME": "CN=Test-Computer-2,OU=Computer,DC=test,DC=com", "SAM_ACCOUNT_NAME": "Test-Computer-2$" }, { "COMPUTER_NAME": "Test-Computer-3", "DISTINGUISHED_NAME": "CN=Test-Computer-3,OU=Computer,DC=test,DC=com", "SAM_ACCOUNT_NAME": "Test-Computer-3$" }, { "COMPUTER_NAME": "Test-Computer-4", "DISTINGUISHED_NAME": "CN=Test-Computer-4,OU=Computer,DC=test,DC=com", "SAM_ACCOUNT_NAME": "Test-Computer-4$" } ], "count": 7, "statusMessage": "", "status": "SUCCESS" }