Add action

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

Adds a new action to the specified pipeline.

Hint
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.

Request

REQUIRED SCOPES
WORKSPACE, EXECUTION_MANAGE
URL PARAMETERS
domainrequired string
The workspace domain.
pipeline_idrequired integer
The numerical ID of the desired pipeline.
project_namerequired string
The name ID of the project.
POST PARAMETERS
namerequired string
The ID of the action.
typerequired string
The type of the action.
trigger_conditionsTriggerCondition[]
The list of trigger conditions to meet so that the action can be triggered.
variablesVariable[]
The list of variables you can use the action.
after_action_idinteger
The numerical ID of the action, after which this action should be added.
timeoutinteger
The timeout in seconds.
disabledboolean
When set to true the action is disabled. By default it is set to false.
run_nextboolean
Defines whether the action should run in parallel with the next one. Possible values: WAIT_ON_SUCCESS(no parallel), IN_SOFT_PARALLEL(run as soon as a runner is available), IN_HARD_PARALLEL(run only with enough runners). The default value is ON_EVERY_EXECUTION
run_only_on_first_failureboolean
Defines whether the action should be executed on each failure. Restricted to and required if the trigger_time is ON_FAILURE.
ignore_errorsboolean
If set to true the execution will proceed, mark action as a warning and jump to the next action. Doesn't apply to deployment actions.
retry_intervalinteger
Delay time between auto retries in seconds.
retry_countinteger
Number of retries if the action fails.
trigger_timestring
Specifies when the action should be executed. Can be one of ON_EVERY_EXECUTION, ON_FAILURE, ON_BACK_TO_SUCCESS, ON_WARNING or ON_WAIT_FOR_APPROVE. The default value is ON_EVERY_EXECUTION.

Last modified on Sep 27, 2024

Example:

CURL
curl -X POST "https://api.buddy.works/workspaces/:domain/projects/:project_name/pipelines/:pipeline_id/actions" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json" \
STATUS
201 Created
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999