Scan Policy REST Reference

/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
**name
**description
**status

policyTemplate
policyProfileName
creator
tags
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 Template)

families

Legend

* = always comes back

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

None

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"
			},
			{
				"id" : "2",
				"name" : "test2",
				"description" : "desc",
				"status" : "0"
			},
			{
				"id" : "3",
				"name" : "test3",
				"description" : "desc",
				"status" : "0"
			},
			{
				"id" : "4",
				"name" : "test4",
				"description" : "test desc",
				"status" : "0"
			},
			{
				"id" : "1000001",
				"name" : "nesus upload - ibm credentials",
				"description" : "",
				"status" : "0"
			},
			{
				"id" : "1000002",
				"name" : "nesus upload - ibm credentials - uploaded one",
				"description" : "Nessus Policy exported from SecurityCenter",
				"status" : "0"
			},
			{
				"id" : "1000003",
				"name" : "IBM iSeries Credentials Name",
				"description" : "Imported Nessus Policy",
				"status" : "0"
			},
			{
				"id" : "1000004",
				"name" : "Nessus Upload 2",
				"description" : "Imported Nessus Policy",
				"status" : "0"
			},
			{
				"id" : "1000005",
				"name" : "Nessus Upload 3",
				"description" : "Imported Nessus Policy",
				"status" : "0"
			},
			{
				"id" : "1000016",
				"name" : "Tom Test",
				"description" : "Imported Nessus Policy",
				"status" : "0"
			},
			{
				"id" : "1000017",
				"name" : "Nessus Upload 4",
				"description" : "Imported Nessus Policy",
				"status" : "0"
			},
			{
				"id" : "1000018",
				"name" : "Tom Test 2",
				"description" : "Imported Nessus Policy",
				"status" : "0"
			},
			{
				"id" : "1000019",
				"name" : "DOCtest",
				"description" : "desc",
				"status" : "0"
			},
			{
				"id" : "1000020",
				"name" : "test5",
				"description" : "test desc",
				"status" : "0"
			}
		],
		"manageable" : [
			{
				"id" : "1000001",
				"name" : "nesus upload - ibm credentials",
				"description" : "",
				"status" : "0"
			},
			{
				"id" : "1000002",
				"name" : "nesus upload - ibm credentials - uploaded one",
				"description" : "Nessus Policy exported from SecurityCenter",
				"status" : "0"
			},
			{
				"id" : "1000003",
				"name" : "IBM iSeries Credentials Name",
				"description" : "Imported Nessus Policy",
				"status" : "0"
			},
			{
				"id" : "1000004",
				"name" : "Nessus Upload 2",
				"description" : "Imported Nessus Policy",
				"status" : "0"
			},
			{
				"id" : "1000005",
				"name" : "Nessus Upload 3",
				"description" : "Imported Nessus Policy",
				"status" : "0"
			},
			{
				"id" : "1000016",
				"name" : "Tom Test",
				"description" : "Imported Nessus Policy",
				"status" : "0"
			},
			{
				"id" : "1000017",
				"name" : "Nessus Upload 4",
				"description" : "Imported Nessus Policy",
				"status" : "0"
			},
			{
				"id" : "1000018",
				"name" : "Tom Test 2",
				"description" : "Imported Nessus Policy",
				"status" : "0"
			},
			{
				"id" : "1000019",
				"name" : "DOCtest",
				"description" : "desc",
				"status" : "0"
			},
			{
				"id" : "1000020",
				"name" : "test5",
				"description" : "test desc",
				"status" : "0"
			}
		]
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1406233675
}