Repository REST Reference

/repository

Methods
GET

Gets the list of Repositories.

NOTE: The field 'transfer' will only be returned if the type is "remote", running is "true", and the field is requested

Fields Parameter
Expand

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

    ?fields=<field>,.

NOTE: 'typeFields' returns type-specific parameters inside of a 'typeFields." If requested, typeFields returns as follows:

dataFormat "mobile": mobileSchedule, preferences, scanner, mdm, mdmType, deviceCount, status, errorDetails
dataFormat "IPv6" | "IPv4": nessusSchedule, correlation, ipRange, ipCount, runningNessus, lastGenerateNessusTime, lastTrendUpdate, trendingDays, trendWithRaw

Allowed Fields

*id
**name
**description
type
dataFormat
vulnCount
remoteID
remoteIP
running
downloadFormat
lastSyncTime
lastVulnUpdate
createdTime
modifiedTime
transfer
typeFields
remoteSchedule

Session User role "1" (Administrator)

organizations

Legend

* = always comes back

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

Parameters must be passed in as query string (as opposed to JSON) in the format of: /repository?type=All&...

{
	"type" : <string> "All" | "Local" | "Remote" | "Offline" DEFAULT "All",
}
Expand Parameters

mdm (only applies to Mobile repositories. 'typeFields' must be requested)

Example Response
Expand
{
	"type" : "regular",
	"response" : [
		{
			"id" : "37",
			"name" : "ag repo1",
			"description" : "Copied from QA"
		},
		{
			"id" : "38",
			"name" : "jm ipv4",
			"description" : "copied from QA"
		},
		{
			"id" : "39",
			"name" : "ipv6 rep",
			"description" : "Copied from QA (name changed)"
		},
		{
			"id" : "43",
			"name" : "Test Local mobile Repository",
			"description" : "DevForm test of mobile repository post"
		},
		{
			"id" : "44",
			"name" : "Test w\/pluginPrefs",
			"description" : ""
		}
	],
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1423767348
}

/repository/{id}/assetIntersections

GET

Gets the ip intersections of an Asset.
NOTE: The number of assets should be limited. Intersecting large numbers of assets may be cause long delays, so pagination should be used in F/E

Request Parameters
Expand

Parameters must be passed in as query string (as opposed to JSON) in the format of: /ipInfo?ip="1.1.1.1"&dnsName="foo"

{
	"ip" : <string> (valid IP),
	"dnsName" : <string> OPTIONAL
}
Example Response
Expand
{
	"type" : "regular",
	"response" : {
		"assets" : []
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1409924685
}

/repository/{id}/ipInfo

GET

Gets the IP Info for the Repository associated with {id}.

Fields Parameter
Expand

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

    ?fields=<field>,...

Allowed Fields

*ip
*repositoryID
repository
score
total
severityInfo
severityLow
severityMedium
severityHigh
severityCritical
macAddress
policyName
pluginSet
netbiosName
dnsName
osCPE
biosGUID
tpmID
mcafeeGUID
lastAuthRun
lastUnauthRun
severityAll
os
hasPassive
hasCompliance
lastScan
links

Legend

* = always comes back

Request Parameters
Expand

Parameters must be passed in as query string (as opposed to JSON) in the format of: /ipInfo?ip="1.1.1.1"&dnsName="foo"

{
	"ip" : <string> (valid ip address),
	"dnsName" : <string> OPTIONAL
}
Example Response
Expand
{
	"type" : "regular",
	"response" : {
		"ip" : "192.168.1.145",
		"repositoryID" : "2",
		"score" : "2130",
		"total" : "322",
		"severityInfo" : "110",
		"severityLow" : "7",
		"severityMedium" : "41",
		"severityHigh" : "152",
		"severityCritical" : "12",
		"macAddress" : "00:00:00:00:00:00",
		"policyName" : "",
		"pluginSet" : "",
		"netbiosName" : "TARGET\\WIN7X64",
		"dnsName" : "target.domain.com",
		"osCPE" : "cpe:\/o:microsoft:windows_7: :gold:x64-ultimate",
		"biosGUID" : "",
		"tpmID" : "",
		"mcafeeGUID" : "",
		"lastAuthRun" : "",
		"lastUnauthRun" : "",
		"severityAll" : "12,152,41,7,110",
		"os" : "Microsoft Windows 7 Ultimate",
		"hasPassive" : "No",
		"hasCompliance" : "No",
		"lastScan" : "1408294249",
		"links" : [
			{
				"name" : "SANS",
				"link" : "https : \/\/isc.sans.edu\/ipinfo.html?ip=192.168.1.145"
			},
			{
				"name" : "ARIN",
				"link" : "http : \/\/whois.arin.net\/rest\/ip\/192.168.1.145"
			}
		],
		"repository" : {
			"id" : "2",
			"name" : "Rep2",
			"description" : ""
		}
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1409855674
}