Upsert service
upsert_serviceCreate or update a service and its deployments via the local agent, specifying language for managed runtime and configuring pipeline options.
Instructions
Create or edit one service and its deployments through the local agent. Set service.language when using local managed runtime.type=language.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| service | Yes | Service config. Set service.language (go, node, python) as the service implementation language; it is required for local managed runtime.type=language deployments. For remote deployments, deployments[].host_ids must contain canonical non-self Host.id values returned by list_hosts, not host name/display name. | |
| pipeline | No | Project pipeline config. Key fields: `variables` are pipeline-wide defaults (strings). `environments` is a map of env name -> { variables } that OVERRIDE defaults per environment (precedence: project < pipeline < pipeline.pipeline < environments[env] < run vars); the same pipeline serves multiple environments by overriding only the differing variables. `sync_mode` declares how build artifacts reach targets: "transfer" (agent uploads the packaged artifact) or "remote_cmd" (the target host runs a command such as git pull to fetch code itself); empty defaults to transfer. `roles` maps a role/run-group name to a host list (run groups); a role entry uses {from_service} to derive hosts from a service's deployment for the running env, or {hosts:[...]} for an explicit set. Only plugins that need to target a specific group (e.g. nginx upstream) reference roles; most deploy steps follow the env deployment targets automatically. Any host_ids, roles hosts, or task host_id values must use canonical non-self Host.id values returned by list_hosts, not host names. | |
| root_path | No | ||
| project_id | No | ||
| project_name | No | ||
| approval_token | No | ||
| debug_session_id | No |