AnkraDocs
Console

API reference · Account and billing

Quota requests

3 operations of the Ankra Cloud API: Requests for higher limits: an account asks for the limits it needs and says why, and Ankra's staff approve, which raises the limits, or decline with a reason the account sees. Nothing but an approval changes a limit.

The account's requests for higher limits, newest first#

GET/v1/quota-requests
Operation
list_quota_requests
Credentials
API token, Portal session
Requires
Permission read

Parameters

Parameters
NameInTypeDescription
cursorquerystringThe next_cursor of the previous page.
limitqueryintegerPage size; the server applies its default and maximum.

Responses

200A page of requests (limit at most 100, default 20).application/json · QuotaRequestList

200 response fields
FieldTypeDescription
itemsrequiredarray of QuotaRequest
idrequiredstring
staterequiredstringpending waits for staff, approved means the limits were raised, declined carries the staff's reason, withdrawn was taken back by the account.One of pending, approved, declined, withdrawn
limitsrequiredQuotaRequestLimitsThe limits asked for; a limit left out is not asked for and stays as it is.
serversinteger
coresinteger
memory_mebibytesintegerMemory limit in MiB.
storage_gibibytesinteger
floating_ipsinteger
routersinteger
private_networksinteger
reasonrequiredstring
staff_reasonrequiredstring | nullWhat staff said when they decided; a decline always carries one.
requested_by_emailrequiredstring
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)
decided_atrequiredstring (date-time) | nullWhen the request was approved, declined or withdrawn.
next_cursorrequiredstring | nullPass as ?cursor= for the next page; null on the last page.
  • 400The request is invalid; detail says why.
  • 401Not signed in, or the credential is invalid or expired.
  • 403The role lacks the permission, the token is read-only (a read-only token also gets reason: read_only_token_cannot_read_credentials on every credential read), the CSRF header is missing, a support session may not do this, or the route needs a verified email address and the caller's is not (reason: email_unverified).
  • 429Rate limited. On a customer operation the credential (the API token, or the signed-in user for a session) is over its requests per minute and the X-RateLimit-* headers say when the window ends; on a sign-in route the client network is over its attempts or the email is locked out.
  • defaultAny other error, usually 500.

Example

bash
curl 'https://cloud.ankra.app/v1/quota-requests' \
  -H "Authorization: Bearer $ANKRA_CLOUD_TOKEN"

Ask Ankra for higher limits#

POST/v1/quota-requests
Operation
create_quota_request
Credentials
API token, Portal session
Requires
Permission operate

Records the limits the account needs (each one asked for must be higher than the account's limit today, see get_quotas) and why, for Ankra's staff to decide; a limit left out stays as it is. The request changes no limit by itself: staff approving it raises each limit asked for to at least that value, and the account is told (quota.request_decided) either way. An account has one pending request at a time: 409 while another is pending (withdraw it first). Recorded in the account's audit log (quota_request.create) and emailed to Ankra's admin staff.

Request bodyapplication/json · CreateQuotaRequest

Request body fields
FieldTypeDescription
limitsrequiredQuotaRequestLimitsThe limits asked for; a limit left out is not asked for and stays as it is.
serversinteger
coresinteger
memory_mebibytesintegerMemory limit in MiB.
storage_gibibytesinteger
floating_ipsinteger
routersinteger
private_networksinteger
reasonrequiredstringWhat the higher limits are for: staff read it to decide.

Responses

201The recorded request.application/json · QuotaRequestEnvelope

201 response fields
FieldTypeDescription
requestrequiredQuotaRequest
idrequiredstring
staterequiredstringpending waits for staff, approved means the limits were raised, declined carries the staff's reason, withdrawn was taken back by the account.One of pending, approved, declined, withdrawn
limitsrequiredQuotaRequestLimitsThe limits asked for; a limit left out is not asked for and stays as it is.
serversinteger
coresinteger
memory_mebibytesintegerMemory limit in MiB.
storage_gibibytesinteger
floating_ipsinteger
routersinteger
private_networksinteger
reasonrequiredstring
staff_reasonrequiredstring | nullWhat staff said when they decided; a decline always carries one.
requested_by_emailrequiredstring
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)
decided_atrequiredstring (date-time) | nullWhen the request was approved, declined or withdrawn.
  • 400The request is invalid; detail says why.
  • 401Not signed in, or the credential is invalid or expired.
  • 403The role lacks the permission, the token is read-only (a read-only token also gets reason: read_only_token_cannot_read_credentials on every credential read), the CSRF header is missing, a support session may not do this, or the route needs a verified email address and the caller's is not (reason: email_unverified).
  • 409The resource's state does not allow this now.
  • 422Nothing is asked for, a limit asked for is not higher than the account's or past 1,000,000, or the reason is missing or longer than 1000 characters.
  • 429Rate limited. On a customer operation the credential (the API token, or the signed-in user for a session) is over its requests per minute and the X-RateLimit-* headers say when the window ends; on a sign-in route the client network is over its attempts or the email is locked out.
  • defaultAny other error, usually 500.

Example

bash
curl -X POST 'https://cloud.ankra.app/v1/quota-requests' \
  -H "Authorization: Bearer $ANKRA_CLOUD_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "limits": {
    "servers": 1,
    "cores": 1,
    "memory_mebibytes": 1,
    "storage_gibibytes": 1,
    "floating_ips": 1,
    "routers": 1,
    "private_networks": 1
  },
  "reason": "string"
}'

Withdraw a pending request for higher limits#

DELETE/v1/quota-requests/{id}
Operation
cancel_quota_request
Credentials
API token, Portal session
Requires
Permission operate

The request becomes withdrawn. Only a pending request can be withdrawn (409 otherwise). Recorded in the account's audit log (quota_request.withdraw).

Parameters

Parameters
NameInTypeDescription
idrequiredpathstring

Responses

200The withdrawn request.application/json · QuotaRequestEnvelope

200 response fields
FieldTypeDescription
requestrequiredQuotaRequest
idrequiredstring
staterequiredstringpending waits for staff, approved means the limits were raised, declined carries the staff's reason, withdrawn was taken back by the account.One of pending, approved, declined, withdrawn
limitsrequiredQuotaRequestLimitsThe limits asked for; a limit left out is not asked for and stays as it is.
serversinteger
coresinteger
memory_mebibytesintegerMemory limit in MiB.
storage_gibibytesinteger
floating_ipsinteger
routersinteger
private_networksinteger
reasonrequiredstring
staff_reasonrequiredstring | nullWhat staff said when they decided; a decline always carries one.
requested_by_emailrequiredstring
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)
decided_atrequiredstring (date-time) | nullWhen the request was approved, declined or withdrawn.
  • 401Not signed in, or the credential is invalid or expired.
  • 403The role lacks the permission, the token is read-only (a read-only token also gets reason: read_only_token_cannot_read_credentials on every credential read), the CSRF header is missing, a support session may not do this, or the route needs a verified email address and the caller's is not (reason: email_unverified).
  • 404No such resource in the caller's account.
  • 409The resource's state does not allow this now.
  • 429Rate limited. On a customer operation the credential (the API token, or the signed-in user for a session) is over its requests per minute and the X-RateLimit-* headers say when the window ends; on a sign-in route the client network is over its attempts or the email is locked out.
  • defaultAny other error, usually 500.

Example

bash
curl -X DELETE 'https://cloud.ankra.app/v1/quota-requests/<id>' \
  -H "Authorization: Bearer $ANKRA_CLOUD_TOKEN"