Execute Migration
POST
/api/v1/migrations/execute
Accept an approval token and start migration execution on production.
Returns a request_id immediately. The migration runs in the background. Poll GET /migrations/requests/{request_id} for status and results.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” ExecuteRequest
object
approval_token
required
Approval Token
HMAC-signed approval token from the /analyze endpoint. Encodes the SQL, connection ID, and a single-use nonce. Expires after 1 hour.
string
sql
required
Sql
Exact SQL migration text that was analyzed. Must match the SQL encoded in the approval token byte-for-byte.
string
connection_id
required
Connection Id
ID of the database connection to execute the migration against. Must match the connection encoded in the approval token.
string format: uuid
Responses
Section titled “ Responses ”Successful Response
ExecuteAcceptedResponse
Response for POST /execute.
object
success
required
Success
Whether the request succeeded.
boolean
error
Any of:
ErrorDetail
null
Validation Error
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context