API Ryoma: quotas
Converted-cost quotas and threshold breaches
This page is generated from
openapi.yamlbynpm run gen, so do not edit it by hand. Authentication is described on the overview page.
/v1/me/quotasQuotas that apply to me and usage in the current cycle
Responses
| Code | Description | Type |
|---|---|---|
| 200 | One quota per cycle (my own, or the default) | application/json · object |
| 401 | Missing or invalid token | application/problem+json · object |
Example response
json
{
"items": [
{
"id": "string",
"scope": "user",
"subject": "string",
"cycle": "week",
"limitUsd": 0,
"thresholds": [],
"from": "2026-11-01T00:00:00Z",
"to": "2026-11-01T00:00:00Z",
"usedUsd": 0,
"percent": 0
}
]
}Call with curl
bash
curl "https://ryoma.phillipcli.cloud/v1/me/quotas" \
-H "Authorization: Bearer $TARA_TOKEN"/v1/quotasAdminQuotas (org owner and admin: all quotas of the organization; other roles: project-scope quotas)
Responses
| Code | Description | Type |
|---|---|---|
| 200 | List of quotas | application/json · object |
| 401 | Missing or invalid token | application/problem+json · object |
| 403 | Forbidden | application/problem+json · object |
Example response
json
{
"items": [
{
"id": "string",
"scope": "user",
"subject": "string",
"cycle": "week",
"limitUsd": 0,
"thresholds": []
}
]
}Call with curl
bash
curl "https://ryoma.phillipcli.cloud/v1/quotas" \
-H "Authorization: Bearer $TARA_TOKEN"/v1/quotasAdminCreate or replace the quota with the same scope, subject and cycle (org owner and admin)
Body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
scope | user | project | yes | |
subject | string | yes | Tara login, '*' (default for everyone without their own quota) or project key |
cycle | week | month | yes | |
limitUsd | number (double) | yes | Converted-cost quota (USD) |
thresholds | integer[] | Alert thresholds (%), default [80, 100] |
Responses
| Code | Description | Type |
|---|---|---|
| 200 | Quota saved | application/json · object |
| 400 | Invalid parameters | application/problem+json · object |
| 401 | Missing or invalid token | application/problem+json · object |
| 403 | Forbidden | application/problem+json · object |
Example response
json
{
"id": "string",
"scope": "user",
"subject": "string",
"cycle": "week",
"limitUsd": 0,
"thresholds": [
0
]
}Call with curl
bash
curl -X PUT "https://ryoma.phillipcli.cloud/v1/quotas" \
-H "Authorization: Bearer $TARA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"scope":"user","subject":"string","cycle":"week","limitUsd":0}'/v1/quotas/{id}AdminDelete a quota (org owner and admin); breach history is kept
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Responses
| Code | Description | Type |
|---|---|---|
| 204 | Deleted | |
| 401 | Missing or invalid token | application/problem+json · object |
| 403 | Forbidden | application/problem+json · object |
| 404 | Not found. Also returned for a project that exists but is private and the caller cannot see (never 403, so a private project cannot be discovered) | application/problem+json · object |
Call with curl
bash
curl -X DELETE "https://ryoma.phillipcli.cloud/v1/quotas/<id>" \
-H "Authorization: Bearer $TARA_TOKEN"/v1/quota-breachesAdminThreshold breaches in a time range (org owner and admin; other roles only see project quotas)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
from | query | string (date-time) | yes | |
to | query | string (date-time) | yes |
Responses
| Code | Description | Type |
|---|---|---|
| 200 | Newest first | application/json · object |
| 400 | Invalid parameters | application/problem+json · object |
| 401 | Missing or invalid token | application/problem+json · object |
| 403 | Forbidden | application/problem+json · object |
Example response
json
{
"items": [
{
"quotaId": "string",
"scope": "user",
"subject": "string",
"cycle": "week",
"periodStart": "2026-11-01T00:00:00Z",
"threshold": 0,
"usedUsd": 0,
"limitUsd": 0,
"at": "2026-11-01T00:00:00Z"
}
]
}Call with curl
bash
curl "https://ryoma.phillipcli.cloud/v1/quota-breaches?from=2026-11-01T00:00:00Z&to=2026-11-01T00:00:00Z" \
-H "Authorization: Bearer $TARA_TOKEN"