# Retrieve Patch Scan System List Retrieves the list of all systems along with their patch scan status. **This API endpoint is deprecating soon** ## Endpoints **GET** `/api/1.4/patch/scandetails` ## Request URL ``` https://{serverurl}/api/1.4/patch/scandetails ``` `{serverurl}` – Refer to your OAuth authentication endpoint domain. ## Scope ``` DesktopCentralCloud.PatchMgmt.READ ``` ## Header ``` Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52 ``` ## Request Parameters ### Query Parameters - **resid** (string, Optional) Filter for system with a resource id - **domainfilter** (string, Optional) Get domain list from `api/1.4/desktop/serverproperties` - **platformfilter** (string, Optional) Windows/Mac/Linux - **branchofficefilter** (string, Optional) Get branch office list from `api/1.4/desktop/serverproperties` - **customgroupfilter** (string, Optional) Get Custom Group list from `api/1.4/desktop/serverproperties` - **healthfilter** (integer, Optional) 0: Unknown — patch status is not available 1: Healthy — system is up-to-date 2: Vulnerable — system has missing patches 3: Highly Vulnerable — system has critical or high-risk missing patches - **livestatusfilter** (integer, Optional) 1: Agent Live (agent is running) 2: Agent Down (agent is not responding) - **searchvalue** (string, Optional) - **searchcolumn** (string, Optional) - **searchtype** (string, Optional) - **sortorder** (string, Optional) - **orderby** (string, Optional) - **pagelimit** (string, Optional) Number of records per page. - **page** (integer, Optional) Current page number for pagination. - **customerid** (long, Optional) - **agentinstallationstatusfilter** (integer, Optional) 21: Not Installed (agent is not installed) 22: Installed (agent is installed) - **scanstatusfilter** (integer, Optional) ## Sample Request ### Curl ```bash curl --request GET \ --url https://appdomain/api/1.4/patch/scandetails \ --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/api/1.4/patch/scandetails")) .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 = { 'Authorization': "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52" } conn.request("GET", "/api/1.4/patch/scandetails", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ### Deluge ```javascript headersMap = Map(); headersMap.put("Accept", "application/json"); response = invokeUrl [ url: "https://appDomain/api/1.4/patch/scandetails" type: GET headers: headersMap connection: connection_name ] info response; ``` ### PowerShell ```powershell $headers=@{} $headers.Add("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52") $response = Invoke-WebRequest -Uri 'https://appdomain/api/1.4/patch/scandetails' -Method GET -Headers $headers ``` ## Response Parameters ### HTTP 200 **Response Body**: `application/json` - **message_type** (string) Value: `scandetails` - **message_response** (JSON object) Paginated scan details data - **total** (string) Total number of systems with scan data - **scandetails** (JSON array) Array of system scan detail objects - **resource.name** (string) Computer name of the system - **resource_id** (long) Unique resource identifier - **resource.domain_netbios_name** (string) Domain name of the system - **branch_office_name** (string) Branch or remote office name - **branch_office_id** (string) Branch office identifier - **scan_status** (string) Scan status: 226 = Failed 227 = InProgress 228 = Success 229 = NotScanned - **computer_live_status** (string) Live status: 1 = Live 2 = Down - **resource_health_status** (string) Health: 0 = Unknown 1 = Healthy 2 = Vulnerable 3 = Highly Vulnerable - **installation_status** (string) Installation status code - **os_platform** (string) Platform ID: 1 = Windows 2 = Mac 3 = Linux - **os_platform_name** (string) Platform name - **os_name** (string) Full operating system name - **service_pack** (string) Service pack or OS version - **agent_version** (string) Agent version installed - **last_scan_time** (long) Timestamp of last scan attempt - **last_successful_scan** (long) Timestamp of last successful scan - **ip_address** (string) IP address(es) of the system - **mac_address** (string) MAC address(es) of the system - **scan_remarks** (string) Scan result remarks - **limit** (string) Records per page - **page** (string) Current page number - **message_version** (string) API version: 1.0 - **status** (string) Operation status: success - **response_code** (string) Response code: 200 ## Sample Response: HTTP 200 ```json { "response_code": 200, "message_type": "scandetails", "message_response": { "total": 94, "limit": 25, "page": 1, "scandetails": [ { "branch_office_name": "Local Office", "scan_status": 228, "resource.name": "WIN-SERVER-01", "resource_health_status": 3, "scan_remarks": "dc.patch.util.Scanning_completedsuccessfully", "os_platform": 1, "ip_address": "192.168.1.100", "branch_office_id": 1, "os_platform_name": "Windows", "agent_version": "10.0.267.W", "mac_address": "00:0c:29:7e:51:a7", "resource.domain_netbios_name": "WORKGROUP", "service_pack": "Windows 10 Version 1803 (x64)", "resource_id": 47707, "installation_status": 22, "os_name": "Windows 10 Professional Edition (x64)", "computer_live_status": 1, "last_scan_time": 1552904526258, "last_successful_scan": 1552904526258 } ] }, "message_version": "1.0", "status": "success" } ``` ## Possible HTTP Status Codes - **200** – HTTP code ## Rate Limiting **Duration:** 1 minute **Threshold:** 30 **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.