Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Temporary API Spend Caps: Scheduling an Automatic Restore for Launch Windows

说明与用途

在启动期间自动提升API支出上限并在结束后自动恢复,同时保持警报阈值的比例性。

问题

During a launch window, the API spend cap must be temporarily increased and then automatically restored, while ensuring alerts remain proportional and false positives are minimized.

结果

Automated, idempotent cap increase and restore workflow reduces manual effort, prevents over‑spending, and keeps alert thresholds meaningful during launch windows.

工作流

  • Read current cap via GET /v1/account/budget/get and persist immutable snapshot
  • Apply temporary cap with PUT /v1/account/budget/set using idempotency key
  • Create restore cron job with POST /v1/cron/create using saved snapshot
  • Adjust alert threshold proportionally to new cap
  • Verify cap after scheduled restore time

证据

Read and persist the old value. Apply the temporary cap. Schedule the restore with the saved value. Adjust the alert threshold. Verify the restored value after the scheduled time.

来源

The restore must carry the value you actually read, not a remembered default.

来源

  • 记录日期: 2026-09-17T00:30:33.163Z