Add action

Creates a new action in the pipeline.

Required scopes: WORKSPACE, EXECUTION_MANAGE

Resource URL

POST /workspaces/:domain/projects/:project_name/pipelines/:pipeline_id/actions

URL Parameters

NameTypeDescription
domain
Required
StringThe workspace domain.
pipeline_id
Required
IntegerThe numerical ID of the desired pipeline.
project_name
Required
StringThe name ID of the project.

Actions schema

Properties

NameTypeDescription
name
Required
StringThe ID of the action.
type
Required
StringThe type of the action.
trigger_time
Required
StringSpecifies when the action should be executed. Can be one of ON_EVERY_EXECUTION, ON_FAILURE or ON_BACK_TO_SUCCESS. The default value is ON_EVERY_EXECUTION.
variablesVariable[]The list of variables you can use the action.
trigger_conditionStringDefines when the build action should be run. Can be one of ALWAYS, ON_CHANGE, ON_CHANGE_AT_PATH, VAR_IS, VAR_IS_NOT, VAR_CONTAINS, VAR_NOT_CONTAINS, DATETIME or SUCCESS_PIPELINE. Can't be used in deployment actions.
trigger_condition_pathsString[]Required when trigger_condition is set to ON_CHANGE_AT_PATH.
trigger_variable_keyStringRequired when trigger_condition is set to VAR_IS, VAR_IS_NOT or VAR_CONTAINS or VAR_NOT_CONTAINS. Defines the name of the desired variable.
trigger_variable_valueStringRequired when trigger_condition is set to VAR_IS, VAR_IS_NOT or VAR_CONTAINS. Defines the value of the desired variable which will be compared with its current value.
after_action_idIntegerThe numerical ID of the action, after which this action should be added.
timeoutIntegerThe timeout in seconds.
disabledBooleanWhen set to true the action is disabled. By default it is set to false.
run_next_parallelBooleanWhen set to true, the subsequent action defined in the pipeline will run in parallel to the current action.
run_only_on_first_failureBooleanDefines whether the action should be executed on each failure. Restricted to and required if the trigger_time is ON_FAILURE.
trigger_hoursInteger[]Available when trigger_condition is set to DATETIME. Defines the time – by default running from 1 to 24.
trigger_daysInteger[]Available when trigger_condition is set to DATETIME. Defines the days running from 1 to 7 where 1 is for Monday.
zone_idStringAvailable when trigger_condition is set to DATETIME. Defines the timezone (by default it is UTC) and takes values from here.
trigger_project_nameStringRequired when trigger_condition is set to SUCCESS_PIPELINE. Defines the name of the project in which the trigger_pipeline_name is.
trigger_pipeline_nameStringRequired when trigger_condition is set to SUCCESS_PIPELINE. Defines the name of the pipeline.

On top of these properties every action has a set of properties unique to its type. You can read how to define each type in separate articles below.