Limit
A Limit is a bound on a Permission, Entitlement, or Mandate, checked before every call; exceeding it creates an Approval.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
amount | money | The most money it allows. | |
count | integer | The most calls or units it allows. | |
period | string | The window a rate resets over, such as a month. | |
percent | number | The largest share off a reference amount it allows, such as 15 percent off list Price. | |
resets | string | One of calendar, rolling: a calendar Limit resets at the start of each period, a rolling one counts the last period from now. |
Object
{
"$id": "https: //api.sb/ routewise.dev/ limits/ limit_1",
"$type": "Limit",
"amount": {
"amount": 25,
"currency": "USD"
},
"count": 1,
"period": "Example period",
"percent": 1,
"resets": "calendar"
}Relationships
None.
Verbs
createCreates a Limit.POST /{namespace}/limitsgetReturns one Limit by id.GET /{namespace}/limits/{id}listReturns Limits, newest first, one page at a time.GET /{namespace}/limitsupdateChanges the given properties of a Limit.PATCH /{namespace}/limits/{id}deleteDeletes a Limit; its history is kept.DELETE /{namespace}/limits/{id}raiseRaise lifts a Limit after an Approval allows it, and the Action that waited on it proceeds.POST /{namespace}/limits/{limit}/raise
Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.
| Operation | owner | admin | member | viewer |
|---|---|---|---|---|
Limit.create | Yes | Yes | No | No |
Limit.get | Yes | Yes | Yes | Yes |
Limit.list | Yes | Yes | Yes | Yes |
Limit.update | Yes | Yes | No | No |
Limit.delete | Yes | Yes | No | No |
Limit.raise | Yes | No | No | No |
Call it
Raise the latest limit.Example
The Billing Specialist's refund Limit is $100. A $250 refund stops before it runs and opens an Approval.