client.templates.list_reports

A method of the Templates endpoint.

list_reports(*, hidden: bool = None, author: str = None, category: str = None, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None) ListResponse | PaginatedResponse

List Report Templates

API URL: GET /templates/reports

import civis
client = civis.APIClient()
response = client.templates.list_reports(...)
Parameters:
hiddenbool, optional

If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.

authorstr, optional

If specified, return items from any of these authors. It accepts a comma- separated list of user IDs.

categorystr, optional

A category to filter results by, one of: dataset-viz

limitint, optional

Number of results to return. Defaults to 50. Maximum allowed is 1000.

page_numint, optional

Page number of the results to return. Defaults to the first page, 1.

orderstr, optional

The field on which to order the result set. Defaults to name. Must be one of: name, updated_at, created_at.

order_dirstr, optional

Direction in which to sort, either asc (ascending) or desc (descending) defaulting to asc.

iteratorbool, optional

If True, return a generator (specifically, a civis.PaginatedResponse object) to iterate over all responses. Use it when more results than the maximum allowed by ‘limit’ are needed. When True, ‘page_num’ is ignored. If False, return a civis.ListResponse object (= a list of civis.Response objects), whose size is determined by ‘limit’. Defaults to False.

Returns:
civis.ListResponse | civis.PaginatedResponse
  • id : int

  • namestr

    The name of the template.

  • categorystr

    The category of this report template. Can be left blank. Acceptable values are: dataset-viz

  • created_at : str (time)

  • updated_at : str (time)

  • use_countint

    The number of uses of this template.

  • archivedbool

    Whether the template has been archived.

  • tech_reviewedbool

    Whether this template has been audited by Civis for security vulnerability and correctness.

  • authorcivis.Response
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.