Tenable Policies API
The Policies API from Tenable — 5 operation(s) for policies.
The Policies API from Tenable — 5 operation(s) for policies.
openapi: 3.0.0
info:
version: 1.0.0
title: Downloads About Policies API
description: 'The Downloads API enables customers to access and download installation and update files for available Tenable products. You can use the API endpoints to list product pages, list downloads available for a specific product, and to download a file. The endpoints can also be used to determine and download the latest version of a file to facilitate the automation of an installation.
**Note:** The Tenable Downloads API uses a different server URL than the Tenable Vulnerability Management API:
`https://www.tenable.com/downloads/api/v2/pages`.
### Authentication
Like the Downloads website, certain files require authentication to download. When files have a `"requires_auth": true` attribute on the product list page, the Downloads API uses bearer token authentication and requires a valid token in the Authorization header to download the file:
```
Authorization: Bearer AbCdEf123456
```
To access or reset your authentication token, navigate to the [Authentication Token](https://www.tenable.com/downloads/api-docs) page.
Examples of product downloads that **do not** require authentication include Nessus and Nessus Agents.'
servers:
- url: https://www.tenable.com/downloads/api/v2
security:
- Bearer: []
tags:
- name: Policies
x-displayName: Policies
paths:
/policies:
post:
summary: Create policy
description: 'Creates a policy (scan template).
**Note:** Policies are referred to as scan templates in the user interface. The term policy is only used by the API. The two terms refer to the same feature. <div class="perms-callout">Requires the Standard [32] user role or the `VM.VM_SCAN.VM_SCAN_USER_TEMPLATE.CREATE` custom role privilege. See [Roles](doc:roles).</div>'
operationId: policies-create
tags:
- Policies
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- uuid
- settings
properties:
uuid:
type: string
description: The UUID for the editor template to use.
example: 18c7e401-b2bc-4924-881a-fa1359485c404e51e1f403febe40
settings:
type: object
required:
- uuid
- name
properties:
name:
type: string
responses:
'200':
description: Returned if the policy (scan template) was created successfully.
content:
application/json:
schema:
type: object
properties:
policy_id:
type: integer
policy_name:
type: string
examples:
response:
value:
policy_id: 69
policy_name: example-scan-template
'400':
description: Returned if your request specified invalid parameters or if your request was improperly formatted.
content:
application/json:
examples:
response:
value:
statusCode: 400
error: Bad Request
message: Invalid request payload JSON format
'401':
description: Returned if the API keys specified in your request are invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/policies_ErrorResponse'
examples:
response:
value:
statusCode: 401
error: Unauthorized
message: Invalid credentials.
'403':
description: Returned if you do not have the required permissions to create a policy (scan template).
'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/policies_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:
- policies_cloud: []
get:
summary: List policies
description: 'Returns a list of policies (scan templates).
**Note:** Policies are referred to as scan templates in the user interface. The term policy is only used by the API. The two terms refer to the same feature. <div class="perms-callout">Requires the Standard [32] user role or the `VM.VM_SCAN.VM_SCAN_USER_TEMPLATE.READ` custom role privilege. See [Roles](doc:roles).</div>'
operationId: policies-list
tags:
- Policies
responses:
'200':
description: Returned if the list of policies (scan templates) was retrieved successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/policies_policies'
examples:
response:
value:
policies:
- no_target: 'false'
template_uuid: d684f1a6-bcf1-4a24-9bac-4a3b9bab086bd24bd260ef5f9e66
description: An example policy.
name: Test Policy 1
owner: api@api.demo
visibility: shared
shared: 1
user_permissions: 128
last_modification_date: 1545938690
creation_date: 1545938690
owner_id: 3
id: 43
- no_target: 'false'
template_uuid: 41df2f51-8214-4a9e-b0e9-cd560ad1949f08a510a44374a167
description: An example policy using the Shellshock template.
name: Test Policy 2
owner: api@api.demo
visibility: shared
shared: 1
user_permissions: 128
last_modification_date: 1545938735
creation_date: 1545938735
owner_id: 3
id: 44
'401':
description: Returned if the API keys specified in your request are invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/policies_ErrorResponse'
examples:
response:
value:
statusCode: 401
error: Unauthorized
message: Invalid credentials.
'403':
description: Returned if you do not have the required permissions to view the policy (scan template) list.
'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/policies_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:
- policies_cloud: []
/policies/{policy_id}/copy:
post:
summary: Copy policy
description: 'Copies a policy (scan template).
**Note:** Policies are referred to as scan templates in the user interface. The term policy is only used by the API. The two terms refer to the same feature. <div class="perms-callout">Requires the Standard [32] user role and the Can Execute [32] scan template (policy) permission. Alternatively, requires the `VM.VM_SCAN.VM_SCAN_USER_TEMPLATE.CREATE` custom role privilege. See [Roles](doc:roles) and [Permissions](doc:permissions).</div>'
operationId: policies-copy
tags:
- Policies
parameters:
- description: The id of the policy to copy.
required: true
name: policy_id
in: path
schema:
type: integer
format: int32
responses:
'200':
description: Returned if the policy (scan template) was copied successfully.
content:
application/json:
schema: {}
examples:
response:
value:
name: Copy of Test Policy 1
id: 45
'401':
description: Returned if the API keys specified in your request are invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/policies_ErrorResponse'
examples:
response:
value:
statusCode: 401
error: Unauthorized
message: Invalid credentials.
'403':
description: Returned if you do not have the required permissions to copy the policy (scan template).
'404':
description: Returned if Tenable Vulnerability Management cannot find the specified policy (scan template).
'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/policies_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:
- policies_cloud: []
/policies/import:
post:
summary: Import policy
description: 'Imports an existing policy (scan template) that was uploaded using the [POST /file/upload](ref:file-upload) endpoint. Only policies (scan templates) in .nessus format can be imported.
**Note:** Policies are referred to as scan templates in the user interface. The term policy is only used by the API. The two terms refer to the same feature. <div class="perms-callout">Requires the Standard [32] user role or the `VM.VM_SCAN.VM_SCAN_USER_TEMPLATE.CREATE` custom role privilege. See [Roles](doc:roles).</div>'
operationId: policies-import
tags:
- Policies
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
file:
type: string
description: The name of the file to import as provided by the response from file-upload.
required:
- file
responses:
'200':
description: Returned if the specified policy (scan template) was imported successfully.
content:
application/json:
schema:
type: object
properties:
private:
type: integer
no_target:
type: string
template_uuid:
type: string
description:
type: string
name:
type: string
owner:
type: string
shared:
type: integer
user_permissions:
type: integer
last_modification_date:
type: integer
creation_date:
type: integer
owner_id:
type: integer
id:
type: integer
examples:
response:
value:
private: 0
no_target: 'false'
template_uuid: 731a8e52-3ea6-a291-ec0a-d2ff0619c19d7bd788d6be818b65
description: null
name: test-policy-2_01
owner: example@example.com
shared: 0
user_permissions: 128
last_modification_date: 1676667445
creation_date: 1676667445
owner_id: 2248974
id: 72
'400':
description: Returned if your request specified invalid parameters or if your request was improperly formatted.
content:
application/json:
examples:
response:
value:
error: Parse error (this might not be a valid .nessus file)
'401':
description: Returned if the API keys specified in your request are invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/policies_ErrorResponse'
examples:
response:
value:
statusCode: 401
error: Unauthorized
message: Invalid credentials.
'403':
description: Returned if you do not have the required permissions to import the policy (scan template).
'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/policies_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:
- policies_cloud: []
/policies/{policy_id}/export:
get:
summary: Export policy
description: 'Exports the specified policy (scan template) in nessus format.
**Note:** Policies are referred to as scan templates in the user interface. The term policy is only used by the API. The two terms refer to the same feature.<div class="perms-callout">Requires the Standard [32] user role and the Can Execute [32] scan template (policy) permission. See [Roles](doc:roles) and [Permissions](doc:permissions).</div>'
operationId: policies-export
tags:
- Policies
parameters:
- description: The ID of the policy to export.
required: true
name: policy_id
in: path
schema:
type: integer
format: int32
responses:
'200':
description: Returned if the policy (scan template) was exported successfully.
content:
text/xml:
schema:
type: string
examples:
response:
value: "<NessusClientData_v2>\n <Policy>\n <policyComments></policyComments>\n <visibility>private</visibility>\n <policyOwner>example.user@example.com</policyOwner>\n <Preferences>\n <PluginsPreferences>\n <item>\n <pluginId>10180</pluginId>\n <pluginName>Ping the remote host</pluginName>\n <fullName>Ping the remote host[checkbox]:Interpret ICMP unreach from gateway</fullName>\n <preferenceType>checkbox</preferenceType>\n <preferenceName>Interpret ICMP unreach from gateway</preferenceName>\n <preferenceValues>no</preferenceValues>\n <selectedValue>no</selectedValue>\n </item>\n </PluginsPreferences>\n <ServerPreferences>\n <preference>\n <name>template_policy</name>\n <value>yes</value>\n </preference>\n <preference>\n <name>wizard_uuid</name>\n <value>731a8e52-3ea6-a291-ec0a-d2ff0619c19d7bd788d6be818b65</value>\n </preference>\n <preference>\n <name>local_portscan.snmp</name>\n <value>yes</value>\n </preference>\n <preference>\n <name>portscan.ping</name>\n <value>yes</value>\n </preference>\n <preference>\n <name>local_portscan.netstat_wmi</name>\n <value>yes</value>\n </preference>\n <preference>\n <name>port_range</name>\n <value>default</value>\n </preference>\n <preference>\n <name>reverse_lookup</name>\n <value>no</value>\n </preference>\n <preference>\n <name>plugin_selection.individual_plugin.34220</name>\n <value>enabled</value>\n </preference>\n <preference>\n <name>network_scanners.udp</name>\n <value>no</value>\n </preference>\n <preference>\n <name>checks_read_timeout</name>\n <value>5</value>\n </preference>\n <preference>\n <name>name</name>\n <value>example-test-policy</value>\n </preference>\n <preference>\n <name>local_portscan.netstat_ssh</name>\n <value>yes</value>\n </preference>\n <preference>\n <name>silent_dependencies</name>\n <value>yes</value>\n </preference>\n <preference>\n <name>plugin_selection.individual_plugin.14272</name>\n <value>enabled</value>\n </preference>\n <preference>\n <name>discovery_mode</name>\n <value>portscan_common</value>\n </preference>\n <preference>\n <name>network_scanners.tcp</name>\n <value>no</value>\n </preference>\n <preference>\n <name>plugin_selection.individual_plugin.11219</name>\n <value>enabled</value>\n </preference>\n <preference>\n <name>max_checks</name>\n <value>4</value>\n </preference>\n <preference>\n <name>max_hosts</name>\n <value>30</value>\n </preference>\n <preference>\n <name>assessment_mode</name>\n <value>default</value>\n </preference>\n <preference>\n <name>host_tagging</name>\n <value>yes</value>\n </preference>\n <preference>\n <name>advanced_mode</name>\n <value>default</value>\n </preference>\n <preference>\n <name>network_scanners.syn</name>\n <value>yes</value>\n </preference>\n <preference>\n <name>plugin_selection.individual_plugin.14274</name>\n <value>enabled</value>\n </preference>\n <preference>\n <name>unscanned_closed</name>\n <value>no</value>\n </preference>\n <preference>\n <name>scan.enable_utf8_output</name>\n <value>no</value>\n </preference>\n <preference>\n <name>plugin_selection.individual_plugin.10180</name>\n <value>enabled</value>\n </preference>\n </ServerPreferences>\n </Preferences>\n <FamilySelection>\n <FamilyItem>\n <FamilyName>SMTP problems</FamilyName>\n <Status>enabled</Status>\n </FamilyItem>\n <FamilyItem>\n <FamilyName>Rocky Linux Local Security Checks</FamilyName>\n <Status>enabled</Status>\n </FamilyItem>\n <FamilyItem>\n <FamilyName>Backdoors</FamilyName>\n <Status>enabled</Status>\n </FamilyItem>\n <FamilyItem>\n <FamilyName>Ubuntu Local Security Checks</FamilyName>\n <Status>enabled</Status>\n </FamilyItem>\n <FamilyItem>\n <FamilyName>RPC</FamilyName>\n <Status>enabled</Status>\n </FamilyItem>\n <FamilyItem>\n <FamilyName>Gentoo Local Security Checks</FamilyName>\n <Status>enabled</Status>\n </FamilyItem>\n <FamilyItem>\n <FamilyName>Oracle Linux Local Security Checks</FamilyName>\n <Status>enabled</Status>\n </FamilyItem>\n <FamilyItem>\n <FamilyName>Brute force attacks</FamilyName>\n <Status>enabled</Status>\n </FamilyItem>\n </FamilySelection>\n <policyName>example-test-policy</policyName>\n <IndividualPluginSelection>\n <PluginItem>\n <PluginName>Netstat Portscanner (WMI)</PluginName>\n <Status>enabled</Status>\n <Family>Port scanners</Family>\n <PluginId>34220</PluginId>\n </PluginItem>\n <PluginItem>\n <PluginName>Netstat Portscanner (SSH)</PluginName>\n <Status>enabled</Status>\n <Family>Port scanners</Family>\n <PluginId>14272</PluginId>\n </PluginItem>\n <PluginItem>\n <PluginName>Nessus SYN scanner</PluginName>\n <Status>enabled</Status>\n <Family>Port scanners</Family>\n <PluginId>11219</PluginId>\n </PluginItem>\n <PluginItem>\n <PluginName>Ping the remote host</PluginName>\n <Status>enabled</Status>\n <Family>Port scanners</Family>\n <PluginId>10180</PluginId>\n </PluginItem>\n </IndividualPluginSelection>\n </Policy>\n</NessusClientData_v2>"
'401':
description: Returned if the API keys specified in your request are invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/policies_ErrorResponse'
examples:
response:
value:
statusCode: 401
error: Unauthorized
message: Invalid credentials.
'403':
description: Returned if you do not have the required permissions to export the policy (scan template).
'404':
description: Returned if Tenable Vulnerability Management cannot find the specified policy (scan template).
content:
application/json:
examples:
response:
value:
error: The requested file was not found
'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/policies_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:
- policies_cloud: []
/policies/{policy_id}:
get:
summary: List policy details
description: 'Returns the details for the specified policy (scan template).
**Note:** Policies are referred to as scan templates in the user interface. The term policy is only used by the API. The two terms refer to the same feature. <div class="perms-callout">Requires the Standard [32] user role and the Can View [16] scan template (policy) permission. Alternatively, requires the `VM.VM_SCAN.VM_SCAN_USER_TEMPLATE.READ` custom role privilege. See [Roles](doc:roles) and [Permissions](doc:permissions).</div>'
operationId: policies-details
tags:
- Policies
parameters:
- description: The ID of the policy to retrieve.
required: true
name: policy_id
in: path
schema:
type: integer
format: int32
responses:
'200':
description: Returned if the details for the specified policy were retrieved successfully.
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
description: The UUID of the Tenable-provided template used to create this policy.
audits:
type: object
credentials:
type: object
plugins:
type: object
scap:
type: object
settings:
type: object
examples:
response:
value:
plugins:
SMTP problems:
status: enabled
Backdoors:
status: enabled
Ubuntu Local Security Checks:
status: enabled
Gentoo Local Security Checks:
status: enabled
Oracle Linux Local Security Checks:
status: enabled
RPC:
status: enabled
Brute force attacks:
status: enabled
Gain a shell remotely:
status: enabled
Service detection:
status: enabled
DNS:
status: enabled
Mandriva Local Security Checks:
status: enabled
Junos Local Security Checks:
status: enabled
Misc.:
status: enabled
FTP:
status: enabled
Slackware Local Security Checks:
status: enabled
Default Unix Accounts:
status: enabled
AIX Local Security Checks:
status: enabled
SNMP:
status: enabled
OracleVM Local Security Checks:
status: enabled
CGI abuses:
status: enabled
Settings:
status: enabled
CISCO:
status: enabled
Firewalls:
status: enabled
Databases:
status: enabled
Debian Local Security Checks:
status: enabled
Fedora Local Security Checks:
status: enabled
Netware:
status: enabled
Huawei Local Security Checks:
status: enabled
'Windows : User management':
status: enabled
VMware ESX Local Security Checks:
status: enabled
Virtuozzo Local Security Checks:
status: enabled
CentOS Local Security Checks:
status: enabled
Peer-To-Peer File Sharing:
status: enabled
General:
status: enabled
Policy Compliance:
status: enabled
Amazon Linux Local Security Checks:
status: enabled
Solaris Local Security Checks:
status: enabled
F5 Networks Local Security Checks:
status: enabled
Denial of Service:
status: enabled
'Windows : Microsoft Bulletins':
status: enabled
SuSE Local Security Checks:
status: enabled
Palo Alto Local Security Checks:
status: enabled
Red Hat Local Security Checks:
status: enabled
PhotonOS Local Security Checks:
status: enabled
HP-UX Local Security Checks:
status: enabled
Mobile Devices:
status: enabled
'CGI abuses : XSS':
status: enabled
FreeBSD Local Security Checks:
status: enabled
Windows:
status: enabled
MacOS X Local Security Checks:
status: enabled
Scientific Linux Local Security Checks:
status: enabled
Web Servers:
status: enabled
SCADA:
status: enabled
settings:
cisco_offline_configs: ''
apm_force_updates: 'yes'
region_hkg_pref_name: 'yes'
http_login_max_redir: '0'
portscan_range: default
icmp_unreach_means_host_down: 'no'
start_cotp_tsap: '8'
ssh_port: '22'
av_grace_period: '0'
http_login_auth_regex_nocase: 'no'
snmp_port: '161'
enable_admin_shares: 'no'
arista_offline_configs: ''
icmp_ping_retries: '2'
syn_firewall_detection: Automatic (normal)
snmp_scanner: 'yes'
sonicos_offline_configs: ''
slice_network_addresses: 'no'
patch_audit_over_rsh: 'no'
aws_verify_ssl: 'yes'
was_http_request_timeout: '5'
tcp_ping: 'yes'
additional_snmp_port3: '161'
dell_
# --- truncated at 32 KB (48 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/tenable/refs/heads/main/openapi/tenable-policies-api-openapi.yml