added

Bulk Network Operations for Agents

Two new endpoints have been added to the Tenable.io API for agent bulk operations. These endpoints allow you to create a bulk operation task to add agents to a network or remove agents from a network.

The new endpoints are:

API EndpointName
POST /scanners/null/agents/_bulk/addToNetworkAdd agents to a network
POST /scanners/null/agents/_bulk/removeFromNetworkRemove agents from a network

The bulk add endpoint accepts two body parameters for specifying the agent UUIDs and the network UUID for the operation. These body parameters are:

ParameterTypeDescription
itemsarray of stringsAn array of agent UUIDs to add to the network.
network_uuidstringThe UUID of the network for which you want to bulk add agents.

You do not need to specify the network_uuid parameter when removing agents from a network.

🛈 Note

Agents that are removed from a custom network will be added to the Default network.

Examples

Bulk add agents to a network

You can create a bulk operation task to add three agents to a network (1b17ee49-8f17-4c8f-8536-bff9aff73429) using the following cURL request:

curl --request POST \
  --url https://cloud.tenable.com/scanners/null/agents/_bulk/addToNetwork \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"items":["c6ce4255-b386-4e71-be64-0d06434bac5d",
  "bce54c02-392d-4305-bc83-e1e1d8130afd",
  "0657efe4-0ba0-423a-ac5f-52a6e23d2e11"],
  "network_uuid":"1b17ee49-8f17-4c8f-8536-bff9aff73429"}'

Bulk remove agents from a network

You can create a bulk operation task to remove three agents from a network using the following cURL request:

curl --request POST \
  --url https://cloud.tenable.com/scanners/null/agents/_bulk/removeFromNetwork \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"items":["c6ce4255-b386-4e71-be64-0d06434bac5d",
  "bce54c02-392d-4305-bc83-e1e1d8130afd",
  "0657efe4-0ba0-423a-ac5f-52a6e23d2e11"]}'