getLiveSearchQueryTaskResult
You can use this method to retrieve the results of a Live Search initiated via the runPredefinedLiveSearchQuery method.
API URL: CONTROL_CENTER_APIs_ACCESS_URL/v1.2/jsonrpc/incidents.
Important
To use this method, your license must include the Live Search feature.
This method requires the Live Search option to be enabled in the target endpoints' policy under the Live Search section.
Results become available progressively as endpoints respond to the query task. The task may still be running when you call this method. Call the method periodically to retrieve newly available results until the expected number of results has been received or the task has completed.
Parameters
Parameter | Description | Included in request | Type | Value requirements |
|---|---|---|---|---|
| The ID of the Run Live Search query task for which you want to view the results. This ID is returned by the TipThis should be the ID of the parent task listed in the Tasks table in GravityZone Control Center, not the ID of an individual subtask. | Mandatory | String | The string should consist of exactly 24 hexadecimal characters. This parameter must reference a valid task within your company for which results are available. |
These are common parameters, available across all public API methods.
Parameter | Description | Included in request | Type | Value requirements |
|---|---|---|---|---|
| This parameter adds an identifier to the request, linking it to its corresponding response. The target replies with the same value in the response, allowing easy call tracking. | Mandatory | String | No additional requirements. |
| The name of the method you are using to send the request. | Mandatory | String | Must be a valid method name. |
| The version of JSON-RPC used by the request and the response. | Mandatory | String | The only possible value is |
| An object containing the configuration of the request. | Mandatory | Object | No additional requirements. |
Under the | ||||
| The results page number. | Optional | Integer | Default value: The minimum allowed value is |
| The number of results displayed per page. | Optional | Integer | The upper limit is The minimum allowed value is Default value: |
Return value
Attribute | Type | Description |
|---|---|---|
| Object | Live Search results organized by endpoint, along with pagination information:
|
Objects
items
Each item provides the Live Search results returned by a single endpoint, along with metadata identifying the endpoint, the associated company, the task, and the result set.
Attribute | Type | Description |
|---|---|---|
| String | The unique identifier of this result record. |
| String | The ID of the company that owns the queried endpoint. |
| String | The identifier of the Run Live Search query task that produced these results. Matches the |
| String | The ID of the endpoint that produced these results. |
| String | A JSON-encoded string containing the Live Search results for this endpoint. TipDecode or parse the string to view the results in a human-readable JSON format. For example, you can use standard JSON parsers available in your programming language or online JSON formatting tools. You may need to remove escaping from the string before parsing it as JSON. Refer to |
results
Contains information about the file or process returned by the Live Search query for a specific endpoint.
The properties included in this object depend on the query type initiated via the runPredefinedLiveSearchQuery method.
Attribute | Type | Description |
|---|---|---|
| ||
| String | The hostname of the endpoint on which the file was found. |
| String | The absolute path of the file. |
| ||
| Integer | The operating system-assigned process ID. |
| Integer | The process ID of the parent process that created this process. |
| String | The full path to the executable file associated with the process. |
| String | The full command line used to start the process, including any arguments and parameters. |
Example
Request
{
"jsonrpc": "2.0",
"method": "getLiveSearchQueryTaskResult",
"id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f",
"params": {
"taskId": "67adcd628399ee12c90e6922",
"page": 1,
"perPage": 30
}
}Response
Retrieving the results of a Live Search with queryType QUERY_RUNNING_HASH
{
"id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f",
"jsonrpc": "2.0",
"result": {
"total": 1,
"page": 1,
"perPage": 30,
"pagesCount": 1,
"items": [
{
"_id": "67adcd860538e3550aba779a",
"companyId": "67a4a32929d8d9cc5a0987f2",
"taskId": "67adcd628399ee12c90e6922",
"protectedEntityId": "67adcd628399ee12c90e6922",
"results": "{\"hostname\":\"cmurar-windows10\",\"path\":\"C:\\\\Windows\\\\System32\\\\svchost.exe\"}"
}
]
}
}Retrieving the results of a Live Search with queryType QUERY_PROCESS_PER_HASH
{
"id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f",
"jsonrpc": "2.0",
"result": {
"total": 1,
"page": 1,
"perPage": 30,
"pagesCount": 1,
"items": [
{
"_id": "6a2a76fc4c9c1be11363ff24",
"protectedEntityId": "6a2a5dccdc4aea26f2cab111",
"companyId": "67a4a32929d8d9cc5a0987f2",
"taskId": "67adcd628399ee12c90e6922",
"results": "{\"cmdline\":\"C:\\\\WINDOWS\\\\system32\\\\svchost.exe -k UnistackSvcGroup -s WpnUserService\",\"parent\":\"960\",\"path\":\"C:\\\\Windows\\\\System32\\\\svchost.exe\",\"pid\":\"716\"}"
}
]
}
}