{
  "opencollection": "1.0.0",
  "info": {
    "name": "Downloads About Agent Groups API",
    "version": "1.0.0"
  },
  "request": {
    "auth": {
      "type": "apikey",
      "key": "Authorization",
      "value": "{{Authorization}}",
      "placement": "header"
    }
  },
  "items": [
    {
      "info": {
        "name": "Agent Groups",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List agent groups",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://www.tenable.com/downloads/api/v2/scanners/null/agent-groups"
          },
          "docs": "Lists all agent groups.<div class=\"perms-callout\">Requires the Scan Manager [40] user role or the `VM.VM_SENSOR.AGENT_GROUP.READ` custom role privilege. See [Roles](doc:roles).</div>"
        },
        {
          "info": {
            "name": "Create agent group",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://www.tenable.com/downloads/api/v2/scanners/null/agent-groups",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates an agent group.<div class=\"perms-callout\">Requires the Scan Manager [40] user role or the `VM.VM_SENSOR.AGENT_GROUP.CREATE` custom role privilege. See [Roles](doc:roles).</div>"
        },
        {
          "info": {
            "name": "Get agent group details",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://www.tenable.com/downloads/api/v2/scanners/null/agent-groups/:group_id",
            "params": [
              {
                "name": "group_id",
                "value": "",
                "type": "path",
                "description": "Specifies the ID or UUID of the agent group to query. You can retrieve the agent group ID or UUID by using the [List agent groups](ref:agent-groups-list) endpoint."
              },
              {
                "name": "f",
                "value": "",
                "type": "query",
                "description": "Specifies a filter condition in the `field:operator:value` format. For example, `field1:match:sometext` matches any records where the value of `field1` contains `sometext`. You can specify multiple `f` parameters."
              },
              {
                "name": "ft",
                "value": "",
                "type": "query",
                "description": "Specifies whether an `and` or `or` condition is applied when multiple `f` parameters are present. If the filter type is `and`, a record is only returned if all filters match. If the filter type is `or`, a record is returned if any filter matches."
              },
              {
                "name": "w",
                "value": "",
                "type": "query",
                "description": "Specifies a wildcard filter string to match against multiple fields of a record simultaneously. If any supported `wildcard_fields` value matches the filter string, the record matches the wildcard filter. For a record to be returned, it must pass the wildcard filter (if present) AND all standard filters. For example, `w=wild&f=field1:match:one&f=field2:match:two&ft=or` returns records where any supported wildcard field contains `wild`, AND either `field1` contains `one` or `field2` contains `two`."
              },
              {
                "name": "wf",
                "value": "",
                "type": "query",
                "description": "Specifies a comma-separated subset of `wildcard_fields` to search when applying the wildcard filter. For example, `field1,field2`. If `w` is provided but `wf` is omitted, the system searches all supported `wildcard_fields` against the wildcard filter text."
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "Specifies the number of records to retrieve. If omitted, the system uses the default value of `50`."
              },
              {
                "name": "offset",
                "value": "",
                "type": "query",
                "description": "Specifies the starting record to retrieve. If omitted, the system uses the default value of `0`."
              },
              {
                "name": "sort",
                "value": "",
                "type": "query",
                "description": "Specifies the field and order used to sort the results, in the format `field:order`. The order must be `asc` (ascending) or `desc` (descending). For example, `name:desc` sorts results by the `name` field in descending order.\n\nTo sort by multiple fields, separate each field:order pair with a comma. For example, `name:desc,creation_date:asc` sorts first by `name` descending, then by `creation_date` ascending.\n\n**Note:** Sort can only be applied to sortable fields specified by the filter capabilities, and the number of sort columns cannot exceed the `max_sort_fields` value specified by the filter capabilities."
              }
            ]
          },
          "docs": "Retrieves details for the specified agent group, including the agent records that belong to the group. You can apply filtering, sorting, or pagination to the agent records.<div class=\"perms-callout\">Requires the Scan Manager [40] user role or the `VM.VM_SENSOR.AGENT_GROUP.READ` custom role privilege. See [Roles](doc:roles).</div>"
        },
        {
          "info": {
            "name": "Update agent group name",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://www.tenable.com/downloads/api/v2/scanners/null/agent-groups/:group_id",
            "params": [
              {
                "name": "group_id",
                "value": "",
                "type": "path",
                "description": "Specifies the ID of the agent group to change."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Changes the name of the agent group.<div class=\"perms-callout\">Requires the Scan Manager [40] user role or the `VM.VM_SENSOR.AGENT_GROUP.EDIT` custom role privilege. See [Roles](doc:roles).</div>"
        },
        {
          "info": {
            "name": "Delete agent group",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://www.tenable.com/downloads/api/v2/scanners/null/agent-groups/:group_id",
            "params": [
              {
                "name": "group_id",
                "value": "",
                "type": "path",
                "description": "Specifies the ID of the agent group to delete."
              }
            ]
          },
          "docs": "Deletes an agent group.<div class=\"perms-callout\">Requires the Scan Manager [40] user role or the `VM.VM_SENSOR.AGENT_GROUP.DELETE` custom role privilege. See [Roles](doc:roles).</div>"
        },
        {
          "info": {
            "name": "Add agent to group",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://www.tenable.com/downloads/api/v2/scanners/null/agent-groups/:group_id/agents/:agent_id",
            "params": [
              {
                "name": "group_id",
                "value": "",
                "type": "path",
                "description": "Specifies the ID of the agent group."
              },
              {
                "name": "agent_id",
                "value": "",
                "type": "path",
                "description": "Specifies the ID of the agent to add."
              }
            ]
          },
          "docs": "Adds an agent to the agent group. You can use the [GET /scanners/{scanner_id}/agent-groups/{group_id}](ref:agent-groups-details) endpoint to verify that the agent was added to the specified agent group.<div class=\"perms-callout\">Requires the Scan Manager [40] user role. See [Roles](doc:roles).</div>"
        },
        {
          "info": {
            "name": "Remove agent from group",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://www.tenable.com/downloads/api/v2/scanners/null/agent-groups/:group_id/agents/:agent_id",
            "params": [
              {
                "name": "group_id",
                "value": "",
                "type": "path",
                "description": "Specifies the ID of the agent group."
              },
              {
                "name": "agent_id",
                "value": "",
                "type": "path",
                "description": "Specifies the ID of the agent to remove."
              }
            ]
          },
          "docs": "Removes an agent from the specified agent group.<div class=\"perms-callout\">Requires the Scan Manager [40] user role. See [Roles](doc:roles).</div>"
        }
      ]
    }
  ],
  "bundled": true
}