Skip to content

tenant.limit_reached

Sent by the gateway when a tenant is found over one of its limits with nothing refused for it: people (the people its sync groups keep, all together, past limits.people). A write through the API that would add a person past the limit is refused (422); a tenant can be over it all the same, for instance when its limit is lowered below what it has. What a clock sends is never refused for the limit: a person enrolled at a clock is the group’s, and counts, so enrolling can take a tenant over it. Nothing is blocked and nothing is deleted: whoever wants people deleted does it in their own business logic reacting to this. Sent once, on the crossing: not again while the tenant stays over, however many people are added. Its coming back at or within the limit (people deleted, at a clock too; the limit raised or taken away; a group gone) is noticed but sends no event; going over again after that is a new crossing, sent again with an id of its own. The envelope has endpoint “sync:” (the group whose write took the tenant over, or after a change of the setup the tenant’s first group that keeps people), device "" and package “houradvantage-connect”; the event goes to the sinks that group names.

Schema id: urn:houradvantage:events:3:tenant.limit_reached

Fields

FieldTypeRequiredDescription
limit"people"yesWhich of the tenant’s limits.
allowedintegeryesThe limit, as it applies to the tenant (its own, else the install’s default). at least 1
countintegeryesWhat the limit counts: more than allowed. at least 0

Example

{
"limit": "people",
"allowed": 500,
"count": 501
}

JSON Schema

tenant.limit_reached.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:houradvantage:events:3:tenant.limit_reached",
"title": "tenant.limit_reached: data",
"description": "Sent by the gateway when a tenant is found over one of its limits with nothing refused for it: people (the people its sync groups keep, all together, past limits.people). A write through the API that would add a person past the limit is refused (422); a tenant can be over it all the same, for instance when its limit is lowered below what it has. What a clock sends is never refused for the limit: a person enrolled at a clock is the group's, and counts, so enrolling can take a tenant over it. Nothing is blocked and nothing is deleted: whoever wants people deleted does it in their own business logic reacting to this. Sent once, on the crossing: not again while the tenant stays over, however many people are added. Its coming back at or within the limit (people deleted, at a clock too; the limit raised or taken away; a group gone) is noticed but sends no event; going over again after that is a new crossing, sent again with an id of its own. The envelope has endpoint \"sync:<group>\" (the group whose write took the tenant over, or after a change of the setup the tenant's first group that keeps people), device \"\" and package \"houradvantage-connect\"; the event goes to the sinks that group names.",
"type": "object",
"properties": {
"limit": {
"enum": [
"people"
],
"description": "Which of the tenant's limits."
},
"allowed": {
"type": "integer",
"minimum": 1,
"description": "The limit, as it applies to the tenant (its own, else the install's default)."
},
"count": {
"type": "integer",
"minimum": 0,
"description": "What the limit counts: more than allowed."
}
},
"required": [
"limit",
"allowed",
"count"
],
"examples": [
{
"limit": "people",
"allowed": 500,
"count": 501
}
]
}