Create a Script Template
templates_post_scripts(
script_id,
name,
note = NULL,
ui_report_id = NULL,
archived = NULL,
hidden = NULL
)
A list containing the following elements:
integer,
boolean, If the template is public or not.
integer, The id of the script that this template uses.
string, The type of the template's backing script (e.g SQL, Container, Python, R, JavaScript)
string, The user context of the script that this template uses.
array, An array containing the following fields:
name string, The variable's name as used within your code.
label string, The label to present to users when asking them for the value.
description string, A short sentence or fragment describing this parameter to the end user.
type string, The type of parameter. Valid options: string, multi_line_string, integer, float, bool, file, table, database, credential_aws, credential_redshift, or credential_custom
required boolean, Whether this param is required.
value string, The value you would like to set this param to. Setting this value makes this parameter a fixed param.
default string, If an argument for this parameter is not defined, it will use this default value. Use true, True, t, y, yes, or 1 for true bool's or false, False, f, n, no, or 0 for false bool's. Cannot be used for parameters that are required or a credential type.
allowedValues array, The possible values this parameter can take, effectively making this an enumerable parameter. Allowed values is an array of hashes of the following format: `label: 'Import', 'value': 'import'`
string, The name of the template.
string, The category of this template.
string, A note describing what this template is used for; custom scripts created off this template will display this description.
string,
string,
integer, The number of uses of this template.
integer, The id of the report that this template uses.
boolean, Whether this template has been audited by Civis for security vulnerability and correctness.
boolean, Whether the template has been archived.
boolean, The hidden status of the item.
list, A list containing the following elements:
id integer, The ID of this user.
name string, This user's name.
username string, This user's username.
initials string, This user's initials.
online boolean, Whether this user is online.
string, Your permission level on the object. One of "read", "write", or "manage".
integer required. The id of the script that this template uses.
string required. The name of the template.
string optional. A note describing what this template is used for; custom scripts created off this template will display this description.
integer optional. The id of the report that this template uses.
boolean optional. Whether the template has been archived.
boolean optional. The hidden status of the item.