Clone this Custom Script
scripts_post_custom_clone(id, clone_schedule = NULL, clone_triggers = NULL,
clone_notifications = NULL)integer required. The ID for the script.
boolean optional. If true, also copy the schedule to the new script.
boolean optional. If true, also copy the triggers to the new script.
boolean optional. If true, also copy the notifications to the new script.
A list containing the following elements:
integer, The ID for the script.
string, The name of the script.
string, The type of the script (e.g Custom)
string, The time this script was created.
string, The time the script was last updated.
object, 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, The status of the script's last run.
string, The time that the script's last run finished.
string,
array, An array containing the following fields:
id integer, The ID for the project.
name string, The name of the project.
integer, The ID of the parent job that will trigger this script
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, 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.
object, Dictionary of name/value pairs to use to run this script. Only settable if this script has defined params.
integer, The ID of the template script.
integer, The url of the custom HTML.
string, The name of the template script.
string, The template's note.
integer, The remote host ID that this script will connect to.
integer, The credential that this script will use.
string, The code that this script will run with arguments inserted.
object, A list containing the following elements:
scheduled boolean, If the object is scheduled
scheduledDays array, Day based on numeric value starting at 0 for Sunday
scheduledHours array, Hours of the day it is scheduled on
scheduledMinutes array, Minutes of the day it is scheduled on
scheduledRunsPerHour integer, Alternative to scheduled minutes, number of times to run per hour
object, A list containing the following elements:
urls array, URLs to receive a POST request at job completion
successEmailSubject string, Custom subject line for success e-mail.
successEmailBody string, Custom body text for success e-mail, written in Markdown.
successEmailAddresses array, Addresses to notify by e-mail when the job completes successfully.
successEmailFromName string, Name from which success emails are sent; defaults to "Civis."
successEmailReplyTo string, Address for replies to success emails; defaults to the author of the job.
failureEmailAddresses array, Addresses to notify by e-mail when the job fails.
stallWarningMinutes integer, Stall warning emails will be sent after this amount of minutes.
successOn boolean, If success email notifications are on.
failureOn boolean, If failure email notifications are on.
object, 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, The time zone of this script.
object, A list containing the following elements:
id integer,
state string,
createdAt string, The time that the run was queued.
startedAt string, The time that the run started.
finishedAt string, The time that the run completed.
error string, The error message for this run, if present.
boolean, The hidden status of the object.
string, The archival status of the requested object(s).
integer, Target project to which script outputs will be added.