Transfer

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

Transfer action covers FTP, FTPS and SSH transfer activities.

Request

URL PARAMETERS
workspacerequired 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 name of the action
typerequired string
Defines the type of the action. Should be set to TRANSFER
targetsrequired string
Define a target (server) for your deployments using the following paramters
input_typestring
Defines whether the files are deployed from the repository or from the build filesystem. Can be one of SCM_REPOSITORY or BUILD_ARTIFACTS.
local_pathstring
The path in the repository.
remote_pathstring
The absolute or relative path on the remote server. If set, overrides the path set in target settings.
deployment_excludesstring[]
The paths and/or files that will be left out during the deployment for the TRANSFER type action.
deployment_includesstring[]
The exceptions from the ignore patterns set in deployment_excludes. For the TRANSFER type action.
use_temporary_filesboolean
The files will be uploaded with a 'tmp' suffix that will be removed once the upload has finished. Only for SSH type transfer.

Last modified on Mar 19, 2025

Example: FTP

curl -X POST "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
  "name": "Upload files to 192.0.2.1 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": "192.0.2.1",
      "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 192.0.2.1 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": "192.0.2.1", "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" }
STATUS
201 Created
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999

Example: Transfer SFTP (password)

curl -X POST "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
  "name": "Upload files to 192.0.2.1 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": "192.0.2.1",
      "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 192.0.2.1 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": "192.0.2.1", "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" }
STATUS
201 Created
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999

Example: Transfer SFTP (key)

curl -X POST "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
  "name": "Upload files to 192.0.2.1 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": "192.0.2.1",
      "port": "22",
      "auth": {
        "method": "ASSETS_KEY",
        "username": "api_tests_user",
        "asset": "id_project"
      }
    }
  ]
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/196734/actions/1609587", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/196734/action/1609587/edit", "id": 1609587, "name": "Upload files to 192.0.2.1 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": "192.0.2.1", "port": "22", "auth": { "method": "ASSETS_KEY", "username": "api_tests_user", "asset": "id_project" } } ], "pipeline": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/196734", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/196734", "id": 196734, "name": "pip6", "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": "X64", "description_required": false }, "ignore_errors": false, "run_next": "WAIT_ON_SUCCESS" }
STATUS
201 Created
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999

Example: Transfer SFTP (password and key)

curl -X POST "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
  "name": "Upload files to 192.0.2.1 by SFTP(Password & Key)",
  "type": "TRANSFER",
  "trigger_time": "ON_EVERY_EXECUTION",
  "input_type": "SCM_REPOSITORY",
  "local_path": "/",
  "remote_path": "",
  "targets": [
    {
      "id": "sftp_target_4",
      "type": "SSH",
      "host": "192.0.2.1",
      "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 192.0.2.1 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": "192.0.2.1", "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" }
STATUS
201 Created
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999

Example: Transfer SFTP (password key passphrase)

curl -X POST "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
  "name": "Upload files to 192.0.2.1 by SFTP(Password, 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": "192.0.2.1",
      "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 192.0.2.1 by SFTP(Pass, Key & Passphrase)", "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": "192.0.2.1", "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" }
STATUS
201 Created
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999

Example: Transfer SFTP with Integration

curl -X POST "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
  "name": "Upload files to 192.0.2.1 by SFTP with Integration",
  "type": "TRANSFER",
  "trigger_time": "ON_EVERY_EXECUTION",
  "input_type": "SCM_REPOSITORY",
  "local_path": "/",
  "remote_path": "",
  "targets": [
    {
      "id": "do_server",
      "type": "DIGITAL_OCEAN",
      "host": "buddy-tests",
      "port": "6464",
      "path": "Home/www",
      "auth": {
        "method": "PASSWORD",
        "username": "sftp-pass-key-phrase-0",
        "password": "$MyPassword"
      },
      "integration": "digitalocean"
    }
  ]
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/525739/actions/1610061", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/525739/action/1610061/edit", "id": 1610061, "name": "Upload files to 192.0.2.1 by SFTP with Integration", "type": "TRANSFER", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INITIAL", "disabled": false, "input_type": "SCM_REPOSITORY", "local_path": "/", "remote_path": "", "targets": [ { "type": "DIGITAL_OCEAN", "id": "do_server", "host": "buddy-tests", "port": "6464", "path": "Home/www", "auth": { "method": "PASSWORD", "username": "sftp-pass-key-phrase-0", "password": "secure!mVDZtTa4G2jzOcxn6u5Ifg==.37LzUFR4h/6jFECXuElXzw==" }, "integration": "digitalocean" } ], "pipeline": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/525739", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/525739", "id": 525739, "name": "pip6", "definition_source": "LOCAL", "git_config_ref": "FIXED", "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_config": { "path": ".buddy/pip6.fixed.yml", "branch": "master", "project": "company-website" }, "git_changeset_base": "LATEST_RUN", "filesystem_changeset_base": "DATE_MODIFIED", "cpu": "X64", "description_required": false }, "ignore_errors": false, "run_next": "WAIT_ON_SUCCESS" }
STATUS
200 OK
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999

Example: Proxy

curl -X POST "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
  "name": "Upload files to 192.0.2.1 by SFTP Proxy",
  "type": "TRANSFER",
  "trigger_time": "ON_EVERY_EXECUTION",
  "input_type": "SCM_REPOSITORY",
  "local_path": "/",
  "remote_path": "",
  "targets": [
    {
      "id": "sftp_target_3",
      "type": "SSH",
      "host": "192.0.2.1",
      "port": "22",
      "auth": {
        "method": "PASSWORD",
        "username": "sftp-pass-0",
        "password": "$MyPassword"
      },
      "proxy": {
        "host": "proxy.myserver.com",
        "port": "80",
        "auth": {
          "method": "PASSWORD",
          "username": "api_tests_user_proxy",
          "password": "$MyPassword"
        }
      }
    }
  ]
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/525739/actions/1610130", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/525739/action/1610130/edit", "id": 1610130, "name": "Upload files to 192.0.2.1 by SFTP Proxy", "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": "192.0.2.1", "port": "22", "auth": { "method": "PASSWORD", "username": "sftp-pass-0", "password": "secure!mVDZtTa4G2jzOcxn6u5Ifg==.37LzUFR4h/6jFECXuElXzw==" }, "proxy": { "host": "proxy.myserver.com", "port": "80", "auth": { "method": "PASSWORD", "username": "api_tests_user_proxy", "password": "secure!mVDZtTa4G2jzOcxn6u5Ifg==.37LzUFR4h/6jFECXuElXzw==" } } } ], "pipeline": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/525739", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/525739", "id": 525739, "name": "pip6", "definition_source": "LOCAL", "git_config_ref": "FIXED", "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_config": { "path": ".buddy/pip6.fixed.yml", "branch": "master", "project": "company-website" }, "git_changeset_base": "LATEST_RUN", "filesystem_changeset_base": "DATE_MODIFIED", "cpu": "X64", "description_required": false }, "ignore_errors": false, "run_next": "WAIT_ON_SUCCESS" }
STATUS
200 OK
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999