Back up an application deployment now
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/deployments/{deployment_id}/restore-points"
payload = {
"vault_id": "<string>",
"selection": {
"databases": True,
"persistent_volume_claims": ["<string>"],
"confirm_exclude_databases": True
},
"note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
vault_id: '<string>',
selection: {
databases: true,
persistent_volume_claims: ['<string>'],
confirm_exclude_databases: true
},
note: '<string>'
})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/deployments/{deployment_id}/restore-points', 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}/deployments/{deployment_id}/restore-points \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"vault_id": "<string>",
"selection": {
"databases": true,
"persistent_volume_claims": [
"<string>"
],
"confirm_exclude_databases": true
},
"note": "<string>"
}
'{
"restore_point_id": "<string>",
"run_id": "<string>",
"restore_point": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"backup_vault_id": "<string>",
"scope_kind": "<string>",
"stack_names": [
"<string>"
],
"trigger": "<string>",
"status": "<string>",
"total_bytes": 123,
"total_bytes_known": true,
"verification_status": "unverified",
"created_at": "2023-11-07T05:31:56Z",
"asset_count": 123,
"delete_guards_version": 2,
"verified_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"assets": [
{
"id": "<string>",
"kind": "<string>",
"name": "<string>",
"size_bytes": 123,
"size_bytes_known": true,
"artifacts": [
{
"kind": "<string>",
"format": "<string>",
"size_bytes": 123,
"sha256": "<string>",
"database": "<string>"
}
]
}
],
"manifest": {},
"run": {}
},
"warnings": [
"<string>"
]
}Backups
Back up an application deployment now
Takes a restore point of the stack behind one application deployment now and answers 202 with the restore point and the run to watch. Needs backups.operate. A deployment with no stack answers 409.
POST
/
api
/
v1
/
org
/
applications
/
{application_id}
/
deployments
/
{deployment_id}
/
restore-points
Back up an application deployment now
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/deployments/{deployment_id}/restore-points"
payload = {
"vault_id": "<string>",
"selection": {
"databases": True,
"persistent_volume_claims": ["<string>"],
"confirm_exclude_databases": True
},
"note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
vault_id: '<string>',
selection: {
databases: true,
persistent_volume_claims: ['<string>'],
confirm_exclude_databases: true
},
note: '<string>'
})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/deployments/{deployment_id}/restore-points', 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}/deployments/{deployment_id}/restore-points \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"vault_id": "<string>",
"selection": {
"databases": true,
"persistent_volume_claims": [
"<string>"
],
"confirm_exclude_databases": true
},
"note": "<string>"
}
'{
"restore_point_id": "<string>",
"run_id": "<string>",
"restore_point": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"backup_vault_id": "<string>",
"scope_kind": "<string>",
"stack_names": [
"<string>"
],
"trigger": "<string>",
"status": "<string>",
"total_bytes": 123,
"total_bytes_known": true,
"verification_status": "unverified",
"created_at": "2023-11-07T05:31:56Z",
"asset_count": 123,
"delete_guards_version": 2,
"verified_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"assets": [
{
"id": "<string>",
"kind": "<string>",
"name": "<string>",
"size_bytes": 123,
"size_bytes_known": true,
"artifacts": [
{
"kind": "<string>",
"format": "<string>",
"size_bytes": 123,
"sha256": "<string>",
"database": "<string>"
}
]
}
],
"manifest": {},
"run": {}
},
"warnings": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The application's id.
The application deployment.
Body
application/json
Response
The restore point was started.
The 202 a "back up now" answers with: what now exists, and what to watch.