Allow Pipeline
- POST
- /workspaces
- /:workspace
- /targets
- /:target_id
- /allow-pipeline
Adds a specific pipeline to the target's allowed pipelines list. This grants the pipeline permission to use the target for deployments.
Usage notes
- The target must have
all_pipelines_allowedset tofalsefor this endpoint to be relevant - Requires
TARGET_MANAGEscope - If the pipeline is already in the allowed list, the operation has no effect
- This endpoint modifies the
allowed_pipelinesarray for the target
Error responses
Pipeline not allowed (validation during execution)
When a pipeline tries to use a target but is not in the allowed list:
2678004=Pipeline is not allowed to use target [BE2810035]
Access denied
When a user with DENIED permission level tries to modify target permissions:
881=Access denied
Request example
curl -X POST "https://api.buddy.works/workspaces/:workspace/targets/:target_id/allow-pipeline" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"project": "my-project",
"pipeline": "deploy-pipeline"
}'Response
EXAMPLE RESPONSE{ "url": "https://api.buddy.works/workspaces/buddy/targets/tg-nd2oxobzr7p2r", "html_url": "https://app.buddy.works/buddy/targets/tg-nd2oxobzr7p2r/edit", "id": "tg-nd2oxobzr7p2r", "identifier": "stage_env", "permissions": { "others": "USE_ONLY", "users": [ { "id": 5, "access_level": "MANAGE" } ] }, "tags": [ "tag1", "staging" ], "name": "Staging environment", "host": "192.168.0.100", "port": "22", "path": "/var/www/stage", "auth": { "method": "PASSWORD", "username": "deploy_user", "password": "!encrypted 3PA3jdHEb0WutNZNaGFXvWMSh0oAD0CxLkUzSq0cKCxPYPxtmIL3dQlFMAjvbcvL.hLyKo3tOxlgpSTieglJTJw==" }, "type": "SSH", "all_pipelines_allowed": false, "allowed_pipelines": [ { "url": "https://api.buddy.works/workspaces/buddy/projects/my-project/pipelines/1", "html_url": "https://app.buddy.works/buddy/my-project/pipelines/pipeline/1", "id": 1, "name": "deploy-pipeline" } ] }
STATUS200 OK