Tenable.sc API: Scan Zone

To avoid serious problems, do not modify existing Scan Zones while scans are in progress.

/zone

Methods
GET

Gets the list of Zones

Tier Management

When the "Tier Management" Feature is Available and Enabled for the Local Tenable.sc Instance this endpoint will return the related SCI information for each Zone as well.

Fields Parameter
Expand

The fields parameter should be specified along the query string, and it takes the syntax

    ?fields=<field>,...

Allowed Fields

*id
**name
**description
**ipList
**createdTime
**modifiedTime
**organizations
**activeScanners
**totalScanners
**scanners

Legend

* = always comes back

** = comes back if fields list not specified on GET all
Request Parameters

None

Example Response
Expand
{
	"type" : "regular",
	"response" : [
		{
			"id" : "5",
			"name" : "Test Zone #1",
			"description" : "",
			"ipList" : "192.168.0.0\/24",
			"createdTime" : "1426871916",
			"modifiedTime" : "1426881426",
			"scanners" : [
				{
					"id" : "2",
					"name" : "Nessus 192.168.1.1:1234",
					"description" : "",
					"status" : "4"
				}
			],
			"organizations" : [
				{
					"id" : "38",
					"name" : "Test Org",
					"description" : ""
				}
			],
			"activeScanners" : 0,
			"totalScanners" : 1
		},
		{
			"id" : "6",
			"name" : "Test Zone #2",
			"description" : "",
			"ipList" : "192.168.0.0\/24",
			"createdTime" : "1426871931",
			"modifiedTime" : "1426871931",
			"scanners" : [],
			"organizations" : [],
			"activeScanners" : 0,
			"totalScanners" : 0
		}
	],
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1426882493
}

POST

Adds an Zone

Request Parameters
Expand

Note: A default for organizations is being set to an empty array; however, there is no logic for utilizing the organizations in any fashion so it was ommitted.

{
	"name" : <string>,
	"description" : <string> DEFAULT "",
	"ipList" : <string> (valid IP list),
	"scanners" : [
		{
			"id" : <number>
		}...
	] DEFAULT []
}
Example Response
Expand
{
	"type" : "regular",
	"response" : {
		"id" : "3",
		"name" : "TestDevformPost",
		"description" : "Test of a post through DevForm",
		"ipList" : "192.168.1.1",
		"createdTime" : "1408733617",
		"modifiedTime" : "1408733617",
		"scanners" : [
			{
				"id" : "11",
				"name" : "Cent5x64-NessC1",
				"description" : "",
				"status" : "1025"
			}
		],
		"organizations" : [],
		"activeScanners" : 1,
		"totalScanners" : 1
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1408733617
}

/zone/{id}

Methods
GET

Gets the Zone associated with {id}.

Tier Management

When the "Tier Management" Feature is Available and Enabled for the Local Tenable.sc Instance this endpoint will return the related SCI information for each Zone as well.

Fields Parameter
Expand

The fields parameter should be specified along the query string, and it takes the syntax

    ?fields=<field>,...

Allowed Fields

*id
**name
**description
**ipList
**createdTime
**modifiedTime
**organizations
**activeScanners
**totalScanners
**scanners

Legend

* = always comes back

** = comes back if fields list not specified on GET all

Request Parameters

None

Example Response
Expand
{
	"type" : "regular",
	"response" : {
		"id" : "5",
		"name" : "Test Zone #1",
		"description" : "",
		"ipList" : "192.168.0.0\/24",
		"createdTime" : "1426871916",
		"modifiedTime" : "1426881426",
		"scanners" : [
			{
				"id" : "2",
				"name" : "Nessus 172.168.0.1:8834",
				"description" : "",
				"status" : "4"
			}
		],
		"organizations" : [
			{
				"id" : "38",
				"name" : "Test Org",
				"description" : ""
			}
		],
		"activeScanners" : 0,
		"totalScanners" : 1
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1426882592
}

PATCH

Edits the Role associated with {id}, changing only the passed in fields.

Request Parameters

(All fields are optional)

See /zone::POST for parameters.

Example Response
See /zone/{id}::GET

DELETE

Deletes the Zone associated with {id}, depending on access and permissions.

Request Parameters

None

Example Response
Expand
{
	"type" : "regular",
	"response" : "",
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1408733643
}