v1

latestOpenAPI 3.1.02026-08-06330343826.1 KB
Report

Reports

Configures a new report for generation. Report types are controlled through either or both a format and template. Non-templatized (export) report formats do not require a template and have their output format preset. Templatized (document and file) report formats support a report template that governs the content of the output and the output format can be chosen from a list of supported formats.

post/api/3/reports

Request body

baselineobject

If the template is baseline-comparison or executive-overview the baseline scan to compare against. This can be the first scan, the previous scan, or a scan as of a specified date. Defaults to previous.

bureaustring

The name of the bureau for a CyberScope report. Only used when the format is "cyberscope-xml".

componentstring

The name of the component for a CyberScope report. Only used when the format is "cyberscope-xml".

enclavestring

The name of the enclave for a CyberScope report. Only used when the format is "cyberscope-xml".

format'sql-query' | 'arf-xml' | 'csv-export' | 'cyberscope-xml' | 'nexpose-simple-xml' | 'oval-xml' | 'qualys-xml' | 'scap-xml' | 'xccdf-csv' | 'xccdf-xml' | 'xml-export' | 'xml-export-v2' | 'pdf' | 'rtf' | 'xml' | 'html' | 'text'

The output format of the report. The format will restrict the available templates and parameters that can be specified.

idinteger

The identifier of the report.

languagestring

The locale (language) in which the report is generated

namestring

The name of the report.

organizationstring

The organization used for a XCCDF XML report. Only used when the format is "xccdf-xml".

ownerinteger

The identifier of the report owner.

policiesobject[]

If the template is rule-breakdown-summary, top-policy-remediations, or top-policy-remediations-with-details the identifiers of the policies to report against.

policyobject

The identifier of the policy

querystring

SQL query to run against the Reporting Data Model. Only used when the format is "sql-query".

templatestring

The template for the report (only required if the format is templatized).

timezonestring

The timezone the report generates in, such as "America/Los_Angeles".

usersinteger[]

The identifiers of the users granted explicit access to the report.

versionstring

The version of the report Data Model to report against. Only used when the format is "sql-query".

Example request

{
  "bureau": "Bureau",
  "component": "Component",
  "email": {
    "access": "zip",
    "additional": "file",
    "assetAccess": true,
    "owner": "file",
    "smtp": {
      "global": true,
      "relay": "mail.acme.com",
      "sender": "john_smith@acme.com"
    }
  },
  "enclave": "Enclave",
  "filters": {
    "categories": {
      "links": [
        {
          "href": "https://hostname:3780/api/3/...",
          "rel": "self"
        }
      ]
    }
  },
  "format": "pdf",
  "frequency": {
    "repeat": {
      "every": "date-of-month",
      "interval": 1
    },
    "start": "2018-03-01T04:31:56Z",
    "type": "schedule"
  },
  "id": 17,
  "language": "en-US",
  "links": [
    {
      "href": "https://hostname:3780/api/3/...",
      "rel": "self"
    }
  ],
  "name": "Monthly Corporate Site Summary",
  "organization": "Acme, Inc.",
  "owner": 1,
  "query": "SELECT * FROM dim_asset ORDER BY ip_address ASC",
  "range": {
    "every": "day",
    "interval": 7
  },
  "remediation": {
    "solutions": 25
  },
  "riskTrend": {
    "allAssets": {
      "total": true,
      "trend": "average-risk"
    },
    "assetGroupMembership": "historical",
    "assetGroups": "total",
    "assets": true,
    "sites": "total",
    "tagMembership": "historical",
    "tags": "total"
  },
  "storage": {
    "location": "monthly_reports/site/corporate",
    "path": "$(install_dir)/nsc/reports/$(user)/monthly_reports/site/corporate"
  },
  "template": "executive-overview",
  "timezone": "America/Los_Angeles",
  "users": [
    7
  ],
  "version": "2.3.0"
}

Response

OK