Sets or clears the monthly limit on one member's Aitronos servers. A limit set for a person replaces the default per person for them, higher or lower; clearing it makes the default apply again. If the person set a lower own limit, the lower one applies. Returns the member's limits now in force, as one entry of List member limits. A refused request stores nothing.
A person's spend is the spend of the Aitronos servers they own. Once one more hour at the quoted price would pass their limit, creating or resuming one of their servers is refused with 402 FORGE_COMPUTE_SPEND_LIMIT_REACHED (details.reason member_limit_reached). At 90% of the limit each of their running Aitronos servers carries the notice member_limit_90; at 100% they are parked (member_limit_parked) or keep running (member_limit_100), as set in the organization's compute settings. Every change is recorded in the organization's audit log.
Requires a bearer token (or API key) whose principal holds the manage_billing capability in the acting organization. It works while Forge cloud compute is switched off.
user_id string required
The member's user id, as listed in members[].user_id by List member limits. The person must be an active member of the acting organization.
organization_id string optional
The organization to act in. Defaults to your current organization. You must be an active member of it, or the request is refused with 403 ORGANIZATION_ACCESS_DENIED.
X-Organization-Id string optional
The same as organization_id, as a header. When both are sent, the query parameter wins.
limit_chf string, number or null required
The person's monthly limit for Aitronos servers, in CHF ("35.00" or 35). Send null to clear it: the default per person applies again. An amount must be at least CHF 0.01, have at most two decimals and be at most the organization's monthly spending limit. Unknown fields are refused.
The member's entry, as in List member limits: user_id, name, email, override_chf (the limit now set for the person), admin_limit_chf, self_limit_chf, effective_limit_chf, limit_source and spent_chf (this month's Aitronos server spend; null when it could not be read).
{
"user_id": "usr_2b8e4d1a9c3f4e7b8a6d5c2e1f0b9a83",
"name": "Marco Rossi",
"email": "marco.rossi@example.com",
"override_chf": "35.00",
"admin_limit_chf": "35.00",
"self_limit_chf": "20.00",
"effective_limit_chf": "20.00",
"limit_source": "self",
"spent_chf": "9.80"
}A refused amount is answered with 422 VALIDATION_ERROR whose details.field is limit_chf and details.reason says why; message is the sentence to show, for example "The limit must be at least CHF 0.01.". A person who is not an active member is refused before the amount is checked.
| Status | Code | When |
|---|---|---|
| 401 | AUTHENTICATION_REQUIRED | No valid credential. |
| 403 | ORGANIZATION_ACCESS_DENIED | organization_id or X-Organization-Id names an organization you are not an active member of. |
| 403 | INSUFFICIENT_PERMISSIONS | The caller does not hold manage_billing in the acting organization. |
| 404 | MEMBER_NOT_FOUND | user_id is not an active member of the acting organization. details.user_id echoes it. |
| 422 | VALIDATION_ERROR | An amount below CHF 0.01 (details.reason must be at least CHF 0.01), with more than two decimals (can have at most two decimals), or above the organization's monthly spending limit (can be at most CHF 80.00, with the organization's own amount). |
| 422 | VALIDATION_ERROR | limit_chf is missing, is not a number, or the body has an unknown field: details.fields lists each field with its message and type. |
- Bash
- Python
- Python
- JavaScript
curl -X PUT "https://api.aitronos.com/v1/forge/compute/limits/members/usr_2b8e4d1a9c3f4e7b8a6d5c2e1f0b9a83" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"limit_chf": "35.00"}'Response:
{
"user_id": "usr_2b8e4d1a9c3f4e7b8a6d5c2e1f0b9a83",
"name": "Marco Rossi",
"email": "marco.rossi@example.com",
"override_chf": "35.00",
"admin_limit_chf": "35.00",
"self_limit_chf": "20.00",
"effective_limit_chf": "20.00",
"limit_source": "self",
"spent_chf": "9.80"
}- Forge cloud compute overview
- List billing organizations
- Choose the default billing organization
- List project groups
- Register or update a project group
- Delete a project group
- List compute offerings
- Get offering options
- Resolve a free size
- List connected accounts
- Connect a cloud account
- Disconnect a cloud account
- Create a server
- List servers
- List your servers in every organization
- Get a server
- Get a server's daily cost and uptime
- List a server's running intervals
- List a server's event history
- Report a setup step
- Report the server's host key
- Mark a server ready
- Report activity
- Park a server
- Resume a server
- Delete a server
- Revoke a server
- Get compute settings
- Update compute settings
- Get spend limits
- Change the organization's limits
- Set your own limit
- List member limits
- Set a member's limit
- Delete a leftover resource