# Retrieve computers where a hardware component is installed Returns all computers that have the specified hardware component. ## Endpoint **GET** `/dcapi/inventory/viewData/computersByHW` ## Request URL ``` https://{serverurl}/dcapi/inventory/viewData/computersByHW ``` ## Scope `DesktopCentralCloud.Inventory.READ` ## Header ``` Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52 ``` ## Request Parameters ### Request Headers - **Accept** (string, Mandatory) `application/InventoryMobileAPI.v1+json` ### Query Parameters - **toolID** (string, Mandatory) Set value as `7773` - **hwID** (string, Mandatory) Hardware ID. Obtain from the response of the [Get Installed Hardware List](https://www.manageengine.com/products/desktop-central/inventory-get-installed-hardware-list.html) API. - **domain** (string, Optional) Domain name to filter computers. Obtain from the response of the [Get Computers List](https://www.manageengine.com/products/desktop-central/computers-getcomputers.html) API. - **branchOffice** (string, Optional) Branch office ID to filter computers. Obtain it from the response of the [Get Remote Office List](https://www.manageengine.com/products/desktop-central/remote-offices-getremoteoffices.html) API. - **customGroup** (string, Optional) Custom group ID to filter computers. Obtain it from the response of the [Get Custom Group List](https://www.manageengine.com/products/desktop-central/custom-groups-get-cglist.html) API. ## Sample Request ### Curl ```bash curl --request GET \ --url 'https://appdomain/dcapi/inventory/viewData/computersByHW?toolID=7773&hwID=SOME_STRING_VALUE' \ --header 'Accept: application/InventoryMobileAPI.v1+json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' ``` ### Java ```java import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.io.IOException; import java.net.http.HttpTimeoutException; public class Main { public static void main(String[] args) { HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://appdomain/dcapi/inventory/viewData/computersByHW?toolID=7773&hwID=SOME_STRING_VALUE")) .header("Accept", "application/InventoryMobileAPI.v1+json") .header("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52") .method("GET", HttpRequest.BodyPublishers.noBody()) .build(); HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } } ``` ### Python ```python import http.client conn = http.client.HTTPSConnection("appdomain") headers = { 'Accept': "application/InventoryMobileAPI.v1+json", 'Authorization': "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52" } conn.request("GET", "/dcapi/inventory/viewData/computersByHW?toolID=7773&hwID=SOME_STRING_VALUE", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ### Deluge ```javascript parameters = "toolID=value" + "&" + "hwID=value"; headersMap = Map(); headersMap.put("Accept", "application/InventoryMobileAPI.v1+json"); response = invokeUrl [ url: "https://appDomain/dcapi/inventory/viewData/computersByHW" + "?" + parameters type: GET headers: headersMap connection: connection_name ] info response; ``` ### PowerShell ```powershell $headers=@{} $headers.Add("Accept", "application/InventoryMobileAPI.v1+json") $headers.Add("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52") $response = Invoke-WebRequest -Uri 'https://appdomain/dcapi/inventory/viewData/computersByHW?toolID=7773&hwID=SOME_STRING_VALUE' -Method GET -Headers $headers ``` ## Response Parameters ### HTTP 200 **Response Body**: `application/json` - **metadata** (JSON object) Pagination metadata - **limit** (string) – Number of items returned per page - **page** (string) – Current page number in paginated response - **totalRecords** (string) Total number of records matching the query - **messageResponse** (JSON array) Array of computer detail objects - **resource_name_transform** (string) – Computer name display value - **model_transform** (string) – Computer model display value - **branch_office_id** (string) – Branch office identifier - **product_number** (string) – Product number - **copies** (string) – Number of hardware copies - **warranty_expiry_date_transform** (string) – Warranty expiry date display value - **model** (string) – Computer model - **live_status_resource_id** (string) – Resource ID for live status lookup - **domain_netbios_name_transform** (string) – Domain NetBIOS name display value - **license_status_transform** (string) – License status display value - **asset_tag** (string) – Asset tag - **copies_transform** (string) – Copies count display value - **branch_office_name_transform** (string) – Branch office name display value - **asset_tag_transform** (string) – Asset tag display value - **agent_last_contact_time_transform** (string) – Agent last contact time display value - **agent_logged_on_users** (string) – Currently logged-on user - **fqdn_name_transform** (string) – FQDN display value - **license_status** (string) – License status - **computer_description** (string) – Computer description - **no_of_processors** (string) – Number of processors - **system_type** (string) – System architecture type - **computer_status_transform** (string) – Computer status display value - **friendly_name_transform** (string) – Friendly name display value - **computer_description_transform** (string) – Computer description display value - **product_number_transform** (string) – Product number display value - **computer_status_update_time** (string) – Computer status update time as epoch timestamp - **no_of_processors_transform** (string) – Processors count display value - **computer_status** (string) – Computer status - **branch_office_name** (string) – Branch office name - **shipping_date** (string) – Shipping date as epoch timestamp - **agent_last_contact_time** (string) – Agent last contact time as epoch timestamp - **domain_netbios_name** (string) – Domain NetBIOS name - **fqdn_name** (string) – Fully qualified domain name - **primary_owner_name** (string) – Primary owner name - **ip_address_transform** (string) – IP address display value - **agent_last_bootup_time_transform** (string) – Last boot time display value - **boot_up_state** (string) – Boot up state - **mac_address** (string) – MAC address - **warranty_expiry_date** (string) – Warranty expiry date as epoch timestamp - **boot_up_state_transform** (string) – Boot up state display value - **friendly_name** (string) – Computer friendly name - **agent_logged_on_users_transform** (string) – Logged-on users display value - **ip_address** (string) – IP address - **shipping_date_transform** (string) – Shipping date display value - **system_type_transform** (string) – System type display value - **mac_address_transform** (string) – MAC address display value - **agent_last_bootup_time** (string) – Last boot time as epoch timestamp - **servicetag** (string) – Service tag - **total_ram_memory** (string) – Total RAM memory in bytes - **resource_id** (string) – Resource identifier - **computer_live_status** (string) – Computer live status code - **resource_name** (string) – Computer resource name - **servicetag_transform** (string) – Service tag display value - **totalPages** (string) Total number of pages - **Links** (JSON object) Pagination links - **next** (string) – URL to the next page of results, null if last page - **prev** (string) – URL to the previous page of results, null if first page - **status** (string) Response status – success ### Sample Response: HTTP 200 ```json { "metadata": { "limit": 25, "page": 1 }, "totalRecords": "1", "messageResponse": [ { "resource_name_transform": "sample-computer", "model_transform": "Sample Model", "branch_office_id": "1", "product_number": "--", "copies": "1", "warranty_expiry_date_transform": "Oct 11, 2024", "model": "Sample Model", "live_status_resource_id": "301", "domain_netbios_name_transform": "WORKGROUP", "license_status_transform": "Licensed", "asset_tag": "-", "copies_transform": "1", "branch_office_name_transform": "Local Office", "asset_tag_transform": "-", "agent_last_contact_time_transform": "May 14, 2026 04:31 PM", "agent_logged_on_users": "Administrator", "fqdn_name_transform": "SAMPLE-COMPUTER.DOMAIN.COM", "license_status": "Licensed", "computer_description": "-", "no_of_processors": "1", "system_type": "x64-based PC", "computer_status_transform": "Unknown", "friendly_name_transform": "sample-computer", "computer_description_transform": "-", "product_number_transform": "--", "computer_status_update_time": "1778756474127", "no_of_processors_transform": "1", "computer_status": "Unknown", "branch_office_name": "Local Office", "shipping_date": "1570714200000", "agent_last_contact_time": "1778756473455", "domain_netbios_name": "WORKGROUP", "fqdn_name": "SAMPLE-COMPUTER.DOMAIN.COM", "primary_owner_name": "--", "ip_address_transform": "10.0.0.1", "agent_last_bootup_time_transform": "Apr 30, 2026 01:20 PM", "boot_up_state": "Normal boot", "mac_address": "00:00:00:00:00:00", "warranty_expiry_date": "1728653399000", "boot_up_state_transform": "Normal boot", "friendly_name": "sample-computer", "agent_logged_on_users_transform": "Administrator", "ip_address": "10.0.0.1", "shipping_date_transform": "Oct 10, 2019", "system_type_transform": "x64-based PC", "mac_address_transform": "00:00:00:00:00:00", "agent_last_bootup_time": "1777535435000", "servicetag": "SAMPLE01", "total_ram_memory": "17179869184", "resource_id": "301", "computer_live_status": "1", "resource_name": "sample-computer", "servicetag_transform": "SAMPLE01" } ], "totalPages": 1, "Links": { "next": null, "prev": null }, "status": "success" } ``` ### HTTP 500 **Response Body**: `application/json` - **error_code** (string) – INTERNAL_ERROR - unexpected exception in the service layer - **error_description** (string) – Internal server error message ### Sample Response: HTTP 500 ```json { "error_description": "Internal server error", "error_code": "INTERNAL_ERROR" } ``` ## Possible HTTP Status Codes - **200** – HTTP code - **500** – HTTP code