Skip to content

Commit

Permalink
[8.12] [EDR Workflows] Correct bugs in Execute action API docs (backp…
Browse files Browse the repository at this point in the history
…ort #4236) (#4656) (#4664)

(cherry picked from commit c329b7b)

Co-authored-by: natasha-moore-elastic <[email protected]>
  • Loading branch information
mergify[bot] and natasha-moore-elastic authored Jan 24, 2024
1 parent cdb587b commit c7fdc66
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/management/api/execute-api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ A JSON object with these fields:
|`case_ids` |Array (String) |The IDs of cases where the action taken will be logged. |No
|`comment` |String |Attach a comment to this action's log. The comment text will appear in associated cases. |No
|`parameters.command` |String |A shell command to run on the host. The command must be supported by `bash` for Linux and macOS hosts, and `cmd.exe` for Windows. |Yes
|`parameters.timeout` |String |How long the host should wait for the command to complete. Use `h` for hours, `m` for minutes, `s` for seconds (for example, `2s` is two seconds). If no timeout is specified, it defaults to four hours. |No
|`parameters.timeout` |Integer |The duration, in seconds, that the host waits for the command to complete. If no timeout is specified, it defaults to four hours. |No
|==============================================

NOTE: The `execute` action uploads a text file containing the results of the execution on the endpoint, which is rate-limited. If you are using the `endpoint_ids` field to task multiple endpoints, you should batch your calls in groups of 10 at a time.

===== Example requests

Runs the command `ls -al` on a host with an `endpoint_id` value of `ed518850-681a-4d60-bb98-e22640cae2a8` with a timeout of `5m` and comments `Get list of all files`:
Runs the command `ls -al` on a host with an `endpoint_id` value of `ed518850-681a-4d60-bb98-e22640cae2a8` with a timeout of `600` seconds and comments `Get list of all files`:

[source,sh]
--------------------------------------------------
Expand All @@ -37,7 +38,7 @@ POST /api/endpoint/action/execute
"endpoint_ids": ["ed518850-681a-4d60-bb98-e22640cae2a8"],
"parameters": {
"command": "ls -al",
"timeout": "5m"
"timeout": 600
},
"comment": "Get list of all files"
}
Expand Down Expand Up @@ -88,7 +89,7 @@ A JSON object with the details of the response action created.
"comment": "Get list of all files",
"parameters": {
"command": "ls -al",
"timeout": 300
"timeout": 600
}
}
}
Expand Down

0 comments on commit c7fdc66

Please sign in to comment.