Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelistoverlay
POST/target-groupsCreate a target group (deprecated) · Create target group#
Ask an LLM
“Can I still create a target group of hosts to scan, even though they are deprecated?”
“What members and ACLs does a new target group take?”
Tell an agent
Create a target group {name} containing {members}.
Create target group {name} with members {members} and access list {acls}.
GET/target-groups/{no_members}List target groups (deprecated) · List target groups#
Ask an LLM
“Which legacy target groups do I still have before migrating to tags?”
“Can I list target groups without their member and ACL details?”
Tell an agent
List my target groups with no_members set to {no_members}.
List all legacy target groups, excluding members ({no_members}).
GET/target-groups/{group_id}Get a target group's details (deprecated) · Get target group details#
Ask an LLM
“Which hosts are in a specific legacy target group?”
“What access controls are set on one target group?”
Tell an agent
Show target group {group_id}.
List the members of target group {group_id}.
PUT/target-groups/{group_id}Update a target group (deprecated) · Update target group#
Ask an LLM
“How do I change the hosts in an existing target group?”
“Can I rename a legacy target group?”
Tell an agent
Set the members of target group {group_id} to {members}.
Rename target group {group_id} to {name}.
DELETE/target-groups/{group_id}Delete a target group (deprecated) · Delete target group#
Ask an LLM
“How do I delete an old target group after moving to tags?”
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Tenable Platform & Settings Target Groups API
version: 1.0.0
servers:
- url: https://cloud.tenable.com
tags:
- name: Target Groups
x-displayName: Target Groups
paths:
/target-groups:
post:
summary: Create target group
description: 'Creates a new target group for the current user.
**Caution:** Target groups were deprecated in Tenable Vulnerability Management on February 4th, 2022. Tenable recommends that customers use tags instead to group and scan assets. Please update any existing integrations that your organization has. If you want to automatically migrate your target groups to tags via the API and pyTenable, see Migrate Target Groups to Tags. For more information about tags, see Tags in the Tenable Vulnerability Management User Guide.
Requires the Scan Operator [24] user role to create user target groups. See Roles.'
operationId: target-groups-create
deprecated: true
tags:
- Target Groups
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: The name for the group.
members:
type: string
description: The members of the group. A comma-separated list of FQDNs or IP address ranges that you want to scan.
acls:
items:
$ref: '#/components/schemas/target-groups_ACL_Request'
description: An array containing permissions to apply to the group.
type: array
example: '[{"type": "default", "permissions": 16}, {"type": "target-group", "permissions": 64, "name": "admin", "id": 1, "owner": 1}]'
required:
- name
- members
- type
responses:
'200':
description: Returned if the group was created successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/target-groups_group'
examples:
response:
value:
acls:
- permissions: 0
type: default
- permissions: 128
owner: 1
display_name: user2@example.com
name: user2@example.com
uuid: 00000000-0000-0000-0000-000000000000
id: 2
type: user
uuid: 00000000-0000-0000-0000-000000000000
default_group: 0
members: 192.0.2.53, 192.0.2.54, 192.0.2.55, 192.0.2.56, 192.0.2.57
name: RHEL_Hosts
owner: user2@example.com
shared: 0
user_permissions: 128
last_modification_date: 1543622674
creation_date: 1543622674
owner_uuid: 00000000-0000-0000-0000-000000000000
owner_id: 2
id: 18
'400':
description: Returned if your response message is missing a required parameter or is otherwise invalid.
'401':
description: Returned if the API keys specified in your request are invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/target-groups_ErrorResponse'
examples:
response:
value:
statusCode: 401
error: Unauthorized
message: Invalid credentials.
'403':
description: Returned if you do not have permission to create a group.
'429':
description: Returned if you attempt to send too many requests in a specific period of time. For more information, see [Rate Limiting](doc:rate-limiting).
content:
text/html:
examples:
response:
value: "<html>\n\n<head>\n <title>429 Too Many Requests</title>\n</head>\n\n<body bgcolor=\"white\">\n <center>\n <h1>429 Too Many Requests</h1>\n </center>\n <hr>\n <center>nginx</center>\n</body>\n\n</html>"
'500':
description: Returned if an internal error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/target-groups_ErrorResponse'
examples:
response:
value:
statusCode: 500
error: Internal Server Error
message: An internal server error occurred. Please wait a moment and try your request again.
security:
- target-groups_cloud: []
/target-groups/{no_members}:
get:
summary: List target groups
description: 'Returns the current target groups.
**Caution:** Target groups were deprecated in Tenable Vulnerability Management on February 4th, 2022. Tenable recommends that customers use tags instead to group and scan assets. Please update any existing integrations that your organization has. If you want to automatically migrate your target groups to tags via the API and pyTenable, see Migrate Target Groups to Tags. For more information about tags, see Tags in the Tenable Vulnerability Management User Guide.
Requires the Basic [16] user role. See Roles.'
operationId: target-groups-list
deprecated: true
tags:
- Target Groups
parameters:
- description: Specifies whether to exclude members and access control lists (ACLs) from the response. If set to `true`, the `members` and `acls` properties for each group are empty.
required: true
name: no_members
in: path
schema:
type: boolean
responses:
'200':
description: Returns the group.
content:
application/json:
schema:
$ref: '#/components/schemas/target-groups_target_groups'
examples:
response:
value:
target_groups:
- acls:
- permissions: 0
type: default
- permissions: 128
owner: 1
display_name: user2@example.com
name: user2@example.com
uuid: 00000000-0000-0000-0000-000000000000
id: 2
type: user
uuid: 00000000-0000-0000-0000-000000000000
default_group: 0
type: user
members: 192.0.2.53, 192.0.2.54, 192.0.2.55, 192.0.2.56, 192.0.2.57
name: Centos_Hosts
owner: user2@example.com
shared: 0
user_permissions: 128
last_modification_date: 1543622642
creation_date: 1543622642
owner_uuid: 00000000-0000-0000-0000-000000000000
owner_id: 2
id: 17
- acls:
- permissions: 64
type: default
- permissions: 128
owner: 1
display_name: system
name: nessus_ms_agent
uuid: 00000000-0000-0000-0000-000000000000
id: 1
type: user
uuid: 00000000-0000-0000-0000-000000000000
default_group: 1
type: user
members: '*'
name: Default
owner: nessus_ms_agent
shared: 1
user_permissions: 64
last_modification_date: 1532459326
creation_date: 1532459326
owner_uuid: 00000000-0000-0000-0000-000000000000
owner_id: 1
id: 7
- acls:
- permissions: 0
type: default
- permissions: 128
owner: 1
display_name: user2@example.com
name: user2@example.com
uuid: 00000000-0000-0000-0000-000000000000
id: 2
type: user
uuid: 00000000-0000-0000-0000-000000000000
default_group: 0
type: user
members: 192.0.2.53, 192.0.2.54, 192.0.2.55, 192.0.2.56, 192.0.2.57
name: RHEL_Hosts
owner: user2@example.com
shared: 0
user_permissions: 128
last_modification_date: 1543622674
creation_date: 1543622674
owner_uuid: 00000000-0000-0000-0000-000000000000
owner_id: 2
id: 18
'401':
description: Returned if the API keys specified in your request are invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/target-groups_ErrorResponse'
examples:
response:
value:
statusCode: 401
error: Unauthorized
message: Invalid credentials.
'403':
description: Returned if you do not have permission to view the group.
'429':
description: Returned if you attempt to send too many requests in a specific period of time. For more information, see [Rate Limiting](doc:rate-limiting).
content:
text/html:
examples:
response:
value: "<html>\n\n<head>\n <title>429 Too Many Requests</title>\n</head>\n\n<body bgcolor=\"white\">\n <center>\n <h1>429 Too Many Requests</h1>\n </center>\n <hr>\n <center>nginx</center>\n</body>\n\n</html>"
'500':
description: Returned if an internal error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/target-groups_ErrorResponse'
examples:
response:
value:
statusCode: 500
error: Internal Server Error
message: An internal server error occurred. Please wait a moment and try your request again.
security:
- target-groups_cloud: []
/target-groups/{group_id}:
get:
summary: Get target group details
description: 'Returns details for the specified target group.
**Caution:** Target groups were deprecated in Tenable Vulnerability Management on February 4th, 2022. Tenable recommends that customers use tags instead to group and scan assets. Please update any existing integrations that your organization has. If you want to automatically migrate your target groups to tags via the API and pyTenable, see Migrate Target Groups to Tags. For more information about tags, see Tags in the Tenable Vulnerability Management User Guide.
Requires the Basic [16] user role. See Roles.'
operationId: target-groups-details
deprecated: true
tags:
- Target Groups
parameters:
- description: The ID of the group.
required: true
name: group_id
in: path
schema:
type: integer
format: int32
responses:
'200':
description: Returns the group details.
content:
application/json:
schema:
$ref: '#/components/schemas/target-groups_group'
examples:
response:
value:
acls:
- permissions: 0
type: default
- permissions: 128
owner: 1
display_name: user2@example.com
name: user2@example.com
uuid: 00000000-0000-0000-0000-000000000000
id: 2
type: user
uuid: 00000000-0000-0000-0000-000000000000
default_group: 0
type: user
members: 192.0.2.53, 192.0.2.54, 192.0.2.55, 192.0.2.56, 192.0.2.57
name: Centos_Hosts
owner: user2@example.com
shared: 0
user_permissions: 128
last_modification_date: 1543622642
creation_date: 1543622642
owner_uuid: 00000000-0000-0000-0000-000000000000
owner_id: 2
id: 17
'401':
description: Returned if the API keys specified in your request are invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/target-groups_ErrorResponse'
examples:
response:
value:
statusCode: 401
error: Unauthorized
message: Invalid credentials.
'403':
description: Returned if you do not have permission to view the group.
'404':
description: Returned if Tenable Vulnerability Management cannot find the specified group.
'429':
description: Returned if you attempt to send too many requests in a specific period of time. For more information, see [Rate Limiting](doc:rate-limiting).
content:
text/html:
examples:
response:
value: "<html>\n\n<head>\n <title>429 Too Many Requests</title>\n</head>\n\n<body bgcolor=\"white\">\n <center>\n <h1>429 Too Many Requests</h1>\n </center>\n <hr>\n <center>nginx</center>\n</body>\n\n</html>"
'500':
description: Returned if an internal error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/target-groups_ErrorResponse'
examples:
response:
value:
statusCode: 500
error: Internal Server Error
message: An internal server error occurred. Please wait a moment and try your request again.
security:
- target-groups_cloud: []
put:
summary: Update target group
description: 'Updates a target group.
**Caution:** Target groups were deprecated in Tenable Vulnerability Management on February 4th, 2022. Tenable recommends that customers use tags instead to group and scan assets. Please update any existing integrations that your organization has. If you want to automatically migrate your target groups to tags via the API and pyTenable, see Migrate Target Groups to Tags. For more information about tags, see Tags in the Tenable Vulnerability Management User Guide.
Requires the Scan Operator [24] user role. See Roles.'
operationId: target-groups-edit
deprecated: true
tags:
- Target Groups
parameters:
- description: The ID of the group to edit.
required: true
name: group_id
in: path
schema:
type: integer
format: int32
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: The name of the group.
members:
type: string
description: The members of the group. A comma-separated list of FQDNs or IP address ranges that you want to scan.
acls:
items:
$ref: '#/components/schemas/target-groups_ACL_Request'
description: An array containing permissions to apply to the group.
type: array
example: '[{"type": "default", "permissions": 16}, {"type": "target-group", "permissions": 64, "name": "admin", "id": 1, "owner": 1}]'
responses:
'200':
description: Returned if the target group was updated successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/target-groups_group'
examples:
response:
value:
acls:
- permissions: 0
type: default
- permissions: 128
owner: 1
display_name: user2@example.com
name: user2@example.com
uuid: 00000000-0000-0000-0000-000000000000
id: 2
type: user
uuid: 00000000-0000-0000-0000-000000000000
default_group: 0
type: user
members: 192.0.2.53, 192.0.2.54, 192.0.2.55, 192.0.2.56, 192.0.2.57
name: Centos_Hosts
owner: user2@example.com
shared: 0
user_permissions: 128
last_modification_date: 1543622642
creation_date: 1543622642
owner_uuid: 00000000-0000-0000-0000-000000000000
owner_id: 2
id: 17
'401':
description: Returned if the API keys specified in your request are invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/target-groups_ErrorResponse'
examples:
response:
value:
statusCode: 401
error: Unauthorized
message: Invalid credentials.
'403':
description: Returned if you do not have permission to update the group.
'404':
description: Returned if Tenable Vulnerability Management cannot find the specified group.
'429':
description: Returned if you attempt to send too many requests in a specific period of time. For more information, see [Rate Limiting](doc:rate-limiting).
content:
text/html:
examples:
response:
value: "<html>\n\n<head>\n <title>429 Too Many Requests</title>\n</head>\n\n<body bgcolor=\"white\">\n <center>\n <h1>429 Too Many Requests</h1>\n </center>\n <hr>\n <center>nginx</center>\n</body>\n\n</html>"
'500':
description: Returned if an internal error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/target-groups_ErrorResponse'
examples:
response:
value:
statusCode: 500
error: Internal Server Error
message: An internal server error occurred. Please wait a moment and try your request again.
security:
- target-groups_cloud: []
delete:
summary: Delete target group
description: 'Deletes a target group.
**Caution:** Target groups were deprecated in Tenable Vulnerability Management on February 4th, 2022. Tenable recommends that customers use tags instead to group and scan assets. Please update any existing integrations that your organization has. If you want to automatically migrate your target groups to tags via the API and pyTenable, see Migrate Target Groups to Tags. For more information about tags, see Tags in the Tenable Vulnerability Management User Guide.
Requires the Scan Operator [24] user role. See Roles.'
operationId: target-groups-delete
deprecated: true
tags:
- Target Groups
parameters:
- description: The ID of the group to delete.
required: true
name: group_id
in: path
schema:
type: integer
format: int32
responses:
'200':
description: Returned if the target group was deleted successfully.
content:
application/json:
schema: {}
examples:
response:
value: {}
'401':
description: Returned if the API keys specified in your request are invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/target-groups_ErrorResponse'
examples:
response:
value:
statusCode: 401
error: Unauthorized
message: Invalid credentials.
'403':
description: Returned if you do not have permission to delete the group.
'404':
description: Returned if Tenable Vulnerability Management cannot find the specified group.
'429':
description: Returned if you attempt to send too many requests in a specific period of time. For more information, see [Rate Limiting](doc:rate-limiting).
content:
text/html:
examples:
response:
value: "<html>\n\n<head>\n <title>429 Too Many Requests</title>\n</head>\n\n<body bgcolor=\"white\">\n <center>\n <h1>429 Too Many Requests</h1>\n </center>\n <hr>\n <center>nginx</center>\n</body>\n\n</html>"
'500':
description: Returned if an internal error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/target-groups_ErrorResponse'
examples:
response:
value:
statusCode: 500
error: Internal Server Error
message: An internal server error occurred. Please wait a moment and try your request again.
security:
- target-groups_cloud: []
components:
schemas:
target-groups_group:
type: object
properties:
acls:
description: The Access Control Lists applicable to the group.
type: array
items:
$ref: '#/components/schemas/target-groups_ACL_Response'
id:
type: integer
description: The unique ID of the group.
default_group:
type: boolean
description: If true, this group is the default.
name:
type: string
description: The name of the group.
members:
type: string
description: The members of the group.
type:
type: string
description: The group type (user or system). Note that the system group type is deprecated. Tenable recommends that you create only user target groups.
owner:
type: string
description: The name of the owner of the group. A user of `nessus_ms_agent` indicates it is a system target group.
owner_id:
type: integer
description: The unique ID of the owner of the group.
last_modification_date:
type: integer
description: The last modification date for the group in unixtime.
shared:
type: integer
description: The shared status of the group.
user_permissions:
type: integer
description: The current user permissions for the group.
target-groups_ACL_Request:
type: object
properties:
type:
type: string
description: The type of permission (default, user, group).
enum:
- default
- user
- group
id:
type: integer
description: The unique ID of the user or group.
permissions:
type: integer
description: The permission value to grant access as described in [Permissions](doc:permissions).
format: int32
target-groups_ACL_Response:
type: object
properties:
type:
type: string
description: The type of permission (default, user, group).
enum:
- default
- user
- group
id:
type: integer
description: The unique ID of the user or group.
uuid:
type: string
description: The UUID of the owner of the object.
name:
type: string
description: The name of the user or group.
display_name:
type: string
description: The display-friendly name of the user or group.
permissions:
type: integer
description: The permission value to grant access as described in [Permissions](doc:permissions).
format: int32
owner:
type: integer
description: The ID of the owner of the object.
target-groups_target_groups:
type: array
items:
$ref: '#/components/schemas/target-groups_group'
target-groups_ErrorResponse:
type: object
properties:
statusCode:
type: integer
description: The HTTP status code of the error.
error:
type: string
description: The standard HTTP error name.
message:
type: string
description: A brief message about the cause of the error.
securitySchemes:
Access_Control_API_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
Access_Control_Groups_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
Access_Control_Permissions_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
Access_Control_Roles_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
Access_Control_Users_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
access-groups_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
access-groups_v2_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
activity-log_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
agents_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
Agent_Config_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
agent-exclusions_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
agent-groups_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
agent-bulk-operations_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
Cloud_Connectors_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
credentials_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
exclusions_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
networks_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
OT_Connectors_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
permissions_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
Profiles_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
recast-rules_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
Scanners_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
Scanner_Config_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
Scanner_Groups_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
Scanner_Profiles_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
Scanner_Tasks_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
server_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
tags_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
target-groups_cloud:
type: apiKey
in: header
name: X-ApiKeys
description: Format - accessKey=ACCESS_KEY;secretKey=SECRET_KEY
x-readme:
proxy-enabled: false
samples-languages:
- python
- curl
- node
- powershell
- ruby
- javascript
- objectivec
- java
- php
- csharp
- go
- swift
- kotlin