import requests
url = "https://platform.ankra.app/api/v1/org/object-storage-buckets"
payload = {
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"region": "<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({
credential_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
region: '<string>'
})
};
fetch('https://platform.ankra.app/api/v1/org/object-storage-buckets', 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/object-storage-buckets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"region": "<string>"
}
'{
"bucket": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"endpoint": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path_style": true,
"provider": "hetzner",
"region": "<string>",
"status": "provisioning",
"updated_at": "2023-11-07T05:31:56Z",
"error_excerpt": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Create an object storage bucket
Bearer PAT authentication; RBAC permission credentials.write. Creates a bucket on one of the organisation’s provider credentials (Hetzner, Scaleway, DigitalOcean or UpCloud). Answers 202 with the bucket in provisioning; the platform creates it and the bucket moves to ready or error. Hetzner needs an Object Storage key pair, passed here or already stored on the Hetzner credential; every other provider mints its keys from the credential and refuses a supplied pair.
import requests
url = "https://platform.ankra.app/api/v1/org/object-storage-buckets"
payload = {
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"region": "<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({
credential_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
region: '<string>'
})
};
fetch('https://platform.ankra.app/api/v1/org/object-storage-buckets', 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/object-storage-buckets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"region": "<string>"
}
'{
"bucket": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"endpoint": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path_style": true,
"provider": "hetzner",
"region": "<string>",
"status": "provisioning",
"updated_at": "2023-11-07T05:31:56Z",
"error_excerpt": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Body
One of the organisation's provider credentials; its provider decides where the bucket is created.
A lowercase label such as registry-storage, unique in the organisation.
The provider region, such as fsn1 (Hetzner), fr-par (Scaleway), fra1 (DigitalOcean) or europe-1 (UpCloud).
Hetzner only: the Object Storage access key, issued in the Hetzner Cloud Console. Omit it when the pair is stored on the Hetzner credential.
The provider-side bucket name. Derived from name when omitted.
Hetzner only: the secret half of the Object Storage key pair.
Response
Accepted: the bucket is being provisioned
An object storage bucket Ankra created on one of the organisation's provider credentials. Key material is never part of it.
The provider-side bucket name.
The provider credential the bucket was created with.
The S3 endpoint. Empty until provisioning knows it (an UpCloud endpoint exists only once its service does).
The Ankra-side name, unique in the organisation.
hetzner, scaleway, digitalocean, upcloud provisioning, ready, error Why provisioning or a teardown failed; present only in error.