import requests
url = "https://platform.ankra.app/api/v1/org/backup-vaults"
payload = {
"name": "<string>",
"endpoint": "<string>",
"bucket": "<string>",
"access_key_id": "<string>",
"secret_access_key": "<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({
name: '<string>',
endpoint: '<string>',
bucket: '<string>',
access_key_id: '<string>',
secret_access_key: '<string>'
})
};
fetch('https://platform.ankra.app/api/v1/org/backup-vaults', 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/backup-vaults \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"endpoint": "<string>",
"bucket": "<string>",
"access_key_id": "<string>",
"secret_access_key": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"kind": "<string>",
"provider": "<string>",
"endpoint": "<string>",
"region": "<string>",
"bucket": "<string>",
"path_style": true,
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"error_excerpt": "<string>",
"last_verified_at": "2023-11-07T05:31:56Z",
"provisioned_via_credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Create a backup vault
Registers a bring-your-own S3-compatible bucket as a backup vault. Requires backups.manage. The secret is stored server side and never returned; run verify to check the bucket.
import requests
url = "https://platform.ankra.app/api/v1/org/backup-vaults"
payload = {
"name": "<string>",
"endpoint": "<string>",
"bucket": "<string>",
"access_key_id": "<string>",
"secret_access_key": "<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({
name: '<string>',
endpoint: '<string>',
bucket: '<string>',
access_key_id: '<string>',
secret_access_key: '<string>'
})
};
fetch('https://platform.ankra.app/api/v1/org/backup-vaults', 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/backup-vaults \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"endpoint": "<string>",
"bucket": "<string>",
"access_key_id": "<string>",
"secret_access_key": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"kind": "<string>",
"provider": "<string>",
"endpoint": "<string>",
"region": "<string>",
"bucket": "<string>",
"path_style": true,
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"error_excerpt": "<string>",
"last_verified_at": "2023-11-07T05:31:56Z",
"provisioned_via_credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
A bring-your-own-bucket vault.
The S3 endpoint URL.
Absent places the vault in the caller's current project, null makes it organisation-wide, a UUID names a project of the organisation.
Address the bucket path-style rather than virtual-host style.
Response
The new vault.
An S3-compatible bucket restore points and imports are kept in. Credentials never leave the server.
customer_s3 for a bring-your-own bucket, ankra_provisioned for one Ankra created.
The vault's lifecycle state, such as provisioning, ready or error.
Why the last verification or provisioning failed.
The organisation credential an Ankra-provisioned vault was created with; absent on a bring-your-own bucket.