sasctl.services.reports#

class sasctl._services.reports.Reports[source]#

Bases: Service

Creates, reads, updates, and deletes reports, report states, and content.

classmethod get_report(item, refresh=False)#

Return a report instance.

Parameters:
  • item (str or dict) – Name, ID, or dictionary representation of the report.

  • refresh (bool, optional) – Obtain an updated copy of the report.

Returns:

RestObj or None – A dictionary containing the report attributes or None.

Notes

If item is a complete representation of the report it will be returned unless refresh is set. This prevents unnecessary REST calls when data is already available on the client.

classmethod get_visual_elements(report)[source]#

Get the visual components of a report.

Returned components may be visualized by rendering with the report_images.get_images method.

Parameters:

report (str or dict) – The name or id of the report, or a dictionary representation of the report.

Returns:

List[RestObj] – List of metadata about each element.

classmethod list_reports(filter=None, start=None, limit=None, **kwargs)#

List all reports available in the environment.

Parameters:
  • filter (str, optional)

  • start (int, optional) – Zero-based index of the first item to return. Defaults to 0.

  • limit (int, optional) – The maximum number of items to return. Defaults to 20.

Returns:

list – A list of dictionaries containing the reports.

Notes

See the filtering reference for details on the filter parameter.