import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/launch-plan/data-migration/runs/{run_id}/rollback"
headers = {"cookie": "ankra_session="}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/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://api.platform.ankra.app/org/applications/{application_id}/launch-plan/data-migration/runs/{run_id}/rollback \
--cookie ankra_session={
"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 (browser session)
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, and refused to a caller confined to a project when the rollback puts back the shared environment secrets of an application that deploys outside it: the restore is judged under the confinement of whoever asks for it. 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://api.platform.ankra.app/org/applications/{application_id}/launch-plan/data-migration/runs/{run_id}/rollback"
headers = {"cookie": "ankra_session="}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/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://api.platform.ankra.app/org/applications/{application_id}/launch-plan/data-migration/runs/{run_id}/rollback \
--cookie ankra_session={
"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
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.