import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/launch-plan/data-migration/runs/{run_id}/rollback"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/launch-plan/data-migration/runs/{run_id}/rollback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/launch-plan/data-migration/runs/{run_id}/rollback \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"application_id": "<string>",
"approval_id": "<string>",
"cluster_id": "<string>",
"commit_sha": "<string>",
"status": "running",
"plan": {},
"run": {},
"targets": {},
"environment_names": [
"<string>"
],
"rollback_requested_at": "2023-11-07T05:31:56Z",
"rollback_closes_at": "2023-11-07T05:31:56Z",
"started_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Roll back a data migration
Asks a data migration to roll back: the pre-cutover environment goes back and every vendor source is made writable again. The request is recorded and the next pass applies it. Refused before the cutover has started, once the rollback window has closed, for a finished run, and while a rollback is requested or running. Nothing at a vendor is deleted. Requires applications.write at the route and applications.deploy on the run’s cluster. Audited.
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/launch-plan/data-migration/runs/{run_id}/rollback"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/launch-plan/data-migration/runs/{run_id}/rollback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/launch-plan/data-migration/runs/{run_id}/rollback \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"application_id": "<string>",
"approval_id": "<string>",
"cluster_id": "<string>",
"commit_sha": "<string>",
"status": "running",
"plan": {},
"run": {},
"targets": {},
"environment_names": [
"<string>"
],
"rollback_requested_at": "2023-11-07T05:31:56Z",
"rollback_closes_at": "2023-11-07T05:31:56Z",
"started_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
The run with the rollback requested
One data-migration run of a Launch Plan (schema ankra.data-migration/v1, enginekit/datamigration). It carries the names of the staged environment values, never a value.
running, cut-over, completed, failed, rolling-back, rolled-back, rollback-failed The data-migration plan the approval covered: migrations, steps, environment changes, rollback steps, teardown checklist, actions and findings.
The state machine's run: every step and rollback step with its status, timestamps, detail and verification, the cutover time, and the failed step and reason.
Show child attributes
Show child attributes
When the rollback window closes; null before the cutover.