PostgreSQL CLI
- POST
- /workspaces
- /:workspace
- /projects
- /:project_name
- /pipelines
- /:pipeline_id
- /actions
Creates a new PostgreSQL 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 PostgreSQL queries",
"type": "POSTGRESQL_CLI",
"trigger_time": "ON_EVERY_EXECUTION",
"version": "16",
"shell": "BASH",
"execute_commands": [
"psql -c '\\l'",
"psql -f migrate.sql"
],
"targets": [
{
"identifier": "my_database",
"name": "My PostgreSQL Database",
"type": "POSTGRESQL",
"scope": "ACTION",
"host": "pg.example.com",
"port": 5432,
"database": "myapp",
"auth": {
"method": "PASSWORD",
"username": "deploy_user",
"password": "secured"
}
}
]
}'STATUS200 OK