GCloud CLI

  • POST
  • /workspaces
  • /:workspace
  • /projects
  • /:project_name
  • /pipelines
  • /:pipeline_id
  • /actions

Request

URL PARAMETERS
workspacerequired string
The workspace name.
pipeline_idrequired integer
The numerical ID of the desired pipeline.
project_namerequired string
The name ID of the project.
POST PARAMETERS
namerequired string
The name of the action.
typerequired string
The type of the action. Should be set to GOOGLE_CLOUD_CLI.
execute_commandsrequired string[]
The array of commands invoked on the remote server.
integrationrequired Integration
The integration.
application_namestring
The name of the Google application.
versionstring
The version of Google Cloud CLI to use. Defaults to latest.
shellstring
The name of the shell that will be used to execute commands. Can be one of SH (default) or BASH.
setup_commandsstring[]
The command that will be executed only on the first run.

Last modified on May 20, 2025

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: gcloud version",
  "type": "GOOGLE_CLOUD_CLI",
  "trigger_time": "ON_EVERY_EXECUTION",
  "setup_commands": [
    "apt-get update && apt-get -y install git"
  ],
  "execute_commands": [
    "gcloud version"
  ],
  "shell": "SH",
  "version": "521.0.0",
  "application_name": "boxwood-builder-150909",
  "integration": {
    "hash_id": "5ddb7c180fb38be67bd78a88a"
  }
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/1/actions/1", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/1/action/1/edit", "id": 1, "name": "Execute commands on Google", "type": "GOOGLE_CLOUD_CLI", "trigger_time": "ON_EVERY_EXECUTION", "last_execution_status": "INITIAL", "disabled": false, "application_name": "boxwood-builder-150909", "version": "521.0.0", "integration": { "identifier": "5ddb7c180fb38be67bd78a88a" }, "execute_commands": [ "gcloud version" ], "setup_commands": [ "apt-get update && apt-get -y install git" ], "pipeline": { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/1", "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/1", "id": 1, "name": "test server", "definition_source": "LOCAL", "git_config_ref": "NONE", "refs": [ "refs/heads/master" ], "events": [ { "type": "PUSH", "refs": [] } ], "priority": "NORMAL", "disabled": false, "last_execution_status": "INITIAL", "always_from_scratch": false, "ignore_fail_on_project_status": false, "no_skip_to_most_recent": false, "terminate_stale_runs": false, "auto_clear_cache": false, "fetch_all_refs": false, "fail_on_prepare_env_warning": true, "concurrent_pipeline_runs": false, "do_not_create_commit_status": false, "stale": false, "waiting_for_push": false, "resources": "DEFAULT", "git_changeset_base": "LATEST_RUN", "filesystem_changeset_base": "DATE_MODIFIED", "cpu": "X64", "description_required": false }, "ignore_errors": false, "shell": "BASH", "run_next": "WAIT_ON_SUCCESS" }
STATUS
201 Created
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999