Edit
- PATCH
- /workspaces
- /:workspace
- /targets
- /:target_id
Edits a target in the project.
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" }
STATUS201 Created
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999