client.templates.post_reports
A method of the Templates endpoint.
- post_reports(name: str, code_body: str, *, category: str = None, archived: bool = None, provide_api_key: bool = None, hidden: bool = None) Response
Create a Report Template
API URL:
POST /templates/reportsimport civis client = civis.APIClient() response = client.templates.post_reports(...)
- Parameters:
- namestr
The name of the template.
- code_bodystr
The code for the Template body.
- categorystr, optional
The category of this report template. Can be left blank. Acceptable values are: dataset-viz
- archivedbool, optional
Whether the template has been archived.
- provide_api_keybool, optional
Whether reports based on this template request an API Key from the report viewer.
- hiddenbool, optional
The hidden status of the item.
- Returns:
civis.Responseid : 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.
- author
civis.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.
- author
- auth_code_urlstr
A URL to the template’s stored code body.
- provide_api_keybool
Whether reports based on this template request an API Key from the report viewer.
- hiddenbool
The hidden status of the item.