-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.15] Endpoint API documentation for
scan
response action (#5476)
- Loading branch information
1 parent
65642ba
commit 5730776
Showing
9 changed files
with
103 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
[[scan-api]] | ||
=== Scan a file or folder | ||
|
||
Scan a file or folder for malware on a host running {elastic-defend}. | ||
|
||
You must have the `Scan Operations` {kib} privilege in the Security feature as part of your role and an Enterprise license to perform this action. | ||
|
||
==== Request URL | ||
|
||
`POST <kibana host>:<port>/api/endpoint/action/scan` | ||
|
||
==== Request body | ||
|
||
A JSON object with these fields: | ||
|
||
[width="100%",options="header"] | ||
|============================================== | ||
include::_response-actions-api-reusable-content.asciidoc[tags=create-response-actions-api-common-body-options-row-content] | ||
|
||
|`parameters.path` |String |The folder or file’s full path (including the file name). |Yes | ||
|============================================== | ||
|
||
|
||
===== Example requests | ||
|
||
Scan a file `/usr/my-file.txt` on a host with an `endpoint_id` value of `ed518850-681a-4d60-bb98-e22640cae2a8` and comment `Scan the file for malware`: | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
POST /api/endpoint/action/scan | ||
{ | ||
"endpoint_ids": ["ed518850-681a-4d60-bb98-e22640cae2a8"], | ||
"parameters": { | ||
"path": "/usr/my-file.txt", | ||
}, | ||
"comment": "Scan the file for malware" | ||
} | ||
-------------------------------------------------- | ||
|
||
|
||
===== Response code | ||
|
||
`200`:: | ||
Indicates a successful call. | ||
|
||
`403`:: | ||
Indicates insufficient user privilege (*Scan Operations* required), or unsupported license level (Enterprise license required). | ||
|
||
==== Response payload | ||
|
||
A JSON object with the details of the response action created. | ||
|
||
===== Example response | ||
|
||
[source,json] | ||
-------------------------------------------------- | ||
{ | ||
"data": { | ||
"id": "27ba1b42-7cc6-4e53-86ce-675c876092b2", | ||
"agents": [ | ||
"ed518850-681a-4d60-bb98-e22640cae2a8" | ||
], | ||
"hosts": { | ||
"ed518850-681a-4d60-bb98-e22640cae2a8": { | ||
"name": "gke-endpoint-gke-clu-endpoint-node-po-e1a3ab89-4c4r" | ||
} | ||
}, | ||
"agentType": "endpoint", | ||
"command": "scan", | ||
"startedAt": "2023-07-28T19:00:03.911Z", | ||
"isCompleted": false, | ||
"wasSuccessful": false, | ||
"isExpired": false, | ||
"status": "pending", | ||
"outputs": {}, | ||
"agentState": { | ||
"ed518850-681a-4d60-bb98-e22640cae2a8": { | ||
"isCompleted": false, | ||
"wasSuccessful": false | ||
} | ||
}, | ||
"createdBy": "myuser", | ||
"parameters": { | ||
"path": "/usr/my-file.txt" | ||
} | ||
} | ||
} | ||
-------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters