Tenable Security Center API: Director Scan Result

 

This API resource is only usable in Tenable.sc Director.

/mgmt/scanResult

Methods
GET

Gets the list of Director Scan Results. A Director Scan Result is Director's copy of a Scan Result from a SCI.

Fields Parameter
Expand

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

    ?fields=<field>,...

Allowed Fields

*id
initiator
owner
scan
resultsSync
**sci
**sciOrganization
**sciScanResult
retrievalStatus
job
repository
**name
**description
details
**status
importStatus
importStart
importFinish
importDuration
ioSyncStatus
ioSyncStart
ioSyncFinish
diagnosticAvailable
downloadAvailable
downloadFormat
dataFormat
resultType
resultSource
running
errorDetails
importErrorDetails
ioSyncErrorDetails
pluginSet
agentScanUUID
totalIPs
scannedIPs
completedIPs
completedChecks
totalChecks
startTime
finishTime
createdTime
scanDuration 
timeCompareField


Legend

* = always comes back

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

Request Parameters
Expand

NOTE: The 'startTime' and 'endTime' parameters search against the field specified in the 'timeCompareField' parameter. By default this is set to 'createdTime'

{
	"startTime" : <number:epoch> DEFAULT {now-30 days},
	"endTime" : <number:epoch> DEFAULT {now}
}
Filter Parameters

running - Only Scan Results that are currently running will be returned. By default, both running and completed Scan Results are returned.
completed - Only Scan Results that have completed will be returned. By default, both running and completed Scan Results are returned.


Example Response
Expand
{
  "type": "regular",
  "response": [
    {
      "status": "Completed",
      "name": "Daily compliance scan",
      "details": "PCI DSS 3.0 - Microsoft Windows Audit",
      "diagnosticAvailable": "false",
      "importStatus": "Finished",
      "createdTime": "1614904201",
      "startTime": "1614904207",
      "finishTime": "1614904269",
      "importStart": "1614904273",
      "importFinish": "1614904276",
      "running": "false",
      "totalIPs": "1",
      "scannedIPs": "1",
      "completedIPs": "1",
      "completedChecks": "190",
      "totalChecks": "190",
      "dataFormat": "IPv4",
      "downloadAvailable": "true",
      "downloadFormat": "v2",
      "resultType": "active",
      "resultSource": "internal",
      "scanDuration": "62",
      "id": "37",
      "scanID": "",
      "jobID": "4967",
      "SCI": {
        "id": "3",
        "name": "Managed SCI - 192.2.0.2",
        "description": "2"
      },
      "owner": {
        "id": "1672",
        "firstname": "",
        "lastname": "",
        "username": "testuser"
      },
      "repository": {
        "id": "10",
        "name": "IPv4_active_compliance",
        "description": "Contains IPv4 data imported from active Nessus scans",
        "type": "Local",
        "dataFormat" : "IPv4"

      },
      "organization": {
        "id": "2",
        "name": "Org on 192.2.0.2",
        "description": "Generated by automation!"
      }
    },
    {
      "status": "Completed",
      "name": "Daily compliance scan",
      "details": "PCI DSS 3.0 - Microsoft Windows Audit 2",
      "diagnosticAvailable": "false",
      "importStatus": "Finished",
      "createdTime": "1615422601",
      "startTime": "1615422607",
      "finishTime": "1615422668",
      "importStart": "1615422673",
      "importFinish": "1615422675",
      "running": "false",
      "totalIPs": "1",
      "scannedIPs": "1",
      "completedIPs": "1",
      "completedChecks": "190",
      "totalChecks": "190",
      "dataFormat": "IPv4",
      "downloadAvailable": "true",
      "downloadFormat": "v2",
      "resultType": "active",
      "resultSource": "internal",
      "scanDuration": "61",
      "id": "43",
      "scanID": "",
      "jobID": "10615",
      "SCI": {
        "id": "3",
        "name": "Managed SCI - 192.2.0.2",
        "description": "2"
      },
      "owner": {
        "id": "1672",
        "firstname": "",
        "lastname": "",
        "username": "testuser"
      },
      "repository": {
        "id": "10",
        "name": "IPv4_active_compliance",
        "description": "Contains IPv4 data imported from active Nessus scans",
        "type": "Local",
        "dataFormat": "IPv4"
      },
      "organization": {
        "id": "2",
        "name": "Org on 192.2.0.2",
        "description": "Generated by automation!"
      }
    }
  ],
  "error_code": 0,
  "error_msg": "",
  "warnings": [],
  "timestamp": 1615490556
}



/mgmt/scanResult/{id}

Methods
GET

Gets the Director Scan Result associated with {id}. A Director Scan Result is Director's copy of a Scan Result from a SCI. 

Fields Parameter
Expand

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

    ?fields=<field>,...

Allowed Fields

*id
initiator
owner
scan
resultsSync
**sci
**sciOrganization
**sciScanResult
retrievalStatus
job
repository
**name
**description
details
**status
importStatus
importStart
importFinish
importDuration
ioSyncStatus
ioSyncStart
ioSyncFinish
diagnosticAvailable
downloadAvailable
downloadFormat
dataFormat
resultType
resultSource
running
errorDetails
importErrorDetails
ioSyncErrorDetails
pluginSet
agentScanUUID
totalIPs
scannedIPs
completedIPs
completedChecks
totalChecks
startTime
finishTime
createdTime
scanDuration 
timeCompareField


Legend

* = always comes back

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

Request Parameters

None

Example Response
Expand
{
  "type": "regular",
  "response": {
    "name": "Daily compliance scan",
    "description": "",
    "diagnosticAvailable": "false",
    "importStatus": "Finished",
    "createdTime" : "1614904200",
    "importStart": "1614904273",
    "importFinish": "1614904276",
    "importDuration": "3",
    "ioSyncStatus": "",
    "ioSyncStart": "-1",
    "ioSyncFinish": "-1",
    "totalIPs": "1",
    "scannedIPs": "1",
    "completedIPs": "1",
    "completedChecks": "190",
    "totalChecks": "190",
    "status": "Completed",
    "errorDetails": "",
    "downloadAvailable": "true",
    "dataFormat": "IPv4",
    "finishTime": "1614904269",
    "downloadFormat": "v2",
    "running": "false",
    "importErrorDetails": "",
    "ioSyncErrorDetails": "",
    "startTime": "1614904207",
    "details": "PCI DSS 3.0 - Microsoft Windows Audit",
    "resultType": "active",
    "resultSource": "internal",
    "scanDuration": "62",
    "agentScanUUID": "",
    "id": "37",
    "scanID": "",
    "jobID": "4967",
    "SCI": {
      "id": "3",
      "name": "Managed SCI - 192.2.0.2",
      "description": "2"
    },
    "owner": {
      "id": "1672",
      "firstname": "",
      "lastname": "",
      "username": "testuser"
    },
    "repository": {
      "id": "10",
      "name": "IPv4_active_compliance",
      "description": "Contains IPv4 data imported from active Nessus scans",
      "type": "Local",
      "dataFormat": "IPv4"
    },
    "organization": {
      "id": "2",
      "name": "Org on 192.2.0.2",
      "description": "Generated by automation!"
    }
  },
  "error_code": 0,
  "error_msg": "",
  "warnings": [],
  "timestamp": 1615490707
}


/mgmt/scanResult/{id}/email

Methods

 

POST

Emails the Scan Result associated with Director {id}.

For documentation please consult the normal Scan Result email endpoint documentation.

 

/mgmt/scanResult/{id}/stop

Methods
POST

Stops the Scan Result on the Tenable.sc Instance associated with Director {id}.

A HTTP 200 from this endpoint does not mean your Scan Result was paused successfully. A job is queued up on Director to check and update the Director Scan Result information for when the Scan Result actually stops.

Request Parameters

type - "discard","import", or "rollover" for what to do with the Scan Result once the stop finishes. "discard" will discard the Scan Result, "import" will import any data Tenable.sc already has, and "rollover" will import any data Tenable.sc already has and create a rollover scan to cover any unscanned targets.

Example Response
Expand
{
  "type": "regular",
  "response": {
    "id": "25",
    "agentScanID": "-1",
    "resultsSyncID": "-1",
    "jobID": "12269",
    "name": "Basic Network Scan with Credentials",
    "description": "",
    "details": "Basic Network Scan Policy",
    "status": "Running",
    "importStatus": "No Results",
    "importStart": "-1",
    "importFinish": "-1",
    "ioSyncStatus": null,
    "ioSyncStart": "-1",
    "ioSyncFinish": "-1",
    "diagnosticAvailable": "false",
    "downloadAvailable": "false",
    "downloadFormat": "v2",
    "dataFormat": "IPv4",
    "resultType": "active",
    "resultSource": "internal",
    "running": "true",
    "errorDetails": "",
    "importErrorDetails": "",
    "ioSyncErrorDetails": null,
    "pluginSet": null,
    "totalIPs": "256",
    "scannedIPs": "8",
    "agentScanUUID": "",
    "agentScanContainerUUID": "",
    "startTime": "1615491193",
    "finishTime": "-1",
    "createdTime": "1615491185",
    "scanDuration": "305",
    "importDuration": "-1",
    "ioSyncDuration": "-1",
    "completedIPs": "26",
    "completedChecks": "3228449",
    "totalChecks": "32645376",
    "canUse": "true",
    "canManage": "true",
    "initiator": {
      "id": "1",
      "username": "qa",
      "firstname": "",
      "lastname": ""
    },
    "owner": {
      "id": "1",
      "username": "qa",
      "firstname": "",
      "lastname": ""
    },
    "scan": {
      "id": "1",
      "name": "Basic Network Scan with Credentials",
      "description": ""
    },
    "repository": {
      "id": "1",
      "name": "qarep_IPv4_active_compliance",
      "description": "Contains IPv4 data imported from active Nessus scans"
    },
    "ownerGroup": {
      "id": "0",
      "name": "Full Access",
      "description": "Full Access group"
    }
  },
  "error_code": 0,
  "error_msg": "",
  "warnings": [],
  "timestamp": 1615491498
} 

/mgmt/scanResult/{id}/pause

Methods
POST

Pauses the Scan Result on the Tenable.sc Instance associated with Director {id}.


A HTTP 200 from this endpoint does not mean your Scan Result was paused successfully. A job is queued up on Director to check and update the Director Scan Result information for when the Scan Result actually pauses.

Request Parameters

None

Example Response
Expand
{
  "type": "regular",
  "response": {
    "id": "43",
    "initiatorID": "1",
    "ownerID": "1",
    "scanID": "",
    "resultsSyncID": "-1",
    "sciID": "3",
    "sciOrgID": "1",
    "sciScanResultID": "24",
    "retrievalStatus": "0",
    "jobID": "10615",
    "repositoryID": "1",
    "name": "Daily compliance scan",
    "description": "",
    "details": "PCI DSS 3.0 - Microsoft Windows Audit",
    "status": "Completed",
    "importStatus": "Finished",
    "importStart": "1615422673",
    "importFinish": "1615422675",
    "ioSyncStatus": "",
    "ioSyncStart": "-1",
    "ioSyncFinish": "-1",
    "diagnosticAvailable": "false",
    "downloadAvailable": "true",
    "downloadFormat": "v2",
    "dataFormat": "IPv4",
    "resultType": "active",
    "resultSource": "internal",
    "running": "false",
    "acknowledged": "false",
    "errorDetails": "",
    "importErrorDetails": "",
    "ioSyncErrorDetails": "",
    "pluginSet": null,
    "agentScanUUID": "",
    "totalIPs": "1",
    "scannedIPs": "1",
    "completedIPs": "1",
    "completedChecks": "190",
    "totalChecks": "190",
    "retrievedTime": "-1",
    "startTime": "1615422607",
    "finishTime": "1615422668",
    "createdTime": "1615422601",
    "scanDuration": "61",
    "importDuration": "2",
    "ioSyncDuration": "-1",
    "username": "qa",
    "firstname": "",
    "lastname": "",
    "title": "",
    "email": "",
    "address": "",
    "city": "",
    "state": "",
    "country": "",
    "phone": "",
    "fax": ""
  },
  "error_code": 0,
  "error_msg": "",
  "warnings": [],
  "timestamp": 1615491019
}

/mgmt/scanResult/{id}/resume

Methods
POST

Resumes the Scan Result on the Tenable.sc Instance associated with Director {id}.

A HTTP 200 from this endpoint does not mean your Scan Result was resumed successfully. A job is queued up on Director to check and update the Director Scan Result information for when the Scan Result actually resumes.

Request Parameters

None

