Skip to main content

Migrate every reference to a region slug

POST 

/api/v1/system/regions/migrate

Reassigns a region slug server-wide and across every organization: checks.regions is rewritten in one transaction, then each affected check's check_jobs are re-materialized under the new slug through the normal reconcile (so the unique (checkUid, region) pair, the phase stagger, the plan weight and the schedule are all recomputed).

This exists because renaming a worker region — an SP_NODE_REGION / SP_REGIONS change, with no check ever edited — leaves every job row under the old spelling, and a worker only claims a job whose region its own region matches by prefix. Those jobs become unclaimable by every worker, silently and forever. The migration is the recovery, and it is server-scope because org-scoped credentials cannot reach the jobs of the other tenants a rename breaks.

to must be a declared region (present in the regions system parameter) or served by a live worker — migrating to a slug nobody serves would only move the stranding. from deliberately need not be declared: cleaning up a slug that no longer exists is the point. A private (@…) region may only migrate to another private region, since its sealed configs are encrypted to the private region's agent keys and cannot be re-targeted server-side.

Idempotent: a second call with the same pair finds no references and returns zeros. Super-admin only.

Request​

Responses​

Migration report (identical shape for a dry run)