client.templates.list_scripts
A method of the Templates endpoint.
- list_scripts(*, 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 Script Templates
API URL:
GET /templates/scriptsimport civis client = civis.APIClient() response = client.templates.list_scripts(...)
- 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: import, export, enhancement, model or script
- 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.PaginatedResponseobject) 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 acivis.ListResponseobject (= a list ofcivis.Responseobjects), whose size is determined by ‘limit’. Defaults to False.
- Returns:
civis.ListResponse|civis.PaginatedResponseid : int
- publicbool
If the template is public or not.
- script_idint
The id of the script that this template uses.
- user_contextstr
The user context of the script that this template uses.
- namestr
The name of the template.
- categorystr
The category of this template.
created_at : str (time)
updated_at : str (time)
- use_countint
The number of uses of this template.
- ui_report_idint
The id of the report that this template uses.
- tech_reviewedbool
Whether this template has been audited by Civis for security vulnerability and correctness.
- archivedbool
Whether the template has been archived.
- 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