added

Send Instructions to Agents

You can now send instructions to agents or agents in a group via the Tenable.io API. Two new endpoints were added to allow users to send instructions in bulk.

New Endpoints

The new endpoints are described in the table below.

New EndpointNameDescription
POST /scanners/null/agents/_bulk/directiveSend instructions to agentsCreate instructions for agents to perform. Instructions include restarting or changing local product settings.
POST /scanners/null/agent-groups/{group_id}/agents/_bulk/directiveSend instructions to agents in groupCreate instructions for agents in an agent group to perform. Instructions include restarting or changing local product settings.

You can send instructions to agents or agents in a group using the endpoints described above by including a directive object in the request body. Additionally, you can use the criteria object to filter the agents for which you want to send the instructions to.

Examples

You can change the debug setting for all agents except agent 1234 by using the following request body:

{
  "criteria": {
    "all_agents": true
  },
  "not_items": [
    1234
  ],
  "directive": {
    "type": "settings",
    "options": {
      "settings": [
        {
          "value": "debug",
          "setting": "backend_log_level"
        }
      ]
    }
  }
}

You can restart all agents by using the following request body:

{
  "criteria": {
    "all_agents": true
  },
  "directive": {
    "type": "restart",
    "options": {
      "hard": true,
      "idle": true
    }
  }
}