Tenable.sc API: Report

/report

Methods
GET

Gets the list of Reports

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
creator
owner
ownerGroup
reportDefinitionID
jobID
type
displayType
status
running
errorDetails
totalSteps
completedSteps
startTime
finishTime
pubSites
txLogs

Legend

* = always comes back

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

None

Filter Parameters

usable - The response will be an object containing an array of usable Reports. By default, both usable and manageable objects are returned.
manageable - The response will be an object containing all manageable Reports. By default, both usable and manageable objects are returned.
running - Only Reports that are currently running will be returned. This is compatible with usable and/or manageable filters. By default, both running and completed Reports are returned.
completed - Only Reports that have completed will be returned. This is compatible with usable and/or manageable filters. By default, both running and completed Reports are returned. 

Example Response
Expand
{
	"type" : "regular",
	"response" : {
		"usable" : [
			{
				"id" : "1",
				"creatorID" : "1",
				"ownerID" : "1",
				"reportDefinitionID" : "-1",
				"jobID" : "1614",
				"name" : "Test Scan",
				"description" : "This report identifies installed software across a series of hosts, utilizing Nessus plugin 22869, Software Enumeration (SSH). This plugin lists the software installed on the remote host by calling the appropriate command (rpm -qa on RPM-based Linux distributions, qpkg, dpkg, etc.).\nThis report is comprised of a Table of Contents for each identified host. The Identified Hosts Table lists the hosts by IP Address, NetBIOS Name, and DNS Name, and is followed by a detailed look at each host individually.\n\nThis area provides some host details in a header with IP Address, DNS Name, NetBIOS Name, and Last Scan Date, and is followed by the host Operating System and a list of installed software, and version (if available).",
				"type" : "pdf",
				"status" : "Completed",
				"running" : "false",
				"errorDetails" : "Error removing components.\nError removing component #6.\nError deleting Data Source #10.\nError retrieving owner of Query.\nUser #1 not found.\n",
				"totalSteps" : "8",
				"completedSteps" : "4",
				"startTime" : "1403298387",
				"finishTime" : "1403299387",
				"ownerGID" : "0",
				"displayType" : "pdf",
				"pubSites" : [
					{
						"id" : "2",
						"name" : "test",
						"description" : "desc"
					}
				],
				"txLogs" : [],
				"canUse" : "true",
				"canManage" : "true",
				"creator" : {
					"id" : "1",
					"username" : "head",
					"firstname" : "test",
					"lastname" : "User"
				},
				"owner" : {
					"id" : "1",
					"username" : "head",
					"firstname" : "test",
					"lastname" : "User"
				},
				"ownerGroup" : {
					"id" : "0",
					"name" : "Full Access",
					"description" : "Full Access group"
				}
			},
			...
		]
		"manageable" : [
			{
				"id" : "1",
				"creatorID" : "1",
				"ownerID" : "1",
				"reportDefinitionID" : "-1",
				"jobID" : "1614",
				"name" : "Test Scan",
				"description" : "This report identifies installed software across a series of hosts, utilizing Nessus plugin 22869, Software Enumeration (SSH). This plugin lists the software installed on the remote host by calling the appropriate command (rpm -qa on RPM-based Linux distributions, qpkg, dpkg, etc.).\nThis report is comprised of a Table of Contents for each identified host. The Identified Hosts Table lists the hosts by IP Address, NetBIOS Name, and DNS Name, and is followed by a detailed look at each host individually.\n\nThis area provides some host details in a header with IP Address, DNS Name, NetBIOS Name, and Last Scan Date, and is followed by the host Operating System and a list of installed software, and version (if available).",
				"type" : "pdf",
				"status" : "Completed",
				"running" : "false",
				"errorDetails" : "Error removing components.\nError removing component #6.\nError deleting Data Source #10.\nError retrieving owner of Query.\nUser #1 not found.\n",
				"totalSteps" : "8",
				"completedSteps" : "4",
				"startTime" : "1403298387",
				"finishTime" : "1403299387",
				"ownerGID" : "0",
				"displayType" : "pdf",
				"pubSites" : [
					{
						"id" : "2",
						"name" : "test",
						"description" : "desc"
					}
				],
				"txLogs" : [],
				"canUse" : "true",
				"canManage" : "true",
				"creator" : {
					"id" : "1",
					"username" : "head",
					"firstname" : "test",
					"lastname" : "User"
				},
				"owner" : {
					"id" : "1",
					"username" : "head",
					"firstname" : "test",
					"lastname" : "User"
				},
				"ownerGroup" : {
					"id" : "0",
					"name" : "Full Access",
					"description" : "Full Access group"
				}
			},
			...
		]
	}
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1404919744
}

 /report/{id}

