Edit action

Updates an action in the pipeline. It’s not possible to change the type of an action. If you want to change the type, remove the action and add it again. Model of each action type is the same as presented in Add Action examples

Required scopes: WORKSPACE, EXECUTION_MANAGE

Resource URL

PATCH /workspaces/:domain/projects/:project_name/pipelines/:pipeline_id/actions/:action_id

URL Parameters

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

POST Parameters

NameTypeDescription
access_keyStringThe Access Key for Amazon S3. Restricted to and required for AMAZON_S3.
active_modeBooleanEnables the active mode for the connection. Restricted to FTP and FTPS.
authentication_modeStringThe authentication mode for SSH. Possible values: PASS, PRIVATE_KEY, PRIVATE_KEY_AND_PASS. Restricted to SFTP or SSH_COMMAND.
bucket_nameStringThe name of the Amazon S3 Bucket. Restricted to and required for AMAZON_S3.
cloudfront_idStringThe ID of the Amazon Cloud Front. Restricted to AMAZON_S3.
commandsStringThe array of commands invoked on the remote server. Only for SSH_COMMAND.
hostStringThe host for the connection. Restricted to FTP, FTPS, SFTP or SSH_COMMAND.
local_pathStringThe path in the repository. Restricted to FTP, FTPS, SFTP and AMAZON_S3.
loginStringThe username required to connect to the server. Restricted to FTP, FTPS, SFTP or SSH_COMMAND.
passphraseStringThe passphrase for the private SSH key. Restricted to SFTP and SSH_COMMAND. Required if authentication_mode is PRIVATE_KEY_AND_PASS.
passwordStringThe password required to connect to the server. Restricted to FTP, FTPS, SFTP or SSH_COMMAND.
public_accessBooleanMakes the files accessible through public HTTP. Restricted to AMAZON_S3.
reduced_redundancyBooleanThe user’s reduced redundancy. Restricted to AMAZON_S3.
remote_pathStringThe absolute or relative path on the remote server. Restricted to FTP, FTPS and SFTP.
secret_keyStringThe Secret Key for Amazon S3. Restricted to and required for AMAZON_S3.
server_keyStringThe private SSH key. Restricted to SFTP and SSH_COMMAND. Required if the authentication_mode is PRIVATE_KEY, PRIVATE_KEY_AND_PASS.
working_directoryStringThe absolute or relative path on the remote server. Restricted to SSH_COMMAND.
deployment_excludesStringThe paths and/or files that will be left out during the deployment.
deployment_includesStringThe exceptions from the ignore patterns set in deployment_excludes.

Example

Request

PATCH https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions/5

JSON

{
"name": "Upload files to Live mirror",
"deployment_excludes": [
"/assets/",
"file.txt"
]
}

Sample Response

HTTP

Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999

JSON

{
"url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions/5",
"html_url": "https://app.buddy.works/buddy/company-website/pipelines/action/5/edit",
"id": 5,
"name": "Upload files to Live mirror",
"type": "FTP",
"trigger_time": "ON_EVERY_EXECUTION",
"last_execution_status": "SUCCESSFUL",
"run_only_on_first_failure": false,
"input_type": "SCM_REPOSITORY",
"local_path": "/",
"remote_path": "",
"login": "pass",
"active_mode": false,
"host": "localhost",
"port": "21",
"deployment_excludes": [
"/assets/",
"file.txt"
],
"pipeline": {
"url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2",
"html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/2",
"id": 2,
"name": "Live mirror",
"trigger_mode": "MANUAL",
"ref_name": "master",
"last_execution_status": "SUCCESSFUL",
"last_execution_revision": "506a3963507943d6908154f4bc9646e829128a08"
}
}