Tenable Security Center 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

Fields Parameter
Expand

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

    ?fields=<field>,...

Allowed Fields

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

Legend

* = always comes back

** = comes back if fields list not specified on GET all
redFont =  field is a JSON object e.g. "repository" :{ "id" : <id>, "name" : <name> } )
Request Parameters

None

Example Response
Expand
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
    "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" : "",
                    "uuid" : "FF00F4D0-5B9F-4A26-998C-19430295284A"
                }
            ],
            "activeScanners" : 0,
            "totalScanners" : 1,
            "uuid" : "4F7DD1CD-EB1B-40D7-BCE1-2DB3E31F6F4C"
        },
        {
            "id" : "6",
            "name" : "Test Zone #2",
            "description" : "",
            "ipList" : "192.168.0.0\/24",
            "createdTime" : "1426871931",
            "modifiedTime" : "1426871931",
            "scanners" : [],
            "organizations" : [],
            "activeScanners" : 0,
            "totalScanners" : 0,
            "uuid" : "E5F2DE96-C050-4328-A6AC-EC89BB1E6CAA"
        }
    ],
    "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.

1
2
3
4
5
6
7
8
9
10
{
    "name" : <string>,
    "description" : <string> DEFAULT "",
    "ipList" : <string> (valid IP list),
    "scanners" : [
        {
            "id" : <number>
        }...
    ] DEFAULT []
}
Example Response
Expand
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
    "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,
        "uuid" : "E5F2DE96-C050-4328-A6AC-EC89BB1E6CAA"
    },
    "error_code" : 0,
    "error_msg" : "",
    "warnings" : [],
    "timestamp" : 1408733617
}

/zone/{id}

/zone/{uuid}

Methods
GET

Gets the Zone associated with {id} or {uuid}.

Fields Parameter
Expand

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

    ?fields=<field>,...

Allowed Fields

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

Legend

* = always comes back

** = comes back if fields list not specified on GET all
redFont =  field is a JSON object e.g. "repository" :{ "id" : <id>, "name" : <name> } )
Request Parameters

None

Example Response
Expand
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
    "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" : "",
                "uuid" : "FF00F4D0-5B9F-4A26-998C-19430295284A"
            }
        ],
        "activeScanners" : 0,
        "totalScanners" : 1,
        "uuid" : "E5F2DE96-C050-4328-A6AC-EC89BB1E6CAA"
    },
    "error_code" : 0,
    "error_msg" : "",
    "warnings" : [],
    "timestamp" : 1426882592
}

PATCH

Edits the Role associated with {id} or {uuid}, 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} or {uuid}, depending on access and permissions.

Request Parameters

None

Example Response
Expand
1
2
3
4
5
6
7
8
{
    "type" : "regular",
    "response" : "",
    "error_code" : 0,
    "error_msg" : "",
    "warnings" : [],
    "timestamp" : 1408733643
}