MySQL CLI
- POST
- /workspaces
- /:workspace
- /projects
- /:project_name
- /pipelines
- /:pipeline_id
- /actions
Creates a new MySQL CLI 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": "Run MySQL queries",
"type": "MYSQL_CLI",
"trigger_time": "ON_EVERY_EXECUTION",
"version": "8.0",
"shell": "BASH",
"execute_commands": [
"mysql -e 'SHOW DATABASES'",
"mysql < migrate.sql"
],
"targets": [
{
"identifier": "my_database",
"name": "My MySQL Database",
"type": "MYSQL",
"scope": "ACTION",
"host": "db.example.com",
"port": 3306,
"database": "myapp",
"auth": {
"method": "PASSWORD",
"username": "deploy_user",
"password": "secured"
}
}
]
}'STATUS200 OK