Edit

  • PATCH
  • /workspaces
  • /:workspace
  • /targets
  • /:target_id

Edits a target in the project.

Request

REQUIRED SCOPES
TARGET_MANAGE
URL PARAMETERS
workspacerequiredstring
The workspace name.
target_idrequiredstring
ID of the desired target.
POST PARAMETERS
namerequiredstring
The name of the target
identifierrequiredstring
Readable ID for target. It can consist of uppercase and lowercase letters, numbers, and underscores. It must start with a letter.
typerequiredString
The type of the target. Possible values: FTP, SSH, MATCH, UPCLOUD, VULTR, DIGITAL_OCEAN, GIT, EC2.
hostrequiredstring
The host for the connection.
authrequiredauth
Authentication details.
repositorystring
The URL to the Git repository. Required when target type is GIT.
permissionsPipelinePermissions
Define to set permissions for the pipeline.
portstring
Port for the connection.
pathstring
Path on the server defined in the target.
integrationstring
Required when type is UPCLOUD, VULTR, DIGITAL_OCEAN and EC2. Identifier of the integration.
secureboolean
Determines whether the transfer is FTP or FTPS. A value of true will set it to FTPS, while false will set it to FTP.
disabledboolean
When set to true the target is disabled. By default it is set to false.
tagsstring[]
A list of tags associated with the target.
regionstring
Defines the source region of EC2 addresses. Required for EC2 target. (Avaible only for EC2 target).
proxystring
Define a SSH proxy server using the following parameters (available only for SSH targets).

Last modified on Jan 19, 2026

Request example

curl -X PATCH "https://api.buddy.works/workspaces/:workspace/targets/:target_id" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "identifier": "stage_env_update", "name": "Staging environment (updated)", "type": "SSH", "tags": [ "tag1", "staging", "updated" ], "host": "192.168.0.100", "port": "22", "path": "/var/www/stage-updated", "auth": { "method": "PASSWORD", "username": "deploy_user", "password": "!encrypted NEW.ENCRYPTED.PASSWORD==" } }'

Response

EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/targets/tg-fmkiyro8d4jx0", "html_url": "https://app.buddy.works/buddy/targets/tg-fmkiyro8d4jx0/edit", "id": "tg-fmkiyro8d4jx0", "identifier": "stage_env_update", "permissions": { "others": "USE_ONLY", "users": [ { "id": 5, "access_level": "MANAGE" } ] }, "tags": [ "tag1", "updated", "staging" ], "name": "Staging environment (updated)", "host": "192.168.0.100", "port": "22", "path": "/var/www/stage-updated", "auth": { "method": "PASSWORD", "username": "deploy_user", "password": "!encrypted vCsBk3tQyN2Ozlo3qXuVlKQtXKzUDvfDDmpHsgHOH+qyBL4UiW7XJ0ei6G/E0eWp.kkaTDpohjXgiikj6LmF1dw==" }, "type": "SSH" }
STATUS
201 Created