Praecise Shield/ Reference/ Budgets and kill switch

Is there room for this request? Charges the declared cost

post/budget/check

Answers allow, challenge (near the limit: ask for proof) or refuse (over it; nothing charged). Give client (any stable id; only a hash is kept) or agent (the signed agent's name).

Request bodyapplication/json, required

  • sitestringrequired
  • secretstringrequired
  • clientstring
  • agentstring
  • methodstring
  • pathstring
  • costobject
    • tokensinteger
      At least 0.
    • dbMsinteger
      Database milliseconds. At least 0.
    • centsinteger
      Money in minor units. At least 0.

Responses

  • 200application/json
    • decisionstringrequired
      One of: allow, challenge, refuse.
    • rationumber
      The largest share of any limit spent.
    • spentobject
      • tokensinteger
        At least 0.
      • dbMsinteger
        Database milliseconds. At least 0.
      • centsinteger
        Money in minor units. At least 0.
    • limitobject
      • tokensinteger
        At least 0.
      • dbMsinteger
        Database milliseconds. At least 0.
      • centsinteger
        Money in minor units. At least 0.
    • windowEndsAtstring
    • retryAfterSecondsinteger
    • reasonstring
  • 401
    Wrong site or secret.

This page as Markdown