Tenable Security Center API: Scan Policy

 

/policy

Methods
GET

Gets the list of Policies.

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
**status
policyTemplate
policyProfileName
creator
tags
type
createdTime
modifiedTime
context
generateXCCDFResults
auditFiles
preferences
targetGroup
 

Session user role "1" (Administrator)

owner
ownerGroup

Session user role not "1" (Administrator)

status
groups 

Template ID "1" (Advanced Scan Template) or "25" (Advanced Agent Scan Template)

families

Legend

* = always comes back

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

red field is a JSON object e.g. "SCI" : {"id" : "2", "name" : "SCI Name", "description" : "Description"} )

Request Parameters
Expand

NOTE: The owner ID for admin is always -100 

{
    "name" : <string> "",
    "owner" : <string> "",
    "policyTemplate" : <string> "",
    "groupID" : <string> "",
	"tags" : <string> ""
    ...
}

Paginated results:

By default, the result set encompasses all Policy.

To obtain paginated results, a parameter value should be included in the request as follows:

?paginated=true

Additionally, for paginated results, the following parameters can be sent:

startOffset <number> (positive integer) DEFAULT 0,
endOffset <number> (integer >= startOffset) DEFAULT 50,
sortDirection <string> "ASC" | "DESC" DEFAULT "DESC",
sortField <string> "name" | "tags" | "policyTemplateID" | "ownerID" | "ownerGID" | "modifiedTime",

Example Request Query Parameters 
Expand

For normal query param request

{
  "policyTemplate": "3,1,7",
  "tags": "BASIC-NETWORK-SCAN",
  "owner": "-100,1",
  "groupID": "0,1",
  "name": "SCAN-875"
}


With Pagination query param 

{
  "startOffset": 0,
  "endOffset": 50,
  "sortField": "name",
  "sortDirection": "ASC",
  "paginated": "true",
  "policyTemplate": "3,1,7",
  "tags": "BASIC-NETWORK-SCAN",
  "owner": "-100,1",
  "groupID": "0,1",
  "name": "SCAN-875"
}
Filter Parameters

usable - The response will be an object containing an array of usable Policies. By default, both usable and manageable objects are returned.
manageable - The response will be an object containing all manageable Policies. By default, both usable and manageable objects are returned. 

