SSH Command
- POST
- /workspaces
- /:workspace
- /projects
- /:project_name
- /pipelines
- /:pipeline_id
- /actions
Creates a new SSH Command action in the pipeline
Request example
curl -X POST "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "Execute commands on 192.0.2.1",
"type": "SSH_COMMAND",
"trigger_time": "ON_EVERY_EXECUTION",
"working_directory": "tests/SSH_Tests/",
"commands": [
"date >> tmp.log"
],
"targets": [
{
"type": "SSH",
"identifier": "vlatncuatc",
"host": "192.0.2.1",
"port": "22",
"auth": {
"method": "PASSWORD",
"username": "buddy",
"password": "$MyPassword"
}
}
],
"run_as_script": true,
"shell": "BASH",
"execute_every_command": false
}'STATUS200 OK