Agent

Execute command

Executes a command on a specific agent.

post/controlplane/agent_command

Request body

selectorobject

The selector for the agent.

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.

selectorobject

The selector for the agent.

Example response

{
  "selector": {
    "environment": "local"
  },
  "command": {
    "type": "exec",
    "data": {
      "cmdline": "path-to-cmd-file/cmd",
      "environment": {
        "NP_ACTION_CONTEXT": "'${NOTIFICATION_CONTEXT}'"
      },
      "arguments": [
        "arg1",
        "arg2"
      ]
    }
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.