GetLastScanTime
Will determine when the last successful malware scan occurred on the system.
Syntax
Method ID
#define WAAPI_MID_GET_LAST_SCAN_TIME 1004
JSON Input Structure
{
"input": {
"method": 1004,
"signature": number,
"scan_type": string,
"api_url": string,
"token": string,
"credentials": {
"client_id": string,
"client_secret": string
}
}
}
Input Properties
| Parameter | Type | Description |
|---|---|---|
scan_type | string | (optional) The type of scan to get the time for: 'full', 'default' or 'path' (equivalent to the types in the Scan method). If not provided, the type of the last scan time will be ignored. |
api_url | string | (optional) The API URL required by the product to retrieve the necessary data. |
token | string | (optional) The API token required by the product to retrieve the necessary data. |
credentials | object | (optional) Credentials required to authenticate with the API. |
credentials.client_id | string | (optional) A unique identifier for authentication. |
credentials.client_secret | string | (optional) A secret key or password for authentication. |
JSON Output Structure
{
"result": {
"method": 1004,
"code": number,
"timing": number,
"timestamp": string,
"scan_time": string,
"scan_type": string
}
}
Output Properties
| Property | Type | Description |
|---|---|---|
result.method | number | The method ID that generated this result. |
result.code | number | The result code. See Result Codes. |
result.timing | number | The measured time for the method call in milliseconds. |
result.timestamp | string | The timestamp in seconds of when the call was made. |
result.scan_time | string | The last scan time in unix time (GMT). |
result.scan_type | string | The type of scan that the time is for: 'full', 'default', 'path' or 'unspecified' (in cases where the scan type could not be differentiated). |
Result Codes
| Code | Name | Description |
|---|---|---|
| 0 | WAAPI_OK | The operation completed successfully. |
note
Other codes may be returned. See the full Result Codes reference for the complete list.
Remarks
Error Handling
The results of this function are determined by the error code returned by the call. If successful, WAAPI_OK or a special success code will be returned. Always check both the function return value and the result.code field in the output JSON.
Examples
Examples will be added here demonstrating the usage of this method.
See Also
Last updated: 2026-10-01