Edit

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

Edits a Kubernetes cluster target in the project.

Request

REQUIRED SCOPES
TARGET_ADD
URL PARAMETERS
workspacerequiredstring
The workspace name.
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.
integrationrequiredstring
Identifier of the integration.
clusterrequiredstring
Address of the cluster.
authrequiredstring
Kubernetes cluster authentication method.
projectstring
Set this if you want to add the target to a project. Must contain field name (string).
pipelineinteger
Set this if you want to add the target to a pipeline. Must contain field id (integer).
environmentstring
Set this if you want to add the target to an environment. Must contain field id (string).
permissionsPipelinePermissions
Define to set permissions for the target.
pathstring
Path on the server defined in the target.
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.

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 '{ "id": "tg-ypfw2tpfm5i4p", "identifier": "k8s_cluster_workspace", "tags": [], "name": "K8S_CLUSTER WORKSPACE", "cluster": "https://192.168.12.123:6464", "auth": { "method": "TOKEN", "token": "!encrypted 9834+V/D7lXE/OhoVor4rd4R+VRBxaG33ZZ9ciZLs3z/12s6WETH27xoi/mWcl5E.aW1crlXL9VMXb8mJjT6YKA==" }, "type": "K8S_CLUSTER" }'

Response

EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/targets/tg-aqtucqx1agenv", "html_url": "https://app.buddy.works/buddy/-/targets/tg-aqtucqx1agenv/edit", "id": "tg-aqtucqx1agenv", "identifier": "k8s_cluster_workspace", "permissions": { "others": "USE_ONLY", "users": [ { "id": 1, "access_level": "MANAGE" } ] }, "name": "K8S_CLUSTER WORKSPACE", "cluster": "https://192.168.12.123:6464", "auth": { "method": "TOKEN", "token": "!encrypted 9834+V/D7lXE/OhoVor4rd4R+VRBxaG33ZZ9ciZLs3z/12s6WETH27xoi/mWcl5E.aW1crlXL9VMXb8mJjT6YKA==" }, "type": "K8S_CLUSTER" }