# Retrieve software metering rules Returns the list of software metering rules configured in the system, including app definition details and usage statistics ## Endpoints **GET** `/dcapi/inventory/viewData/swMeteringSummary` ## Request URL ``` https://{serverurl}/dcapi/inventory/viewData/swMeteringSummary ``` **Server URL reference:** 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 `7771` ## Sample Request ### Curl ```bash curl --request GET \ --url 'https://appdomain/dcapi/inventory/viewData/swMeteringSummary?toolID=7771' \ --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/swMeteringSummary?toolID=7771")) .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/swMeteringSummary?toolID=7771", 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/swMeteringSummary" + "?" + 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/swMeteringSummary?toolID=7771' -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 software metering rule objects - **original_file_name_transform** (string) — Original file name display value - **file_version** (string) — File version - **comments_transform** (string) — Comments display value - **product_name_transform** (string) — Product name display value - **added_time** (string) — Rule added time as epoch timestamp - **modified_time_transform** (string) — Modified time display value - **os_platform_transform** (string) — OS platform display value - **swm_discovered_count** (string) — Number of computers where software was discovered - **app_definition_status** (string) — App definition enabled status - **modified_time** (string) — Modified time as epoch timestamp - **added_by** (string) — User who added the rule - **original_file_name** (string) — Original file name - **file_version_transform** (string) — File version display value - **comments** (string) — Comments - **modified_by_transform** (string) — Modified by user display value - **file_name** (string) — Executable file name - **os_platform** (string) — OS platform code - **total_run_time** (string) — Total run time in seconds - **definition_name_transform** (string) — Definition name display value - **added_by_transform** (string) — Added by user display value - **product_name** (string) — Product name - **file_name_transform** (string) — File name display value - **invswmeteringrulessummaryapp_definition_id** (string) — Metering rules summary app definition ID - **total_run_count** (string) — Total run count - **definition_name** (string) — App definition name - **modified_by** (string) — User who last modified the rule - **app_definition_id** (string) — App definition identifier - **added_time_transform** (string) — Added time display value - **customer_id** (string) — Customer identifier - **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": "2", "messageResponse": [ { "original_file_name_transform": "--", "file_version": "", "comments_transform": "--", "product_name_transform": "--", "added_time": "1778827877323", "modified_time_transform": "May 15, 2026 12:21 PM", "os_platform_transform": "Windows", "swm_discovered_count": "1", "app_definition_status": "true", "modified_time": "1778827877323", "added_by": "SampleUser", "original_file_name": "", "file_version_transform": "--", "comments": "", "modified_by_transform": "SampleUser", "file_name": "sampleapp.exe", "os_platform": "1", "total_run_time": "145540", "definition_name_transform": "Sample App", "added_by_transform": "SampleUser", "product_name": "", "file_name_transform": "sampleapp.exe", "invswmeteringrulessummaryapp_definition_id": "1", "total_run_count": "726", "definition_name": "Sample App", "modified_by": "SampleUser", "app_definition_id": "1", "added_time_transform": "May 15, 2026 12:21 PM", "customer_id": "1" } ], "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