pyfsr.api.reporting

The reporting module — client.reporting.

Read the report definitions behind the SOAR UI’s Reports section (/api/3/reporting).

The display name is ``displayName``, not ``name`` — there is no name field on a Report, so lookups here match on displayName. That is the name the export wizard’s Reports category shows and the one ExportTemplate.add_report() takes.

Classes

ReportingAPI

List and resolve report definitions (/api/3/reporting).

Module Contents

class pyfsr.api.reporting.ReportingAPI(client: pyfsr.client.FortiSOAR)[source]

Bases: pyfsr.api.base.BaseAPI

List and resolve report definitions (/api/3/reporting).

Example

for report in client.reporting.list():
    print(report.displayName, report.templateType)

soc = client.reporting.get("SOC Summary Report")
list(params: dict[str, Any] | None = None, *, typed: bool = True) list[pyfsr.models.Report] | list[dict[str, Any]][source]

List report definitions.

Parameters:
  • params – optional query params passed through to the collection.

  • typed – parse into Report (default) or return dicts.

Doctest:

>>> from pyfsr._testing import demo_client
>>> client = demo_client()
>>> reports = client.reporting.list()
>>> len(reports)
2
>>> reports[0].displayName
'Weekly Alert Report'
get(name: str, *, typed: bool = True) pyfsr.models.Report | dict[str, Any][source]

Resolve a single report by its display name.

Parameters:
  • name – the report’s displayName (e.g. "SOC Summary Report").

  • typed – parse into Report (default) or return a dict.

Raises:

ValueError – if no report carries that display name.