Edit

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

Edits a target in the project.

Request

REQUIRED SCOPES
WORKSPACE, TARGET_MANAGE
URL PARAMETERS
workspacerequired string
The workspace name.
target_idrequired string
ID of the desired target.
POST PARAMETERS
namerequired string
The name of the target
identifierrequired string
Readable ID for target. It can consist of uppercase and lowercase letters, numbers, and underscores. It must start with a letter. If not provided, the same one will be set as the generated hash_id.
typerequired String
The type of the target. Possible values: FTP, SSH, MATCH, UPCLOUD, VULTR, DIGITAL_OCEAN, GIT.
hostrequired string
The host for the connection.
authrequired auth
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, and DIGITAL_OCEAN. 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.
proxystring
Define a SSH proxy server using the following parameters (available only for SSH targets).

Last modified on May 27, 2025

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=="
  }
}'
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
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999