Example Response
Expand
{
  "type": "regular",
  "response": {
    "id": "44",
    "initiatorID": "1",
    "ownerID": "1",
    "scanID": "",
    "resultsSyncID": "-1",
    "sciID": "3",
    "sciOrgID": "1",
    "sciScanResultID": "25",
    "retrievalStatus": "0",
    "jobID": "12269",
    "repositoryID": "1",
    "name": "Basic Network Scan with Credentials",
    "description": "",
    "details": "Basic Network Scan Policy",
    "status": "Resuming",
    "importStatus": "No Results",
    "importStart": "-1",
    "importFinish": "-1",
    "ioSyncStatus": "",
    "ioSyncStart": "-1",
    "ioSyncFinish": "-1",
    "diagnosticAvailable": "false",
    "downloadAvailable": "false",
    "downloadFormat": "v2",
    "dataFormat": "IPv4",
    "resultType": "active",
    "resultSource": "internal",
    "running": "true",
    "acknowledged": "false",
    "errorDetails": "",
    "importErrorDetails": "",
    "ioSyncErrorDetails": "",
    "pluginSet": null,
    "agentScanUUID": "",
    "totalIPs": "256",
    "scannedIPs": "8",
    "completedIPs": "8",
    "completedChecks": "127521",
    "totalChecks": "32645376",
    "retrievedTime": "-1",
    "startTime": "1615491193",
    "finishTime": "-1",
    "createdTime": "1615491185",
    "scanDuration": "263",
    "importDuration": "-1",
    "ioSyncDuration": "-1",
    "username": "qa",
    "firstname": "",
    "lastname": "",
    "title": "",
    "email": "",
    "address": "",
    "city": "",
    "state": "",
    "country": "",
    "phone": "",
    "fax": ""
  },
  "error_code": 0,
  "error_msg": "",
  "warnings": [],
  "timestamp": 1615491456
}

/mgmt/scanResult/{id}/retrieve

Methods
POST

Instructs Tenable.sc director to download (retrieve) the Scan Result on the SCI associated with Director {id} from the SCI to Director.

A HTTP 200 from this endpoint does not mean your Scan Result was retrieved successfully. A job is queued up on Director to download the Scan Result and update the Director Scan Result information for when that Scan Result is actually retrieved.

Example Response
Expand
{
  "type": "regular",
  "response": {
    "id": "43",
    "initiatorID": "1",
    "ownerID": "1",
    "scanID": "",
    "resultsSyncID": "-1",
    "sciID": "3",
    "sciOrgID": "1",
    "sciScanResultID": "24",
    "retrievalStatus": "0",
    "jobID": "10615",
    "repositoryID": "1",
    "name": "Daily compliance scan",
    "description": "",
    "details": "PCI DSS 3.0 - Microsoft Windows Audit",
    "status": "Completed",
    "importStatus": "Finished",
    "importStart": "1615422673",
    "importFinish": "1615422675",
    "ioSyncStatus": "",
    "ioSyncStart": "-1",
    "ioSyncFinish": "-1",
    "diagnosticAvailable": "false",
    "downloadAvailable": "true",
    "downloadFormat": "v2",
    "dataFormat": "IPv4",
    "resultType": "active",
    "resultSource": "internal",
    "running": "false",
    "acknowledged": "false",
    "errorDetails": "",
    "importErrorDetails": "",
    "ioSyncErrorDetails": "",
    "pluginSet": null,
    "agentScanUUID": "",
    "totalIPs": "1",
    "scannedIPs": "1",
    "completedIPs": "1",
    "completedChecks": "190",
    "totalChecks": "190",
    "retrievedTime": "-1",
    "startTime": "1615422607",
    "finishTime": "1615422668",
    "createdTime": "1615422601",
    "scanDuration": "61",
    "importDuration": "2",
    "ioSyncDuration": "-1",
    "username": "qa",
    "firstname": "",
    "lastname": "",
    "title": "",
    "email": "",
    "address": "",
    "city": "",
    "state": "",
    "country": "",
    "phone": "",
    "fax": ""
  },
  "error_code": 0,
  "error_msg": "",
  "warnings": [],
  "timestamp": 1615491019
}

/mgmt/scanResult/{id}/download

Methods
POST

Downloads the Scan Result on the SCI associated with Director {id}.

For documentation please consult the normal Scan Result download endpoint documentation.