Guest Machines
API referencePipelines

Update a pipeline

PATCH/api/v1/pipelines/{pipeline_id}

Update selected fields of a saved pipeline. Omitted fields are unchanged. The effective complete step graph is re-authorized on every update, including an update that changes only metadata.

Required access

Credentials: service principal, delegated token, user session

Scope: pipelines:edit

A delegated token may update only a pipeline owned by its user. A service principal may update an organization-shared pipeline when its scope and optional resource allowlist cover it. The caller also needs agents:invoke or teams:invoke for every effective step and fallback target, as applicable.

Authorization

AuthorizationBearer <token>

An organization-owned automation key, prefixed gsmc_sk_. Already bound to one organization, so it needs no X-Org-Id header. It carries no user identity: it never reaches a private resource however it is scoped, and a run it starts has no user for an interactive tool to reach.

In: header

Path Parameters

pipeline_id*Pipeline Id
Formatuuid

Header Parameters

X-Org-Id?|

Selects the active organization for a credential that belongs to more than one. Service-principal keys are bound to a single organization and ignore it.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for updating a pipeline.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v1/pipelines/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Authorization: Bearer $GUEST_MACHINES_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "description": "Audit, verify, then summarize the release decision.",    "resource_limits": {      "max_physical_tool_attempts": 50    }  }'
{  "pipeline": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",    "owner_user_id": "65139110-7c3c-4777-b692-80c218be3b9d",    "visibility": "org_shared",    "name": "string",    "description": "string",    "steps": [      {        "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",        "team_id": "810007d0-bec5-486c-b5d1-28fcd8a079ba",        "name": "string",        "on_error": {          "strategy": "bubble",          "max_attempts": 3,          "backoff": "exponential",          "backoff_delay_seconds": 1,          "fallback_agent_id": "ea74c5a8-d285-4937-959b-1e318178db0b",          "transform_template": "string"        },        "input_mapping": {          "property1": "string",          "property2": "string"        },        "output_mapping": {          "property1": "string",          "property2": "string"        },        "artifact_input_mapping": [          {            "source": {              "kind": "pipeline_input",              "input_alias": "string",              "source_step_index": 0,              "selector": {                "file_name": "string",                "primary": true              }            },            "target_alias": "string",            "required": true          }        ],        "skip_if": "string"      }    ],    "on_error": {      "strategy": "bubble",      "max_attempts": 3,      "backoff": "exponential",      "backoff_delay_seconds": 1,      "fallback_agent_id": "ea74c5a8-d285-4937-959b-1e318178db0b",      "transform_template": "string"    },    "loop_config": {      "enabled": false,      "max_iterations": 10,      "continue_while": "string",      "until": "string",      "loop_back_to_step": 0    },    "resource_limits": {      "max_total_tokens": 0,      "max_tokens_per_step": 0,      "max_total_cost_usd": 0,      "max_duration_seconds": 300,      "max_duration_per_step_seconds": 0,      "max_physical_tool_attempts": 1    },    "is_active": true,    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  }}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}