Transfer
- POST
- /workspaces
- /:domain
- /projects
- /:project_name
- /pipelines
- /:pipeline_id
- /actions
Transfer action covers FTP, FTPS and SSH transfer activities.
Example: FTP
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" \
-d '{
"name": "Upload files to 5.75.234.250 by FTP",
"type": "TRANSFER",
"trigger_time": "ON_EVERY_EXECUTION",
"input_type": "SCM_REPOSITORY",
"local_path": "/",
"remote_path": "",
"targets": [
{
"id": "ftp_target_1",
"type": "FTP",
"secure": false,
"host": "5.75.234.250",
"port": "21",
"auth": {
"username": "user",
"password": "$MyPassword"
},
"path": "/var/www"
}
]
}'
EXAMPLE RESPONSE{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/175688/actions/196731", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/175688/action/196731/edit", "id": 196731, "name": "Upload files to 5.75.234.250 by FTP", "type": "TRANSFER", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INITIAL", "disabled": false, "input_type": "SCM_REPOSITORY", "local_path": "/", "remote_path": "", "targets": [ { "type": "FTP", "secure": false, "id": "ftp_target_1", "host": "5.75.234.250", "port": "21", "auth": { "username": "user", "password": "secure!gYTKjljwPt4nAffHn6mGEQ==.5rkCAHX55eiwOqJ73oGg6g==" }, "path": "/var/www" } ], "pipeline": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/175688", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/175688", "id": 175688, "name": "Test Docs", "on": "EVENT", "definition_source": "LOCAL", "git_config_ref": "NONE", "events": [ { "type": "PUSH", "refs": [ "refs/heads/master" ] } ], "priority": "NORMAL", "disabled": false, "last_execution_status": "INITIAL", "always_from_scratch": false, "ignore_fail_on_project_status": false, "no_skip_to_most_recent": false, "terminate_stale_runs": false, "auto_clear_cache": false, "fetch_all_refs": false, "fail_on_prepare_env_warning": true, "concurrent_pipeline_runs": false, "do_not_create_commit_status": false, "stale": false, "waiting_for_push": false, "resources": "DEFAULT", "git_changeset_base": "LATEST_RUN", "filesystem_changeset_base": "DATE_MODIFIED", "cpu": "X86", "description_required": false }, "ignore_errors": false, "run_next": "WAIT_ON_SUCCESS" }
STATUS201 Created
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999
Example: FTPS
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" \
-d '{
"name": "Upload files to 5.75.234.250 by FTPS",
"type": "TRANSFER",
"trigger_time": "ON_EVERY_EXECUTION",
"input_type": "SCM_REPOSITORY",
"local_path": "/",
"remote_path": "",
"targets": [
{
"id": "ftps_target_1",
"type": "FTP",
"secure": true,
"host": "5.75.234.250",
"port": "21",
"auth": {
"username": "ftp-0",
"password": "$MyPassword"
},
"path": "/var/www"
}
]
}'
EXAMPLE RESPONSE{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/175688/actions/196732", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/175688/action/196732/edit", "id": 196732, "name": "Upload files to 5.75.234.250 by FTPS", "type": "TRANSFER", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INITIAL", "disabled": false, "input_type": "SCM_REPOSITORY", "local_path": "/", "remote_path": "", "targets": [ { "type": "FTP", "secure": true, "id": "ftps_target_1", "host": "5.75.234.250", "port": "21", "auth": { "username": "ftp-0", "password": "secure!gYTKjljwPt4nAffHn6mGEQ==.5rkCAHX55eiwOqJ73oGg6g==" } } ], "pipeline": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/175688", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/175688", "id": 175688, "name": "Test Docs", "on": "EVENT", "definition_source": "LOCAL", "git_config_ref": "NONE", "events": [ { "type": "PUSH", "refs": [ "refs/heads/master" ] } ], "priority": "NORMAL", "disabled": false, "last_execution_status": "INITIAL", "always_from_scratch": false, "ignore_fail_on_project_status": false, "no_skip_to_most_recent": false, "terminate_stale_runs": false, "auto_clear_cache": false, "fetch_all_refs": false, "fail_on_prepare_env_warning": true, "concurrent_pipeline_runs": false, "do_not_create_commit_status": false, "stale": false, "waiting_for_push": false, "resources": "DEFAULT", "git_changeset_base": "LATEST_RUN", "filesystem_changeset_base": "DATE_MODIFIED", "cpu": "X86", "description_required": false }, "ignore_errors": false, "run_next": "WAIT_ON_SUCCESS" }
STATUS201 Created
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999
Example: SFTP key transfer
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" \
-d '{
"name": "Upload files to 5.75.234.250 by SFTP(Key)",
"type": "TRANSFER",
"trigger_time": "ON_EVERY_EXECUTION",
"input_type": "SCM_REPOSITORY",
"local_path": "/",
"remote_path": "",
"targets": [
{
"id": "sftp_target_1",
"type": "SSH",
"host": "5.75.234.250",
"port": "22",
"auth": {
"method": "SSH_KEY",
"username": "sftp-key-0",
"key": "$MyKey"
}
}
]
}'
EXAMPLE RESPONSE{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/175688/actions/196734", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/175688/action/196734/edit", "id": 196734, "name": "Upload files to 5.75.234.250 by SFTP(Key)", "type": "TRANSFER", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INITIAL", "disabled": false, "input_type": "SCM_REPOSITORY", "local_path": "/", "remote_path": "", "targets": [ { "type": "SSH", "id": "sftp_target_1", "host": "5.75.234.250", "port": "22", "auth": { "method": "SSH_KEY", "username": "sftp-key-0", "key": "secure!yIy8Wqq7yIZ+Do7TgemGzw==.R3r9SWFn67RO1QfSzDtMnA==" } } ], "pipeline": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/175688", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/175688", "id": 175688, "name": "Test Docs", "on": "EVENT", "definition_source": "LOCAL", "git_config_ref": "NONE", "events": [ { "type": "PUSH", "refs": [ "refs/heads/master" ] } ], "priority": "NORMAL", "disabled": false, "last_execution_status": "INITIAL", "always_from_scratch": false, "ignore_fail_on_project_status": false, "no_skip_to_most_recent": false, "terminate_stale_runs": false, "auto_clear_cache": false, "fetch_all_refs": false, "fail_on_prepare_env_warning": true, "concurrent_pipeline_runs": false, "do_not_create_commit_status": false, "stale": false, "waiting_for_push": false, "resources": "DEFAULT", "git_changeset_base": "LATEST_RUN", "filesystem_changeset_base": "DATE_MODIFIED", "cpu": "X86", "description_required": false }, "ignore_errors": false, "run_next": "WAIT_ON_SUCCESS" }
STATUS201 Created
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999
Example: SFTP key & phrase transfer
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" \
-d '{
"name": "Upload files to 5.75.234.250 by SFTP(Key & Phrase)",
"type": "TRANSFER",
"trigger_time": "ON_EVERY_EXECUTION",
"input_type": "SCM_REPOSITORY",
"local_path": "/",
"remote_path": "",
"targets": [
{
"id": "sftp_target_2",
"type": "SSH",
"host": "5.75.234.250",
"port": "22",
"auth": {
"method": "SSH_KEY",
"username": "sftp-key-phrase-0",
"passphrase": "MyPassphrase",
"key": "$MyKey"
}
}
]
}'
EXAMPLE RESPONSE{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/175688/actions/196735", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/175688/action/196735/edit", "id": 196735, "name": "Upload files to 5.75.234.250 by SFTP(Key & Phrase)", "type": "TRANSFER", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INITIAL", "disabled": false, "input_type": "SCM_REPOSITORY", "local_path": "/", "remote_path": "", "targets": [ { "type": "SSH", "id": "sftp_target_2", "host": "5.75.234.250", "port": "22", "auth": { "method": "SSH_KEY", "username": "sftp-key-phrase-0", "passphrase": "secure!XbPhCUMzlLd4ZeiR5UlW2g==.ar6PHXL5fQL79BNOaTc3aw==", "key": "secure!QQ2jNn5URpsicPDdMYU5QQ==.rvMfWQ3R0OLqSc1t22//rg==" } } ], "pipeline": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/175688", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/175688", "id": 175688, "name": "Test Docs", "on": "EVENT", "definition_source": "LOCAL", "git_config_ref": "NONE", "events": [ { "type": "PUSH", "refs": [ "refs/heads/master" ] } ], "priority": "NORMAL", "disabled": false, "last_execution_status": "INITIAL", "always_from_scratch": false, "ignore_fail_on_project_status": false, "no_skip_to_most_recent": false, "terminate_stale_runs": false, "auto_clear_cache": false, "fetch_all_refs": false, "fail_on_prepare_env_warning": true, "concurrent_pipeline_runs": false, "do_not_create_commit_status": false, "stale": false, "waiting_for_push": false, "resources": "DEFAULT", "git_changeset_base": "LATEST_RUN", "filesystem_changeset_base": "DATE_MODIFIED", "cpu": "X86", "description_required": false }, "ignore_errors": false, "run_next": "WAIT_ON_SUCCESS" }
STATUS201 Created
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999
Example: SFTP
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" \
-d '{
"name": "Upload files to 5.75.234.250 by SFTP",
"type": "TRANSFER",
"trigger_time": "ON_EVERY_EXECUTION",
"input_type": "SCM_REPOSITORY",
"local_path": "/",
"remote_path": "",
"targets": [
{
"id": "sftp_target_3",
"type": "SSH",
"host": "5.75.234.250",
"port": "22",
"auth": {
"method": "PASSWORD",
"username": "sftp-pass-0",
"password": "$MyPassword"
}
}
]
}'
EXAMPLE RESPONSE{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/175688/actions/196736", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/175688/action/196736/edit", "id": 196736, "name": "Upload files to 5.75.234.250 by SFTP", "type": "TRANSFER", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INITIAL", "disabled": false, "input_type": "SCM_REPOSITORY", "local_path": "/", "remote_path": "", "targets": [ { "type": "SSH", "id": "sftp_target_3", "host": "5.75.234.250", "port": "22", "auth": { "method": "PASSWORD", "username": "sftp-pass-0", "password": "secure!Fa+KZiUPt454/V0I/rzVow==.NTxejOG4XOsR8a5u8PLhVw==" } } ], "pipeline": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/175688", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/175688", "id": 175688, "name": "Test Docs", "on": "EVENT", "definition_source": "LOCAL", "git_config_ref": "NONE", "events": [ { "type": "PUSH", "refs": [ "refs/heads/master" ] } ], "priority": "NORMAL", "disabled": false, "last_execution_status": "INITIAL", "always_from_scratch": false, "ignore_fail_on_project_status": false, "no_skip_to_most_recent": false, "terminate_stale_runs": false, "auto_clear_cache": false, "fetch_all_refs": false, "fail_on_prepare_env_warning": true, "concurrent_pipeline_runs": false, "do_not_create_commit_status": false, "stale": false, "waiting_for_push": false, "resources": "DEFAULT", "git_changeset_base": "LATEST_RUN", "filesystem_changeset_base": "DATE_MODIFIED", "cpu": "X86", "description_required": false }, "ignore_errors": false, "run_next": "WAIT_ON_SUCCESS" }
STATUS201 Created
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999
Example: SFTP pass and key
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" \
-d '{
"name": "Upload files to 5.75.234.250 by SFTP(Pass & Key)",
"type": "TRANSFER",
"trigger_time": "ON_EVERY_EXECUTION",
"input_type": "SCM_REPOSITORY",
"local_path": "/",
"remote_path": "",
"targets": [
{
"id": "sftp_target_4",
"type": "SSH",
"host": "5.75.234.250",
"port": "22",
"auth": {
"method": "SSH_KEY",
"username": "sftp-pass-key-0",
"password": "$MyPassword",
"passphrase": "$MyPassphrase",
"key": "$MyKey"
}
}
]
}'
EXAMPLE RESPONSE{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/175688/actions/196737", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/175688/action/196737/edit", "id": 196737, "name": "Upload files to 5.75.234.250 by SFTP(Pass & Key)", "type": "TRANSFER", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INITIAL", "disabled": false, "input_type": "SCM_REPOSITORY", "local_path": "/", "remote_path": "", "targets": [ { "type": "SSH", "id": "sftp_target_4", "host": "5.75.234.250", "port": "22", "auth": { "method": "SSH_KEY", "username": "sftp-pass-key-0", "password": "secure!Fa+KZiUPt454/V0I/rzVow==.NTxejOG4XOsR8a5u8PLhVw==", "passphrase": "secure!XbPhCUMzlLd4ZeiR5UlW2g==.ar6PHXL5fQL79BNOaTc3aw==", "key": "secure!QQ2jNn5URpsicPDdMYU5QQ==.rvMfWQ3R0OLqSc1t22//rg==" } } ], "pipeline": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/175688", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/175688", "id": 175688, "name": "Test Docs", "on": "EVENT", "definition_source": "LOCAL", "git_config_ref": "NONE", "events": [ { "type": "PUSH", "refs": [ "refs/heads/master" ] } ], "priority": "NORMAL", "disabled": false, "last_execution_status": "INITIAL", "always_from_scratch": false, "ignore_fail_on_project_status": false, "no_skip_to_most_recent": false, "terminate_stale_runs": false, "auto_clear_cache": false, "fetch_all_refs": false, "fail_on_prepare_env_warning": true, "concurrent_pipeline_runs": false, "do_not_create_commit_status": false, "stale": false, "waiting_for_push": false, "resources": "DEFAULT", "git_changeset_base": "LATEST_RUN", "filesystem_changeset_base": "DATE_MODIFIED", "cpu": "X86", "description_required": false }, "ignore_errors": false, "run_next": "WAIT_ON_SUCCESS" }
STATUS201 Created
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999
Example: SFTP pass key phrase
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" \
-d '{
"name": "Upload files to 5.75.234.250 by SFTP(Pass, Key & Phrase)",
"type": "TRANSFER",
"trigger_time": "ON_EVERY_EXECUTION",
"input_type": "SCM_REPOSITORY",
"local_path": "/",
"remote_path": "",
"targets": [
{
"id": "sftp_target_5",
"type": "SSH",
"host": "5.75.234.250",
"port": "22",
"auth": {
"method": "SSH_KEY",
"username": "sftp-pass-key-phrase-0",
"password": "$MyPassword",
"passphrase": "$MyPassphrase",
"key": "$MyKey"
}
}
]
}'
EXAMPLE RESPONSE{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/175688/actions/196738", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/175688/action/196738/edit", "id": 196738, "name": "Upload files to 5.75.234.250 by SFTP(Pass, Key & Phrase)", "type": "TRANSFER", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INITIAL", "disabled": false, "input_type": "SCM_REPOSITORY", "local_path": "/", "remote_path": "", "targets": [ { "type": "SSH", "id": "sftp_target_5", "host": "5.75.234.250", "port": "22", "auth": { "method": "SSH_KEY", "username": "sftp-pass-key-phrase-0", "password": "secure!Fa+KZiUPt454/V0I/rzVow==.NTxejOG4XOsR8a5u8PLhVw==", "passphrase": "secure!XbPhCUMzlLd4ZeiR5UlW2g==.ar6PHXL5fQL79BNOaTc3aw==", "key": "secure!QQ2jNn5URpsicPDdMYU5QQ==.rvMfWQ3R0OLqSc1t22//rg==" } } ], "pipeline": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/175688", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/175688", "id": 175688, "name": "Test Docs", "on": "EVENT", "definition_source": "LOCAL", "git_config_ref": "NONE", "events": [ { "type": "PUSH", "refs": [ "refs/heads/master" ] } ], "priority": "NORMAL", "disabled": false, "last_execution_status": "INITIAL", "always_from_scratch": false, "ignore_fail_on_project_status": false, "no_skip_to_most_recent": false, "terminate_stale_runs": false, "auto_clear_cache": false, "fetch_all_refs": false, "fail_on_prepare_env_warning": true, "concurrent_pipeline_runs": false, "do_not_create_commit_status": false, "stale": false, "waiting_for_push": false, "resources": "DEFAULT", "git_changeset_base": "LATEST_RUN", "filesystem_changeset_base": "DATE_MODIFIED", "cpu": "X86", "description_required": false }, "ignore_errors": false, "run_next": "WAIT_ON_SUCCESS" }
STATUS201 Created
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999