# Retrieve hardware detected across managed computers Returns the complete list of hardware detected across all managed computers. ## Endpoints **GET** `/dcapi/inventory/viewData/hardware` ## Request URL ``` https://{serverurl}/dcapi/inventory/viewData/hardware ``` - `{serverurl}`: OAuth authentication endpoint domain. See [OAuth Authentication Endpoint Domain](https://www.manageengine.com/products/desktop-central/oauth-authentication-endpoint-domain.html) ## 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 `2111` - **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. - **hardwareTypeFilter** (string) — Optional Hardware type to filter by. Obtain the list of hardware types from the response of the [Get Filter Parameters](https://www.manageengine.com/products/desktop-central/inventory-get-filter-parameters.html) API. - **manufacturerFilter** (string) — Optional Manufacturer name to filter by. Obtain the list of manufacturers from the response of the [Get Filter Parameters](https://www.manageengine.com/products/desktop-central/inventory-get-filter-parameters.html) API. ## Sample Request ### Curl ```bash curl --request GET \ --url 'https://appdomain/dcapi/inventory/viewData/hardware?toolID=2111' \ --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/hardware?toolID=2111")) .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/hardware?toolID=2111", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ### Deluge ```javascript parameters = "toolID=value"; headersMap = Map(); headersMap.put("Accept", "application/InventoryMobileAPI.v1+json"); response = invokeUrl [ url: "https://appDomain/dcapi/inventory/viewData/hardware" + "?" + 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/hardware?toolID=2111' -Method GET -Headers $headers ``` ## Response Parameters ### HTTP 200 **Response Body**: `application/json` - **JSON object** - **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 hardware detail objects - **managed_installations_transform** (string) — Managed installations count display value - **hardware_name_transform** (string) — Hardware name display value - **installations_transform** (string) — Installations count display value - **hardware_name** (string) — Hardware component name - **installations** (string) — Total installations count - **hw_type_description_transform** (string) — Hardware type description display value - **manufacturer_name** (string) — Manufacturer name - **hw_type_description** (string) — Hardware type description - **hardware_id** (string) — Hardware component identifier - **manufacturer_name_transform** (string) — Manufacturer name display value - **managed_installations** (string) — Managed installations count - **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 ### HTTP 500 **Response Body**: `application/json` - **JSON object** - **error_code** (string) — INTERNAL_ERROR - unexpected exception in the service layer - **error_description** (string) — Internal server error message ## Sample Response: HTTP 200 ```json { "metadata": { "limit": 25, "page": 1 }, "totalRecords": "23", "messageResponse": [ { "managed_installations_transform": "1", "hardware_name_transform": "Sample Hardware Name", "installations_transform": "1", "hardware_name": "Sample Hardware", "installations": "1", "hw_type_description_transform": "Sample Type", "manufacturer_name": "Sample Manufacturer", "hw_type_description": "Sample Hardware Type", "hardware_id": "1", "manufacturer_name_transform": "Sample Manufacturer", "managed_installations": "1" } ], "totalPages": 1, "Links": { "next": null, "prev": null }, "status": "success" } ``` ## Sample Response: HTTP 500 ```json { "error_description": "Internal server error", "error_code": "INTERNAL_ERROR" } ``` ## Possible HTTP Status Codes - **200** - **500** ## Rate Limiting **Duration:** 1 minute **Threshold:** 120 **Lock period:** 5 minutes - **Duration** — Time window for the threshold. - **Threshold** — Number of API calls allowed within the specified duration. - **Lock period** — Wait time before consecutive API requests.