Example Response
Expand
{
	"type" : "regular",
	"response" : {
		"usable" : [
			{
				"id" : "1",
				"name" : "test",
				"description" : "desc",
				"status" : "0",
				"uuid" : "2E950182-08B6-4737-830B-4ACC8F6B92F9"
			},
			{
				"id" : "2",
				"name" : "test2",
				"description" : "desc",
				"status" : "0",
				"uuid" : "929EF9DD-8A81-4864-AFD2-F87845224F6C"
			},
			{
				"id" : "3",
				"name" : "test3",
				"description" : "desc",
				"status" : "0",
				"uuid" : "F4B2DE11-F6A1-4058-AFF6-F7D49C238660"
			},
			{
				"id" : "4",
				"name" : "test4",
				"description" : "test desc",
				"status" : "0",
				"uuid" : "F4B2DE11-F6A1-4058-AFF6-F7D49C238660"
			},
			{
				"id" : "1000001",
				"name" : "nesus upload - ibm credentials",
				"description" : "",
				"status" : "0",
				"uuid" : "BC2DC4A1-298F-4CC3-A7D4-ABED7248E406"
			},
			{
				"id" : "1000002",
				"name" : "nesus upload - ibm credentials - uploaded one",
				"description" : "Nessus Policy exported from Tenable.sc",
				"status" : "0",
				"uuid" : "058E06E5-2E30-4E6C-8D27-20FBE45CED2F"
			},
			{
				"id" : "1000003",
				"name" : "IBM iSeries Credentials Name",
				"description" : "Imported Nessus Policy",
				"status" : "0",
				"uuid" : "970AF7B9-1DE2-43DF-BA29-A282FACE693B"
			},
			{
				"id" : "1000004",
				"name" : "Nessus Upload 2",
				"description" : "Imported Nessus Policy",
				"status" : "0",
				"uuid" : "893A5150-FB99-4405-AEA1-F88E720686C8"
			},
			{
				"id" : "1000005",
				"name" : "Nessus Upload 3",
				"description" : "Imported Nessus Policy",
				"status" : "0",
				"uuid" : "308027F4-77F9-4444-A5CE-E57B3928078B"
			},
			{
				"id" : "1000016",
				"name" : "Tom Test",
				"description" : "Imported Nessus Policy",
				"status" : "0",
				"uuid" : "2278CBB5-F927-4C8F-AEC1-EEF76DEB175D"
			},
			{
				"id" : "1000017",
				"name" : "Nessus Upload 4",
				"description" : "Imported Nessus Policy",
				"status" : "0",
				"uuid" : "4CF267BB-0A5C-47AB-BAC3-E77E6270EBC5"
			},
			{
				"id" : "1000018",
				"name" : "Tom Test 2",
				"description" : "Imported Nessus Policy",
				"status" : "0",
				"uuid" : "E8F73EF3-9D8D-4FCA-A3F4-2B4D176767B9"
			},
			{
				"id" : "1000019",
				"name" : "DOCtest",
				"description" : "desc",
				"status" : "0",
				"uuid" : "178C9E5F-E768-40D4-951C-5A76E7DC6BDA"
			},
			{
				"id" : "1000020",
				"name" : "test5",
				"description" : "test desc",
				"status" : "0",
				"uuid" : "A4C62370-91ED-42DA-927B-3FE248974563"
			}
		],
		"manageable" : [
			{
				"id" : "1000001",
				"name" : "nesus upload - ibm credentials",
				"description" : "",
				"status" : "0",
				"uuid" : "BC2DC4A1-298F-4CC3-A7D4-ABED7248E406"
			},
			{
				"id" : "1000002",
				"name" : "nesus upload - ibm credentials - uploaded one",
				"description" : "Nessus Policy exported from Tenable.sc",
				"status" : "0",
				"uuid" : "058E06E5-2E30-4E6C-8D27-20FBE45CED2F"
			},
			{
				"id" : "1000003",
				"name" : "IBM iSeries Credentials Name",
				"description" : "Imported Nessus Policy",
				"status" : "0",
				"uuid" : "970AF7B9-1DE2-43DF-BA29-A282FACE693B"
			},
			{
				"id" : "1000004",
				"name" : "Nessus Upload 2",
				"description" : "Imported Nessus Policy",
				"status" : "0",
				"uuid" : "893A5150-FB99-4405-AEA1-F88E720686C8"
			},
			{
				"id" : "1000005",
				"name" : "Nessus Upload 3",
				"description" : "Imported Nessus Policy",
				"status" : "0",
				"uuid" : "308027F4-77F9-4444-A5CE-E57B3928078B"
			},
			{
				"id" : "1000016",
				"name" : "Tom Test",
				"description" : "Imported Nessus Policy",
				"status" : "0",
				"uuid" : "2278CBB5-F927-4C8F-AEC1-EEF76DEB175D"
			},
			{
				"id" : "1000017",
				"name" : "Nessus Upload 4",
				"description" : "Imported Nessus Policy",
				"status" : "0",
				"uuid" : "4CF267BB-0A5C-47AB-BAC3-E77E6270EBC5"
			},
			{
				"id" : "1000018",
				"name" : "Tom Test 2",
				"description" : "Imported Nessus Policy",
				"status" : "0",
				"uuid" : "E8F73EF3-9D8D-4FCA-A3F4-2B4D176767B9"
			},
			{
				"id" : "1000019",
				"name" : "DOCtest",
				"description" : "desc",
				"status" : "0",
				"uuid" : "178C9E5F-E768-40D4-951C-5A76E7DC6BDA"
			},
			{
				"id" : "1000020",
				"name" : "test5",
				"description" : "test desc",
				"status" : "0",
				"uuid" : "A4C62370-91ED-42DA-927B-3FE248974563"
			}
		]
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1406233675
}
Paginated response
Expand
{
    "type": "regular",
    "response": {
        "totalRecords": "1",
        "returnedRecords": 1,
        "startOffset": "0",
        "endOffset": "50",
        "usable": [
            {
                "name": "Basic network Scan",
                "description": "",
                "tags": "BASIC-NETWORK-SCAN",
                "createdTime": "1704867262",
                "modifiedTime": "1704867262",
                "status": "0",
                "id": "1000002",
                "groups": [],
                "canUse": "true",
                "canManage": "true",
                "ownerGroup": {
                    "id": "0",
                    "name": "Full Access",
                    "description": "Full Access group"
                },
                "owner": {
                    "id": "1",
                    "username": "qahead",
                    "firstname": "Qa",
                    "lastname": "Head",
                    "uuid": "36DC8C6C-962A-4C65-AB6C-8C9986D40446"
                },
                "policyTemplate": {
                    "id": "3",
                    "name": "Basic Network Scan",
                    "description": "A full system scan suitable for any host.",
                    "agent": "false",
                    "isWas": "false"
                },
                "uuid": "8DCCD0D1-BA3F-47A6-8197-F85C86381FF8"
            },
            {
                "name": "ADMIN - Policy Compliance Auditing",
                "description": "",
                "tags": "admin",
                "createdTime": "1704876775",
                "modifiedTime": "1704876775",
                "status": "0",
                "id": "1",
                "canUse": "true",
                "canManage": "false",
                "policyTemplate": {
                    "id": "7",
                    "name": "Policy Compliance Auditing",
                    "description": "Audit system configurations against a known baseline.",
                    "agent": "false",
                    "isWas": "false"
                },
                "uuid": "E26BE33B-E25F-483B-901D-093692E1686B"
            }
        ],
        "manageable": [
            {
                "name": "Basic network Scan",
                "description": "",
                "tags": "BASIC-NETWORK-SCAN",
                "createdTime": "1704867262",
                "modifiedTime": "1704867262",
                "status": "0",
                "id": "1000002",
                "groups": [],
                "canUse": "true",
                "canManage": "true",
                "ownerGroup": {
                    "id": "0",
                    "name": "Full Access",
                    "description": "Full Access group"
                },
                "owner": {
                    "id": "1",
                    "username": "qahead",
                    "firstname": "Qa",
                    "lastname": "Head",
                    "uuid": "36DC8C6C-962A-4C65-AB6C-8C9986D40446"
                },
                "policyTemplate": {
                    "id": "3",
                    "name": "Basic Network Scan",
                    "description": "A full system scan suitable for any host.",
                    "agent": "false",
                    "isWas": "false"
                },
                "uuid": "8DCCD0D1-BA3F-47A6-8197-F85C86381FF8"
            }
        ]
    },
    "error_code": 0,
    "error_msg": "",
    "warnings": [],
    "timestamp": 1704968196
}

POST

Adds a Policy at the Admin or Organizational level.

NOTE #1: To specify a mixed Plugin Family, the plugins field must be present; otherwise, the family type defaults to enabled.
NOTE #2: When a policy is not context "" (empty), a new name will be generated. The 'name' parameter, if passed, will be overwritten.

Request Parameters
Expand
{
	"context" : <string> "" | "scan" DEFAULT ""
	"description" : <string> DEFAULT "",
	"tags" : <string> DEFAULT "",
	"preferences" : [
		<string:name> : <string:value>...
	] DEFAULT [],
	"auditFiles" : [
		{
			"id" : <number>
		}...
	] DEFAULT [],
	"policyTemplate" : {
		"id" : <number>
	},
	"policyProfileName" : <string> OPTIONAL,
	"generateXCCDFResults" : <string> "false" | "true" DEFAULT "false"
 
	context "" (empty)
	------------------
	"name" : <string>
}

policyTemplate ID "1" (Advanced Scan Template) or "25" (Advanced Agent Scan Template) 

...
	"families" : [
		{
			"id" : <number>,
            "plugins" : [
				{
					"id" : <number>
                },
                ....
            ] OPTIONAL (must be specified to effect a "mixed" Plugin Family type),

            Family "enabled"
            ----------------
            "state" : <string> "unlocked" DEFAULT "unlocked"
 
            Family "mixed"
            --------------
            "state" : <string> "unlocked" | "locked" DEFAULT "locked"
		}...
	] DEFAULT []
...

Session User is not an administrator

{
	"ownerID" : <number> DEFAULT {creatorID},  (
}
Example Response
Expand
{
	"type" : "regular",
	"response" : [
		{
			"id" : "1000019",
			"name" : "DOCtest",
			"description" : "desc",
			"policyTemplate" : {
				"id" : "1",
				"name" : "Advanced Scan",
				"description" : "Configure a scan without using any recommendations.",
				"agent" : "false",
				"isWas" : "false"
			},
			"policyProfileName" : "",
			"generateXCCDFResults" : "false",
			"creatorID" : "1",
			"ownerID" : "1",
			"context" : "",
			"tags" : "",
			"createdTime" : "1406224504",
			"modifiedTime" : "1406224504",
			"ownerGID" : "0",
			"targetGID" : "-1",
			"auditFiles" : [],
			"preferences" : [],
			"families" : [
				{
					"id" : "9",
 					"type" : "mixed",
					"state" : "unlocked", 
                    "name" : "AIX Local Security Checks",
					"count" : "11164"
				},
				{
					"id" : "54",
 					"type" : "mixed",
					"state" : "locked", 
                    "name" : "Amazon Linux Local Security Checks",
					"count" : "502"
				},
				{
					"id" : "35",
 					"type" : "enabled",
					"state" : "unlocked", 
                    "name" : "Backdoors",
					"count" : "102"
				},
				{
					"id" : "18",
 					"type" : "enabled",
					"state" : "unlocked", 
                    "name" : "CentOS Local Security Checks",
					"count" : "1890"
				},
				{
					"id" : "6",
 					"type" : "enabled",
					"state" : "unlocked", 
                    "name" : "CGI abuses",
					"count" : "3235"
				},
				{
					"id" : "26",
 					"type" : "enabled",
					"state" : "unlocked", 
                    "name" : "CGI abuses  :  XSS",
					"count" : "600"
				},
				{
					"id" : "33",
 					"type" : "enabled",
					"state" : "unlocked", 
                    "name" : "CISCO",
					"count" : "576"
				},
				{
					"id" : "31",
 					"type" : "enabled",
					"state" : "unlocked", 
                    "name" : "Databases",
					"count" : "372"
				},
				{
					"id" : "3",
 					"type" : "enabled",
					"state" : "unlocked",  
					"name" : "Debian Local Security Checks",
					"count" : "3179"
				},
				{
					"id" : "25",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Default Unix Accounts",
					"count" : "101"
				},
				{
					"id" : "22",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Denial of Service",
					"count" : "107"
				},
				{
					"id" : "37",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "DNS",
					"count" : "110"
				},
				{
					"id" : "57",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "F5 Networks Local Security Checks",
					"count" : "154"
				},
				{
					"id" : "5",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Fedora Local Security Checks",
					"count" : "8067"
				},
				{
					"id" : "34",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Firewalls",
					"count" : "139"
				},
				{
					"id" : "13",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "FreeBSD Local Security Checks",
					"count" : "2616"
				},
				{
					"id" : "19",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "FTP",
					"count" : "244"
				},
				{
					"id" : "40",
 					"type" : "enabled",
					"state" : "unlocked",
					"name" : "Gain a shell remotely",
					"count" : "274"
				},
				{
					"id" : "30",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "General",
					"count" : "198"
				},
				{
					"id" : "7",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Gentoo Local Security Checks",
					"count" : "2071"
				},
				{
					"id" : "2",
 					"type" : "enabled",
					"state" : "unlocked",  
					"name" : "HP-UX Local Security Checks",
					"count" : "1974"
				},
				{
					"id" : "56",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Huawei Local Security Checks",
					"count" : "14"
				},
				{
					"id" : "50",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Junos Local Security Checks",
					"count" : "107"
				},
				{
					"id" : "21",
 					"type" : "enabled",
					"state" : "unlocked",  
					"name" : "MacOS X Local Security Checks",
					"count" : "717"
				},
				{
					"id" : "47",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Mandriva Local Security Checks",
					"count" : "2970"
				},
				{
					"id" : "23",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Misc.",
					"count" : "972"
				},
				{
					"id" : "52",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Mobile Devices",
					"count" : "43"
				},
				{
					"id" : "43",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Netware",
					"count" : "14"
				},
				{
					"id" : "53",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Oracle Linux Local Security Checks",
					"count" : "1912"
				},
				{
					"id" : "55",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Palo Alto Local Security Checks",
					"count" : "20"
				},
				{
					"id" : "32",
 					"type" : "enabled",
					"state" :"unlocked", 
					"name" : "Peer-To-Peer File Sharing",
					"count" : "72"
				},
				{
					"id" : "39",
 					"type" : "enabled",
					"state" :"unlocked", 
					"name" : "Policy Compliance",
					"count" : "38"
				},
				{
					"id" : "42",
 					"type" : "enabled",
					"state" :"unlocked", 
                    "name" : "Port scanners",
					"count" : "8"
				},
				{
					"id" : "1",
 					"type" : "enabled",
					"state" :"unlocked",  
					"name" : "Red Hat Local Security Checks",
					"count" : "3424"
				},
				{
					"id" : "28",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "RPC",
					"count" : "36"
				},
				{
					"id" : "36",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "SCADA",
					"count" : "198"
				},
				{
					"id" : "51",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Scientific Linux Local Security Checks",
					"count" : "1760"
				},
				{
					"id" : "24",
 					"type" : "enabled",
					"state" : "unlocked",  
					"name" : "Service detection",
					"count" : "408"
				},
				{
					"id" : "41",
 					"type" : "enabled",
					"state" : "unlocked",  
					"name" : "Settings",
					"count" : "66"
				},
				{
					"id" : "15",
 					"type" : "enabled",
					"state" : "unlocked",  
					"name" : "Slackware Local Security Checks",
					"count" : "757"
				},
				{
					"id" : "12",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "SMTP problems",
					"count" : "135"
				},
				{
					"id" : "45",
 					"type" : "enabled",
					"state" : "unlocked",  
					"name" : "SNMP",
					"count" : "33"
				},
				{
					"id" : "4",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Solaris Local Security Checks",
					"count" : "3798"
				},
				{
					"id" : "8",
 					"type" : "enabled",
					"state" : "unlocked",  
					"name" : "SuSE Local Security Checks",
					"count" : "7355"
				},
				{
					"id" : "14",
 					"type" : "enabled",
					"state" : "unlocked",  
					"name" : "Ubuntu Local Security Checks",
					"count" : "2767"
				},
				{
					"id" : "48",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "VMware ESX Local Security Checks",
					"count" : "94"
				},
				{
					"id" : "11",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Web Servers",
					"count" : "876"
				},
				{
					"id" : "20",
 					"type" : "enabled",
					"state" : "unlocked", 
                    "name" : "Windows",
					"count" : "3113"
				},
				{
					"id" : "10",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Windows  :  Microsoft Bulletins",
					"count" : "986"
				},
				{
					"id" : "29",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Windows  :  User management",
					"count" : "28"
				}
			],
			"status" : "0",
			"creator" : {
				"id" : "1",
				"username" : "head",
				"firstname" : "test",
				"lastname" : "User",
				"uuid" : "96F2AD1B-1B83-462E-908A-84E6054F6B64"
			},
			"canUse" : "true",
			"canManage" : "true",
			"groups" : [],
			"uuid" : "2E950182-08B6-4737-830B-4ACC8F6B92F9"
		}
	],
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1406224504
}

/policy/{id}

/policy/{uuid}

Methods
GET

Gets the Policy 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
**status
policyTemplateType
policyTemplate
policyProfileName
creator
tags
type
status
createdTime
modifiedTime
context
generateXCCDFResults
auditFiles
preferences
targetGroup 

Session user role "1" (Administrator)

owner
ownerGroup

Session user role not "1" (Administrator)

groups

Template ID "1" (Advanced Scan Template) or "25" (Advanced Agent Scan Template)

families

 

Legend

* = always comes back

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

red field is a JSON object e.g. "SCI" : {"id" : "2", "name" : "SCI Name", "description" : "Description"} )

Request Parameters

None

Example Response
Expand
{
	"type" : "regular",
	"response" : [
		{
			"id" : "1",
			"generateXCCDFResults" : "false",
			"context" : "",
			"policyTemplate" : {
				"id" : "1",
				"name" : "Advanced Scan",
				"description" : "Configure a scan without using any recommendations.",
				"agent" : "false",
				"isWas" : "false"
			},
			"policyProfileName" : "",
			"name" : "test",
			"description" : "desc",
			"tags" : "",
			"createdTime" : "1406148027",
			"modifiedTime" : "1406148027",
			"status" : "0",
			"auditFiles" : [],
			"preferences" : {
				"preference1" : "value1",
				"preference2" : "value2"
			},
			"families" : [
				{
					"id" : "9",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "AIX Local Security Checks",
					"count" : "11164"
				},
				{
					"id" : "54",
 					"type" : "mixed",
					"state" : "unlocked", 
					"name" : "Amazon Linux Local Security Checks",
					"count" : "502"
				},
				{
					"id" : "35",
 					"type" : "mixed",
					"state" : "locked", 
					"name" : "Backdoors",
					"count" : "102"
				},
				{
					"id" : "18",
 					"type" : "mixed",
					"state" : "unlocked",  
					"name" : "CentOS Local Security Checks",
					"count" : "1890"
				},
				{
					"id" : "6",
 					"type" : "mixed",
					"state" : "locked", 
					"name" : "CGI abuses",
					"count" : "3235"
				},
				{
					"id" : "26",
 					"type" : "enabled",
					"state" : "unlocked",
					"name" : "CGI abuses  :  XSS",
					"count" : "600"
				},
				{
					"id" : "33",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "CISCO",
					"count" : "576"
				},
				{
					"id" : "31",
 					"type" : "enabled",
					"state" : "unlocked",  
					"name" : "Databases",
					"count" : "372"
				},
				{
					"id" : "3",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Debian Local Security Checks",
					"count" : "3179"
				},
				{
					"id" : "25",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Default Unix Accounts",
					"count" : "101"
				},
				{
					"id" : "22",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Denial of Service",
					"count" : "107"
				},
				{
					"id" : "37",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "DNS",
					"count" : "110"
				},
				{
					"id" : "57",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "F5 Networks Local Security Checks",
					"count" : "154"
				},
				{
					"id" : "5",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Fedora Local Security Checks",
					"count" : "8067"
				},
				{
					"id" : "34",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Firewalls",
					"count" : "139"
				},
				{
					"id" : "13",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "FreeBSD Local Security Checks",
					"count" : "2616"
				},
				{
					"id" : "19",
 					"type" : "enabled",
					"state" : "unlocked",
					"name" : "FTP",
					"count" : "244"
				},
				{
					"id" : "40",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Gain a shell remotely",
					"count" : "274"
				},
				{
					"id" : "30",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "General",
					"count" : "198"
				},
				{
					"id" : "7",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Gentoo Local Security Checks",
					"count" : "2071"
				},
				{
					"id" : "2",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "HP-UX Local Security Checks",
					"count" : "1974"
				},
				{
					"id" : "56",
 					"type" : "enabled",
					"state" : "unlocked", 

					"name" : "Huawei Local Security Checks",
					"count" : "14"
				},
				{
					"id" : "50",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Junos Local Security Checks",
					"count" : "107"
				},
				{
					"id" : "21",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "MacOS X Local Security Checks",
					"count" : "717"
				},
				{
					"id" : "47",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Mandriva Local Security Checks",
					"count" : "2970"
				},
				{
					"id" : "23",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Misc.",
					"count" : "972"
				},
				{
					"id" : "52",
 					"type" : "enabled",
					"state" : "unlocked",  
					"name" : "Mobile Devices",
					"count" : "43"
				},
				{
					"id" : "43",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Netware",
					"count" : "14"
				},
				{
					"id" : "53",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Oracle Linux Local Security Checks",
					"count" : "1912"
				},
				{
					"id" : "55",
 					"type" : "enabled",
					"state" : "unlocked",
					"name" : "Palo Alto Local Security Checks",
					"count" : "20"
				},
				{
					"id" : "32",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Peer-To-Peer File Sharing",
					"count" : "72"
				},
				{
					"id" : "39",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Policy Compliance",
					"count" : "38"
				},
				{
					"id" : "42",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Port scanners",
					"count" : "8"
				},
				{
					"id" : "1",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Red Hat Local Security Checks",
					"count" : "3424"
				},
				{
					"id" : "28",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "RPC",
					"count" : "36"
				},
				{
					"id" : "36",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "SCADA",
					"count" : "198"
				},
				{
					"id" : "51",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Scientific Linux Local Security Checks",
					"count" : "1760"
				},
				{
					"id" : "24",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Service detection",
					"count" : "408"
				},
				{
					"id" : "41",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Settings",
					"count" : "66"
				},
				{
					"id" : "15",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Slackware Local Security Checks",
					"count" : "757"
				},
				{
					"id" : "12",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "SMTP problems",
					"count" : "135"
				},
				{
					"id" : "45",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "SNMP",
					"count" : "33"
				},
				{
					"id" : "4",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Solaris Local Security Checks",
					"count" : "3798"
				},
				{
					"id" : "8",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "SuSE Local Security Checks",
					"count" : "7355"
				},
				{
					"id" : "14",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Ubuntu Local Security Checks",
					"count" : "2767"
				},
				{
					"id" : "48",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "VMware ESX Local Security Checks",
					"count" : "94"
				},
				{
					"id" : "11",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Web Servers",
					"count" : "876"
				},
				{
					"id" : "20",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Windows",
					"count" : "3113"
				},
				{
					"id" : "10",
 					"type" : "enabled",
					"state" : "unlocked", 
					"name" : "Windows  :  Microsoft Bulletins",
					"count" : "986"
				},
				{
					"id" : "29",
 					"type" : "mixed",
					"state" : "locked", 
					"name" : "Windows  :  User management",
					"count" : "28"
				}
			],
			"creator" : {
				"id" : "1",
				"username" : "head",
				"firstname" : "test",
				"lastname" : "User",
				"uuid" : "96F2AD1B-1B83-462E-908A-84E6054F6B64"
			},
			"canUse" : "true",
			"canManage" : "false",
			"uuid" : "2E950182-08B6-4737-830B-4ACC8F6B92F9"
		}
	],
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1406223313
}

PATCH

Edits the Policy associated with {id} or {uuid}, changing only the passed in fields.

NOTE #1: A policy's context may not be modified. When a policy is not context "" (empty), a new name will be generated. If the 'name' parameter is passed, it will be overwritten.
NOTE #2: In addition to the root object level (as usual), preferences and auth preference levels are defaulted. To maintain passwords on policy preferences, the policy preference object must contain the 'id' associated with that preference.

Request Parameters

All fields are optional

See /policy::POST for parameters.

Expand

In addition, the following may be used to completely remove a preference:

NOTE: Not sending a preference will cause it to remain unchanged. Sending a preference as null, false, blank, or empty will just simply set the respective preference to that value. The only way to remove a preference is to include it in the removePrefs.

{
	...
	"removePrefs" : [
		<string:name>...
	] DEFAULT []
}
Example Response
See /policy/{id}::GET

DELETE

Deletes the Policy associated with {id} or {uuid}, depending on access and permissions.

Request Parameters
Expand

NOTE: If the parameter targetGID is specified, this will delete the specified policy share to the provided targetGID. Otherwise, it will delete the specified policy.

{
	"targetGID" : <number> DEFAULT -1 (not set)
}
Example Response
Expand
{
    "type" : "regular",
    "response" : "",
    "error_code" : 0,
    "error_msg" : "",
    "warnings" : [],
    "timestamp" : 1403100582
}

/policy/{id}/copy

/policy/{uuid}/copy

POST

Copies the Policy associated with {id} or {uuid}, depending on access and permissions.

NOTE: The policy that is associated with {id} or {uuid} must contain context "" (empty).

Request Parameters
Expand
{
 	"name" : <string> DEFAULT -1 (not set)
}
Example Response
Expand
{
	"type" : "regular",
	"response" : {
		"id" : "4",
		"name" : "testCopy2",
		"description" : "test",
		"policyTemplate" : {
			"id" : "1",
			"name" : "Advanced Scan",
			"description" : "Configure a scan without using any recommendations.",
			"agent" : "false",
			"isWas" : "false"
		},
		"policyProfileName" : "",
		"generateXCCDFResults" : "false",
		"creatorID" : "1",
		"context" : null,
		"tags" : "",
		"status" : "0",
		"createdTime" : "1410976021",
		"modifiedTime" : "1410976021",
		"auditFiles" : [],
		"preferences" : [],
		"families" : [],
		"creator" : {
			"id" : "1",
			"username" : "head",
			"firstname" : "test",
			"lastname" : "User",
			"uuid" : "96F2AD1B-1B83-462E-908A-84E6054F6B64"
		},
		"canUse" : "true",
		"canManage" : "false",
		"uuid" : "71E25154-8888-458C-9B66-F6905CA217EB"
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1410976021
}

/policy/{id}/export

/policy/{uuid}/export

Methods
POST
Exports the Policy associated with {id} or {uuid}, depending on access and permissions.
Request Parameters

None

Example Response

None given. The response will be an xml file containing the Scan Policy.

/policy/{id}/share

/policy/{uuid}/share

Methods
POST

Shares the Policy associated with {id} or {uuid}, depending on access and permissions

Request Parameters
Expand
{
	"groups" : [
		{
			"id" : <number>
		}...
	]
}
Example Response
Expand
{
	"type" : "regular",
	"response" : {
		"id" : "1000002",
		"name" : "POST TEST",
		"description" : "Test of post for use with scan post test",
		"policyProfileName" : null,
		"generateXCCDFResults" : "false",
		"creatorID" : "1",
		"ownerID" : "1",
		"context" : "",
		"tags" : "",
		"createdTime" : "1406815230",
		"modifiedTime" : "1406831623",
		"ownerGID" : "0",
		"targetGID" : "-1",
		"auditFiles" : [
			{
				"id" : "5",
				"name" : "Admin - Top 25 extended File Listener",
				"description" : "",
				"type" : "windowsfiles",
				"uuid" : "F8F1B126-1B50-4A65-851A-1168F3283D7B"
			},
			{
				"id" : "6",
				"name" : "Admin - Top 25 lite",
				"description" : "",
				"type" : "windowsfiles",
				"uuid" : "8C255497-411D-4C7C-B44B-602EBA251B9E"
			},
			{
				"id" : "1000030",
				"name" : "Basic Audit File",
				"description" : "",
				"type" : "windowsfiles",
				"uuid" : "5EC6E35C-5B2C-435F-A5CB-C99EDBA5BA01"
			},
			{
				"id" : "1000047",
				"ownerID" : "1",
				"name" : "With Scap",
				"description" : "",
				"type" : "windowsfiles",
				"uuid" : "BAFE2113-DF13-4C7C-8837-B6C8DF2D04DE"
			},
			{
				"id" : "1000048",
				"ownerID" : "1",
				"name" : "test12122",
				"description" : "",
				"type" : "scapWindows",
				"uuid" : "20E94166-BCF8-46D1-B2C2-B331154A0D18"
			},
			{
				"id" : "1000049",
				"ownerID" : "1",
				"name" : "Test",
				"description" : "",
				"type" : "scapWindows",
				"uuid" : "5EC6E35C-5B2C-435F-A5CB-C99EDBA5BA01"
			}
		],
		"preferences" : [],
		"families" : [],
		"status" : "0",
		"policyTemplate" : {
			"id" : "1",
			"name" : "Advanced",
			"description" : "Configure a policy without using any templates or recommendations.",
			"agent" : "false",
			"isWas" : "false"
		},
		"creator" : {
			"id" : "1",
			"username" : "head",
			"firstname" : "Security Manager",
			"lastname" : "",
			"uuid" : "96F2AD1B-1B83-462E-908A-84E6054F6B64"
		},
		"owner" : {
			"id" : "1",
			"username" : "head",
			"firstname" : "Security Manager",
			"lastname" : "",
			"uuid" : "96F2AD1B-1B83-462E-908A-84E6054F6B64"
		},
		"ownerGroup" : {
			"id" : "0",
			"name" : "Full Access",
			"description" : "Full Access group"
		},
		"targetGroup" : {
			"id" : -1,
			"name" : "",
			"description" : ""
		},
		"uuid" : "2E950182-08B6-4737-830B-4ACC8F6B92F9"
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1409087451
}

/policy/import

Methods
POST
Request Parameters
Expand
{
	"name" : <string>,
	"filename" : <string>,
	"description" : <string> DEFAULT "",
	"tags" : <string> OPTIONAL
}
Example Response
Expand
{
    "type" : "regular",
    "response" :  "",
    "error_code" : 0,
    "error_msg" : "",
    "warnings" : [],
    "timestamp" : 1407340545
}

/policy/tag

Methods
GET

Gets the full list of unique Policy tags

Note: Organization user responses will contain both organization and admin policy tags. Admin user responses will contain only admin policy tags.

Request Parameters

none

Example Response
Expand
{
	"type" : "regular",
	"response" : [
		"Tag1",
		"Tag2",
		"Tag3"
	],
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1461093219
}