PostgreSQL CLI
- PATCH
- /workspaces
- /:workspace
- /projects
- /:project_name
- /pipelines
- /:pipeline_id
- /actions
- /:action_id
Update PostgreSQL CLI action configuration
Warning
You can't change the type of an existing action. To change the type, remove the action and add it again.
Request example
curl -X PATCH "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions/:action_id" \
-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