import requests
url = "https://platform.ankra.app/api/v1/org/registry-storage/addon"
payload = { "blocks": 1 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({blocks: 1})
};
fetch('https://platform.ankra.app/api/v1/org/registry-storage/addon', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/registry-storage/addon \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"blocks": 1
}'{
"addon": {
"available": true,
"unavailable_reason": "<string>",
"block_gib": 123,
"price_cents_per_block_month": 123,
"currency": "<string>",
"max_blocks": 123,
"blocks": 123,
"base_limit_bytes": 123,
"effective_limit_bytes": 123,
"monthly_cents": 123,
"scheduled_price_cents_per_block_month": 123,
"scheduled_price_from": "2023-11-07T05:31:56Z",
"billing_ready": true,
"billing_blocker": "<string>",
"updated_by": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"version": "<string>"
},
"storage": {
"organisation_id": "<string>",
"limit_bytes": 123,
"base_limit_bytes": 123,
"addon_blocks": 123,
"addon_monthly_cents": 123,
"default_limit_bytes": 123,
"source": "default",
"reason": "<string>",
"updated_by": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"used_bytes": 123,
"usage_status": "complete",
"projects": [
{
"name": "<string>",
"project": "<string>",
"limit_bytes": 123,
"used_bytes": 123,
"status": "ok"
}
]
},
"harbor_applied": true,
"harbor_apply_error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Set paid registry storage
Set how many paid storage blocks the organisation holds and apply the new limit to the registry at once. Each block adds block_gib GiB to every registry project’s limit and is billed on the monthly invoice, prorated by the days held. Buying more needs billing that can pay (402 with a sentence saying what to fix on the Billing page; 503 when billing could not be checked). More than max_blocks, a decrease below what the registry holds, or a purchase while sales are paused answer 422 with the figures. A stale expected_version answers 409. Requires billing.manage. A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication, CSRF header).
import requests
url = "https://platform.ankra.app/api/v1/org/registry-storage/addon"
payload = { "blocks": 1 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({blocks: 1})
};
fetch('https://platform.ankra.app/api/v1/org/registry-storage/addon', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/registry-storage/addon \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"blocks": 1
}'{
"addon": {
"available": true,
"unavailable_reason": "<string>",
"block_gib": 123,
"price_cents_per_block_month": 123,
"currency": "<string>",
"max_blocks": 123,
"blocks": 123,
"base_limit_bytes": 123,
"effective_limit_bytes": 123,
"monthly_cents": 123,
"scheduled_price_cents_per_block_month": 123,
"scheduled_price_from": "2023-11-07T05:31:56Z",
"billing_ready": true,
"billing_blocker": "<string>",
"updated_by": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"version": "<string>"
},
"storage": {
"organisation_id": "<string>",
"limit_bytes": 123,
"base_limit_bytes": 123,
"addon_blocks": 123,
"addon_monthly_cents": 123,
"default_limit_bytes": 123,
"source": "default",
"reason": "<string>",
"updated_by": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"used_bytes": 123,
"usage_status": "complete",
"projects": [
{
"name": "<string>",
"project": "<string>",
"limit_bytes": 123,
"used_bytes": 123,
"status": "ok"
}
]
},
"harbor_applied": true,
"harbor_apply_error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Response
Successful Response
The organisation's paid registry storage: blocks it holds on top of its base limit, what they cost, and whether more can be bought.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
false means the change is saved and the registry gets the new limit on the next provisioning pass, within about five minutes.