Agent
Execute command
Executes a command on a specific agent.
post/controlplane/agent_command
Request body
Example request
{
"command": {
"type": "exec",
"data": {
"cmdline": "path-to-cmd-file/cmd",
"environment": {
"NP_ACTION_CONTEXT": "'${NOTIFICATION_CONTEXT}"
},
"arguments": [
"arg1",
"arg2"
]
}
},
"selector": {
"environment": "local"
}
}Response
Command executed successfully.
Example response
{
"selector": {
"environment": "local"
},
"command": {
"type": "exec",
"data": {
"cmdline": "path-to-cmd-file/cmd",
"environment": {
"NP_ACTION_CONTEXT": "'${NOTIFICATION_CONTEXT}'"
},
"arguments": [
"arg1",
"arg2"
]
}
}
}