Methods
GET

Gets the Report 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

*id
**name
**description
creator
owner
ownerGroup
reportDefinitionID
jobID
type
displayType
status
running
errorDetails
totalSteps
completedSteps
startTime
finishTime
pubSites
txLogs

Legend

* = always comes back

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

None

Example Response
Expand
{
	"type" : "regular",
	"response" : {
		"id" : "1",
		"creatorID" : "1",
		"ownerID" : "1",
		"reportDefinitionID" : "-1",
		"jobID" : "1614",
		"name" : "Test Scan",
		"description" : "This report identifies installed software across a series of hosts, utilizing Nessus plugin 22869, Software Enumeration (SSH). This plugin lists the software installed on the remote host by calling the appropriate command (rpm -qa on RPM-based Linux distributions, qpkg, dpkg, etc.).\nThis report is comprised of a Table of Contents for each identified host. The Identified Hosts Table lists the hosts by IP Address, NetBIOS Name, and DNS Name, and is followed by a detailed look at each host individually.\n\nThis area provides some host details in a header with IP Address, DNS Name, NetBIOS Name, and Last Scan Date, and is followed by the host Operating System and a list of installed software, and version (if available).",
		"type" : "pdf",
		"status" : "Completed",
		"running" : "false",
		"errorDetails" : "Error removing components.\nError removing component #6.\nError deleting Data Source #10.\nError retrieving owner of Query.\nUser #1 not found.\n",
		"totalSteps" : "8",
		"completedSteps" : "4",
		"startTime" : "1403298387",
		"finishTime" : "1403299387",
		"ownerGID" : "0",
		"pubSites" : [
			{
				"id" : "2",
				"name" : "test",
				"description" : "desc"
			}
		],
		"creator" : {
			"id" : "1",
			"username" : "head",
			"firstname" : "test",
			"lastname" : "User"
		},
		"owner" : {
			"id" : "1",
			"username" : "head",
			"firstname" : "test",
			"lastname" : "User"
		},
		"ownerGroup" : {
			"id" : "0",
			"name" : "Full Access",
			"description" : "Full Access group"
		}
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1404920431
}


DELETE

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

Request Parameters

None

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

/report/{id}/copy

Methods

POST

Copies the Report associated with {id}, depending on access and permissions.

Request Parameters
Expand
{
	"users" : [
		{
			"id" : <number>
		}...
	]
}
Example Response
Expand
{
    "type" : "regular",
    "response" : {},
    "error_code" : 0,
    "error_msg" : "",
    "warnings" : [],
    "timestamp" : 1406924039
}

/report/{id}/email

Methods
POST

Copies the Report associated with {id}, depending on access and permissions.

Request Parameters
Expand
{
	"email" : <string> (valid email list)
}
Example Response
Expand
{
    "type" : "regular",
    "response" : {},
    "error_code" : 0,
    "error_msg" : "",
    "warnings" : [],
    "timestamp" : 1406924039
}

/report/{id}/publish

Methods
POST

Copies the Report associated with {id}, depending on access and permissions.

Request Parameters
Expand
{
	"pubSites" : [
		{
			"id" : <number>
		}
	]
}
Example Response
Expand
{
    "type" : "regular",
    "response" : {},
    "error_code" : 0,
    "error_msg" : "",
    "warnings" : [],
    "timestamp" : 1422999381
}

/report/{id}/download

POST

Downloads the report associated with {id}.

Request Parameters

None

Example Response

None given. The response will be a PDF, RTF, CSV, ASR, ARF, or LASR file in binary or ascii format.

/report/{id}/stop

POST

Stops the Report associated with {id}.

Request Parameters

None

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

/report/{id}/send

POST
Request Query Parameters
Expand
{
	"pubSites" : [
		<number>...
	]
}
Example Response
Expand
{
	"type" : "regular",
	"response" : "",
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1407248107
}