Fix doc execute-command

This commit is contained in:
Mattia Codato 2020-08-26 09:20:06 +02:00
parent 3b4c008c81
commit dd2bc681fe
1 changed files with 4 additions and 1 deletions

View File

@ -1548,7 +1548,7 @@ Send a `POST` request to the URL endpoint `/v1/actions/execute-command`.
command_type | String | **Optional.** The command type: `CheckCommand` or `EventCommand` or `NotificationCommand`. Default: `EventCommand`
command | String | **Optional.** The command to execute. Its type must the same as `command_type`. It can be a macro string. Default: depending on the `command_type` it's either `$check_command$`, `$event_command$` or `$notification_command$`
endpoint | String | **Optional.** The endpoint to execute the command on. It can be a macro string. Default: `$command_endpoint$`.
macros | Dictionary | **Optional**. A serialized object used to resolve the macro strings. It overrides also macros of other parameter. e.g. {"http_ssl": false}. Default: `{}`
macros | Dictionary | **Optional**. Macro overrides. Default: `{}`
user | String | **Optional.** The user used for the notification command.
notification | String | **Optional.** The notification used for the notification command.
@ -1558,6 +1558,9 @@ Send a `POST` request to the URL endpoint `/v1/actions/execute-command`.
$ curl -k -s -S -i -u root:icinga -H 'Accept: application/json' \
-X POST 'https://localhost:5665/v1/actions/execute-command' \
-d '{"type": "Service", "service": "agent!custom_service", "ttl": 15, "macros": { "command_endpoint": "master", "ls_dir": "/tmp/foo" }, "command": "custom_command", "command_type": "CheckCommand" }'
```
```
{
"results": [
{