Rollout Service

Cancel a rollout

POST
/projects/{projectId}/endpoints/{endpointId}/rollouts/{id}/cancel

Cancels a running, pausing, paused, system-paused, or stabilizing rollout by freezing the current traffic split into standing weights. Revert is removed and rejected; after canceling, start another canary rollout in either direction or rebalance the traffic split. The response is the accepted rollout snapshot; poll GetRollout until it reaches CANCELED.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Project identifier.

endpointId*string

Endpoint identifier.

id*string

Rollout identifier.

Request Body

application/json

Reason, disposition, and optional concurrency check for canceling a rollout.

reason*string

Required human-readable reason recorded in the rollout audit trail.

etag?string

Optional etag for optimistic concurrency.

disposition?string

Optional cancel behavior. Absent defaults to freeze, which preserves the current traffic split. Revert is removed and rejected with FAILED_PRECONDITION; cancel with freeze, then run a reverse rollout back to the source.

Value in

  • "CANCEL_DISPOSITION_FREEZE"
  • "CANCEL_DISPOSITION_REVERT"

Response Body

application/json

application/json

curl -X POST "https://example.com/projects/string/endpoints/string/rollouts/string/cancel" \  -H "Content-Type: application/json" \  -d '{    "reason": "string"  }'
{  "id": "string",  "endpointId": "string",  "sourceDeploymentId": "string",  "targetDeploymentId": "string",  "strategy": "ROLLOUT_STRATEGY_TYPE_ROLLING",  "state": "ROLLOUT_STATE_RUNNING",  "currentStep": 0,  "currentTrafficPercent": 0,  "createdAt": "2019-08-24T14:15:22Z",  "startedAt": "2019-08-24T14:15:22Z",  "completedAt": "2019-08-24T14:15:22Z",  "etag": "string",  "status": {    "totalSteps": 0,    "condition": {      "category": "ROLLOUT_FAILURE_CATEGORY_METRIC_REGRESSION",      "message": "string",      "atStep": 0,      "observedAt": "2019-08-24T14:15:22Z",      "metrics": [        {          "name": "string",          "stat": "METRIC_STAT_TYPE_AVG",          "percentile": 0,          "check": "METRIC_CHECK_TYPE_THRESHOLD",          "sourceValue": 0,          "targetValue": 0,          "threshold": 0,          "operator": "THRESHOLD_OPERATOR_GT",          "maxRegressionPercent": 0,          "direction": "REGRESSION_DIRECTION_HIGHER_IS_WORSE",          "verdict": "METRIC_VERDICT_PASS",          "failureReason": "string"        }      ],      "type": "CapacityLimited"    },    "steps": [      {        "stepIndex": 0,        "targetTrafficPercent": 0,        "state": "ROLLOUT_STEP_STATE_PENDING",        "metrics": [          {            "name": "string",            "stat": "METRIC_STAT_TYPE_AVG",            "percentile": 0,            "check": "METRIC_CHECK_TYPE_THRESHOLD",            "sourceValue": 0,            "targetValue": 0,            "threshold": 0,            "operator": "THRESHOLD_OPERATOR_GT",            "maxRegressionPercent": 0,            "direction": "REGRESSION_DIRECTION_HIGHER_IS_WORSE",            "verdict": "METRIC_VERDICT_PASS",            "failureReason": "string"          }        ],        "startedAt": "2019-08-24T14:15:22Z",        "completedAt": "2019-08-24T14:15:22Z",        "failureReason": "string"      }    ],    "updatedAt": "2019-08-24T14:15:22Z",    "conditions": [      {        "category": "ROLLOUT_FAILURE_CATEGORY_METRIC_REGRESSION",        "message": "string",        "atStep": 0,        "observedAt": "2019-08-24T14:15:22Z",        "metrics": [          {            "name": "string",            "stat": "METRIC_STAT_TYPE_AVG",            "percentile": 0,            "check": "METRIC_CHECK_TYPE_THRESHOLD",            "sourceValue": 0,            "targetValue": 0,            "threshold": 0,            "operator": "THRESHOLD_OPERATOR_GT",            "maxRegressionPercent": 0,            "direction": "REGRESSION_DIRECTION_HIGHER_IS_WORSE",            "verdict": "METRIC_VERDICT_PASS",            "failureReason": "string"          }        ],        "type": "CapacityLimited"      }    ]  },  "pauseInfo": {    "reason": "string",    "pausedAt": "2019-08-24T14:15:22Z"  }}