Shipeasy
APIOperations

Edit a trail's plan

A person edits the plan text, the release block (strategy, reason, the resources to create) or the breakdown (milestones and items). Pass at least one…

A person edits the plan text, the release block (strategy, reason, the resources to create) or the breakdown (milestones and items). Pass at least one field. Any edit puts the plan back to drafted, so it needs approving again; a trail with no plan yet gets one this way. Not available to the restricted ops key.

Use case

The plan names a flag the team already has under another key; fix the key before approving.

PATCH
/api/admin/trails/{handle}/plan

Authorization

bearerSdkKey
AuthorizationBearer <token>

Pass an admin SDK key as Authorization: Bearer sdk_admin_…. Mint via POST /api/admin/keys with type: "admin".

In: header

Path Parameters

handle*string

The trail's handle (T-12) or its id.

Match^(?:T-[0-9]+|[0-9a-fA-F-]{32,36})$
Length1 <= length <= 64

Header Parameters

X-Project-Id?string

Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://shipeasy.ai/api/admin/trails/string/plan" \  -H "Content-Type: application/json" \  -d '{    "release": {      "strategy": "flag_kill_switch",      "reason": "Customer-facing and hard to undo once emails go out",      "resources": [        {          "kind": "gate",          "key": "checkout.v2"        },        {          "kind": "killswitch",          "key": "checkout.v2.kill"        }      ]    }  }'
{
  "plan": {
    "status": "none",
    "plan": "string",
    "release": {
      "strategy": "straight_to_main",
      "reason": "string",
      "resources": [
        {
          "kind": "gate",
          "key": "string",
          "role": "ships_behind",
          "rollout": {
            "steps": [
              1,
              5,
              25,
              50,
              100
            ],
            "holdMinutes": 0,
            "minExposure": 0,
            "internal": {
              "holdMinutes": 0
            },
            "guards": {
              "alertRuleIds": [
                "string"
              ],
              "attributedErrors": true
            },
            "policies": {
              "onBreach": "pull_back",
              "breachTimeoutMinutes": 1,
              "advance": "auto",
              "afterFix": "resume"
            }
          }
        }
      ],
      "rollout": {
        "steps": [
          1,
          5,
          25,
          50,
          100
        ],
        "holdMinutes": 0,
        "minExposure": 0,
        "internal": {
          "holdMinutes": 0
        },
        "guards": {
          "alertRuleIds": [
            "string"
          ],
          "attributedErrors": true
        },
        "policies": {
          "onBreach": "pull_back",
          "breachTimeoutMinutes": 1,
          "advance": "auto",
          "afterFix": "resume"
        }
      },
      "flags": [
        {
          "key": "string",
          "bucketBy": "user",
          "internalFirst": true,
          "internalSkipReason": "string",
          "cleanup": "string"
        }
      ],
      "risks": [
        {
          "risk": "string",
          "class": "load",
          "impact": "low",
          "detect": "string",
          "rollback": "flag",
          "mitigation": "string"
        }
      ]
    },
    "breakdown": {
      "milestones": [
        {
          "name": "string",
          "targetDate": "2019-08-24"
        }
      ],
      "items": [
        {
          "title": "string",
          "type": "bug",
          "priority": "nice_to_have",
          "body": "string",
          "milestone": "string",
          "assignee": "string",
          "workKind": "code",
          "creates": [
            "string"
          ],
          "shipsDark": true
        }
      ]
    },
    "marketing": {
      "summary": "string",
      "channels": [
        {
          "channel": "blog",
          "title": "string",
          "timing": "string",
          "brief": "string"
        }
      ]
    },
    "sources": [
      {
        "kind": "memory",
        "ref": "string",
        "note": "string"
      }
    ],
    "revision": 0,
    "approvedBy": "string",
    "approvedAt": "string",
    "requirePlan": true,
    "nextRun": "plan",
    "openQuestions": 0,
    "checks": {
      "warnings": [
        "string"
      ],
      "facts": {
        "proxy": {
          "kind": "metric",
          "key": "string"
        },
        "tier": "none",
        "unitsPerDay": 0,
        "rollout": {
          "internal": {
            "holdMinutes": 0
          },
          "steps": [
            0
          ],
          "holdMinutes": 0,
          "minExposure": 0
        },
        "notes": [
          "string"
        ]
      },
      "checkedAt": "string"
    }
  }
}
{
  "error": "Malformed request (bad JSON, missing project scope).",
  "code": "BAD_REQUEST"
}
{
  "error": "Missing or invalid admin SDK key.",
  "code": "UNAUTHORIZED"
}

{
  "error": "Key is valid but not allowed to act on this project.",
  "code": "FORBIDDEN"
}

{
  "error": "The resource does not exist or is not visible to the caller.",
  "code": "NOT_FOUND"
}

{
  "error": "A resource with this name already exists in the project.",
  "code": "ALREADY_EXISTS"
}

{
  "error": "The request body failed structural (schema) validation.",
  "code": "VALIDATION"
}

Was this page helpful?