Mongosh CLI
- PATCH
- /workspaces
- /:workspace
- /projects
- /:project_name
- /pipelines
- /:pipeline_id
- /actions
- /:action_id
Update Mongosh 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 MongoDB queries",
"type": "MONGOSH_CLI",
"trigger_time": "ON_EVERY_EXECUTION",
"version": "8.0",
"shell": "BASH",
"execute_commands": [
"mongosh --quiet \"$MONGOSH_URI\" --eval 'db.stats()'",
"mongosh --quiet \"$MONGOSH_URI\" script.js"
],
"targets": [
{
"identifier": "my_mongo",
"type": "MONGO",
"scope": "ACTION",
"host": "mongo.example.com",
"database": "myapp",
"auth_source": "admin",
"auth": {
"method": "PASSWORD",
"username": "user",
"password": "pass"
}
}
]
}'STATUS200 OK