{
  "openapi": "3.0.0",
  "info": {
    "title": "Installation: REST API",
    "description": "The REST API of one sedisto installation.\n\n## Where to send requests\n\n**There is no central endpoint.** Every installation answers on a hostname of its own,\nand the operator you are integrating with will give you theirs. Every path in this\ndocument is relative to it.\n\nTreat that hostname as **one configuration value, entered whole**. Do not build it from\na pattern and do not assume any part of it is fixed:\n\n- The **region** varies. Installations are deployed per region so that a customer's\n  data stays where it belongs and requests stay near it, and the regions change over\n  time: one has been added and two retired since this API was first published.\n- The **domain** varies. An operator may run under a sedisto domain or bring their own,\n  and many do: the portal is white-labelled, so the hostname a customer's staff and\n  partners see is often the operator's own brand with no `sedisto` in it at all.\n- The **subdomain** varies. It identifies the installation, and an operator can be\n  moved or renamed.\n\nSo an integration that stores `https://acme.sedisto.eu` as `https://{name}.sedisto.eu`\nwith `name` filled in will break: not hypothetically, but on the ordinary day an\noperator moves to their own domain. Store the whole URL, exactly as the operator gave\nit to you, next to the token it belongs with.\n\nOne consequence worth stating plainly: **a token belongs to a hostname.** Credentials\nare not portable between installations, and there is no endpoint that spans them. An\nintegration serving several operators holds several pairs of (base URL, token) and\ntalks to each separately.\n\n## Authenticating\n\nSend a bearer token in the `Authorization` header. One token is all this API takes;\nthere is nothing to sign and no session to keep. A token belongs to an *integration*\nregistered by the operator, and it carries that integration's permissions and its\nsite restriction with it.\n\n## Permissions\n\nEvery operation names the permission it needs, in the form `units:read` or\n`units:write`. An integration holds a set of these, granted by the operator, and a\ntoken without the permission an operation names is refused with **401**.\n\nA permission is named for the record an operation works on, not for the path it hangs\nunder: creating a unit at `/rest/v1/sites/{site_id}/units` needs `units:write`, not\nsomething about sites. `all:read` and `all:write` stand in for every one of their kind,\nand are worth avoiding. Ask for the two or three an integration actually uses.\n\nSome resources have no write permission because they have no write: sites and entrances\nare created by the operator, and an account by the person it belongs to.\n\nPermissions are separate from *reach*. An integration may additionally be restricted\nto some of the operator's sites. Anything outside that set answers **404, not 403**,\ndeliberately, because a 403 would confirm that the record exists.\n\n## Identifying a record\n\nIds are UUIDs (version 4), and every listing returns them. Where you keep your own\nidentifier, most resources accept it in the path instead: set `external_id` when you\ncreate the record, then use it anywhere the documentation says `id`. That works for\nareas, buildings, floors, zones, units, tenants, tenant memberships and rental\nagreements. It does not work for sites, entrances, accounts or webhook endpoints, which\nhave no `external_id`.\n\n## Pagination\n\n**There are two mechanisms**, and which one a listing uses is not a matter of taste:\n\n| | | |\n|---|---|---|\n| by page | every listing but one | `page`, `per_page`, `offset` |\n| by cursor | `GET /webhook_endpoints/{id}/deliveries` | `limit`, `cursor` |\n\nThe delivery listing is the exception because it is not ours to page: it reads through to\nthe delivery provider on every call, and that provider hands back an opaque cursor rather\nthan a count. So there is no `X-Total` there, no page number, and no jumping to page four.\n\n### Paging by page\n\n`page` (from 1), `per_page` (default 10) and `offset` control it, and the response\ncarries seven headers:\n\n| Header | Meaning |\n|---|---|\n| `X-Total` | records matching the query, across all pages |\n| `X-Total-Pages` | pages at this `per_page` |\n| `X-Per-Page` | records per page, as applied |\n| `X-Page` | the page in this response |\n| `X-Next-Page` | next page number, **empty on the last page** |\n| `X-Prev-Page` | previous page number, empty on the first |\n| `X-Offset` | records skipped before this page |\n\nCompare `X-Total` against the number of records you received to learn whether there\nare more. Nothing in the body says a listing was cut short, and no error is raised:\nasking for page 900 of a two-page result returns an empty array, not a 404.\n\n`X-Next-Page` and `X-Prev-Page` are **strings**, and they are empty rather than absent\nat the ends. Parse them as text and treat empty as \"stop\"; a client that expects a\nnumber there fails on the last page of every listing.\n\n### Paging by cursor\n\nTake the opaque value from `X-Next-Cursor` and send it back as `cursor`. There is no\ncount and no page number: the only question you can ask is whether there is more.\n\n**The two say \"no more\" differently**, which is worth knowing before you write the loop\nonce and reuse it:\n\n| | at the end |\n|---|---|\n| `X-Next-Page` | present and **empty** |\n| `X-Next-Cursor` | **absent** |\n\nThe second is the ordinary convention; the first is the odd one, and it is odd because an\nempty string is what a missing page number renders as. Both are stable. This is a\ndifference to code around, not one that will be tidied away underneath you.\n\n## Filtering\n\nListings take a `q` parameter holding one entry per condition, named\n`q[<field>_<predicate>]`. Conditions combine with AND:\n\n```\nGET /rest/v1/units?q[name_cont]=A1&q[state_eq]=available\n```\n\n**Every field a listing filters on is declared on that listing**, with the predicate we\nexpect you to reach for and, where the values are fixed, the values. Generate from that\nlist rather than from this page: it is derived from the same allowlist the endpoint\nfilters by, so it cannot fall behind.\n\nWhat the declaration does *not* enumerate is the predicates. Every field accepts far\nmore than the one it is shown with:\n\n| | |\n|---|---|\n| `_eq` | equals |\n| `_not_eq` | does not equal |\n| `_in` | is one of |\n| `_not_in` | is none of |\n| `_cont` | contains |\n| `_not_cont` | does not contain |\n| `_i_cont` | contains, ignoring case |\n| `_not_i_cont` | does not contain, ignoring case |\n| `_start` | begins with |\n| `_not_start` | does not begin with |\n| `_end` | ends with |\n| `_not_end` | does not end with |\n| `_matches` | matches a SQL LIKE pattern, where `%` stands for any run of characters |\n| `_does_not_match` | does not match that pattern |\n| `_lt` | is less than |\n| `_lteq` | is less than or equal to |\n| `_gt` | is greater than |\n| `_gteq` | is greater than or equal to |\n| `_dategteq` | is on or after that date, ignoring the time of day |\n| `_datelteq` | is on or before that date, ignoring the time of day |\n| `_null` | is null (`true`) or is not (`false`) |\n| `_not_null` | the reverse of `_null` |\n| `_present` | is present (neither null nor empty) |\n| `_blank` | is null or empty |\n| `_true` | is true |\n| `_not_true` | is not true |\n| `_false` | is false |\n| `_not_false` | is not false |\n\n**Which of these a given field accepts depends on what kind of column it is.** A\n`_cont` on a number is `integer LIKE`, which the database refuses rather than answers,\nso it is not on offer there. Rather than spell out some 3,664 field-and-predicate pairs\nas parameters (several megabytes, and no renderer survives it), the document publishes\nthe *rule*, in two machine-readable pieces:\n\n| | |\n|---|---|\n| `x-filter-classes` | once, at the top: which predicates each class of field accepts, which take an `_any` / `_all` suffix, and which take no value |\n| `x-filter` | on each listing: the class of every field it filters on, the members where the values are fixed, whether a field is reachable through the search index, and the fields it sorts on |\n\nCross the two and you have the exact set, about 3 KB instead of several megabytes.\nA client generating from it can reject a mistyped filter before sending it.\n\nThe classes are `text`, `numeric`, `datetime`, `identifier`, `enum`,\n`encrypted_deterministic` and `encrypted_non_deterministic`. Two of them are narrower\nthan the database strictly requires: ordering an identifier or an enum works in SQL but\ncompares a UUID's bytes or an enum member's ordinal, neither of which this API gives you\na way to reason about. Anything left out there is still *accepted*; it is simply not\nsomething to build on.\n\n**Being indexed is a separate question from the class**, and a field says so itself with\n`searchable`. An address is encrypted deterministically *and* indexed, so it answers\nboth `_eq` and `_search`; a name is encrypted without a stable ciphertext and indexed, so\nit answers `_search` alone; a membership's invitation address is deterministic and not\nindexed, so it answers `_eq` alone. Three combinations, which is why searchability is an\nattribute of the field rather than a class of its own.\n\n**Any two or more searchable fields of a listing can be joined into one search**, with\nthe `join` from `x-filter-classes`: `q[name_or_email_search]`. The matches are unioned,\nnot intersected, which is the point: asking two searches separately narrows to the people\nmatching on *both*, and somebody holding a string that could be a name or an address is\nlooking for either. Each listing declares the join across all of its searchable fields as\na worked example; the rest follow from the rule.\n\nThe twenty that carry a value also take an `_any` or `_all` suffix, matching against\nseveral: `q[state_in_any]`. The eight that carry only a flag (the emptiness and boolean\ntests) do not.\n\n### Sending several values\n\n`_in`, `_not_in` and every `_any` / `_all` compound take **one parameter per value**.\n\n| | |\n|---|---|\n| ✅ `q[state_in][]=available&q[state_in][]=booked` | two values |\n| ❌ `q[state_in]=available,booked` | **400**: one value, and not a member of the set |\n| ❌ `q[name_in]=Meier,Schmidt` | **200 and an empty list**: one value, the literal text `Meier,Schmidt` |\n\n**A comma is not a separator here, and cannot be made into one.** It is a legal character\nin a name (`Meier, Müller GmbH` is a customer), so reading it as a separator would break\nexactly the values that contain it. There is no way to have both.\n\nThe third row is the one to watch, and the reason this section exists. On a fixed-value\nfield the mistake is caught, because `available,booked` is not a member of the set. On a\nfree-text field there is nothing to check it against, so the filter searches for a\ncustomer literally called `Meier,Schmidt`, finds none, and answers **200 with an empty\nlist**. That is the one place left in this API where a malformed filter answers instead\nof refusing, and one parameter per value is how you stay out of it.\n\nEach value is checked on its own, compounds included: `q[state_eq_any][]` with one\nunknown member names that member and not the whole parameter.\n\nOne warning for anyone building a client on top of this. The obvious helper for a\nrepeatable argument, in most languages and CLI frameworks, splits its input on commas\nbefore you ever see it (Go's `pflag.StringSliceVar` is one example), and it is the name\nyou reach for first. Sending `Meier, Müller GmbH` through one of those arrives here as two\nvalues, and a customer whose name contains a comma is then unfindable, quietly. Some of\nthose helpers also apply CSV quoting rules, so a value containing a quotation mark can\nfail outright. Pick the variant that appends the argument verbatim (`StringArrayVar` in\nthat example): respecting the comma at this end is worth nothing if the client breaks it\nat the other.\n\nThree things are worth knowing beyond the table.\n\n**Fixed-value fields**, such as states, types and roles, accept only a member of their set, on\nevery predicate that compares a value: `_eq`, `_not_eq`, `_in`, `_not_in`. Anything else\nis refused with a **400** naming the parameter and listing what it does accept.\n\n**Encrypted fields cannot be compared, only searched.** `name` on an account is\nencrypted with a fresh initialisation vector each time, so the stored ciphertext for the\nsame name differs on every row: no comparison against it can match, and none is offered.\n`email` and `invitation_email` are encrypted deterministically, so `_eq` on those does\nwork and matches an exact address; every other predicate on them would compare against\nkey material and is refused.\n\n**`_search` reaches those fields**, through a search index that holds the plaintext:\n\n```\nGET /rest/v1/accounts?q[name_or_email_search]=alex\n```\n\nIt is a search rather than a comparison, which is why it is called neither `_cont` nor\n`_eq`: it is typo-tolerant and matches whole words and prefixes. Join fields with `_or_`\nto search several at once and take the union of the matches. This is the right shape when you\nhold a string and do not know which field it belongs to. A `_search` on a field with no\nindex behind it is refused with a **400** naming the ones there are; today only accounts\nare indexed. It combines with ordinary filters as any other condition does, and a\nrefusal to search is never silently downgraded to a comparison: if the index is\nunavailable the listing answers **503** rather than a plausible, wrong result.\n\nA search can be **cut off**: a very broad term stops collecting candidates at a fixed\nnumber before the other filters run, which makes the listing incomplete however far you\npage. That is reported as `X-Search-Truncated`, sent on every search (`false` included),\nso it can be told apart from no search having run.\n\n## When a request is refused\n\nA refusal carries `error_code`, which is the HTTP status, and, where the status alone\ndoes not say what to do about it, a `reason`, which is a stable string:\n\n| `reason` | what it means |\n|---|---|\n| `filter_unknown` | the field or the predicate is not one this listing filters on |\n| `filter_value_unknown` | the value is not a member of that field's set |\n| `filter_unavailable` | the column cannot answer that comparison (see encrypted fields) |\n| `search_field_unknown` | `_search` on a field with no index behind it |\n| `sort_field_unknown` | `q[s]` names a field this listing does not sort on |\n\nSwitch on `reason` where it is present and fall back to `error_code` where it is not.\nThe `message` beside it is written for a person and says which parameter was at fault and\nwhat would have worked; it is not a stable interface and will be reworded.\n\n## Sorting\n\n`q[s]` takes a field and a direction, and replaces the listing's default order:\n\n```\nGET /rest/v1/units?q[s]=created_at desc\n```\n\n`asc` and `desc` only. Each listing documents what it is ordered by when you do not say,\nand **declares `q[s]` with the fields it will sort on**, so there is no need to infer them\nfrom the filters. A field outside that set is refused with a **400** listing what is available; it\nused to be accepted and produce a third ordering, neither the one you asked for nor the\ndefault.\n\n**An encrypted field cannot be sorted on**, and asking is refused with the same 400.\nOrdering by one orders by ciphertext, which carries none of the order of the text behind\nit: a stable, plausible, meaningless sequence with nothing in the response to say so.\nUntil 2.5.0 it was accepted and documented as meaningless; documenting a trap is not the\nsame as closing it.\n\n## When a filter is not offered\n\nA filter naming an attribute a listing does not offer is refused with a **400** naming\nit. Which attributes those are differs per resource (`created_at` filters on accounts\nand not on tenants), so the same query can be a result on one listing and a refusal on\nanother. Each listing documents its own.\n\n## Receiving events\n\nRather than polling this API, register a webhook destination and we deliver events to\nyou as they happen: one HTTPS `POST` per event, with a JSON body:\n\n```json\n{ \"id\": \"…\", \"type\": \"access.granted\", \"version\": 1,\n  \"occurred_at\": \"2026-09-04T08:21:44.512Z\",\n  \"installation\": { \"id\": \"…\", \"domain\": \"…\" },\n  \"site\": { \"id\": \"…\", \"name\": \"…\" },\n  \"data\": { } }\n```\n\nRoute on `type` in the body. `occurred_at` is when the thing happened, which for an\nevent a gateway reported can be tens of seconds before we sent it.\n\nThree things a receiver must do, and none of them are optional:\n\n- **Verify the signature.** Every delivery carries `Webhook-Id`, `Webhook-Timestamp` and\n  `Webhook-Signature`. Sign `<id>.<timestamp>.<raw body>` with HMAC-SHA256 over your\n  secret, and compare against the header. The header holds **several** signatures,\n  space-separated, and any one matching is a pass. That is how secret rotation works,\n  and a verifier that reads only the first locks itself out for the whole overlap.\n- **Deduplicate on the envelope's `id`.** A delivery we consider failed is retried, and\n  your server may already have processed it.\n- **Reject a timestamp more than five minutes from your clock**, or a valid signature can\n  be replayed indefinitely.\n\nThe destination URL must be **HTTPS**; an `http://` URL is refused when you register it.\nAnswer `2xx` quickly and do the work afterwards: a slow response counts as a failure and\nis retried, so slow handling turns into duplicate deliveries.\n\nA destination filters on the event types you name and, independently, on the sites,\nentrances, units or accounts you restrict it to.\n\nA delivered event can be read again with `GET /rest/v1/events/{id}` (permission\n`events:read`), optionally with `include` to add the records it\nrefers to, in full; see the `events` tag.\n\nThe full contract (the event catalogue with every field, the verification steps in\norder, the retry schedule, secret rotation and replaying a window you missed) is in\n**Receiving Webhook Events**, which the operator you are integrating with can give you.\n\n## When something goes wrong\n\nErrors answer with `error_code` and `message`:\n\n```json\n{ \"error_code\": 404, \"message\": \"Couldn't find Installation::Unit\" }\n```\n\n`400` malformed request or an unacceptable parameter value · `401` missing, unknown or\ninsufficiently privileged token · `403` authenticated but not allowed · `404` no such\nrecord, or one you may not see · `422` the record was rejected, with the reason in\n`message` · `500` our fault. The webhook endpoints add `502` and `503` for the\ndelivery provider being unreachable.\n\n\nProprietary, commercial license. Usage or redistribution without written consent of sedisto GmbH is forbidden! Please contact us, for more information.",
    "termsOfService": "https://sedisto.com/terms-of-service",
    "contact": {
      "name": "sedisto Support",
      "email": "support@sedisto.com",
      "url": "https://support.sedisto.com"
    },
    "license": {
      "name": "Proprietary"
    },
    "version": "v3.11.0"
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "x-tagGroups": [
    {
      "name": "The place",
      "tags": [
        "sites",
        "buildings",
        "floors",
        "areas",
        "zones",
        "units"
      ]
    },
    {
      "name": "The people",
      "tags": [
        "tenants",
        "tenant_memberships",
        "rental_agreements",
        "accounts"
      ]
    },
    {
      "name": "Getting in",
      "tags": [
        "entrances",
        "interaction_requests"
      ]
    },
    {
      "name": "The hardware",
      "tags": [
        "locks",
        "lock_controllers",
        "gateways",
        "ble_connectors",
        "terminals",
        "elevators",
        "network_devices"
      ]
    },
    {
      "name": "Integrating",
      "tags": [
        "webhook_endpoints",
        "events"
      ]
    },
    {
      "name": "Monitoring",
      "tags": [
        "incidents"
      ]
    }
  ],
  "x-filter-classes": {
    "text": [
      "eq",
      "not_eq",
      "in",
      "not_in",
      "cont",
      "not_cont",
      "i_cont",
      "not_i_cont",
      "start",
      "not_start",
      "end",
      "not_end",
      "matches",
      "does_not_match",
      "lt",
      "lteq",
      "gt",
      "gteq",
      "null",
      "not_null",
      "present",
      "blank"
    ],
    "numeric": [
      "eq",
      "not_eq",
      "in",
      "not_in",
      "lt",
      "lteq",
      "gt",
      "gteq",
      "null",
      "not_null",
      "present",
      "blank"
    ],
    "datetime": [
      "eq",
      "not_eq",
      "in",
      "not_in",
      "lt",
      "lteq",
      "gt",
      "gteq",
      "dategteq",
      "datelteq",
      "null",
      "not_null",
      "present",
      "blank"
    ],
    "identifier": [
      "eq",
      "not_eq",
      "in",
      "not_in",
      "null",
      "not_null",
      "present",
      "blank"
    ],
    "enum": [
      "eq",
      "not_eq",
      "in",
      "not_in",
      "null",
      "not_null",
      "present",
      "blank"
    ],
    "boolean": [
      "eq",
      "not_eq",
      "in",
      "not_in",
      "true",
      "false",
      "not_true",
      "not_false",
      "null",
      "not_null",
      "present",
      "blank"
    ],
    "encrypted_deterministic": [
      "eq",
      "not_eq",
      "in",
      "not_in",
      "null",
      "not_null",
      "present",
      "blank"
    ],
    "encrypted_non_deterministic": [],
    "compoundable": [
      "eq",
      "not_eq",
      "matches",
      "does_not_match",
      "lt",
      "lteq",
      "gt",
      "gteq",
      "in",
      "not_in",
      "cont",
      "not_cont",
      "i_cont",
      "not_i_cont",
      "start",
      "not_start",
      "end",
      "not_end",
      "dategteq",
      "datelteq"
    ],
    "valueless": [
      "null",
      "not_null",
      "present",
      "blank",
      "true",
      "false",
      "not_true",
      "not_false"
    ],
    "searchable": {
      "predicate": "search",
      "join": "_or_"
    }
  },
  "tags": [
    {
      "name": "sites",
      "x-displayName": "Sites",
      "description": "A physical location an operator runs: one address, one set of opening hours, one time zone. Everything else in this API belongs to a site: its buildings and units, the people with access to it, and the doors they open. An integration is granted a set of sites, and endpoints outside that set answer 404 rather than 403."
    },
    {
      "name": "buildings",
      "x-displayName": "Buildings",
      "description": "The structure of a site, level one. A site has buildings, a building has floors, a floor has areas, an area has zones, and a zone holds the units people rent. Every level is optional in practice (a single-hall facility may have one of each), but the chain is always present."
    },
    {
      "name": "floors",
      "x-displayName": "Floors",
      "description": "A level within a building. Carries a numeric level, so a basement is negative and the ground floor is zero."
    },
    {
      "name": "areas",
      "x-displayName": "Areas",
      "description": "A part of a floor. `state` here is a **province**, not a condition. It is part of the postal address. The word means something else on an entrance and on a unit, where it is a condition."
    },
    {
      "name": "locks",
      "x-displayName": "Locks",
      "description": "The hardware on an entrance. Where an entrance says what *may* be done at a door, a lock says what the door is doing: whether it is engaged, whether it stands open, whether its wiring is healthy, and when it was last heard from."
    },
    {
      "name": "gateways",
      "x-displayName": "Gateways",
      "description": "What connects a site's hardware to us. Its state answers a question no other resource can (whether the site is reachable at all), and a door that will not open is often the same fact told twice."
    },
    {
      "name": "lock_controllers",
      "x-displayName": "Lock controllers",
      "description": "The box a row of locks hangs off. Where a lock reports its own door, a controller reports the thing that drives several of them, which is the level an outage usually lives at, and the only one that warns of a flat backup battery before the doors stop."
    },
    {
      "name": "terminals",
      "x-displayName": "Terminals",
      "description": "The screen a person walks up to. The one device here whose silence a customer sees: a terminal that stopped reporting is a queue at the gate."
    },
    {
      "name": "ble_connectors",
      "x-displayName": "BLE connectors",
      "description": "What stands between a phone in the corridor and a lock with no radio of its own. Placed by area and floor rather than by building, because it is installed where the coverage has to reach."
    },
    {
      "name": "elevators",
      "x-displayName": "Elevators",
      "description": "A lift in a building, and what an entrance of type `elevator` points at. Its `state` is an operator's declaration rather than a device reading: nothing reports `out_of_order`, somebody sets it."
    },
    {
      "name": "network_devices",
      "x-displayName": "Network devices",
      "description": "Devices seen on a site's building network, but only those the site adopted, by linking one to equipment we know or by switching monitoring on. The rest of that sweep is whoever happened to be in the building, and it stays in the console."
    },
    {
      "name": "zones",
      "x-displayName": "Zones",
      "description": "The smallest division of the structure, and what a unit sits in. A zone is usually the granularity access is granted at: one corridor, one cage block, one row of drive-up doors."
    },
    {
      "name": "units",
      "x-displayName": "Units",
      "description": "A space somebody rents: a storage unit, a locker, a garage, a parking space. This is the thing a rental agreement is *for*, and the reason somebody has access to the site at all."
    },
    {
      "name": "entrances",
      "x-displayName": "Entrances",
      "description": "A door, gate or barrier, and the locks on it. An entrance is what an access right grants and what an interaction request opens. It belongs to a level of the structure rather than to a unit, so opening one is never granted per unit directly."
    },
    {
      "name": "tenants",
      "x-displayName": "Tenants",
      "description": "**A renting customer**: a person or a company that rents from the operator. Not a tenant in the multi-tenancy sense: an installation is one operator, and every tenant in this API is one of that operator's customers. A tenant holds rental agreements and has people attached to it through tenant memberships."
    },
    {
      "name": "tenant_memberships",
      "x-displayName": "Tenant memberships",
      "description": "The link between a person and a renting customer, and where their role lives (member, manager or owner). A company renting six units has one tenant and several memberships; a membership may also be tied to a single rental agreement, which is how one employee gets access to one unit rather than all of them."
    },
    {
      "name": "rental_agreements",
      "x-displayName": "Rental agreements",
      "description": "What ties a tenant to a unit for a period, and the basis on which anybody has access at all. Ending one is what ends access: the access rights derived from it are withdrawn with it, rather than needing to be revoked separately."
    },
    {
      "name": "accounts",
      "x-displayName": "Accounts",
      "description": "A person. One account can belong to several tenants and hold access at several sites, which is why an account is never scoped to one site the way the structure is."
    },
    {
      "name": "interaction_requests",
      "x-displayName": "Interaction requests",
      "description": "One attempt to operate a door: who, which entrance, which of unlock, lock, open or close, and how it ended. This is the audit trail: a row per attempt, successful or not, and the closest thing this API has to an event stream."
    },
    {
      "name": "events",
      "x-displayName": "Events",
      "description": "One event: the body a webhook delivered, readable again by its id (the `id` of the delivery). Ask for `include` to get the records the event refers to, in full, as far as this key may read them (otherwise just their id, and `external_id` for a unit, tenant or rental agreement). There is no listing, and an id that was never yours, belongs to a site outside this key, or is older than the retention period is simply not found."
    },
    {
      "name": "webhook_endpoints",
      "x-displayName": "Webhook endpoints",
      "description": "Where we deliver events to you, so an integration does not have to poll. An endpoint is registered by the integration that owns it and is invisible to any other, filters by event type and by site, entrance, account or unit, and is signed with a secret that can be rotated with an overlap rather than a simultaneous deploy."
    },
    {
      "name": "incidents",
      "x-displayName": "Incidents",
      "description": "One operational problem, one row per CAUSE rather than per symptom: seven units behind one dead lock controller is a single incident. Read-only: an integration sees what is happening and to whom it currently belongs, never opens, acknowledges or closes one itself. A problem type still being tuned internally is invisible here exactly as it is on the operator's own screen, until it graduates."
    }
  ],
  "paths": {
    "/rest/v1/accounts/aggregate": {
      "get": {
        "summary": "Count or aggregate accounts",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: created_at, state.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[id_eq]",
            "description": "ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[email_search]",
            "description": "Email matches, through the search index",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[email_eq]",
            "description": "Email equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_search]",
            "description": "Name matches, through the search index",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_or_email_search]",
            "description": "Name or Email match, through the search index: the matches are unioned, not intersected",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[created_at_gteq]",
            "description": "Created at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[created_at_lteq]",
            "description": "Created at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "blocked"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: id, created_at, state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate accounts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "accounts"
        ],
        "operationId": "getRestV1AccountsAggregate",
        "x-filter": {
          "fields": {
            "id": "identifier",
            "email": {
              "class": "encrypted_deterministic",
              "searchable": true
            },
            "name": {
              "class": "encrypted_non_deterministic",
              "searchable": true
            },
            "created_at": "datetime",
            "state": {
              "class": "enum",
              "values": [
                "active",
                "blocked"
              ]
            }
          },
          "sortable": [
            "id",
            "created_at",
            "state"
          ]
        }
      }
    },
    "/rest/v1/accounts": {
      "get": {
        "summary": "List all accounts",
        "description": "Returns the people who can be seen from the sites this integration may see, oldest first.\n\nRequires the `accounts:read` permission. An account is a person, not a customer: one\naccount can belong to several tenants and hold access at several sites, which is why it is\nnot scoped to one site the way the structure is.\n\n## Finding a person\n\nTwo columns here are encrypted, and that decides what can be asked of them.\nThere are exactly two comparisons, and no third is possible:\n\n| | |\n|---|---|\n| `q[email_eq]` | exact, answered by the database |\n| `q[name_search]`, `q[email_search]` | answered by the search index |\n| `q[name_or_email_search]` | both fields at once, matches unioned |\n\n**`_search` is a search, not a comparison.** It is typo-tolerant and matches\nwhole words and prefixes, so it is neither \"equals\" nor \"contains\", which is\nwhy it is not called either. `q[name_search]=Meier` finds Meier and Maier;\n`q[name_search]=Johan` finds Johanna, and `ohan` finds nobody.\n\n`q[email_eq]` is the one exact comparison, and it works because that column is\nencrypted deterministically: the same address always produces the same\nciphertext. A name has no such guarantee, so there is no `q[name_eq]`: it\ncould only ever have returned nothing.\n\nEvery other comparison on these two columns is refused with a 400 naming the\nreplacement. `_cont` in particular is not merely useless: a LIKE on an\nencrypted column compares your text against stored ciphertext and key\nmaterial, so it matches on coincidence. On live data `q[email_cont]=a`\nreturned 61 of 61 accounts and `=9` returned 35, neither having anything to do\nwith the addresses.\n\nUse the `_or_` form when you hold a string and do not know which of the two\nit is (a support agent given \"alex\" by a caller). Asking `name_search` and\n`email_search` separately would narrow to people matching on *both*, which is\nnobody.\n\nSearching combines with the other filters and with pagination:\n`q[name_search]=alex` and `q[state_eq]=blocked` narrow each other.\n\nTwo behaviours to plan for. If the index is unavailable the request answers\n**503** rather than falling back to a lesser filter; retry. And a very broad\nterm is cut off at a fixed number of candidates before the other filters run,\nwhich comes back as `X-Search-Truncated: true`. Narrow the term rather than\npaging through what you got. The header is sent on every search, `false`\nincluded, so it can be told apart from no search at all.\n\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[id_eq]",
            "description": "ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[email_search]",
            "description": "Email matches, through the search index",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[email_eq]",
            "description": "Email equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_search]",
            "description": "Name matches, through the search index",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_or_email_search]",
            "description": "Name or Email match, through the search index: the matches are unioned, not intersected",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[created_at_gteq]",
            "description": "Created at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[created_at_lteq]",
            "description": "Created at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "blocked"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: id, created_at, state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all accounts",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Search-Truncated": {
                "description": "Whether the search index stopped collecting candidates before the other filters ran, as `true` or `false`. `true` means this listing is incomplete however far you page. Narrow the term rather than paging on.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Account"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "accounts"
        ],
        "operationId": "getRestV1Accounts",
        "x-filter": {
          "fields": {
            "id": "identifier",
            "email": {
              "class": "encrypted_deterministic",
              "searchable": true
            },
            "name": {
              "class": "encrypted_non_deterministic",
              "searchable": true
            },
            "created_at": "datetime",
            "state": {
              "class": "enum",
              "values": [
                "active",
                "blocked"
              ]
            }
          },
          "sortable": [
            "id",
            "created_at",
            "state"
          ]
        }
      }
    },
    "/rest/v1/accounts/{id}": {
      "get": {
        "summary": "Get details about a specific account",
        "description": "Returns one account.\n\nRequires the `accounts:read` permission. Accounts have no `external_id`; address them by\ntheir UUID.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the account",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Account"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "accounts"
        ],
        "operationId": "getRestV1AccountsId"
      }
    },
    "/rest/v1/areas/aggregate": {
      "get": {
        "summary": "Count or aggregate areas",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate areas",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "areas"
        ],
        "operationId": "getRestV1AreasAggregate",
        "x-filter": {
          "fields": {
            "name": "text",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/areas": {
      "get": {
        "summary": "List all areas across all sites",
        "description": "Returns the areas at every site this integration may see, ordered by name.\n\nRequires the `areas:read` permission. Use this when you want the whole estate in one\nsweep; the same listing exists under a site (`/sites/{site_id}/areas`) when you want\none site's.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all areas across all sites",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Area"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "areas"
        ],
        "operationId": "getRestV1Areas",
        "x-filter": {
          "fields": {
            "name": "text",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/areas/aggregate": {
      "get": {
        "summary": "Count or aggregate areas",
        "description": "Answers with numbers instead of rows, for one site, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate areas",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "areas"
        ],
        "operationId": "getRestV1SitesSiteIdAreasAggregate",
        "x-filter": {
          "fields": {
            "name": "text",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/areas": {
      "get": {
        "summary": "List all areas of this site",
        "description": "Returns the areas of one site, ordered by name.\n\nRequires the `areas:read` permission. A site outside this integration's grant answers\n404, so this is also the cheapest way to find out whether you may see a site at all.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all areas of this site",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Area"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "areas"
        ],
        "operationId": "getRestV1SitesSiteIdAreas",
        "x-filter": {
          "fields": {
            "name": "text",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "site_id",
            "external_id"
          ]
        }
      },
      "post": {
        "summary": "Creates a new area",
        "description": "Creates an area on a floor.\n\nRequires the `areas:write` permission.\n\n`state` here is the **province** in the postal address, not a condition; the word means\nsomething else on a unit and on an entrance.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/postRestV1SitesSiteIdAreas"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Creates a new area",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Area"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "areas"
        ],
        "operationId": "postRestV1SitesSiteIdAreas"
      }
    },
    "/rest/v1/sites/{site_id}/areas/{id}": {
      "get": {
        "summary": "Get details about a specific area",
        "description": "Returns one area.\n\nRequires the `areas:read` permission. Accepts either the UUID or your own `external_id`.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the area",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific area",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Area"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "areas"
        ],
        "operationId": "getRestV1SitesSiteIdAreasId"
      },
      "put": {
        "summary": "Updates a area",
        "description": "Updates an area.\n\nRequires the `areas:write` permission.\n\nFields you leave out keep their current value.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the area",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/putRestV1SitesSiteIdAreasId"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updates a area",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Area"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "areas"
        ],
        "operationId": "putRestV1SitesSiteIdAreasId"
      },
      "delete": {
        "summary": "Deletes a area",
        "description": "Deletes an area.\n\nRequires the `areas:write` permission.\n\nThe deleted record is returned in the response, so you can log what went.\n\nAn area holds zones, which hold the units people rent. Deleting one that is still in use\nis refused rather than cascading.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the area",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deletes a area",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Area"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "areas"
        ],
        "operationId": "deleteRestV1SitesSiteIdAreasId"
      }
    },
    "/rest/v1/sites/{site_id}/ble_connectors/aggregate": {
      "get": {
        "summary": "Count or aggregate ble connectors",
        "description": "Answers with numbers instead of rows, for one site, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id, area_id, floor_id, zone_id, state, last_active_at, last_active_at_cloud, last_active_at_building.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[area_id_eq]",
            "description": "Area ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[floor_id_eq]",
            "description": "Floor ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[zone_id_eq]",
            "description": "Zone ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_cont]",
            "description": "Firmware version contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_eq]",
            "description": "Firmware version equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[target_firmware_version_cont]",
            "description": "Target firmware version contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[target_firmware_version_eq]",
            "description": "Target firmware version equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_ble_cont]",
            "description": "Mac address ble contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_ble_eq]",
            "description": "Mac address ble equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "unprovisioned",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_gteq]",
            "description": "Last active at cloud on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_lteq]",
            "description": "Last active at cloud on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_gteq]",
            "description": "Last active at building on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_lteq]",
            "description": "Last active at building on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, area_id, floor_id, zone_id, firmware_version, target_firmware_version, mac_address, mac_address_ble, ip_address, description, notes, state, last_active_at, last_active_at_cloud, last_active_at_building.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate ble connectors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "ble_connectors"
        ],
        "operationId": "getRestV1SitesSiteIdBleConnectorsAggregate",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "area_id": "identifier",
            "floor_id": "identifier",
            "zone_id": "identifier",
            "firmware_version": "text",
            "target_firmware_version": "text",
            "mac_address": "text",
            "mac_address_ble": "text",
            "ip_address": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "unprovisioned",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "last_active_at_cloud": "datetime",
            "last_active_at_building": "datetime"
          },
          "sortable": [
            "site_id",
            "area_id",
            "floor_id",
            "zone_id",
            "firmware_version",
            "target_firmware_version",
            "mac_address",
            "mac_address_ble",
            "ip_address",
            "description",
            "notes",
            "state",
            "last_active_at",
            "last_active_at_cloud",
            "last_active_at_building"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/ble_connectors": {
      "get": {
        "summary": "List all BLE connectors of this site",
        "description": "Returns the Bluetooth connectors at this site.\n\nRequires the `ble_connectors:read` permission. A site outside this\nintegration's grant answers 404.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[area_id_eq]",
            "description": "Area ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[floor_id_eq]",
            "description": "Floor ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[zone_id_eq]",
            "description": "Zone ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_cont]",
            "description": "Firmware version contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_eq]",
            "description": "Firmware version equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[target_firmware_version_cont]",
            "description": "Target firmware version contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[target_firmware_version_eq]",
            "description": "Target firmware version equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_ble_cont]",
            "description": "Mac address ble contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_ble_eq]",
            "description": "Mac address ble equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "unprovisioned",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_gteq]",
            "description": "Last active at cloud on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_lteq]",
            "description": "Last active at cloud on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_gteq]",
            "description": "Last active at building on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_lteq]",
            "description": "Last active at building on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, area_id, floor_id, zone_id, firmware_version, target_firmware_version, mac_address, mac_address_ble, ip_address, description, notes, state, last_active_at, last_active_at_cloud, last_active_at_building.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all BLE connectors of this site",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_BleConnector"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "ble_connectors"
        ],
        "operationId": "getRestV1SitesSiteIdBleConnectors",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "area_id": "identifier",
            "floor_id": "identifier",
            "zone_id": "identifier",
            "firmware_version": "text",
            "target_firmware_version": "text",
            "mac_address": "text",
            "mac_address_ble": "text",
            "ip_address": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "unprovisioned",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "last_active_at_cloud": "datetime",
            "last_active_at_building": "datetime"
          },
          "sortable": [
            "site_id",
            "area_id",
            "floor_id",
            "zone_id",
            "firmware_version",
            "target_firmware_version",
            "mac_address",
            "mac_address_ble",
            "ip_address",
            "description",
            "notes",
            "state",
            "last_active_at",
            "last_active_at_cloud",
            "last_active_at_building"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/ble_connectors/{id}": {
      "get": {
        "summary": "Get details about a specific BLE connector",
        "description": "Returns one Bluetooth connector.\n\nRequires the `ble_connectors:read` permission. BLE connectors have no\n`external_id`; address them by their UUID.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the BLE connector",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific BLE connector",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_BleConnector"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "ble_connectors"
        ],
        "operationId": "getRestV1SitesSiteIdBleConnectorsId"
      }
    },
    "/rest/v1/sites/{site_id}/buildings/aggregate": {
      "get": {
        "summary": "Count or aggregate buildings",
        "description": "Answers with numbers instead of rows, for one site, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate buildings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "buildings"
        ],
        "operationId": "getRestV1SitesSiteIdBuildingsAggregate",
        "x-filter": {
          "fields": {
            "name": "text",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/buildings": {
      "get": {
        "summary": "List all buildings of this site",
        "description": "Returns the buildings of one site, ordered by name.\n\nRequires the `buildings:read` permission. A site outside this integration's grant answers\n404, so this is also the cheapest way to find out whether you may see a site at all.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all buildings of this site",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Building"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "buildings"
        ],
        "operationId": "getRestV1SitesSiteIdBuildings",
        "x-filter": {
          "fields": {
            "name": "text",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "site_id",
            "external_id"
          ]
        }
      },
      "post": {
        "summary": "Creates a new building",
        "description": "Creates a building on a site.\n\nRequires the `buildings:write` permission.\n\nA building is the first level below the site. It carries its own address, which is what\nmakes a campus with several street numbers work.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/postRestV1SitesSiteIdBuildings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Creates a new building",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Building"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "buildings"
        ],
        "operationId": "postRestV1SitesSiteIdBuildings"
      }
    },
    "/rest/v1/sites/{site_id}/buildings/{id}": {
      "get": {
        "summary": "Get details about a specific building",
        "description": "Returns one building.\n\nRequires the `buildings:read` permission. Accepts either the UUID or your own\n`external_id`.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the building",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific building",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Building"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "buildings"
        ],
        "operationId": "getRestV1SitesSiteIdBuildingsId"
      },
      "put": {
        "summary": "Updates a building",
        "description": "Updates a building.\n\nRequires the `buildings:write` permission.\n\nFields you leave out keep their current value.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the building",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/putRestV1SitesSiteIdBuildingsId"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updates a building",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Building"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "buildings"
        ],
        "operationId": "putRestV1SitesSiteIdBuildingsId"
      },
      "delete": {
        "summary": "Deletes a building",
        "description": "Deletes a building.\n\nRequires the `buildings:write` permission.\n\nThe deleted record is returned in the response.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the building",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deletes a building",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Building"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "buildings"
        ],
        "operationId": "deleteRestV1SitesSiteIdBuildingsId"
      }
    },
    "/rest/v1/sites/{site_id}/elevators/aggregate": {
      "get": {
        "summary": "Count or aggregate elevators",
        "description": "Answers with numbers instead of rows, for one site, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id, building_id, elevator_type, state.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[elevator_type_eq]",
            "description": "Elevator type equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "passenger",
                "service",
                "freight"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "available",
                "disabled",
                "out_of_order",
                "under_construction",
                "in_maintenance"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, name, description, notes, elevator_type, state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate elevators",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "elevators"
        ],
        "operationId": "getRestV1SitesSiteIdElevatorsAggregate",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "name": "text",
            "description": "text",
            "notes": "text",
            "elevator_type": {
              "class": "enum",
              "values": [
                "unspecified",
                "passenger",
                "service",
                "freight"
              ]
            },
            "state": {
              "class": "enum",
              "values": [
                "available",
                "disabled",
                "out_of_order",
                "under_construction",
                "in_maintenance"
              ]
            }
          },
          "sortable": [
            "site_id",
            "building_id",
            "name",
            "description",
            "notes",
            "elevator_type",
            "state"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/elevators": {
      "get": {
        "summary": "List all elevators of this site",
        "description": "Returns the elevators at this site.\n\nRequires the `elevators:read` permission. A site outside this integration's\ngrant answers 404.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[elevator_type_eq]",
            "description": "Elevator type equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "passenger",
                "service",
                "freight"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "available",
                "disabled",
                "out_of_order",
                "under_construction",
                "in_maintenance"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, name, description, notes, elevator_type, state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all elevators of this site",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Elevator"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "elevators"
        ],
        "operationId": "getRestV1SitesSiteIdElevators",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "name": "text",
            "description": "text",
            "notes": "text",
            "elevator_type": {
              "class": "enum",
              "values": [
                "unspecified",
                "passenger",
                "service",
                "freight"
              ]
            },
            "state": {
              "class": "enum",
              "values": [
                "available",
                "disabled",
                "out_of_order",
                "under_construction",
                "in_maintenance"
              ]
            }
          },
          "sortable": [
            "site_id",
            "building_id",
            "name",
            "description",
            "notes",
            "elevator_type",
            "state"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/elevators/{id}": {
      "get": {
        "summary": "Get details about a specific elevator",
        "description": "Returns one elevator.\n\nRequires the `elevators:read` permission. Elevators have no `external_id`;\naddress them by their UUID.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the elevator",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific elevator",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Elevator"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "elevators"
        ],
        "operationId": "getRestV1SitesSiteIdElevatorsId"
      }
    },
    "/rest/v1/sites/{site_id}/floors/aggregate": {
      "get": {
        "summary": "Count or aggregate floors",
        "description": "Answers with numbers instead of rows, for one site, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: level.\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[level_eq]",
            "description": "Level equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, level, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate floors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "floors"
        ],
        "operationId": "getRestV1SitesSiteIdFloorsAggregate",
        "x-filter": {
          "fields": {
            "name": "text",
            "level": {
              "class": "numeric",
              "format": "integer"
            },
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "level",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/floors": {
      "get": {
        "summary": "List all floors of this site",
        "description": "Returns the floors of one site, ordered by level, highest first.\n\nRequires the `floors:read` permission. A site outside this integration's grant answers\n404, so this is also the cheapest way to find out whether you may see a site at all.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[level_eq]",
            "description": "Level equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, level, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all floors of this site",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Floor"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "floors"
        ],
        "operationId": "getRestV1SitesSiteIdFloors",
        "x-filter": {
          "fields": {
            "name": "text",
            "level": {
              "class": "numeric",
              "format": "integer"
            },
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "level",
            "site_id",
            "external_id"
          ]
        }
      },
      "post": {
        "summary": "Creates a new floor",
        "description": "Creates a floor in a building.\n\nRequires the `floors:write` permission.\n\n`level` is a signed number: 0 is the ground floor and a basement is negative. It is what\nthe listing orders by, so getting it right is what makes a floor picker read sensibly.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/postRestV1SitesSiteIdFloors"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Creates a new floor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Floor"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "floors"
        ],
        "operationId": "postRestV1SitesSiteIdFloors"
      }
    },
    "/rest/v1/sites/{site_id}/floors/{id}": {
      "get": {
        "summary": "Get details about a specific floor",
        "description": "Returns one floor.\n\nRequires the `floors:read` permission. Accepts either the UUID or your own `external_id`.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the floor",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific floor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Floor"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "floors"
        ],
        "operationId": "getRestV1SitesSiteIdFloorsId"
      },
      "put": {
        "summary": "Updates a floor",
        "description": "Updates a floor.\n\nRequires the `floors:write` permission.\n\nFields you leave out keep their current value.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the floor",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/putRestV1SitesSiteIdFloorsId"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updates a floor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Floor"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "floors"
        ],
        "operationId": "putRestV1SitesSiteIdFloorsId"
      },
      "delete": {
        "summary": "Deletes a floor",
        "description": "Deletes a floor.\n\nRequires the `floors:write` permission.\n\nThe deleted record is returned in the response.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the floor",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deletes a floor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Floor"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "floors"
        ],
        "operationId": "deleteRestV1SitesSiteIdFloorsId"
      }
    },
    "/rest/v1/sites/{site_id}/gateways/aggregate": {
      "get": {
        "summary": "Count or aggregate gateways",
        "description": "Answers with numbers instead of rows, for one site, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id, building_id, state, last_active_at.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth0_cont]",
            "description": "Mac address eth0 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth0_eq]",
            "description": "Mac address eth0 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth0_cont]",
            "description": "Ip address eth0 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth0_eq]",
            "description": "Ip address eth0 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth1_cont]",
            "description": "Mac address eth1 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth1_eq]",
            "description": "Mac address eth1 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth1_cont]",
            "description": "Ip address eth1 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth1_eq]",
            "description": "Ip address eth1 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, mac_address_eth0, ip_address_eth0, mac_address_eth1, ip_address_eth1, description, notes, state, last_active_at, name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate gateways",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "gateways"
        ],
        "operationId": "getRestV1SitesSiteIdGatewaysAggregate",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "mac_address_eth0": "text",
            "ip_address_eth0": "text",
            "mac_address_eth1": "text",
            "ip_address_eth1": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "name": "text"
          },
          "sortable": [
            "site_id",
            "building_id",
            "mac_address_eth0",
            "ip_address_eth0",
            "mac_address_eth1",
            "ip_address_eth1",
            "description",
            "notes",
            "state",
            "last_active_at",
            "name"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/gateways": {
      "get": {
        "summary": "List all gateways of this site",
        "description": "Returns the gateways at this site.\n\nRequires the `gateways:read` permission. A site outside this integration's\ngrant answers 404.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth0_cont]",
            "description": "Mac address eth0 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth0_eq]",
            "description": "Mac address eth0 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth0_cont]",
            "description": "Ip address eth0 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth0_eq]",
            "description": "Ip address eth0 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth1_cont]",
            "description": "Mac address eth1 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth1_eq]",
            "description": "Mac address eth1 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth1_cont]",
            "description": "Ip address eth1 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth1_eq]",
            "description": "Ip address eth1 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, mac_address_eth0, ip_address_eth0, mac_address_eth1, ip_address_eth1, description, notes, state, last_active_at, name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all gateways of this site",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Gateway"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "gateways"
        ],
        "operationId": "getRestV1SitesSiteIdGateways",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "mac_address_eth0": "text",
            "ip_address_eth0": "text",
            "mac_address_eth1": "text",
            "ip_address_eth1": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "name": "text"
          },
          "sortable": [
            "site_id",
            "building_id",
            "mac_address_eth0",
            "ip_address_eth0",
            "mac_address_eth1",
            "ip_address_eth1",
            "description",
            "notes",
            "state",
            "last_active_at",
            "name"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/gateways/{id}": {
      "get": {
        "summary": "Get details about a specific gateway",
        "description": "Returns one gateway.\n\nRequires the `gateways:read` permission. Gateways have no `external_id`;\naddress them by their UUID.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the gateway",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Gateway"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "gateways"
        ],
        "operationId": "getRestV1SitesSiteIdGatewaysId"
      }
    },
    "/rest/v1/sites/{site_id}/lock_controllers/aggregate": {
      "get": {
        "summary": "Count or aggregate lock controllers",
        "description": "Answers with numbers instead of rows, for one site, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id, building_id, state, last_active_at, last_active_at_building, last_active_at_cloud, battery_state, sabotage_detected_at.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: locks_count.\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_gteq]",
            "description": "Last active at building on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_lteq]",
            "description": "Last active at building on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_gteq]",
            "description": "Last active at cloud on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_lteq]",
            "description": "Last active at cloud on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[battery_state_eq]",
            "description": "Battery state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "full",
                "normal",
                "low",
                "critical"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[sabotage_detected_at_gteq]",
            "description": "Sabotage detected at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[sabotage_detected_at_lteq]",
            "description": "Sabotage detected at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[locks_count_eq]",
            "description": "Locks count equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_cont]",
            "description": "Firmware version contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_eq]",
            "description": "Firmware version equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, mac_address, ip_address, description, notes, state, last_active_at, last_active_at_building, last_active_at_cloud, battery_state, sabotage_detected_at, locks_count, firmware_version.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate lock controllers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "lock_controllers"
        ],
        "operationId": "getRestV1SitesSiteIdLockControllersAggregate",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "mac_address": "text",
            "ip_address": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "last_active_at_building": "datetime",
            "last_active_at_cloud": "datetime",
            "battery_state": {
              "class": "enum",
              "values": [
                "unknown",
                "full",
                "normal",
                "low",
                "critical"
              ]
            },
            "sabotage_detected_at": "datetime",
            "locks_count": {
              "class": "numeric",
              "format": "integer"
            },
            "firmware_version": "text"
          },
          "sortable": [
            "site_id",
            "building_id",
            "mac_address",
            "ip_address",
            "description",
            "notes",
            "state",
            "last_active_at",
            "last_active_at_building",
            "last_active_at_cloud",
            "battery_state",
            "sabotage_detected_at",
            "locks_count",
            "firmware_version"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/lock_controllers": {
      "get": {
        "summary": "List all lock controllers of this site",
        "description": "Returns the lock controllers at this site.\n\nRequires the `lock_controllers:read` permission. A site outside this\nintegration's grant answers 404.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_gteq]",
            "description": "Last active at building on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_lteq]",
            "description": "Last active at building on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_gteq]",
            "description": "Last active at cloud on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_lteq]",
            "description": "Last active at cloud on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[battery_state_eq]",
            "description": "Battery state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "full",
                "normal",
                "low",
                "critical"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[sabotage_detected_at_gteq]",
            "description": "Sabotage detected at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[sabotage_detected_at_lteq]",
            "description": "Sabotage detected at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[locks_count_eq]",
            "description": "Locks count equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_cont]",
            "description": "Firmware version contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_eq]",
            "description": "Firmware version equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, mac_address, ip_address, description, notes, state, last_active_at, last_active_at_building, last_active_at_cloud, battery_state, sabotage_detected_at, locks_count, firmware_version.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all lock controllers of this site",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_LockController"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "lock_controllers"
        ],
        "operationId": "getRestV1SitesSiteIdLockControllers",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "mac_address": "text",
            "ip_address": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "last_active_at_building": "datetime",
            "last_active_at_cloud": "datetime",
            "battery_state": {
              "class": "enum",
              "values": [
                "unknown",
                "full",
                "normal",
                "low",
                "critical"
              ]
            },
            "sabotage_detected_at": "datetime",
            "locks_count": {
              "class": "numeric",
              "format": "integer"
            },
            "firmware_version": "text"
          },
          "sortable": [
            "site_id",
            "building_id",
            "mac_address",
            "ip_address",
            "description",
            "notes",
            "state",
            "last_active_at",
            "last_active_at_building",
            "last_active_at_cloud",
            "battery_state",
            "sabotage_detected_at",
            "locks_count",
            "firmware_version"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/lock_controllers/{id}": {
      "get": {
        "summary": "Get details about a specific lock controller",
        "description": "Returns one lock controller.\n\nRequires the `lock_controllers:read` permission. Lock controllers have no\n`external_id`; address them by their UUID.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the lock controller",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific lock controller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_LockController"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "lock_controllers"
        ],
        "operationId": "getRestV1SitesSiteIdLockControllersId"
      }
    },
    "/rest/v1/sites/{site_id}/locks/aggregate": {
      "get": {
        "summary": "Count or aggregate locks",
        "description": "Answers with numbers instead of rows, for one site, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: entrance_id, last_active_at, lock_state, door_state, cable_state.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[entrance_id_eq]",
            "description": "Entrance ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[lock_state_eq]",
            "description": "Lock state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "open",
                "locked"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[door_state_eq]",
            "description": "Door state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "open",
                "closed"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[cable_state_eq]",
            "description": "Cable state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "broken",
                "healthy"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: entrance_id, last_active_at, lock_state, door_state, cable_state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate locks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "locks"
        ],
        "operationId": "getRestV1SitesSiteIdLocksAggregate",
        "x-filter": {
          "fields": {
            "entrance_id": "identifier",
            "last_active_at": "datetime",
            "lock_state": {
              "class": "enum",
              "values": [
                "unknown",
                "open",
                "locked"
              ]
            },
            "door_state": {
              "class": "enum",
              "values": [
                "unknown",
                "open",
                "closed"
              ]
            },
            "cable_state": {
              "class": "enum",
              "values": [
                "unknown",
                "broken",
                "healthy"
              ]
            }
          },
          "sortable": [
            "entrance_id",
            "last_active_at",
            "lock_state",
            "door_state",
            "cable_state"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/locks": {
      "get": {
        "summary": "List all locks of this site",
        "description": "Returns the locks at this site.\n\nRequires the `locks:read` permission. A site outside this integration's grant\nanswers 404.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[entrance_id_eq]",
            "description": "Entrance ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[lock_state_eq]",
            "description": "Lock state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "open",
                "locked"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[door_state_eq]",
            "description": "Door state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "open",
                "closed"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[cable_state_eq]",
            "description": "Cable state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "broken",
                "healthy"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: entrance_id, last_active_at, lock_state, door_state, cable_state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all locks of this site",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Lock"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "locks"
        ],
        "operationId": "getRestV1SitesSiteIdLocks",
        "x-filter": {
          "fields": {
            "entrance_id": "identifier",
            "last_active_at": "datetime",
            "lock_state": {
              "class": "enum",
              "values": [
                "unknown",
                "open",
                "locked"
              ]
            },
            "door_state": {
              "class": "enum",
              "values": [
                "unknown",
                "open",
                "closed"
              ]
            },
            "cable_state": {
              "class": "enum",
              "values": [
                "unknown",
                "broken",
                "healthy"
              ]
            }
          },
          "sortable": [
            "entrance_id",
            "last_active_at",
            "lock_state",
            "door_state",
            "cable_state"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/locks/{id}": {
      "get": {
        "summary": "Get details about a specific lock",
        "description": "Returns one lock.\n\nRequires the `locks:read` permission. Locks have no `external_id`; address\nthem by their UUID.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the lock",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific lock",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Lock"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "locks"
        ],
        "operationId": "getRestV1SitesSiteIdLocksId"
      }
    },
    "/rest/v1/sites/{site_id}/network_devices/aggregate": {
      "get": {
        "summary": "Count or aggregate network devices",
        "description": "Answers with numbers instead of rows, for one site, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: known, monitoring, last_seen_at, first_seen_at, offline_since, site_id, pingable.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[vendor_cont]",
            "description": "Vendor contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[vendor_eq]",
            "description": "Vendor equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[interface_cont]",
            "description": "Interface contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[interface_eq]",
            "description": "Interface equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[known_eq]",
            "description": "Known equals",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "q[monitoring_eq]",
            "description": "Monitoring equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inactive",
                "active",
                "high_priority"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_seen_at_gteq]",
            "description": "Last seen at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_seen_at_lteq]",
            "description": "Last seen at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[first_seen_at_gteq]",
            "description": "First seen at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[first_seen_at_lteq]",
            "description": "First seen at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[offline_since_gteq]",
            "description": "Offline since on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[offline_since_lteq]",
            "description": "Offline since on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[pingable_eq]",
            "description": "Pingable equals",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "q[associated_device_type_cont]",
            "description": "Associated device type contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[associated_device_type_eq]",
            "description": "Associated device type equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, description, ip_address, mac_address, vendor, interface, known, monitoring, last_seen_at, first_seen_at, offline_since, site_id, pingable, associated_device_type.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate network devices",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "network_devices"
        ],
        "operationId": "getRestV1SitesSiteIdNetworkDevicesAggregate",
        "x-filter": {
          "fields": {
            "name": "text",
            "description": "text",
            "ip_address": "text",
            "mac_address": "text",
            "vendor": "text",
            "interface": "text",
            "known": "boolean",
            "monitoring": {
              "class": "enum",
              "values": [
                "inactive",
                "active",
                "high_priority"
              ]
            },
            "last_seen_at": "datetime",
            "first_seen_at": "datetime",
            "offline_since": "datetime",
            "site_id": "identifier",
            "pingable": "boolean",
            "associated_device_type": "text"
          },
          "sortable": [
            "name",
            "description",
            "ip_address",
            "mac_address",
            "vendor",
            "interface",
            "known",
            "monitoring",
            "last_seen_at",
            "first_seen_at",
            "offline_since",
            "site_id",
            "pingable",
            "associated_device_type"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/network_devices": {
      "get": {
        "summary": "List all adopted network devices of this site",
        "description": "Returns the adopted devices on this site's building network.\n\nRequires the `network_devices:read` permission. A site outside this\nintegration's grant answers 404.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[vendor_cont]",
            "description": "Vendor contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[vendor_eq]",
            "description": "Vendor equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[interface_cont]",
            "description": "Interface contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[interface_eq]",
            "description": "Interface equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[known_eq]",
            "description": "Known equals",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "q[monitoring_eq]",
            "description": "Monitoring equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inactive",
                "active",
                "high_priority"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_seen_at_gteq]",
            "description": "Last seen at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_seen_at_lteq]",
            "description": "Last seen at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[first_seen_at_gteq]",
            "description": "First seen at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[first_seen_at_lteq]",
            "description": "First seen at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[offline_since_gteq]",
            "description": "Offline since on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[offline_since_lteq]",
            "description": "Offline since on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[pingable_eq]",
            "description": "Pingable equals",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "q[associated_device_type_cont]",
            "description": "Associated device type contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[associated_device_type_eq]",
            "description": "Associated device type equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, description, ip_address, mac_address, vendor, interface, known, monitoring, last_seen_at, first_seen_at, offline_since, site_id, pingable, associated_device_type.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all adopted network devices of this site",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_NetworkDevice"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "network_devices"
        ],
        "operationId": "getRestV1SitesSiteIdNetworkDevices",
        "x-filter": {
          "fields": {
            "name": "text",
            "description": "text",
            "ip_address": "text",
            "mac_address": "text",
            "vendor": "text",
            "interface": "text",
            "known": "boolean",
            "monitoring": {
              "class": "enum",
              "values": [
                "inactive",
                "active",
                "high_priority"
              ]
            },
            "last_seen_at": "datetime",
            "first_seen_at": "datetime",
            "offline_since": "datetime",
            "site_id": "identifier",
            "pingable": "boolean",
            "associated_device_type": "text"
          },
          "sortable": [
            "name",
            "description",
            "ip_address",
            "mac_address",
            "vendor",
            "interface",
            "known",
            "monitoring",
            "last_seen_at",
            "first_seen_at",
            "offline_since",
            "site_id",
            "pingable",
            "associated_device_type"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/network_devices/{id}": {
      "get": {
        "summary": "Get details about a specific network device",
        "description": "Returns one adopted network device.\n\nRequires the `network_devices:read` permission. A device this site has\nnot adopted answers 404, whether or not the sweep has seen it.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the network device",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific network device",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_NetworkDevice"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "network_devices"
        ],
        "operationId": "getRestV1SitesSiteIdNetworkDevicesId"
      }
    },
    "/rest/v1/sites/{site_id}/terminals/aggregate": {
      "get": {
        "summary": "Count or aggregate terminals",
        "description": "Answers with numbers instead of rows, for one site, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id, building_id, zone_id, state, last_active_at.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[zone_id_eq]",
            "description": "Zone ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, zone_id, mac_address, ip_address, description, notes, state, last_active_at, name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate terminals",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "terminals"
        ],
        "operationId": "getRestV1SitesSiteIdTerminalsAggregate",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "zone_id": "identifier",
            "mac_address": "text",
            "ip_address": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "name": "text"
          },
          "sortable": [
            "site_id",
            "building_id",
            "zone_id",
            "mac_address",
            "ip_address",
            "description",
            "notes",
            "state",
            "last_active_at",
            "name"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/terminals": {
      "get": {
        "summary": "List all terminals of this site",
        "description": "Returns the terminals at this site.\n\nRequires the `terminals:read` permission. A site outside this integration's\ngrant answers 404.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[zone_id_eq]",
            "description": "Zone ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, zone_id, mac_address, ip_address, description, notes, state, last_active_at, name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all terminals of this site",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Terminal"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "terminals"
        ],
        "operationId": "getRestV1SitesSiteIdTerminals",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "zone_id": "identifier",
            "mac_address": "text",
            "ip_address": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "name": "text"
          },
          "sortable": [
            "site_id",
            "building_id",
            "zone_id",
            "mac_address",
            "ip_address",
            "description",
            "notes",
            "state",
            "last_active_at",
            "name"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/terminals/{id}": {
      "get": {
        "summary": "Get details about a specific terminal",
        "description": "Returns one terminal.\n\nRequires the `terminals:read` permission. Terminals have no `external_id`;\naddress them by their UUID.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the terminal",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific terminal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Terminal"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "terminals"
        ],
        "operationId": "getRestV1SitesSiteIdTerminalsId"
      }
    },
    "/rest/v1/sites/{site_id}/units/aggregate": {
      "get": {
        "summary": "Count or aggregate units",
        "description": "Answers with numbers instead of rows, for one site, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: unit_type, state, zone_id, site_id.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: width, length, height, capacity, base_area.\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[unit_type_eq]",
            "description": "Unit type equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "storage_unit",
                "drive_up",
                "room",
                "parcel_room",
                "locker",
                "garage",
                "parking_space",
                "bike_rack",
                "other"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "available",
                "booked",
                "demo",
                "disabled",
                "broken",
                "under_construction",
                "archived"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[width_eq]",
            "description": "Width equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[length_eq]",
            "description": "Length equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[height_eq]",
            "description": "Height equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[capacity_eq]",
            "description": "Capacity equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[base_area_eq]",
            "description": "Base area equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[zone_id_eq]",
            "description": "Zone ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, description, notes, unit_type, state, width, length, height, capacity, base_area, zone_id, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate units",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "units"
        ],
        "operationId": "getRestV1SitesSiteIdUnitsAggregate",
        "x-filter": {
          "fields": {
            "name": "text",
            "description": "text",
            "notes": "text",
            "unit_type": {
              "class": "enum",
              "values": [
                "unspecified",
                "storage_unit",
                "drive_up",
                "room",
                "parcel_room",
                "locker",
                "garage",
                "parking_space",
                "bike_rack",
                "other"
              ]
            },
            "state": {
              "class": "enum",
              "values": [
                "unspecified",
                "available",
                "booked",
                "demo",
                "disabled",
                "broken",
                "under_construction",
                "archived"
              ]
            },
            "width": {
              "class": "numeric",
              "format": "float"
            },
            "length": {
              "class": "numeric",
              "format": "float"
            },
            "height": {
              "class": "numeric",
              "format": "float"
            },
            "capacity": {
              "class": "numeric",
              "format": "float"
            },
            "base_area": {
              "class": "numeric",
              "format": "float"
            },
            "zone_id": "identifier",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "description",
            "notes",
            "unit_type",
            "state",
            "width",
            "length",
            "height",
            "capacity",
            "base_area",
            "zone_id",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/units": {
      "get": {
        "summary": "List all units of this site",
        "description": "Returns the units of one site, ordered by name.\n\nRequires the `units:read` permission. A site outside this integration's grant answers\n404, so this is also the cheapest way to find out whether you may see a site at all.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[unit_type_eq]",
            "description": "Unit type equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "storage_unit",
                "drive_up",
                "room",
                "parcel_room",
                "locker",
                "garage",
                "parking_space",
                "bike_rack",
                "other"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "available",
                "booked",
                "demo",
                "disabled",
                "broken",
                "under_construction",
                "archived"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[width_eq]",
            "description": "Width equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[length_eq]",
            "description": "Length equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[height_eq]",
            "description": "Height equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[capacity_eq]",
            "description": "Capacity equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[base_area_eq]",
            "description": "Base area equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[zone_id_eq]",
            "description": "Zone ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, description, notes, unit_type, state, width, length, height, capacity, base_area, zone_id, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all units of this site",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Unit"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "units"
        ],
        "operationId": "getRestV1SitesSiteIdUnits",
        "x-filter": {
          "fields": {
            "name": "text",
            "description": "text",
            "notes": "text",
            "unit_type": {
              "class": "enum",
              "values": [
                "unspecified",
                "storage_unit",
                "drive_up",
                "room",
                "parcel_room",
                "locker",
                "garage",
                "parking_space",
                "bike_rack",
                "other"
              ]
            },
            "state": {
              "class": "enum",
              "values": [
                "unspecified",
                "available",
                "booked",
                "demo",
                "disabled",
                "broken",
                "under_construction",
                "archived"
              ]
            },
            "width": {
              "class": "numeric",
              "format": "float"
            },
            "length": {
              "class": "numeric",
              "format": "float"
            },
            "height": {
              "class": "numeric",
              "format": "float"
            },
            "capacity": {
              "class": "numeric",
              "format": "float"
            },
            "base_area": {
              "class": "numeric",
              "format": "float"
            },
            "zone_id": "identifier",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "description",
            "notes",
            "unit_type",
            "state",
            "width",
            "length",
            "height",
            "capacity",
            "base_area",
            "zone_id",
            "site_id",
            "external_id"
          ]
        }
      },
      "post": {
        "summary": "Creates a new unit",
        "description": "Creates a unit in a zone.\n\nRequires the `units:write` permission.\n\nSet `external_id` to your own identifier for the unit and you can address it that way\neverywhere afterwards, instead of storing our UUID alongside yours.\n\n`unit_type` and `state` take a fixed set of values, listed on the parameters. A value\noutside the set is refused with a 400 rather than accepted and misread.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/postRestV1SitesSiteIdUnits"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Creates a new unit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Unit"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "units"
        ],
        "operationId": "postRestV1SitesSiteIdUnits"
      }
    },
    "/rest/v1/sites/{site_id}/units/{id}": {
      "get": {
        "summary": "Get details about a specific unit",
        "description": "Returns one unit.\n\nRequires the `units:read` permission. Accepts either the UUID or your own `external_id`,\nwhich is what makes it possible to look a unit up by the identifier your own system\nalready has.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the unit",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific unit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Unit"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "units"
        ],
        "operationId": "getRestV1SitesSiteIdUnitsId"
      },
      "put": {
        "summary": "Updates a unit",
        "description": "Updates a unit.\n\nRequires the `units:write` permission.\n\nFields you leave out keep their current value.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the unit",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/putRestV1SitesSiteIdUnitsId"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updates a unit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Unit"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "units"
        ],
        "operationId": "putRestV1SitesSiteIdUnitsId"
      },
      "delete": {
        "summary": "Deletes a unit",
        "description": "Deletes a unit.\n\nRequires the `units:write` permission.\n\nThe deleted record is returned in the response.\n\nDelete the rental agreements on a unit before the unit itself. An agreement is what gives\nsomebody access, and one pointing at a unit that no longer exists is a state worth\navoiding.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the unit",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deletes a unit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Unit"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "units"
        ],
        "operationId": "deleteRestV1SitesSiteIdUnitsId"
      }
    },
    "/rest/v1/sites/aggregate": {
      "get": {
        "summary": "Count or aggregate sites",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: state.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[id_eq]",
            "description": "ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inactive",
                "active"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[time_zone_cont]",
            "description": "Time zone contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[time_zone_eq]",
            "description": "Time zone equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[country_code_cont]",
            "description": "Country code contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[country_code_eq]",
            "description": "Country code equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: id, name, state, time_zone, country_code.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate sites",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "sites"
        ],
        "operationId": "getRestV1SitesAggregate",
        "x-filter": {
          "fields": {
            "id": "identifier",
            "name": "text",
            "state": {
              "class": "enum",
              "values": [
                "inactive",
                "active"
              ]
            },
            "time_zone": "text",
            "country_code": "text"
          },
          "sortable": [
            "id",
            "name",
            "state",
            "time_zone",
            "country_code"
          ]
        }
      }
    },
    "/rest/v1/sites": {
      "get": {
        "summary": "List all sites",
        "description": "Returns the sites this integration may see, newest first.\n\nRequires the `sites:read` permission. An integration restricted to a set of\nsites sees only those; the restriction is applied here rather than being\nsomething you filter for.\n\n**This listing is paginated, and it did not use to be.** Before 2.4.0 it\nreturned every site whatever `per_page` said. It now returns at most\n`per_page` records, default 10. Compare `X-Total` against the number of\nrecords you received to find out whether there are more. There is no error\nto tell you a list was cut short.\n\nFilter with `q`, which takes ransack predicates: `q[name_cont]=Berlin`\nmatches on a substring, `q[state_eq]=active` on an exact value. An unknown\nvalue for a field with fixed values is refused with a 400 naming the\nparameter, rather than matching nothing.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[id_eq]",
            "description": "ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inactive",
                "active"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[time_zone_cont]",
            "description": "Time zone contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[time_zone_eq]",
            "description": "Time zone equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[country_code_cont]",
            "description": "Country code contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[country_code_eq]",
            "description": "Country code equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: id, name, state, time_zone, country_code.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all sites",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Site"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "sites"
        ],
        "operationId": "getRestV1Sites",
        "x-filter": {
          "fields": {
            "id": "identifier",
            "name": "text",
            "state": {
              "class": "enum",
              "values": [
                "inactive",
                "active"
              ]
            },
            "time_zone": "text",
            "country_code": "text"
          },
          "sortable": [
            "id",
            "name",
            "state",
            "time_zone",
            "country_code"
          ]
        }
      }
    },
    "/rest/v1/sites/{id}": {
      "get": {
        "summary": "Get details about a specific site",
        "description": "Returns one site.\n\nRequires the `sites:read` permission. A site outside this integration's\ngrant answers **404, not 403**, and that is deliberate: a 403 would\nconfirm that the site exists. A site you may not see is therefore\npresented as one that is not there.\n\nThe `id` is the site's UUID. Every nested resource repeats it in the path\n(`/sites/{id}/units`, `/sites/{id}/entrances`), so this is usually the\nfirst call an integration makes and the value it holds on to.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific site",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Site"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "sites"
        ],
        "operationId": "getRestV1SitesId"
      },
      "put": {
        "summary": "Renames a site",
        "description": "Changes a site's name, and nothing else.\n\nRequires the `sites:write` permission, on its own: `sites:read` is not also\nrequired to rename.\n\nSites are still created and removed by an operator, not through this API.\nAddress, time zone and opening hours are not editable here either.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/putRestV1SitesId"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Renames a site",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Site"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "sites"
        ],
        "operationId": "putRestV1SitesId"
      }
    },
    "/rest/v1/sites/{site_id}/zones/aggregate": {
      "get": {
        "summary": "Count or aggregate zones",
        "description": "Answers with numbers instead of rows, for one site, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate zones",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "zones"
        ],
        "operationId": "getRestV1SitesSiteIdZonesAggregate",
        "x-filter": {
          "fields": {
            "name": "text",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/sites/{site_id}/zones": {
      "get": {
        "summary": "List all zones of this site",
        "description": "Returns the zones of one site, ordered by name.\n\nRequires the `zones:read` permission. A site outside this integration's grant answers\n404, so this is also the cheapest way to find out whether you may see a site at all.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all zones of this site",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Zone"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "zones"
        ],
        "operationId": "getRestV1SitesSiteIdZones",
        "x-filter": {
          "fields": {
            "name": "text",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "site_id",
            "external_id"
          ]
        }
      },
      "post": {
        "summary": "Creates a new zone",
        "description": "Creates a zone in an area.\n\nRequires the `zones:write` permission.\n\nA zone is the smallest division of the structure and what a unit sits in. It is usually\nthe granularity access is granted at, so it is worth modelling the way the site is\nactually divided rather than in one big zone.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/postRestV1SitesSiteIdZones"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Creates a new zone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Zone"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "zones"
        ],
        "operationId": "postRestV1SitesSiteIdZones"
      }
    },
    "/rest/v1/sites/{site_id}/zones/{id}": {
      "get": {
        "summary": "Get details about a specific zone",
        "description": "Returns one zone.\n\nRequires the `zones:read` permission. Accepts either the UUID or your own `external_id`.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the zone",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific zone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Zone"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "zones"
        ],
        "operationId": "getRestV1SitesSiteIdZonesId"
      },
      "put": {
        "summary": "Updates a zone",
        "description": "Updates a zone.\n\nRequires the `zones:write` permission.\n\nFields you leave out keep their current value.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the zone",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/putRestV1SitesSiteIdZonesId"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updates a zone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Zone"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "zones"
        ],
        "operationId": "putRestV1SitesSiteIdZonesId"
      },
      "delete": {
        "summary": "Deletes a zone",
        "description": "Deletes a zone.\n\nRequires the `zones:write` permission.\n\nThe deleted record is returned in the response.\n",
        "parameters": [
          {
            "in": "path",
            "name": "site_id",
            "description": "Unique UUID (Type 4) of the site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the zone",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deletes a zone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Zone"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "zones"
        ],
        "operationId": "deleteRestV1SitesSiteIdZonesId"
      }
    },
    "/rest/v1/ble_connectors/aggregate": {
      "get": {
        "summary": "Count or aggregate ble connectors",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id, area_id, floor_id, zone_id, state, last_active_at, last_active_at_cloud, last_active_at_building.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[area_id_eq]",
            "description": "Area ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[floor_id_eq]",
            "description": "Floor ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[zone_id_eq]",
            "description": "Zone ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_cont]",
            "description": "Firmware version contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_eq]",
            "description": "Firmware version equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[target_firmware_version_cont]",
            "description": "Target firmware version contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[target_firmware_version_eq]",
            "description": "Target firmware version equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_ble_cont]",
            "description": "Mac address ble contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_ble_eq]",
            "description": "Mac address ble equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "unprovisioned",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_gteq]",
            "description": "Last active at cloud on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_lteq]",
            "description": "Last active at cloud on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_gteq]",
            "description": "Last active at building on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_lteq]",
            "description": "Last active at building on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, area_id, floor_id, zone_id, firmware_version, target_firmware_version, mac_address, mac_address_ble, ip_address, description, notes, state, last_active_at, last_active_at_cloud, last_active_at_building.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate ble connectors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "ble_connectors"
        ],
        "operationId": "getRestV1BleConnectorsAggregate",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "area_id": "identifier",
            "floor_id": "identifier",
            "zone_id": "identifier",
            "firmware_version": "text",
            "target_firmware_version": "text",
            "mac_address": "text",
            "mac_address_ble": "text",
            "ip_address": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "unprovisioned",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "last_active_at_cloud": "datetime",
            "last_active_at_building": "datetime"
          },
          "sortable": [
            "site_id",
            "area_id",
            "floor_id",
            "zone_id",
            "firmware_version",
            "target_firmware_version",
            "mac_address",
            "mac_address_ble",
            "ip_address",
            "description",
            "notes",
            "state",
            "last_active_at",
            "last_active_at_cloud",
            "last_active_at_building"
          ]
        }
      }
    },
    "/rest/v1/ble_connectors": {
      "get": {
        "summary": "List all BLE connectors across all sites",
        "description": "Returns the Bluetooth connectors at every site this integration may see.\n\nRequires the `ble_connectors:read` permission.\n\nA connector is what stands between a phone in the corridor and a lock with no\nradio of its own, which is why it is placed by area and floor rather than by\nbuilding: it is installed where the coverage has to reach. \"Which area has no\nworking connector\" is the question this answers.\n\n`mac_address_ble` is the address a handset sees, and the one a device-side log\nnames when an app failed to reach the connector.\n\nWhat is deliberately not returned is this device's firmware health: free\nmemory, uptime, why it last reset, how many HTTP calls failed. Those are\nquestions about our firmware rather than about your site.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[area_id_eq]",
            "description": "Area ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[floor_id_eq]",
            "description": "Floor ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[zone_id_eq]",
            "description": "Zone ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_cont]",
            "description": "Firmware version contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_eq]",
            "description": "Firmware version equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[target_firmware_version_cont]",
            "description": "Target firmware version contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[target_firmware_version_eq]",
            "description": "Target firmware version equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_ble_cont]",
            "description": "Mac address ble contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_ble_eq]",
            "description": "Mac address ble equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "unprovisioned",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_gteq]",
            "description": "Last active at cloud on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_lteq]",
            "description": "Last active at cloud on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_gteq]",
            "description": "Last active at building on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_lteq]",
            "description": "Last active at building on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, area_id, floor_id, zone_id, firmware_version, target_firmware_version, mac_address, mac_address_ble, ip_address, description, notes, state, last_active_at, last_active_at_cloud, last_active_at_building.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all BLE connectors across all sites",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_BleConnector"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "ble_connectors"
        ],
        "operationId": "getRestV1BleConnectors",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "area_id": "identifier",
            "floor_id": "identifier",
            "zone_id": "identifier",
            "firmware_version": "text",
            "target_firmware_version": "text",
            "mac_address": "text",
            "mac_address_ble": "text",
            "ip_address": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "unprovisioned",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "last_active_at_cloud": "datetime",
            "last_active_at_building": "datetime"
          },
          "sortable": [
            "site_id",
            "area_id",
            "floor_id",
            "zone_id",
            "firmware_version",
            "target_firmware_version",
            "mac_address",
            "mac_address_ble",
            "ip_address",
            "description",
            "notes",
            "state",
            "last_active_at",
            "last_active_at_cloud",
            "last_active_at_building"
          ]
        }
      }
    },
    "/rest/v1/buildings/aggregate": {
      "get": {
        "summary": "Count or aggregate buildings",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate buildings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "buildings"
        ],
        "operationId": "getRestV1BuildingsAggregate",
        "x-filter": {
          "fields": {
            "name": "text",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/buildings": {
      "get": {
        "summary": "List all buildings across all sites",
        "description": "Returns the buildings at every site this integration may see, ordered by name.\n\nRequires the `buildings:read` permission. Use this when you want the whole estate in one\nsweep; the same listing exists under a site (`/sites/{site_id}/buildings`) when you want\none site's.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all buildings across all sites",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Building"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "buildings"
        ],
        "operationId": "getRestV1Buildings",
        "x-filter": {
          "fields": {
            "name": "text",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/elevators/aggregate": {
      "get": {
        "summary": "Count or aggregate elevators",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id, building_id, elevator_type, state.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[elevator_type_eq]",
            "description": "Elevator type equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "passenger",
                "service",
                "freight"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "available",
                "disabled",
                "out_of_order",
                "under_construction",
                "in_maintenance"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, name, description, notes, elevator_type, state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate elevators",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "elevators"
        ],
        "operationId": "getRestV1ElevatorsAggregate",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "name": "text",
            "description": "text",
            "notes": "text",
            "elevator_type": {
              "class": "enum",
              "values": [
                "unspecified",
                "passenger",
                "service",
                "freight"
              ]
            },
            "state": {
              "class": "enum",
              "values": [
                "available",
                "disabled",
                "out_of_order",
                "under_construction",
                "in_maintenance"
              ]
            }
          },
          "sortable": [
            "site_id",
            "building_id",
            "name",
            "description",
            "notes",
            "elevator_type",
            "state"
          ]
        }
      }
    },
    "/rest/v1/elevators": {
      "get": {
        "summary": "List all elevators across all sites",
        "description": "Returns the elevators at every site this integration may see.\n\nRequires the `elevators:read` permission.\n\nThis resolves an identifier the API was already handing out: an entrance of\ntype `elevator` carries an `elevator_id`, and until now there was no route\nbehind it.\n\n`state` is not a device reading. Somebody sets `out_of_order` or\n`in_maintenance` (no lift reports it), and it decides whether the entrances\nhanging off this lift are worth offering to a person at all.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[elevator_type_eq]",
            "description": "Elevator type equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "passenger",
                "service",
                "freight"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "available",
                "disabled",
                "out_of_order",
                "under_construction",
                "in_maintenance"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, name, description, notes, elevator_type, state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all elevators across all sites",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Elevator"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "elevators"
        ],
        "operationId": "getRestV1Elevators",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "name": "text",
            "description": "text",
            "notes": "text",
            "elevator_type": {
              "class": "enum",
              "values": [
                "unspecified",
                "passenger",
                "service",
                "freight"
              ]
            },
            "state": {
              "class": "enum",
              "values": [
                "available",
                "disabled",
                "out_of_order",
                "under_construction",
                "in_maintenance"
              ]
            }
          },
          "sortable": [
            "site_id",
            "building_id",
            "name",
            "description",
            "notes",
            "elevator_type",
            "state"
          ]
        }
      }
    },
    "/rest/v1/events/{id}": {
      "get": {
        "summary": "Get one delivered event again",
        "description": "The body a webhook delivery carried, unchanged.\n\nAnswers 404 for an id that does not exist, has been removed after the\nretention period, belongs to another installation or to a site this key is\nrestricted from - the four are indistinguishable on purpose.\n\nThe answer is the envelope exactly as the webhook delivered it:\n\n<!-- example:read-back -->\n```json\n{\n  \"id\": \"0197f4d2-5f7c-7a41-b2c2-6b0c9a2e5f31\",\n  \"type\": \"access.granted\",\n  \"version\": 1,\n  \"occurred_at\": \"2026-09-04T08:21:44.512Z\",\n  \"installation\": {\n    \"id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e01\",\n    \"domain\": \"example-storage.sedisto.eu\"\n  },\n  \"site\": {\n    \"id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e02\",\n    \"name\": \"Example Storage Berlin\"\n  },\n  \"data\": {\n    \"entrance_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e03\",\n    \"unit_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e04\",\n    \"account_id\": null,\n    \"tenant_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e05\",\n    \"interaction_request_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e06\"\n  }\n}\n```\n<!-- /example:read-back -->\n\n### Including referenced records\n\nAn event names other records by id. `include` returns them alongside it:\neach entry in `included` is the whole record as its own show endpoint returns\nit, as it is now - where this key may read that resource (`units:read` for a\nunit, and so on) at the event's site. Otherwise the entry is only its `id`,\nplus `external_id` for a unit, tenant or rental agreement. A kind the event\ndoes not refer to is absent; there is no `include=all`.\n\nWith `include=entrance,unit,tenant`, the same envelope comes back with an\n`included` block. `entrance` and `unit` are whole records, as their own show\nroutes return them. `tenant` is only the minimal form (`id` and\n`external_id`), because the key in this example holds `events:read`,\n`entrances:read` and `units:read` but not `tenants:read`:\n\n<!-- example:read-back-included -->\n```json\n{\n  \"id\": \"0197f4d2-5f7c-7a41-b2c2-6b0c9a2e5f31\",\n  \"type\": \"access.granted\",\n  \"version\": 1,\n  \"occurred_at\": \"2026-09-04T08:21:44.512Z\",\n  \"installation\": {\n    \"id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e01\",\n    \"domain\": \"example-storage.sedisto.eu\"\n  },\n  \"site\": {\n    \"id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e02\",\n    \"name\": \"Example Storage Berlin\"\n  },\n  \"data\": {\n    \"entrance_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e03\",\n    \"unit_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e04\",\n    \"account_id\": null,\n    \"tenant_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e05\",\n    \"interaction_request_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e06\"\n  },\n  \"included\": {\n    \"entrance\": {\n      \"id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e03\",\n      \"site_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e02\",\n      \"area_id\": null,\n      \"floor_id\": null,\n      \"zone_id\": null,\n      \"unit_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e04\",\n      \"elevator_id\": null,\n      \"name\": \"Main entrance\",\n      \"entrance_type\": \"unspecified\",\n      \"door_type\": \"rollup\",\n      \"state\": \"unspecified\",\n      \"id_check_type\": \"remote_only\",\n      \"active\": true,\n      \"building_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e07\",\n      \"openable_via_api\": true,\n      \"openable_via_ble\": true,\n      \"openable_via_nfc\": false,\n      \"available_for_everyone_within_building\": false,\n      \"supports_automatic_opening\": true,\n      \"supports_automatic_closing\": false,\n      \"supports_automatic_locking\": false,\n      \"supports_automatic_unlocking\": true,\n      \"id_check_for_remote_interactions_enabled\": true,\n      \"nearby_hint_for_remote_interactions_enabled\": true,\n      \"tenant_can_share_access\": false,\n      \"tenant_can_view_activities\": false,\n      \"tenant_can_request_support\": false,\n      \"width\": 0.0,\n      \"height\": 0.0,\n      \"created_at\": \"2026-01-15T09:00:00Z\",\n      \"updated_at\": \"2026-09-01T10:30:00Z\"\n    },\n    \"unit\": {\n      \"id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e04\",\n      \"site_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e02\",\n      \"external_id\": \"U-0815\",\n      \"area_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e08\",\n      \"building_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e07\",\n      \"floor_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e09\",\n      \"zone_id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e0a\",\n      \"name\": \"A-12\",\n      \"description\": \"Ground floor, next to the loading bay\",\n      \"notes\": \"Key held at the front desk\",\n      \"unit_type\": \"unspecified\",\n      \"level\": -1,\n      \"state\": \"available\",\n      \"width\": 1.51,\n      \"length\": 2.55,\n      \"height\": 2.15,\n      \"base_area\": 3.85,\n      \"capacity\": 8.28,\n      \"created_at\": \"2026-01-15T09:00:00Z\",\n      \"updated_at\": \"2026-09-01T10:30:00Z\"\n    },\n    \"tenant\": {\n      \"id\": \"5b1d6c2e-3a4f-4e8a-9c1d-0a1b2c3d4e05\",\n      \"external_id\": \"C-2041\"\n    }\n  }\n}\n```\n<!-- /example:read-back-included -->\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "The event id - the `id` of a webhook delivery",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "include",
            "description": "Records to include: entrance, unit, tenant, account, rental_agreement, interaction_request, site, incident. Comma-separated or repeated.",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get one delivered event again",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_WebhookEvent"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "events"
        ],
        "operationId": "getRestV1EventsId"
      }
    },
    "/rest/v1/floors/aggregate": {
      "get": {
        "summary": "Count or aggregate floors",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: level.\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[level_eq]",
            "description": "Level equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, level, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate floors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "floors"
        ],
        "operationId": "getRestV1FloorsAggregate",
        "x-filter": {
          "fields": {
            "name": "text",
            "level": {
              "class": "numeric",
              "format": "integer"
            },
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "level",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/floors": {
      "get": {
        "summary": "List all floors across all sites",
        "description": "Returns the floors at every site this integration may see, ordered by level, highest first.\n\nRequires the `floors:read` permission. Use this when you want the whole estate in one\nsweep; the same listing exists under a site (`/sites/{site_id}/floors`) when you want\none site's.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[level_eq]",
            "description": "Level equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, level, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all floors across all sites",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Floor"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "floors"
        ],
        "operationId": "getRestV1Floors",
        "x-filter": {
          "fields": {
            "name": "text",
            "level": {
              "class": "numeric",
              "format": "integer"
            },
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "level",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/gateways/aggregate": {
      "get": {
        "summary": "Count or aggregate gateways",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id, building_id, state, last_active_at.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth0_cont]",
            "description": "Mac address eth0 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth0_eq]",
            "description": "Mac address eth0 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth0_cont]",
            "description": "Ip address eth0 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth0_eq]",
            "description": "Ip address eth0 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth1_cont]",
            "description": "Mac address eth1 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth1_eq]",
            "description": "Mac address eth1 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth1_cont]",
            "description": "Ip address eth1 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth1_eq]",
            "description": "Ip address eth1 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, mac_address_eth0, ip_address_eth0, mac_address_eth1, ip_address_eth1, description, notes, state, last_active_at, name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate gateways",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "gateways"
        ],
        "operationId": "getRestV1GatewaysAggregate",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "mac_address_eth0": "text",
            "ip_address_eth0": "text",
            "mac_address_eth1": "text",
            "ip_address_eth1": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "name": "text"
          },
          "sortable": [
            "site_id",
            "building_id",
            "mac_address_eth0",
            "ip_address_eth0",
            "mac_address_eth1",
            "ip_address_eth1",
            "description",
            "notes",
            "state",
            "last_active_at",
            "name"
          ]
        }
      }
    },
    "/rest/v1/gateways": {
      "get": {
        "summary": "List all gateways across all sites",
        "description": "Returns the gateways at every site this integration may see.\n\nRequires the `gateways:read` permission.\n\nA gateway is what connects a site's hardware to us, so its `state` and\n`last_active_at` answer a question no other resource can: whether the site is\nreachable at all. A door that will not open and a gateway that has not reported\nfor an hour are usually the same fact told twice.\n\nThe local addresses are here, because on your own estate they are how a box is\nrecognised. What is deliberately not here is what identifies the device to us\nrather than to you: hostname, serial number, fleet and release identifiers, and\nthe site's public address. Those live in the operator's console.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth0_cont]",
            "description": "Mac address eth0 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth0_eq]",
            "description": "Mac address eth0 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth0_cont]",
            "description": "Ip address eth0 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth0_eq]",
            "description": "Ip address eth0 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth1_cont]",
            "description": "Mac address eth1 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eth1_eq]",
            "description": "Mac address eth1 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth1_cont]",
            "description": "Ip address eth1 contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eth1_eq]",
            "description": "Ip address eth1 equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, mac_address_eth0, ip_address_eth0, mac_address_eth1, ip_address_eth1, description, notes, state, last_active_at, name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all gateways across all sites",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Gateway"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "gateways"
        ],
        "operationId": "getRestV1Gateways",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "mac_address_eth0": "text",
            "ip_address_eth0": "text",
            "mac_address_eth1": "text",
            "ip_address_eth1": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "name": "text"
          },
          "sortable": [
            "site_id",
            "building_id",
            "mac_address_eth0",
            "ip_address_eth0",
            "mac_address_eth1",
            "ip_address_eth1",
            "description",
            "notes",
            "state",
            "last_active_at",
            "name"
          ]
        }
      }
    },
    "/rest/v1/incidents/aggregate": {
      "get": {
        "summary": "Count or aggregate incidents",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id, problem, owner, kind, due_at, opened_at, closed_at, cause_kind, acknowledged_at.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: affected_tenancies.\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[problem_eq]",
            "description": "Problem equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "site_unreachable",
                "site_on_backup_uplink",
                "renewals_not_landing",
                "revocation_not_landing",
                "gateway_offline",
                "lock_controller_offline",
                "terminal_offline",
                "ble_connector_offline",
                "lock_cable_broken",
                "battery_low",
                "battery_critical",
                "unitlock_silent",
                "access_lists_invalid",
                "stale_credential_accepted",
                "entrance_marked_broken",
                "flapping",
                "ble_coverage_degraded",
                "terminal_coverage_degraded",
                "entry_help",
                "sabotage_detected",
                "emergency_release_triggered",
                "door_forced_open",
                "motion_outside_opening_hours",
                "door_left_open",
                "unit_left_unlocked",
                "opened_without_sign_in",
                "pin_failures_outside_hours",
                "access_schedule_changed",
                "several_warnings_at_once",
                "cable_cut_suspected",
                "motion_at_unopened_unit",
                "monitored_device_offline",
                "camera_not_recording",
                "blocked_credential_presented",
                "lock_controller_module_fault",
                "imported_pin_code_rejected"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[owner_eq]",
            "description": "Owner equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "operator",
                "provider"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[kind_eq]",
            "description": "Kind equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "operations",
                "security"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[affected_tenancies_eq]",
            "description": "Affected tenancies equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[due_at_gteq]",
            "description": "Due at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[due_at_lteq]",
            "description": "Due at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[opened_at_gteq]",
            "description": "Opened at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[opened_at_lteq]",
            "description": "Opened at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[closed_at_gteq]",
            "description": "Closed at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[closed_at_lteq]",
            "description": "Closed at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[cause_kind_eq]",
            "description": "Cause kind equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "site",
                "gateway",
                "lock_controller",
                "lock",
                "terminal",
                "ble_connector",
                "entrance",
                "network_device",
                "network_video_recorder",
                "network_camera"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[cause_label_cont]",
            "description": "Cause label contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[cause_label_eq]",
            "description": "Cause label equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[acknowledged_at_gteq]",
            "description": "Acknowledged at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[acknowledged_at_lteq]",
            "description": "Acknowledged at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, problem, owner, kind, affected_tenancies, due_at, opened_at, closed_at, cause_kind, cause_label, acknowledged_at.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate incidents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "incidents"
        ],
        "operationId": "getRestV1IncidentsAggregate",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "problem": {
              "class": "enum",
              "values": [
                "site_unreachable",
                "site_on_backup_uplink",
                "renewals_not_landing",
                "revocation_not_landing",
                "gateway_offline",
                "lock_controller_offline",
                "terminal_offline",
                "ble_connector_offline",
                "lock_cable_broken",
                "battery_low",
                "battery_critical",
                "unitlock_silent",
                "access_lists_invalid",
                "stale_credential_accepted",
                "entrance_marked_broken",
                "flapping",
                "ble_coverage_degraded",
                "terminal_coverage_degraded",
                "entry_help",
                "sabotage_detected",
                "emergency_release_triggered",
                "door_forced_open",
                "motion_outside_opening_hours",
                "door_left_open",
                "unit_left_unlocked",
                "opened_without_sign_in",
                "pin_failures_outside_hours",
                "access_schedule_changed",
                "several_warnings_at_once",
                "cable_cut_suspected",
                "motion_at_unopened_unit",
                "monitored_device_offline",
                "camera_not_recording",
                "blocked_credential_presented",
                "lock_controller_module_fault",
                "imported_pin_code_rejected"
              ]
            },
            "owner": {
              "class": "enum",
              "values": [
                "operator",
                "provider"
              ]
            },
            "kind": {
              "class": "enum",
              "values": [
                "operations",
                "security"
              ]
            },
            "affected_tenancies": {
              "class": "numeric",
              "format": "integer"
            },
            "due_at": "datetime",
            "opened_at": "datetime",
            "closed_at": "datetime",
            "cause_kind": {
              "class": "enum",
              "values": [
                "site",
                "gateway",
                "lock_controller",
                "lock",
                "terminal",
                "ble_connector",
                "entrance",
                "network_device",
                "network_video_recorder",
                "network_camera"
              ]
            },
            "cause_label": "text",
            "acknowledged_at": "datetime"
          },
          "sortable": [
            "site_id",
            "problem",
            "owner",
            "kind",
            "affected_tenancies",
            "due_at",
            "opened_at",
            "closed_at",
            "cause_kind",
            "cause_label",
            "acknowledged_at"
          ]
        }
      }
    },
    "/rest/v1/incidents": {
      "get": {
        "summary": "List all incidents across all sites",
        "description": "Returns operational incidents at the sites this integration may see, newest\nfirst.\n\nRequires the `incidents:read` permission. One row per CAUSE, not per symptom:\nseven units behind one dead lock controller is one incident, not seven. `owner`\nsays whose problem it currently is to fix: `operator` or `provider`, and it is\nre-evaluated on every reconciliation run rather than fixed at opening.\n\nEmpty until the organisation's operators can see the feature themselves, and a\nproblem type still being tuned internally is absent here exactly as it is from\nthe operator's own screen. It has to graduate before any integration can see\nit, the same way it has to graduate before an operator does.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[problem_eq]",
            "description": "Problem equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "site_unreachable",
                "site_on_backup_uplink",
                "renewals_not_landing",
                "revocation_not_landing",
                "gateway_offline",
                "lock_controller_offline",
                "terminal_offline",
                "ble_connector_offline",
                "lock_cable_broken",
                "battery_low",
                "battery_critical",
                "unitlock_silent",
                "access_lists_invalid",
                "stale_credential_accepted",
                "entrance_marked_broken",
                "flapping",
                "ble_coverage_degraded",
                "terminal_coverage_degraded",
                "entry_help",
                "sabotage_detected",
                "emergency_release_triggered",
                "door_forced_open",
                "motion_outside_opening_hours",
                "door_left_open",
                "unit_left_unlocked",
                "opened_without_sign_in",
                "pin_failures_outside_hours",
                "access_schedule_changed",
                "several_warnings_at_once",
                "cable_cut_suspected",
                "motion_at_unopened_unit",
                "monitored_device_offline",
                "camera_not_recording",
                "blocked_credential_presented",
                "lock_controller_module_fault",
                "imported_pin_code_rejected"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[owner_eq]",
            "description": "Owner equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "operator",
                "provider"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[kind_eq]",
            "description": "Kind equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "operations",
                "security"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[affected_tenancies_eq]",
            "description": "Affected tenancies equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[due_at_gteq]",
            "description": "Due at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[due_at_lteq]",
            "description": "Due at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[opened_at_gteq]",
            "description": "Opened at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[opened_at_lteq]",
            "description": "Opened at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[closed_at_gteq]",
            "description": "Closed at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[closed_at_lteq]",
            "description": "Closed at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[cause_kind_eq]",
            "description": "Cause kind equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "site",
                "gateway",
                "lock_controller",
                "lock",
                "terminal",
                "ble_connector",
                "entrance",
                "network_device",
                "network_video_recorder",
                "network_camera"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[cause_label_cont]",
            "description": "Cause label contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[cause_label_eq]",
            "description": "Cause label equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[acknowledged_at_gteq]",
            "description": "Acknowledged at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[acknowledged_at_lteq]",
            "description": "Acknowledged at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, problem, owner, kind, affected_tenancies, due_at, opened_at, closed_at, cause_kind, cause_label, acknowledged_at.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all incidents across all sites",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Incident"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "incidents"
        ],
        "operationId": "getRestV1Incidents",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "problem": {
              "class": "enum",
              "values": [
                "site_unreachable",
                "site_on_backup_uplink",
                "renewals_not_landing",
                "revocation_not_landing",
                "gateway_offline",
                "lock_controller_offline",
                "terminal_offline",
                "ble_connector_offline",
                "lock_cable_broken",
                "battery_low",
                "battery_critical",
                "unitlock_silent",
                "access_lists_invalid",
                "stale_credential_accepted",
                "entrance_marked_broken",
                "flapping",
                "ble_coverage_degraded",
                "terminal_coverage_degraded",
                "entry_help",
                "sabotage_detected",
                "emergency_release_triggered",
                "door_forced_open",
                "motion_outside_opening_hours",
                "door_left_open",
                "unit_left_unlocked",
                "opened_without_sign_in",
                "pin_failures_outside_hours",
                "access_schedule_changed",
                "several_warnings_at_once",
                "cable_cut_suspected",
                "motion_at_unopened_unit",
                "monitored_device_offline",
                "camera_not_recording",
                "blocked_credential_presented",
                "lock_controller_module_fault",
                "imported_pin_code_rejected"
              ]
            },
            "owner": {
              "class": "enum",
              "values": [
                "operator",
                "provider"
              ]
            },
            "kind": {
              "class": "enum",
              "values": [
                "operations",
                "security"
              ]
            },
            "affected_tenancies": {
              "class": "numeric",
              "format": "integer"
            },
            "due_at": "datetime",
            "opened_at": "datetime",
            "closed_at": "datetime",
            "cause_kind": {
              "class": "enum",
              "values": [
                "site",
                "gateway",
                "lock_controller",
                "lock",
                "terminal",
                "ble_connector",
                "entrance",
                "network_device",
                "network_video_recorder",
                "network_camera"
              ]
            },
            "cause_label": "text",
            "acknowledged_at": "datetime"
          },
          "sortable": [
            "site_id",
            "problem",
            "owner",
            "kind",
            "affected_tenancies",
            "due_at",
            "opened_at",
            "closed_at",
            "cause_kind",
            "cause_label",
            "acknowledged_at"
          ]
        }
      }
    },
    "/rest/v1/incidents/{id}": {
      "get": {
        "summary": "Get details about a specific incident",
        "description": "Returns one incident.\n\nRequires the `incidents:read` permission. An id belonging to a site outside\nthis integration's grant, to a problem type not yet released, or to an\norganisation that cannot see this feature yet at all, answers 404,\nindistinguishable from an id that does not exist at all.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the incident",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific incident",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Incident"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "incidents"
        ],
        "operationId": "getRestV1IncidentsId"
      }
    },
    "/rest/v1/lock_controllers/aggregate": {
      "get": {
        "summary": "Count or aggregate lock controllers",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id, building_id, state, last_active_at, last_active_at_building, last_active_at_cloud, battery_state, sabotage_detected_at.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: locks_count.\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_gteq]",
            "description": "Last active at building on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_lteq]",
            "description": "Last active at building on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_gteq]",
            "description": "Last active at cloud on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_lteq]",
            "description": "Last active at cloud on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[battery_state_eq]",
            "description": "Battery state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "full",
                "normal",
                "low",
                "critical"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[sabotage_detected_at_gteq]",
            "description": "Sabotage detected at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[sabotage_detected_at_lteq]",
            "description": "Sabotage detected at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[locks_count_eq]",
            "description": "Locks count equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_cont]",
            "description": "Firmware version contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_eq]",
            "description": "Firmware version equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, mac_address, ip_address, description, notes, state, last_active_at, last_active_at_building, last_active_at_cloud, battery_state, sabotage_detected_at, locks_count, firmware_version.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate lock controllers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "lock_controllers"
        ],
        "operationId": "getRestV1LockControllersAggregate",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "mac_address": "text",
            "ip_address": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "last_active_at_building": "datetime",
            "last_active_at_cloud": "datetime",
            "battery_state": {
              "class": "enum",
              "values": [
                "unknown",
                "full",
                "normal",
                "low",
                "critical"
              ]
            },
            "sabotage_detected_at": "datetime",
            "locks_count": {
              "class": "numeric",
              "format": "integer"
            },
            "firmware_version": "text"
          },
          "sortable": [
            "site_id",
            "building_id",
            "mac_address",
            "ip_address",
            "description",
            "notes",
            "state",
            "last_active_at",
            "last_active_at_building",
            "last_active_at_cloud",
            "battery_state",
            "sabotage_detected_at",
            "locks_count",
            "firmware_version"
          ]
        }
      }
    },
    "/rest/v1/lock_controllers": {
      "get": {
        "summary": "List all lock controllers across all sites",
        "description": "Returns the lock controllers at every site this integration may see.\n\nRequires the `lock_controllers:read` permission.\n\nA lock reports the door it sits on; a controller reports the box that drives a\nrow of them. When several doors stop answering at once, this is the level the\nexplanation lives at, and `battery_state` is the one reading here that\npredicts an outage instead of reporting one, because a controller runs its\ndoors off a battery when the mains fail.\n\nThe two `last_active_at_*` stamps are not interchangeable. `_cloud` is the\ncontroller reporting to us over the internet, `_building` is the site gateway\nreaching it over the building network. Fresh in the building and stale in the\ncloud is a connectivity problem; the other way round it is a wiring one.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_gteq]",
            "description": "Last active at building on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_building_lteq]",
            "description": "Last active at building on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_gteq]",
            "description": "Last active at cloud on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_cloud_lteq]",
            "description": "Last active at cloud on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[battery_state_eq]",
            "description": "Battery state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "full",
                "normal",
                "low",
                "critical"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[sabotage_detected_at_gteq]",
            "description": "Sabotage detected at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[sabotage_detected_at_lteq]",
            "description": "Sabotage detected at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[locks_count_eq]",
            "description": "Locks count equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_cont]",
            "description": "Firmware version contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[firmware_version_eq]",
            "description": "Firmware version equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, mac_address, ip_address, description, notes, state, last_active_at, last_active_at_building, last_active_at_cloud, battery_state, sabotage_detected_at, locks_count, firmware_version.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all lock controllers across all sites",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_LockController"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "lock_controllers"
        ],
        "operationId": "getRestV1LockControllers",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "mac_address": "text",
            "ip_address": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "last_active_at_building": "datetime",
            "last_active_at_cloud": "datetime",
            "battery_state": {
              "class": "enum",
              "values": [
                "unknown",
                "full",
                "normal",
                "low",
                "critical"
              ]
            },
            "sabotage_detected_at": "datetime",
            "locks_count": {
              "class": "numeric",
              "format": "integer"
            },
            "firmware_version": "text"
          },
          "sortable": [
            "site_id",
            "building_id",
            "mac_address",
            "ip_address",
            "description",
            "notes",
            "state",
            "last_active_at",
            "last_active_at_building",
            "last_active_at_cloud",
            "battery_state",
            "sabotage_detected_at",
            "locks_count",
            "firmware_version"
          ]
        }
      }
    },
    "/rest/v1/locks/aggregate": {
      "get": {
        "summary": "Count or aggregate locks",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: entrance_id, last_active_at, lock_state, door_state, cable_state.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[entrance_id_eq]",
            "description": "Entrance ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[lock_state_eq]",
            "description": "Lock state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "open",
                "locked"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[door_state_eq]",
            "description": "Door state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "open",
                "closed"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[cable_state_eq]",
            "description": "Cable state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "broken",
                "healthy"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: entrance_id, last_active_at, lock_state, door_state, cable_state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate locks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "locks"
        ],
        "operationId": "getRestV1LocksAggregate",
        "x-filter": {
          "fields": {
            "entrance_id": "identifier",
            "last_active_at": "datetime",
            "lock_state": {
              "class": "enum",
              "values": [
                "unknown",
                "open",
                "locked"
              ]
            },
            "door_state": {
              "class": "enum",
              "values": [
                "unknown",
                "open",
                "closed"
              ]
            },
            "cable_state": {
              "class": "enum",
              "values": [
                "unknown",
                "broken",
                "healthy"
              ]
            }
          },
          "sortable": [
            "entrance_id",
            "last_active_at",
            "lock_state",
            "door_state",
            "cable_state"
          ]
        }
      }
    },
    "/rest/v1/locks": {
      "get": {
        "summary": "List all locks across all sites",
        "description": "Returns the locks at every site this integration may see.\n\nRequires the `locks:read` permission.\n\nThis is the hardware behind an entrance, and it answers the question an entrance\ncannot: not what *may* be done at the door, but what the door is doing. Three\nreadings (whether the lock is engaged, whether the door stands open, whether the\nwiring is healthy), plus when the lock was last heard from.\n\n**`unknown` is an answer, not a gap.** A lock that has never reported says so,\nand telling that from `open` is the difference between \"the door is fine\" and\n\"we have no idea\".\n\n`entrance_id` is absent while a lock is not fitted to a door. Filter on it to\nfind the ones that are, or to find a spare.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[entrance_id_eq]",
            "description": "Entrance ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[lock_state_eq]",
            "description": "Lock state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "open",
                "locked"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[door_state_eq]",
            "description": "Door state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "open",
                "closed"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[cable_state_eq]",
            "description": "Cable state equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "broken",
                "healthy"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: entrance_id, last_active_at, lock_state, door_state, cable_state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all locks across all sites",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Lock"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "locks"
        ],
        "operationId": "getRestV1Locks",
        "x-filter": {
          "fields": {
            "entrance_id": "identifier",
            "last_active_at": "datetime",
            "lock_state": {
              "class": "enum",
              "values": [
                "unknown",
                "open",
                "locked"
              ]
            },
            "door_state": {
              "class": "enum",
              "values": [
                "unknown",
                "open",
                "closed"
              ]
            },
            "cable_state": {
              "class": "enum",
              "values": [
                "unknown",
                "broken",
                "healthy"
              ]
            }
          },
          "sortable": [
            "entrance_id",
            "last_active_at",
            "lock_state",
            "door_state",
            "cable_state"
          ]
        }
      }
    },
    "/rest/v1/network_devices/aggregate": {
      "get": {
        "summary": "Count or aggregate network devices",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: known, monitoring, last_seen_at, first_seen_at, offline_since, site_id, pingable.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[vendor_cont]",
            "description": "Vendor contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[vendor_eq]",
            "description": "Vendor equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[interface_cont]",
            "description": "Interface contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[interface_eq]",
            "description": "Interface equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[known_eq]",
            "description": "Known equals",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "q[monitoring_eq]",
            "description": "Monitoring equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inactive",
                "active",
                "high_priority"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_seen_at_gteq]",
            "description": "Last seen at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_seen_at_lteq]",
            "description": "Last seen at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[first_seen_at_gteq]",
            "description": "First seen at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[first_seen_at_lteq]",
            "description": "First seen at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[offline_since_gteq]",
            "description": "Offline since on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[offline_since_lteq]",
            "description": "Offline since on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[pingable_eq]",
            "description": "Pingable equals",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "q[associated_device_type_cont]",
            "description": "Associated device type contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[associated_device_type_eq]",
            "description": "Associated device type equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, description, ip_address, mac_address, vendor, interface, known, monitoring, last_seen_at, first_seen_at, offline_since, site_id, pingable, associated_device_type.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate network devices",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "network_devices"
        ],
        "operationId": "getRestV1NetworkDevicesAggregate",
        "x-filter": {
          "fields": {
            "name": "text",
            "description": "text",
            "ip_address": "text",
            "mac_address": "text",
            "vendor": "text",
            "interface": "text",
            "known": "boolean",
            "monitoring": {
              "class": "enum",
              "values": [
                "inactive",
                "active",
                "high_priority"
              ]
            },
            "last_seen_at": "datetime",
            "first_seen_at": "datetime",
            "offline_since": "datetime",
            "site_id": "identifier",
            "pingable": "boolean",
            "associated_device_type": "text"
          },
          "sortable": [
            "name",
            "description",
            "ip_address",
            "mac_address",
            "vendor",
            "interface",
            "known",
            "monitoring",
            "last_seen_at",
            "first_seen_at",
            "offline_since",
            "site_id",
            "pingable",
            "associated_device_type"
          ]
        }
      }
    },
    "/rest/v1/network_devices": {
      "get": {
        "summary": "List all adopted network devices across all sites",
        "description": "Returns the devices on your building networks that a site has adopted.\n\nRequires the `network_devices:read` permission.\n\n**This resource returns fewer rows than the console shows, on purpose.** The\ntable behind it is an ARP sweep: it records whatever answered on the network,\nwhich at a staffed site is largely personal phones and laptops. A row reaches\nthis API only once somebody linked it to a device we know, or switched\nmonitoring on for it: both acts by an operator saying \"this one is ours\".\nEverything else stays in the console, where it is subject to retention\ndeletion. A device that was not adopted cannot be fetched by its id either.\n\nFor the rows that do come through, `associated_device_type` and\n`associated_device_id` say what it was recognised as, addressable on that\nresource's own route.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[vendor_cont]",
            "description": "Vendor contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[vendor_eq]",
            "description": "Vendor equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[interface_cont]",
            "description": "Interface contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[interface_eq]",
            "description": "Interface equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[known_eq]",
            "description": "Known equals",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "q[monitoring_eq]",
            "description": "Monitoring equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inactive",
                "active",
                "high_priority"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_seen_at_gteq]",
            "description": "Last seen at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_seen_at_lteq]",
            "description": "Last seen at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[first_seen_at_gteq]",
            "description": "First seen at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[first_seen_at_lteq]",
            "description": "First seen at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[offline_since_gteq]",
            "description": "Offline since on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[offline_since_lteq]",
            "description": "Offline since on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[pingable_eq]",
            "description": "Pingable equals",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "q[associated_device_type_cont]",
            "description": "Associated device type contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[associated_device_type_eq]",
            "description": "Associated device type equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, description, ip_address, mac_address, vendor, interface, known, monitoring, last_seen_at, first_seen_at, offline_since, site_id, pingable, associated_device_type.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all adopted network devices across all sites",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_NetworkDevice"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "network_devices"
        ],
        "operationId": "getRestV1NetworkDevices",
        "x-filter": {
          "fields": {
            "name": "text",
            "description": "text",
            "ip_address": "text",
            "mac_address": "text",
            "vendor": "text",
            "interface": "text",
            "known": "boolean",
            "monitoring": {
              "class": "enum",
              "values": [
                "inactive",
                "active",
                "high_priority"
              ]
            },
            "last_seen_at": "datetime",
            "first_seen_at": "datetime",
            "offline_since": "datetime",
            "site_id": "identifier",
            "pingable": "boolean",
            "associated_device_type": "text"
          },
          "sortable": [
            "name",
            "description",
            "ip_address",
            "mac_address",
            "vendor",
            "interface",
            "known",
            "monitoring",
            "last_seen_at",
            "first_seen_at",
            "offline_since",
            "site_id",
            "pingable",
            "associated_device_type"
          ]
        }
      }
    },
    "/rest/v1/terminals/aggregate": {
      "get": {
        "summary": "Count or aggregate terminals",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id, building_id, zone_id, state, last_active_at.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[zone_id_eq]",
            "description": "Zone ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, zone_id, mac_address, ip_address, description, notes, state, last_active_at, name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate terminals",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "terminals"
        ],
        "operationId": "getRestV1TerminalsAggregate",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "zone_id": "identifier",
            "mac_address": "text",
            "ip_address": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "name": "text"
          },
          "sortable": [
            "site_id",
            "building_id",
            "zone_id",
            "mac_address",
            "ip_address",
            "description",
            "notes",
            "state",
            "last_active_at",
            "name"
          ]
        }
      }
    },
    "/rest/v1/terminals": {
      "get": {
        "summary": "List all terminals across all sites",
        "description": "Returns the terminals at every site this integration may see.\n\nRequires the `terminals:read` permission.\n\nA terminal is the screen a person walks up to, which is what makes it the one\ndevice here whose silence is visible to a customer: a terminal that stopped\nreporting is a queue forming at the gate, not a background fault.\n\nThe self-service settings are deliberately not returned. They are configuration\nof the kiosk the terminal runs, two of them are credentials, and whether an\nintegration may change an operator's setting is a separate question from\nwhether it may see the state it is working against.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[building_id_eq]",
            "description": "Building ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[zone_id_eq]",
            "description": "Zone ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_cont]",
            "description": "Mac address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[mac_address_eq]",
            "description": "Mac address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_cont]",
            "description": "Ip address contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[ip_address_eq]",
            "description": "Ip address equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unknown",
                "installed",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_gteq]",
            "description": "Last active at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[last_active_at_lteq]",
            "description": "Last active at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: site_id, building_id, zone_id, mac_address, ip_address, description, notes, state, last_active_at, name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all terminals across all sites",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Terminal"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "terminals"
        ],
        "operationId": "getRestV1Terminals",
        "x-filter": {
          "fields": {
            "site_id": "identifier",
            "building_id": "identifier",
            "zone_id": "identifier",
            "mac_address": "text",
            "ip_address": "text",
            "description": "text",
            "notes": "text",
            "state": {
              "class": "enum",
              "values": [
                "unknown",
                "installed",
                "broken"
              ]
            },
            "last_active_at": "datetime",
            "name": "text"
          },
          "sortable": [
            "site_id",
            "building_id",
            "zone_id",
            "mac_address",
            "ip_address",
            "description",
            "notes",
            "state",
            "last_active_at",
            "name"
          ]
        }
      }
    },
    "/rest/v1/units/aggregate": {
      "get": {
        "summary": "Count or aggregate units",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: unit_type, state, zone_id, site_id.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: width, length, height, capacity, base_area.\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[unit_type_eq]",
            "description": "Unit type equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "storage_unit",
                "drive_up",
                "room",
                "parcel_room",
                "locker",
                "garage",
                "parking_space",
                "bike_rack",
                "other"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "available",
                "booked",
                "demo",
                "disabled",
                "broken",
                "under_construction",
                "archived"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[width_eq]",
            "description": "Width equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[length_eq]",
            "description": "Length equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[height_eq]",
            "description": "Height equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[capacity_eq]",
            "description": "Capacity equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[base_area_eq]",
            "description": "Base area equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[zone_id_eq]",
            "description": "Zone ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, description, notes, unit_type, state, width, length, height, capacity, base_area, zone_id, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate units",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "units"
        ],
        "operationId": "getRestV1UnitsAggregate",
        "x-filter": {
          "fields": {
            "name": "text",
            "description": "text",
            "notes": "text",
            "unit_type": {
              "class": "enum",
              "values": [
                "unspecified",
                "storage_unit",
                "drive_up",
                "room",
                "parcel_room",
                "locker",
                "garage",
                "parking_space",
                "bike_rack",
                "other"
              ]
            },
            "state": {
              "class": "enum",
              "values": [
                "unspecified",
                "available",
                "booked",
                "demo",
                "disabled",
                "broken",
                "under_construction",
                "archived"
              ]
            },
            "width": {
              "class": "numeric",
              "format": "float"
            },
            "length": {
              "class": "numeric",
              "format": "float"
            },
            "height": {
              "class": "numeric",
              "format": "float"
            },
            "capacity": {
              "class": "numeric",
              "format": "float"
            },
            "base_area": {
              "class": "numeric",
              "format": "float"
            },
            "zone_id": "identifier",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "description",
            "notes",
            "unit_type",
            "state",
            "width",
            "length",
            "height",
            "capacity",
            "base_area",
            "zone_id",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/units": {
      "get": {
        "summary": "List all units across all sites",
        "description": "Returns the units at every site this integration may see, ordered by name.\n\nRequires the `units:read` permission. Use this when you want the whole estate in one\nsweep; the same listing exists under a site (`/sites/{site_id}/units`) when you want\none site's.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_cont]",
            "description": "Description contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[description_eq]",
            "description": "Description equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_cont]",
            "description": "Notes contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[notes_eq]",
            "description": "Notes equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[unit_type_eq]",
            "description": "Unit type equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "storage_unit",
                "drive_up",
                "room",
                "parcel_room",
                "locker",
                "garage",
                "parking_space",
                "bike_rack",
                "other"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "available",
                "booked",
                "demo",
                "disabled",
                "broken",
                "under_construction",
                "archived"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[width_eq]",
            "description": "Width equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[length_eq]",
            "description": "Length equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[height_eq]",
            "description": "Height equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[capacity_eq]",
            "description": "Capacity equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[base_area_eq]",
            "description": "Base area equals",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "in": "query",
            "name": "q[zone_id_eq]",
            "description": "Zone ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, description, notes, unit_type, state, width, length, height, capacity, base_area, zone_id, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all units across all sites",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Unit"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "units"
        ],
        "operationId": "getRestV1Units",
        "x-filter": {
          "fields": {
            "name": "text",
            "description": "text",
            "notes": "text",
            "unit_type": {
              "class": "enum",
              "values": [
                "unspecified",
                "storage_unit",
                "drive_up",
                "room",
                "parcel_room",
                "locker",
                "garage",
                "parking_space",
                "bike_rack",
                "other"
              ]
            },
            "state": {
              "class": "enum",
              "values": [
                "unspecified",
                "available",
                "booked",
                "demo",
                "disabled",
                "broken",
                "under_construction",
                "archived"
              ]
            },
            "width": {
              "class": "numeric",
              "format": "float"
            },
            "length": {
              "class": "numeric",
              "format": "float"
            },
            "height": {
              "class": "numeric",
              "format": "float"
            },
            "capacity": {
              "class": "numeric",
              "format": "float"
            },
            "base_area": {
              "class": "numeric",
              "format": "float"
            },
            "zone_id": "identifier",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "description",
            "notes",
            "unit_type",
            "state",
            "width",
            "length",
            "height",
            "capacity",
            "base_area",
            "zone_id",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/rental_agreements/aggregate": {
      "get": {
        "summary": "Count or aggregate rental agreements",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: state, starts_at, ends_at, site_id.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "active",
                "inactive",
                "unpaid",
                "terminated",
                "archived"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[starts_at_gteq]",
            "description": "Starts at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[starts_at_lteq]",
            "description": "Starts at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[ends_at_gteq]",
            "description": "Ends at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[ends_at_lteq]",
            "description": "Ends at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, state, starts_at, ends_at, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate rental agreements",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "rental_agreements"
        ],
        "operationId": "getRestV1RentalAgreementsAggregate",
        "x-filter": {
          "fields": {
            "name": "text",
            "state": {
              "class": "enum",
              "values": [
                "pending",
                "active",
                "inactive",
                "unpaid",
                "terminated",
                "archived"
              ]
            },
            "starts_at": "datetime",
            "ends_at": "datetime",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "state",
            "starts_at",
            "ends_at",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/rental_agreements": {
      "get": {
        "summary": "List all rental agreements",
        "description": "Returns the rental agreements at the sites this integration may see, ordered by name.\n\nRequires the `rental_agreements:read` permission. An agreement ties a renting customer to\na unit for a period, and it is the basis on which anybody has access at all.\n\nFilter by `state_eq` to separate the live ones from the ended; the states are listed on\nthe parameter.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "active",
                "inactive",
                "unpaid",
                "terminated",
                "archived"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[starts_at_gteq]",
            "description": "Starts at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[starts_at_lteq]",
            "description": "Starts at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[ends_at_gteq]",
            "description": "Ends at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[ends_at_lteq]",
            "description": "Ends at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, state, starts_at, ends_at, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all rental agreements",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_RentalAgreement"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "rental_agreements"
        ],
        "operationId": "getRestV1RentalAgreements",
        "x-filter": {
          "fields": {
            "name": "text",
            "state": {
              "class": "enum",
              "values": [
                "pending",
                "active",
                "inactive",
                "unpaid",
                "terminated",
                "archived"
              ]
            },
            "starts_at": "datetime",
            "ends_at": "datetime",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "state",
            "starts_at",
            "ends_at",
            "site_id",
            "external_id"
          ]
        }
      },
      "post": {
        "summary": "Creates a new rental agreement",
        "description": "Creates a rental agreement between a tenant and a unit.\n\nRequires the `rental_agreements:write` permission. This is the call that turns a customer\nand a unit into access: the access rights follow from it, and you do not create them\nyourself.\n\n`starts_at` and `ends_at` bound the period. An agreement with no `ends_at` runs until you\nend it. A time without an offset is read in the local time of the unit's site, and a bare\ndate covers the whole local day.\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/postRestV1RentalAgreements"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Creates a new rental agreement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_RentalAgreement"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "rental_agreements"
        ],
        "operationId": "postRestV1RentalAgreements"
      }
    },
    "/rest/v1/rental_agreements/{id}": {
      "get": {
        "summary": "Get details about a specific rental agreement",
        "description": "Returns one rental agreement.\n\nRequires the `rental_agreements:read` permission. Accepts either the UUID or your own\n`external_id`.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the rental_agreement",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific rental agreement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_RentalAgreement"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "rental_agreements"
        ],
        "operationId": "getRestV1RentalAgreementsId"
      },
      "put": {
        "summary": "Updates a rental agreement",
        "description": "Updates a rental agreement.\n\nRequires the `rental_agreements:write` permission. Fields you leave out keep their current\nvalue.\n\n**Ending an agreement is how you end access.** Set `ends_at`, or move the state, and the\naccess rights derived from it are withdrawn with it: there is nothing separate to revoke,\nand revoking rights by hand would leave the agreement contradicting them.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the rental_agreement",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/putRestV1RentalAgreementsId"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updates a rental agreement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_RentalAgreement"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "rental_agreements"
        ],
        "operationId": "putRestV1RentalAgreementsId"
      },
      "delete": {
        "summary": "Deletes a rental agreement",
        "description": "Deletes a rental agreement.\n\nRequires the `rental_agreements:write` permission. The deleted record is returned in the\nresponse.\n\nPrefer *ending* an agreement to deleting it. Deleting removes the record of why somebody\nhad access; ending keeps the history and withdraws the access just as completely.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the rental_agreement",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deletes a rental agreement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_RentalAgreement"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "rental_agreements"
        ],
        "operationId": "deleteRestV1RentalAgreementsId"
      }
    },
    "/rest/v1/tenants/aggregate": {
      "get": {
        "summary": "Count or aggregate tenants",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: tenant_type.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[tenant_type_eq]",
            "description": "Tenant type equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "individual",
                "business",
                "organization",
                "other"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[unique_identifier_cont]",
            "description": "Unique identifier contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[unique_identifier_eq]",
            "description": "Unique identifier equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, tenant_type, unique_identifier, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate tenants",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "tenants"
        ],
        "operationId": "getRestV1TenantsAggregate",
        "x-filter": {
          "fields": {
            "name": "text",
            "tenant_type": {
              "class": "enum",
              "values": [
                "unspecified",
                "individual",
                "business",
                "organization",
                "other"
              ]
            },
            "unique_identifier": "text",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "tenant_type",
            "unique_identifier",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/tenants": {
      "get": {
        "summary": "List all tenants",
        "description": "Returns the renting customers of this installation, ordered by name.\n\nRequires the `tenants:read` permission. A tenant is a **renting customer**: a person or a\ncompany that rents from the operator, and not a tenant in the multi-tenancy sense.\n\nTenants are deliberately not scoped by site: staff have to be able to find an existing\ncustomer before knowing which site they rent at, and a customer may rent at several.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[tenant_type_eq]",
            "description": "Tenant type equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "individual",
                "business",
                "organization",
                "other"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[unique_identifier_cont]",
            "description": "Unique identifier contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[unique_identifier_eq]",
            "description": "Unique identifier equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, tenant_type, unique_identifier, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all tenants",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Tenant"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "tenants"
        ],
        "operationId": "getRestV1Tenants",
        "x-filter": {
          "fields": {
            "name": "text",
            "tenant_type": {
              "class": "enum",
              "values": [
                "unspecified",
                "individual",
                "business",
                "organization",
                "other"
              ]
            },
            "unique_identifier": "text",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "tenant_type",
            "unique_identifier",
            "external_id"
          ]
        }
      },
      "post": {
        "summary": "Creates a new tenant",
        "description": "Creates a renting customer.\n\nRequires the `tenants:write` permission. `name` is the only required field. Set\n`external_id` to your own identifier and you can address the tenant that way afterwards;\n`unique_identifier` is for the operator's own customer number.\n\nCreating a tenant grants nobody anything. Access follows from a rental agreement and a\ntenant membership, which are separate calls.\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/postRestV1Tenants"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Creates a new tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Tenant"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "tenants"
        ],
        "operationId": "postRestV1Tenants"
      }
    },
    "/rest/v1/tenants/{id}": {
      "get": {
        "summary": "Get details about a specific tenant",
        "description": "Returns one renting customer.\n\nRequires the `tenants:read` permission. Accepts either the UUID or your own `external_id`.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the tenant",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Tenant"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "tenants"
        ],
        "operationId": "getRestV1TenantsId"
      },
      "put": {
        "summary": "Updates a tenant",
        "description": "Updates a renting customer.\n\nRequires the `tenants:write` permission. Fields you leave out keep their current value.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the tenant",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/putRestV1TenantsId"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updates a tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Tenant"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "tenants"
        ],
        "operationId": "putRestV1TenantsId"
      },
      "delete": {
        "summary": "Deletes a tenant",
        "description": "Deletes a renting customer.\n\nRequires the `tenants:write` permission. The deleted record is returned in the response.\n\nDelete the tenant's rental agreements and memberships first. Access is derived from those,\nand this endpoint does not cascade.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the tenant",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deletes a tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Tenant"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "tenants"
        ],
        "operationId": "deleteRestV1TenantsId"
      }
    },
    "/rest/v1/tenant_memberships/aggregate": {
      "get": {
        "summary": "Count or aggregate tenant memberships",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: starts_at, ends_at, role.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[invitation_email_eq]",
            "description": "Invitation email equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[starts_at_gteq]",
            "description": "Starts at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[starts_at_lteq]",
            "description": "Starts at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[ends_at_gteq]",
            "description": "Ends at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[ends_at_lteq]",
            "description": "Ends at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[role_eq]",
            "description": "Role equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "member",
                "manager",
                "owner"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: starts_at, ends_at, role, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate tenant memberships",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "tenant_memberships"
        ],
        "operationId": "getRestV1TenantMembershipsAggregate",
        "x-filter": {
          "fields": {
            "invitation_email": "encrypted_deterministic",
            "starts_at": "datetime",
            "ends_at": "datetime",
            "role": {
              "class": "enum",
              "values": [
                "member",
                "manager",
                "owner"
              ]
            },
            "external_id": "identifier"
          },
          "sortable": [
            "starts_at",
            "ends_at",
            "role",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/tenant_memberships": {
      "get": {
        "summary": "List all tenant memberships",
        "description": "Returns the memberships at the sites this integration may see, ordered by `starts_at`.\n\nRequires the `tenant_memberships:read` permission. A membership links a person to a\nrenting customer and carries their role (member, manager or owner).\n\nA membership may also name a single rental agreement. That is how one employee gets access\nto one unit rather than to everything the company rents.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[invitation_email_eq]",
            "description": "Invitation email equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[starts_at_gteq]",
            "description": "Starts at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[starts_at_lteq]",
            "description": "Starts at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[ends_at_gteq]",
            "description": "Ends at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[ends_at_lteq]",
            "description": "Ends at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[role_eq]",
            "description": "Role equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "member",
                "manager",
                "owner"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: starts_at, ends_at, role, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all tenant memberships",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_TenantMembership"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "tenant_memberships"
        ],
        "operationId": "getRestV1TenantMemberships",
        "x-filter": {
          "fields": {
            "invitation_email": "encrypted_deterministic",
            "starts_at": "datetime",
            "ends_at": "datetime",
            "role": {
              "class": "enum",
              "values": [
                "member",
                "manager",
                "owner"
              ]
            },
            "external_id": "identifier"
          },
          "sortable": [
            "starts_at",
            "ends_at",
            "role",
            "external_id"
          ]
        }
      },
      "post": {
        "summary": "Creates a new tenant membership",
        "description": "Adds a person to a renting customer.\n\nRequires the `tenant_memberships:write` permission. The person is identified by email\naddress: an existing account is linked, and an unknown address creates one. No email is sent.\n\nSet `rental_agreement_id` to confine the membership to a single agreement. Leave it out\nand the membership covers everything the tenant rents.\n\n`starts_at` and `ends_at` bound it. Without an offset they are read in the local time of\nthe agreement's site, or, for a membership not confined to one, of the zone all the\ntenant's sites share (UTC when they differ). `role` takes member, manager or owner.\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/postRestV1TenantMemberships"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Creates a new tenant membership",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_TenantMembership"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "tenant_memberships"
        ],
        "operationId": "postRestV1TenantMemberships"
      }
    },
    "/rest/v1/tenant_memberships/{id}": {
      "get": {
        "summary": "Get details about a specific tenant membership",
        "description": "Returns one membership.\n\nRequires the `tenant_memberships:read` permission. Accepts either the UUID\nor your own `external_id`.\n\nThis is the one place a membership's **PIN code** is returned. The listing\ndoes not carry it, and neither does the response to creating one, so if you\nneed the code to hand to somebody, this is the call that has it.\n\n`pin_codes:read` authorises this call on its own, for an integration that\nneeds to read a code without being able to read memberships generally.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the tenant_membership",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific tenant membership",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_TenantMembership"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "tenant_memberships"
        ],
        "operationId": "getRestV1TenantMembershipsId"
      },
      "put": {
        "summary": "Updates a tenant membership",
        "description": "Updates a membership.\n\nRequires the `tenant_memberships:write` permission. Fields you leave out keep their\ncurrent value.\n\nTo change which person a membership belongs to, use `migrate_to_new_email_address` rather\nthan editing the address here.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the tenant_membership",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/putRestV1TenantMembershipsId"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updates a tenant membership",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_TenantMembership"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "tenant_memberships"
        ],
        "operationId": "putRestV1TenantMembershipsId"
      },
      "delete": {
        "summary": "Deletes a tenant membership",
        "description": "Removes a person from a renting customer.\n\nRequires the `tenant_memberships:write` permission. The deleted record is returned in the\nresponse.\n\nThis ends that person's access under this tenant. It does not touch the account, which may\nhold memberships elsewhere.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the tenant_membership",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deletes a tenant membership",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_TenantMembership"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "tenant_memberships"
        ],
        "operationId": "deleteRestV1TenantMembershipsId"
      }
    },
    "/rest/v1/tenant_memberships/{id}/regenerate_pin_code": {
      "put": {
        "summary": "Revokes the current assigned pin code and generates a new one",
        "description": "Issues a new PIN code for this membership, replacing the current one.\n\nRequires `tenant_memberships:write`, or `pin_codes:revoke` on its own, which\nauthorises this one call and nothing else. An integration that only ever\nreissues a forgotten code needs no right to change a membership.\n\nThe old code stops working immediately. The new one is delivered to the person, not\nreturned here.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the tenant_membership",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revokes the current assigned pin code and generates a new one",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_TenantMembership"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "tenant_memberships"
        ],
        "operationId": "putRestV1TenantMembershipsIdRegeneratePinCode"
      }
    },
    "/rest/v1/tenant_memberships/{id}/migrate_to_new_email_address": {
      "put": {
        "summary": "Migrates this tenant member onto a new email address",
        "description": "\nDisables the current tenant membership and creates a clone with the new email address.\n\nIf an `external_id` is given, this will be copied over to the new tenant membership and the old one will be suffixed with a random hex string.\nThe existing tenant membership will end at the time of the migration and the new one will start at the same time.\n\n(requires: `tenant_memberships:write` permission)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the tenant_membership",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/putRestV1TenantMembershipsIdMigrateToNewEmailAddress"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Migrates this tenant member onto a new email address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_TenantMembership"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "tenant_memberships"
        ],
        "operationId": "putRestV1TenantMembershipsIdMigrateToNewEmailAddress"
      }
    },
    "/rest/v1/zones/aggregate": {
      "get": {
        "summary": "Count or aggregate zones",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: site_id.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate zones",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "zones"
        ],
        "operationId": "getRestV1ZonesAggregate",
        "x-filter": {
          "fields": {
            "name": "text",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/zones": {
      "get": {
        "summary": "List all zones across all sites",
        "description": "Returns the zones at every site this integration may see, ordered by name.\n\nRequires the `zones:read` permission. Use this when you want the whole estate in one\nsweep; the same listing exists under a site (`/sites/{site_id}/zones`) when you want\none site's.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[external_id_eq]",
            "description": "External ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, site_id, external_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all zones across all sites",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Zone"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "zones"
        ],
        "operationId": "getRestV1Zones",
        "x-filter": {
          "fields": {
            "name": "text",
            "site_id": "identifier",
            "external_id": "identifier"
          },
          "sortable": [
            "name",
            "site_id",
            "external_id"
          ]
        }
      }
    },
    "/rest/v1/entrances/aggregate": {
      "get": {
        "summary": "Count or aggregate entrances",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: entrance_type, door_type, state, site_id, area_id, floor_id, zone_id.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[entrance_type_eq]",
            "description": "Entrance type equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "main",
                "side",
                "back",
                "front",
                "garage",
                "parking",
                "loading",
                "elevator"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[door_type_eq]",
            "description": "Door type equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "rollup",
                "swing",
                "double_swing",
                "revolving",
                "sliding",
                "turn_stile"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "open",
                "closed",
                "locked",
                "unlocked",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[area_id_eq]",
            "description": "Area ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[floor_id_eq]",
            "description": "Floor ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[zone_id_eq]",
            "description": "Zone ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, entrance_type, door_type, state, site_id, area_id, floor_id, zone_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate entrances",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "entrances"
        ],
        "operationId": "getRestV1EntrancesAggregate",
        "x-filter": {
          "fields": {
            "name": "text",
            "entrance_type": {
              "class": "enum",
              "values": [
                "unspecified",
                "main",
                "side",
                "back",
                "front",
                "garage",
                "parking",
                "loading",
                "elevator"
              ]
            },
            "door_type": {
              "class": "enum",
              "values": [
                "unspecified",
                "rollup",
                "swing",
                "double_swing",
                "revolving",
                "sliding",
                "turn_stile"
              ]
            },
            "state": {
              "class": "enum",
              "values": [
                "unspecified",
                "open",
                "closed",
                "locked",
                "unlocked",
                "broken"
              ]
            },
            "site_id": "identifier",
            "area_id": "identifier",
            "floor_id": "identifier",
            "zone_id": "identifier"
          },
          "sortable": [
            "name",
            "entrance_type",
            "door_type",
            "state",
            "site_id",
            "area_id",
            "floor_id",
            "zone_id"
          ]
        }
      }
    },
    "/rest/v1/entrances": {
      "get": {
        "summary": "List all entrances",
        "description": "Returns the entrances at the sites this integration may see, ordered by name.\n\nRequires the `entrances:read` permission. An entrance is a door, gate or barrier together\nwith the locks on it: it is what an access right grants and what an interaction request\nopens.\n\nEntrances are created by the operator, because creating one means describing physical\nhardware. Only the name can be changed here.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[name_cont]",
            "description": "Name contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[name_eq]",
            "description": "Name equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[entrance_type_eq]",
            "description": "Entrance type equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "main",
                "side",
                "back",
                "front",
                "garage",
                "parking",
                "loading",
                "elevator"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[door_type_eq]",
            "description": "Door type equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "rollup",
                "swing",
                "double_swing",
                "revolving",
                "sliding",
                "turn_stile"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unspecified",
                "open",
                "closed",
                "locked",
                "unlocked",
                "broken"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[area_id_eq]",
            "description": "Area ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[floor_id_eq]",
            "description": "Floor ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[zone_id_eq]",
            "description": "Zone ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: name, entrance_type, door_type, state, site_id, area_id, floor_id, zone_id.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all entrances",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_Entrance"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "entrances"
        ],
        "operationId": "getRestV1Entrances",
        "x-filter": {
          "fields": {
            "name": "text",
            "entrance_type": {
              "class": "enum",
              "values": [
                "unspecified",
                "main",
                "side",
                "back",
                "front",
                "garage",
                "parking",
                "loading",
                "elevator"
              ]
            },
            "door_type": {
              "class": "enum",
              "values": [
                "unspecified",
                "rollup",
                "swing",
                "double_swing",
                "revolving",
                "sliding",
                "turn_stile"
              ]
            },
            "state": {
              "class": "enum",
              "values": [
                "unspecified",
                "open",
                "closed",
                "locked",
                "unlocked",
                "broken"
              ]
            },
            "site_id": "identifier",
            "area_id": "identifier",
            "floor_id": "identifier",
            "zone_id": "identifier"
          },
          "sortable": [
            "name",
            "entrance_type",
            "door_type",
            "state",
            "site_id",
            "area_id",
            "floor_id",
            "zone_id"
          ]
        }
      }
    },
    "/rest/v1/entrances/{id}": {
      "get": {
        "summary": "Get details about a specific entrance",
        "description": "Returns one entrance.\n\nRequires the `entrances:read` permission. `entrance_type`, `door_type` and `state` each\ntake a fixed set of values, listed on the listing's filters.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the entrance",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific entrance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Entrance"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "entrances"
        ],
        "operationId": "getRestV1EntrancesId"
      },
      "put": {
        "summary": "Renames an entrance",
        "description": "Changes an entrance's name, and nothing else.\n\nRequires the `entrances:write` permission, on its own: `entrances:read` is not\nalso required to rename.\n\nEntrances are still not created or deleted through this API: creating one means\ndescribing physical hardware. This is the one field an operator can correct from\nhere.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the entrance",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/putRestV1EntrancesId"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Renames an entrance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Entrance"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "entrances"
        ],
        "operationId": "putRestV1EntrancesId"
      }
    },
    "/rest/v1/interaction_requests/aggregate": {
      "get": {
        "summary": "Count or aggregate interaction requests",
        "description": "Answers with numbers instead of rows, across every site in reach, so counting\ndoes not mean fetching every record to add it up. Requires the same\npermission the listing does, and takes the same `q` filters.\n\nGroups on: state, interaction, entrance_id, site_id, account_id, tenant_id, rental_agreement_id, site_membership_id, tenant_membership_id, requested_at, completed_at, failed_at, confirmed_by_lock_at.\nA timestamp needs a bucket after a colon, as in `requested_at:month`.\nAggregates on: nothing (count only).\n\nA grouping that would exceed\n200 groups is refused rather\nthan shortened: a truncated aggregate looks complete and is wrong.\n",
        "parameters": [
          {
            "in": "query",
            "name": "group_by",
            "description": "Group the answer: a column, or a timestamp field and a bucket separated by a colon (e.g. `requested_at:month`). Buckets: hour, day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year. Omit to aggregate over the whole result.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "aggregate",
            "description": "What to compute: `count`, or a function and a numeric field separated by a colon: `sum:<field>`, `avg:<field>`, `min:<field>`, `max:<field>`.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "count"
            }
          },
          {
            "in": "query",
            "name": "range_from",
            "description": "Start of the window a time bucket covers, inclusive. Only meaningful with a time bucket. As well as narrowing the data it fills the empty buckets inside the window, so every hour or day appears even where nothing happened.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "range_to",
            "description": "End of that window, inclusive, so one day of `hour` is 25 buckets, midnight to midnight. Either end may be given on its own; the other then follows the data.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[id_eq]",
            "description": "ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "requested",
                "in_progress",
                "completed",
                "failed"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[interaction_eq]",
            "description": "Interaction equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unlock",
                "lock",
                "open",
                "close"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[entrance_id_eq]",
            "description": "Entrance ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[account_id_eq]",
            "description": "Account ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[tenant_id_eq]",
            "description": "Tenant ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[rental_agreement_id_eq]",
            "description": "Rental agreement ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_membership_id_eq]",
            "description": "Site membership ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[tenant_membership_id_eq]",
            "description": "Tenant membership ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[requester_type_cont]",
            "description": "Requester type contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[requester_type_eq]",
            "description": "Requester type equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[requester_id_eq]",
            "description": "Requester ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[requested_at_gteq]",
            "description": "Requested at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[requested_at_lteq]",
            "description": "Requested at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[completed_at_gteq]",
            "description": "Completed at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[completed_at_lteq]",
            "description": "Completed at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[failed_at_gteq]",
            "description": "Failed at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[failed_at_lteq]",
            "description": "Failed at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[confirmed_by_lock_at_gteq]",
            "description": "Confirmed by lock at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[confirmed_by_lock_at_lteq]",
            "description": "Confirmed by lock at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: id, state, interaction, entrance_id, site_id, account_id, tenant_id, rental_agreement_id, site_membership_id, tenant_membership_id, requester_type, requester_id, requested_at, completed_at, failed_at, confirmed_by_lock_at.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Count or aggregate interaction requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_Aggregation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "interaction_requests"
        ],
        "operationId": "getRestV1InteractionRequestsAggregate",
        "x-filter": {
          "fields": {
            "id": "identifier",
            "state": {
              "class": "enum",
              "values": [
                "requested",
                "in_progress",
                "completed",
                "failed"
              ]
            },
            "interaction": {
              "class": "enum",
              "values": [
                "unlock",
                "lock",
                "open",
                "close"
              ]
            },
            "entrance_id": "identifier",
            "site_id": "identifier",
            "account_id": "identifier",
            "tenant_id": "identifier",
            "rental_agreement_id": "identifier",
            "site_membership_id": "identifier",
            "tenant_membership_id": "identifier",
            "requester_type": "text",
            "requester_id": "identifier",
            "requested_at": "datetime",
            "completed_at": "datetime",
            "failed_at": "datetime",
            "confirmed_by_lock_at": "datetime"
          },
          "sortable": [
            "id",
            "state",
            "interaction",
            "entrance_id",
            "site_id",
            "account_id",
            "tenant_id",
            "rental_agreement_id",
            "site_membership_id",
            "tenant_membership_id",
            "requester_type",
            "requester_id",
            "requested_at",
            "completed_at",
            "failed_at",
            "confirmed_by_lock_at"
          ]
        }
      }
    },
    "/rest/v1/interaction_requests": {
      "get": {
        "summary": "List all interaction requests",
        "description": "Returns door interactions at the sites this integration may see, newest first.\n\nRequires the `interaction_requests:read` permission. One record per attempt (who, which\nentrance, which operation, and how it ended), successful or not. This is the audit trail,\nand the closest thing this API has to an event stream.\n\nIt grows without bound, so filter it. `state_eq` and `interaction_eq` take fixed sets,\nlisted on the parameters.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "in": "query",
            "name": "q[id_eq]",
            "description": "ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[state_eq]",
            "description": "State equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "requested",
                "in_progress",
                "completed",
                "failed"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[interaction_eq]",
            "description": "Interaction equals",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unlock",
                "lock",
                "open",
                "close"
              ]
            }
          },
          {
            "in": "query",
            "name": "q[entrance_id_eq]",
            "description": "Entrance ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_id_eq]",
            "description": "Site ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[account_id_eq]",
            "description": "Account ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[tenant_id_eq]",
            "description": "Tenant ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[rental_agreement_id_eq]",
            "description": "Rental agreement ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[site_membership_id_eq]",
            "description": "Site membership ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[tenant_membership_id_eq]",
            "description": "Tenant membership ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[requester_type_cont]",
            "description": "Requester type contains",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[requester_type_eq]",
            "description": "Requester type equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[requester_id_eq]",
            "description": "Requester ID equals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q[requested_at_gteq]",
            "description": "Requested at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[requested_at_lteq]",
            "description": "Requested at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[completed_at_gteq]",
            "description": "Completed at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[completed_at_lteq]",
            "description": "Completed at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[failed_at_gteq]",
            "description": "Failed at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[failed_at_lteq]",
            "description": "Failed at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[confirmed_by_lock_at_gteq]",
            "description": "Confirmed by lock at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[confirmed_by_lock_at_lteq]",
            "description": "Confirmed by lock at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "q[s]",
            "description": "Sort as `<field> asc` or `<field> desc`. Sortable: id, state, interaction, entrance_id, site_id, account_id, tenant_id, rental_agreement_id, site_membership_id, tenant_membership_id, requester_type, requester_id, requested_at, completed_at, failed_at, confirmed_by_lock_at.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all interaction requests",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_InteractionRequest"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "interaction_requests"
        ],
        "operationId": "getRestV1InteractionRequests",
        "x-filter": {
          "fields": {
            "id": "identifier",
            "state": {
              "class": "enum",
              "values": [
                "requested",
                "in_progress",
                "completed",
                "failed"
              ]
            },
            "interaction": {
              "class": "enum",
              "values": [
                "unlock",
                "lock",
                "open",
                "close"
              ]
            },
            "entrance_id": "identifier",
            "site_id": "identifier",
            "account_id": "identifier",
            "tenant_id": "identifier",
            "rental_agreement_id": "identifier",
            "site_membership_id": "identifier",
            "tenant_membership_id": "identifier",
            "requester_type": "text",
            "requester_id": "identifier",
            "requested_at": "datetime",
            "completed_at": "datetime",
            "failed_at": "datetime",
            "confirmed_by_lock_at": "datetime"
          },
          "sortable": [
            "id",
            "state",
            "interaction",
            "entrance_id",
            "site_id",
            "account_id",
            "tenant_id",
            "rental_agreement_id",
            "site_membership_id",
            "tenant_membership_id",
            "requester_type",
            "requester_id",
            "requested_at",
            "completed_at",
            "failed_at",
            "confirmed_by_lock_at"
          ]
        }
      },
      "post": {
        "summary": "Create an interaction request",
        "description": "Opens a door on somebody's behalf, and only if that person could have opened it\nthemselves.\n\nRequires the `interaction_requests:write` permission.\n\n**The validation is the same as for a request from the person's own app.** The\nrequest is created only when the actor currently holds a valid access right at\nthe entrance: an active rental agreement or membership, inside its access\nwindow, inside opening hours, and an entrance that may be opened through the\nAPI at all. Holding this permission lets you act *for* somebody; it does not\nlet you exceed what they may do.\n\nName the door with either `entrance_id` or `unit_id`. Name the person with\n`account_id`, `site_membership_id` or `tenant_membership_id`;\n`site_membership_id` additionally confines the request to that membership.\n\n**404** when the actor or the entrance cannot be found, **422** when the actor\nhas no valid access right. The difference matters: the first says you named\nsomething that is not there, the second that the person is real and may not go\nthrough.\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/postRestV1InteractionRequests"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Create an interaction request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_InteractionRequest"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "interaction_requests"
        ],
        "operationId": "postRestV1InteractionRequests"
      }
    },
    "/rest/v1/interaction_requests/{id}": {
      "get": {
        "summary": "Get details about a specific interaction request",
        "description": "Returns one interaction request.\n\nRequires the `interaction_requests:read` permission.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the interaction request",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific interaction request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_InteractionRequest"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "interaction_requests"
        ],
        "operationId": "getRestV1InteractionRequestsId"
      }
    },
    "/rest/v1/webhook_endpoints": {
      "get": {
        "summary": "List all webhook endpoints",
        "description": "Returns the webhook endpoints this integration registered, oldest first.\n\nRequires the `webhook_endpoints:read` permission. An endpoint belongs to the integration\nthat created it: yours are the only ones you see, even where several integrations serve\none operator. Endpoints created from a console have no owning integration and are not\nreachable through this API at all.\n",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "description": "Page offset to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "description": "Number of results to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Pad a number of results.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all webhook endpoints",
            "headers": {
              "X-Total": {
                "description": "Number of records matching the query, across all pages.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Total-Pages": {
                "description": "Number of pages the match splits into at this `per_page`.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Per-Page": {
                "description": "Records per page as applied: the `per_page` parameter after the maximum is enforced.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Page": {
                "description": "The page in this response, counting from 1.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-Next-Page": {
                "description": "Number of the next page, empty on the last page. Empty means the listing is complete.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Prev-Page": {
                "description": "Number of the previous page, empty on the first page.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Offset": {
                "description": "Records skipped before this page, from the `offset` parameter.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_WebhookEndpoint"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "webhook_endpoints"
        ],
        "operationId": "getRestV1WebhookEndpoints"
      },
      "post": {
        "summary": "Creates a webhook endpoint",
        "description": "Registers a destination for us to deliver events to.\n\nRequires the `webhook_endpoints:write` permission. **The signing secret is in the response\nand is never returned again**: store it before you do anything else.\n\nFilter what you receive by event type, and by any of four axes: site, entrance, account or\nunit. At most ten subscription ids in total across those axes. A site-restricted\nintegration may subscribe only within its sites, and not by account at all, because one\naccount may hold access at several sites and that channel cannot be confined.\n\nThe url must be https and on a publicly reachable host.\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/postRestV1WebhookEndpoints"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Creates a webhook endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_WebhookEndpointWithSecret"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "webhook_endpoints"
        ],
        "operationId": "postRestV1WebhookEndpoints"
      }
    },
    "/rest/v1/webhook_endpoints/{id}": {
      "get": {
        "summary": "Get details about a specific webhook endpoint",
        "description": "Returns one webhook endpoint.\n\nRequires the `webhook_endpoints:read` permission. The signing secret is not included:\nit is returned once, when the endpoint is created or its secret rotated.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the webhook endpoint",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get details about a specific webhook endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_WebhookEndpoint"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "webhook_endpoints"
        ],
        "operationId": "getRestV1WebhookEndpointsId"
      },
      "put": {
        "summary": "Updates a webhook endpoint",
        "description": "Updates a webhook endpoint.\n\nRequires the `webhook_endpoints:write` permission. Fields you leave out keep their current\nvalue.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the webhook endpoint",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/putRestV1WebhookEndpointsId"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updates a webhook endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_WebhookEndpoint"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "webhook_endpoints"
        ],
        "operationId": "putRestV1WebhookEndpointsId"
      },
      "delete": {
        "summary": "Deletes a webhook endpoint",
        "description": "Deletes a webhook endpoint.\n\nRequires the `webhook_endpoints:write` permission. Delivery stops immediately; messages\nalready queued for it are dropped rather than delivered late.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the webhook endpoint",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deletes a webhook endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_WebhookEndpoint"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "webhook_endpoints"
        ],
        "operationId": "deleteRestV1WebhookEndpointsId"
      }
    },
    "/rest/v1/webhook_endpoints/{id}/rotate_secret": {
      "post": {
        "summary": "Rotates a webhook endpoint signing secret",
        "description": "Issues a new signing secret for this endpoint.\n\nRequires the `webhook_endpoints:write` permission. The new secret is in the response and\nis never returned again.\n\n**Both secrets are accepted for 24 hours.** That overlap is the point: verify against\neither during the window and you can roll the secret out on your own schedule instead of\ndeploying at the same moment as this call.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the webhook endpoint",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rotates a webhook endpoint signing secret",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_WebhookEndpointSecret"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "webhook_endpoints"
        ],
        "operationId": "postRestV1WebhookEndpointsIdRotateSecret"
      }
    },
    "/rest/v1/webhook_endpoints/{id}/enable": {
      "post": {
        "summary": "Re-enables a disabled webhook endpoint",
        "description": "Resumes delivery to an endpoint the delivery provider disabled after repeated failures (requires: `webhook_endpoints:write` permission).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the webhook endpoint",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Re-enables a disabled webhook endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_RestEntities_WebhookEndpoint"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "webhook_endpoints"
        ],
        "operationId": "postRestV1WebhookEndpointsIdEnable"
      }
    },
    "/rest/v1/webhook_endpoints/{id}/deliveries": {
      "get": {
        "summary": "Lists an endpoint's recent delivery attempts",
        "description": "Returns recent delivery attempts for this endpoint, newest first, with the\nresponse your own server gave.\n\nRequires the `webhook_endpoints:read` permission.\n\nRead through to the delivery provider on every call: nothing is stored here,\nso this shows what actually happened rather than what we recorded.\n\n**This listing pages by cursor, not by number.** Take the opaque value from the\n`X-Next-Cursor` response header and send it back as `cursor`; the header is\n*absent* once there is nothing further, which is the signal to stop. `page` and\n`per_page` do not apply here. Use `limit`.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the webhook endpoint",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lists an endpoint's recent delivery attempts",
            "headers": {
              "X-Next-Cursor": {
                "description": "Opaque cursor for the next page. Pass it back as `cursor`. Absent when there are no further attempts.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Common_API_RestEntities_WebhookDelivery"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "webhook_endpoints"
        ],
        "operationId": "getRestV1WebhookEndpointsIdDeliveries"
      }
    },
    "/rest/v1/webhook_endpoints/{id}/recover": {
      "post": {
        "summary": "Asks the delivery provider to re-send messages in a time window",
        "description": "Asks for messages in a window to be delivered again.\n\nRequires the `webhook_endpoints:write` permission. The window is `[since, until)`:\n`since` inclusive, `until` exclusive; leaving `until` out means \"up to now\".\n\nAnswers **202**: recovery runs asynchronously and this call reports no result, because\nclaiming one would be claiming something we do not yet know. `since` cannot reach past the\ndelivery provider's retention window, and asking for more is refused rather than silently\nreturning less.\n",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "Unique UUID (Type 4) of the webhook endpoint",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/postRestV1WebhookEndpointsIdRecover"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Recovery requested"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "422": {
            "description": "Record invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common_API_Entities_APIError"
                }
              }
            }
          }
        },
        "tags": [
          "webhook_endpoints"
        ],
        "operationId": "postRestV1WebhookEndpointsIdRecover"
      }
    }
  },
  "servers": [
    {
      "url": "https://{host}/api",
      "description": "One installation. Every operator answers on a domain of its own.",
      "variables": {
        "host": {
          "default": "example.sedisto.net",
          "description": "The domain of the installation to talk to, e.g. lubulager.sedisto.eu."
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "description": "Validates identity through Bearer token in Authorization header"
      }
    },
    "schemas": {
      "Common_API_Entities_APIError": {
        "type": "object",
        "properties": {
          "error_code": {
            "type": "integer",
            "format": "int32",
            "description": "The HTTP status of the response, repeated here"
          },
          "reason": {
            "type": "string",
            "enum": [
              "filter_unknown",
              "filter_value_unknown",
              "filter_unavailable",
              "search_field_unknown",
              "sort_field_unknown"
            ],
            "description": "Stable machine-readable refusal reason, where one applies"
          },
          "message": {
            "type": "string",
            "description": "A human readable error message"
          }
        },
        "required": [
          "error_code",
          "message"
        ],
        "description": "Common_API_Entities_APIError model"
      },
      "Common_API_RestEntities_Aggregation": {
        "type": "object",
        "properties": {
          "aggregate": {
            "type": "string",
            "description": "The function that was computed, as it was asked for."
          },
          "group_by": {
            "type": "string",
            "description": "The grouping that was applied."
          },
          "value": {
            "type": "number",
            "format": "float",
            "description": "The aggregate over the whole result. Null when no row matched, except for count, which is 0."
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Common_API_RestEntities_AggregationGroup"
            },
            "description": "One label-and-value pair per group, in the grouping order."
          },
          "total_groups": {
            "type": "integer",
            "format": "int32",
            "description": "How many groups came back."
          },
          "time_zone": {
            "type": "string",
            "description": "The zone a time bucket was cut in: the site zone where the call reaches exactly one, UTC otherwise."
          },
          "week_start": {
            "type": "string",
            "description": "The day a week bucket starts on. Present only for the week bucket."
          }
        },
        "required": [
          "aggregate"
        ],
        "description": "Common_API_RestEntities_Aggregation model"
      },
      "Common_API_RestEntities_AggregationGroup": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "What the group is: an enum member by name, a site name, a bucket as YYYY-MM-DD / YYYY-MM / YYYY-Qn / YYYY, or the raw value. Always a string."
          },
          "value": {
            "type": "number",
            "format": "float",
            "description": "The aggregate for this group. Always a finite number."
          }
        },
        "required": [
          "label",
          "value"
        ]
      },
      "Common_API_RestEntities_Account": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Account ID"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "email": {
            "type": "string",
            "description": "Email address of account"
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "blocked"
            ],
            "description": "State of account"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "name",
          "email",
          "state",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_Account model"
      },
      "Common_API_RestEntities_Area": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Area ID"
          },
          "site_id": {
            "type": "string",
            "description": "Site ID"
          },
          "external_id": {
            "type": "string",
            "description": "External identifier"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "building_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of all buildings for this area"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "site_id",
          "external_id",
          "name",
          "building_ids",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_Area model"
      },
      "postRestV1SitesSiteIdAreas": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the area"
          },
          "external_id": {
            "type": "string",
            "description": "External ID for this area"
          },
          "street": {
            "type": "string",
            "description": "Street and house number of the area"
          },
          "zip_code": {
            "type": "string",
            "description": "Zip code of the area"
          },
          "city": {
            "type": "string",
            "description": "City of the area"
          },
          "federal_state": {
            "type": "string",
            "description": "Federal state of the area"
          },
          "country_code": {
            "type": "string",
            "description": "Country code of the area"
          }
        },
        "required": [
          "name"
        ],
        "description": "Creates a new area"
      },
      "putRestV1SitesSiteIdAreasId": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the area"
          },
          "external_id": {
            "type": "string",
            "description": "External ID for this area"
          },
          "street": {
            "type": "string",
            "description": "Street and house number of the area"
          },
          "zip_code": {
            "type": "string",
            "description": "Zip code of the area"
          },
          "city": {
            "type": "string",
            "description": "City of the area"
          },
          "federal_state": {
            "type": "string",
            "description": "Federal state of the area"
          },
          "country_code": {
            "type": "string",
            "description": "Country code of the area"
          }
        },
        "description": "Updates a area"
      },
      "Common_API_RestEntities_BleConnector": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "BLE connector ID"
          },
          "site_id": {
            "type": "string",
            "description": "Site the connector is installed at"
          },
          "area_id": {
            "type": "string",
            "description": "Area it covers, where one is recorded"
          },
          "floor_id": {
            "type": "string",
            "description": "Floor it covers, where one is recorded"
          },
          "zone_id": {
            "type": "string",
            "description": "Zone it covers, where one is recorded"
          },
          "description": {
            "type": "string",
            "description": "Description"
          },
          "notes": {
            "type": "string",
            "description": "Notes"
          },
          "ip_address": {
            "type": "string",
            "description": "Address on the local network"
          },
          "mac_address": {
            "type": "string",
            "description": "Hardware address of the network interface"
          },
          "mac_address_ble": {
            "type": "string",
            "description": "Hardware address of the Bluetooth radio"
          },
          "firmware_version": {
            "type": "string",
            "description": "Firmware the connector is running"
          },
          "target_firmware_version": {
            "type": "string",
            "description": "Firmware it is meant to run, where that differs from the running one"
          },
          "state": {
            "type": "string",
            "enum": [
              "unknown",
              "installed",
              "unprovisioned",
              "broken"
            ],
            "description": "Condition of the device"
          },
          "last_active_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the connector was last heard from, by either route (ISO 8601)"
          },
          "last_active_at_building": {
            "type": "string",
            "format": "date-time",
            "description": "When the site gateway last reached it over the building network (ISO 8601)"
          },
          "last_active_at_cloud": {
            "type": "string",
            "format": "date-time",
            "description": "When it last reported to us over the internet (ISO 8601)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "site_id",
          "area_id",
          "floor_id",
          "zone_id",
          "description",
          "notes",
          "ip_address",
          "mac_address",
          "mac_address_ble",
          "firmware_version",
          "target_firmware_version",
          "state",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_BleConnector model"
      },
      "Common_API_RestEntities_Building": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Building ID"
          },
          "site_id": {
            "type": "string",
            "description": "Site ID"
          },
          "external_id": {
            "type": "string",
            "description": "External identifier"
          },
          "area_id": {
            "type": "string",
            "description": "Area ID"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "floor_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of all floors for this building"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "site_id",
          "external_id",
          "area_id",
          "name",
          "floor_ids",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_Building model"
      },
      "postRestV1SitesSiteIdBuildings": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the building"
          },
          "area_id": {
            "type": "string",
            "description": "Unique UUID (Type 4) or external ID of the area this building belongs to"
          },
          "external_id": {
            "type": "string",
            "description": "External ID for this building"
          },
          "street": {
            "type": "string",
            "description": "Street and house number of the building"
          },
          "zip_code": {
            "type": "string",
            "description": "Zip code of the building"
          },
          "city": {
            "type": "string",
            "description": "City of the building"
          },
          "federal_state": {
            "type": "string",
            "description": "Federal state of the building"
          },
          "country_code": {
            "type": "string",
            "description": "Country code of the building"
          }
        },
        "required": [
          "name",
          "area_id"
        ],
        "description": "Creates a new building"
      },
      "putRestV1SitesSiteIdBuildingsId": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the building"
          },
          "external_id": {
            "type": "string",
            "description": "External ID for this building"
          },
          "street": {
            "type": "string",
            "description": "Street and house number of the building"
          },
          "zip_code": {
            "type": "string",
            "description": "Zip code of the building"
          },
          "city": {
            "type": "string",
            "description": "City of the building"
          },
          "federal_state": {
            "type": "string",
            "description": "Federal state of the building"
          },
          "country_code": {
            "type": "string",
            "description": "Country code of the building"
          }
        },
        "description": "Updates a building"
      },
      "Common_API_RestEntities_Elevator": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Elevator ID"
          },
          "site_id": {
            "type": "string",
            "description": "Site the elevator is in"
          },
          "building_id": {
            "type": "string",
            "description": "Building the elevator is in"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "description": {
            "type": "string",
            "description": "Description"
          },
          "notes": {
            "type": "string",
            "description": "Notes"
          },
          "elevator_type": {
            "type": "string",
            "enum": [
              "unspecified",
              "passenger",
              "service",
              "freight"
            ],
            "description": "What the lift is for"
          },
          "state": {
            "type": "string",
            "enum": [
              "available",
              "disabled",
              "out_of_order",
              "under_construction",
              "in_maintenance"
            ],
            "description": "Whether the lift is in service"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "site_id",
          "building_id",
          "name",
          "description",
          "notes",
          "elevator_type",
          "state",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_Elevator model"
      },
      "Common_API_RestEntities_Floor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Floor ID"
          },
          "site_id": {
            "type": "string",
            "description": "Site ID"
          },
          "external_id": {
            "type": "string",
            "description": "External identifier"
          },
          "area_id": {
            "type": "string",
            "description": "Area ID"
          },
          "building_id": {
            "type": "string",
            "description": "Building ID"
          },
          "zone_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of all zones for this floor"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "level": {
            "type": "integer",
            "format": "int32",
            "description": "Level"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "site_id",
          "external_id",
          "area_id",
          "building_id",
          "zone_ids",
          "name",
          "level",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_Floor model"
      },
      "postRestV1SitesSiteIdFloors": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the floor"
          },
          "building_id": {
            "type": "string",
            "description": "Unique UUID (Type 4) or external ID of the building this floor belongs to"
          },
          "external_id": {
            "type": "string",
            "description": "External ID for this floor"
          },
          "level": {
            "type": "integer",
            "format": "int32",
            "description": "Level of the floor"
          }
        },
        "required": [
          "name",
          "building_id",
          "level"
        ],
        "description": "Creates a new floor"
      },
      "putRestV1SitesSiteIdFloorsId": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the floor"
          },
          "external_id": {
            "type": "string",
            "description": "External ID for this floor"
          },
          "level": {
            "type": "integer",
            "format": "int32",
            "description": "Level of the floor"
          }
        },
        "description": "Updates a floor"
      },
      "Common_API_RestEntities_Gateway": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Gateway ID"
          },
          "site_id": {
            "type": "string",
            "description": "Site the gateway is installed at"
          },
          "building_id": {
            "type": "string",
            "description": "Building the gateway is installed in, where one is recorded"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "description": {
            "type": "string",
            "description": "Description"
          },
          "notes": {
            "type": "string",
            "description": "Notes"
          },
          "ip_address_eth0": {
            "type": "string",
            "description": "Address on the first network interface, on the local network"
          },
          "ip_address_eth1": {
            "type": "string",
            "description": "Address on the second network interface, where one is wired"
          },
          "mac_address_eth0": {
            "type": "string",
            "description": "Hardware address of the first network interface"
          },
          "mac_address_eth1": {
            "type": "string",
            "description": "Hardware address of the second network interface"
          },
          "firmware_version": {
            "type": "string",
            "description": "Release the gateway is running: a version, or a build and its date"
          },
          "state": {
            "type": "string",
            "enum": [
              "unknown",
              "installed",
              "broken"
            ],
            "description": "Condition of the device"
          },
          "last_active_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the gateway last reported in (ISO 8601)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "site_id",
          "building_id",
          "name",
          "description",
          "notes",
          "ip_address_eth0",
          "ip_address_eth1",
          "mac_address_eth0",
          "mac_address_eth1",
          "firmware_version",
          "state",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_Gateway model"
      },
      "Common_API_RestEntities_LockController": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Lock controller ID"
          },
          "site_id": {
            "type": "string",
            "description": "Site the controller is installed at"
          },
          "building_id": {
            "type": "string",
            "description": "Building the controller is installed in, where one is recorded"
          },
          "description": {
            "type": "string",
            "description": "Description"
          },
          "notes": {
            "type": "string",
            "description": "Notes"
          },
          "ip_address": {
            "type": "string",
            "description": "Address on the local network"
          },
          "mac_address": {
            "type": "string",
            "description": "Hardware address of the network interface"
          },
          "firmware_version": {
            "type": "string",
            "description": "Firmware the controller is running"
          },
          "state": {
            "type": "string",
            "enum": [
              "unknown",
              "installed",
              "broken"
            ],
            "description": "Condition of the device"
          },
          "battery_state": {
            "type": "string",
            "enum": [
              "unknown",
              "full",
              "normal",
              "low",
              "critical"
            ],
            "description": "Charge left in the backup battery"
          },
          "locks_count": {
            "type": "integer",
            "format": "int32",
            "description": "How many locks this controller drives"
          },
          "sabotage_detected_at": {
            "type": "string",
            "format": "date-time",
            "description": "When tampering with the enclosure was detected, if it is open now (ISO 8601)"
          },
          "last_active_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the controller was last heard from, by either route (ISO 8601)"
          },
          "last_active_at_building": {
            "type": "string",
            "format": "date-time",
            "description": "When the site gateway last reached it over the building network (ISO 8601)"
          },
          "last_active_at_cloud": {
            "type": "string",
            "format": "date-time",
            "description": "When it last reported to us over the internet (ISO 8601)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "site_id",
          "building_id",
          "description",
          "notes",
          "ip_address",
          "mac_address",
          "firmware_version",
          "state",
          "battery_state",
          "locks_count",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_LockController model"
      },
      "Common_API_RestEntities_Lock": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Lock ID"
          },
          "entrance_id": {
            "type": "string",
            "description": "Entrance this lock is fitted to, absent while it is unassigned"
          },
          "lock_state": {
            "type": "string",
            "enum": [
              "unknown",
              "open",
              "locked"
            ],
            "description": "Whether the lock is engaged"
          },
          "door_state": {
            "type": "string",
            "enum": [
              "unknown",
              "open",
              "closed"
            ],
            "description": "Whether the door itself stands open"
          },
          "cable_state": {
            "type": "string",
            "enum": [
              "unknown",
              "broken",
              "healthy"
            ],
            "description": "Condition of the wiring to the lock"
          },
          "last_active_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the lock was last heard from (ISO 8601)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "entrance_id",
          "lock_state",
          "door_state",
          "cable_state",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_Lock model"
      },
      "Common_API_RestEntities_NetworkDevice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Network device ID"
          },
          "site_id": {
            "type": "string",
            "description": "Site whose network this was seen on"
          },
          "name": {
            "type": "string",
            "description": "Name the operator gave it"
          },
          "description": {
            "type": "string",
            "description": "Description"
          },
          "ip_address": {
            "type": "string",
            "description": "Address on the local network"
          },
          "mac_address": {
            "type": "string",
            "description": "Hardware address"
          },
          "vendor": {
            "type": "string",
            "description": "Manufacturer, derived from the hardware address"
          },
          "interface": {
            "type": "string",
            "description": "Interface on the gateway that saw it"
          },
          "known": {
            "type": "boolean",
            "description": "Whether the operator marked it as recognised"
          },
          "monitoring": {
            "type": "string",
            "enum": [
              "inactive",
              "active",
              "high_priority"
            ],
            "description": "Whether its absence is watched for"
          },
          "associated_device_type": {
            "type": "string",
            "description": "What kind of device this was recognised as, where it was linked"
          },
          "associated_device_id": {
            "type": "string",
            "description": "The device it was linked to, addressable on that resource"
          },
          "pingable": {
            "type": "boolean",
            "description": "Whether it answered the last ping"
          },
          "first_seen_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it first appeared on this network (ISO 8601)"
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was last seen on this network (ISO 8601)"
          },
          "offline_since": {
            "type": "string",
            "format": "date-time",
            "description": "When it went missing, while it is still missing (ISO 8601)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "site_id",
          "name",
          "description",
          "ip_address",
          "mac_address",
          "vendor",
          "interface",
          "known",
          "monitoring",
          "associated_device_type",
          "associated_device_id",
          "pingable",
          "first_seen_at",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_NetworkDevice model"
      },
      "Common_API_RestEntities_Terminal": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Terminal ID"
          },
          "site_id": {
            "type": "string",
            "description": "Site the terminal stands at"
          },
          "building_id": {
            "type": "string",
            "description": "Building the terminal stands in, where one is recorded"
          },
          "zone_id": {
            "type": "string",
            "description": "Zone the terminal stands in, where one is recorded"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "description": {
            "type": "string",
            "description": "Description"
          },
          "notes": {
            "type": "string",
            "description": "Notes"
          },
          "ip_address": {
            "type": "string",
            "description": "Address on the local network"
          },
          "mac_address": {
            "type": "string",
            "description": "Hardware address of the network interface"
          },
          "state": {
            "type": "string",
            "enum": [
              "unknown",
              "installed",
              "broken"
            ],
            "description": "Condition of the device"
          },
          "last_active_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the terminal last reported in (ISO 8601)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "site_id",
          "building_id",
          "zone_id",
          "name",
          "description",
          "notes",
          "ip_address",
          "mac_address",
          "state",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_Terminal model"
      },
      "Common_API_RestEntities_Unit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unit ID"
          },
          "site_id": {
            "type": "string",
            "description": "Site ID"
          },
          "external_id": {
            "type": "string",
            "description": "External identifier"
          },
          "area_id": {
            "type": "string",
            "description": "Area ID"
          },
          "building_id": {
            "type": "string",
            "description": "Building ID"
          },
          "floor_id": {
            "type": "string",
            "description": "Floor ID"
          },
          "zone_id": {
            "type": "string",
            "description": "Zone ID"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "description": {
            "type": "string",
            "description": "Description"
          },
          "notes": {
            "type": "string",
            "description": "Notes"
          },
          "unit_type": {
            "type": "string",
            "enum": [
              "unspecified",
              "storage_unit",
              "drive_up",
              "room",
              "parcel_room",
              "locker",
              "garage",
              "parking_space",
              "bike_rack",
              "other"
            ],
            "description": "What kind of space is rented"
          },
          "level": {
            "type": "integer",
            "format": "int32",
            "description": "Level"
          },
          "state": {
            "type": "string",
            "enum": [
              "unspecified",
              "available",
              "booked",
              "demo",
              "disabled",
              "broken",
              "under_construction",
              "archived"
            ],
            "description": "Whether the unit can be rented, and why not if it cannot"
          },
          "width": {
            "type": "number",
            "format": "float",
            "description": "Width in meters"
          },
          "length": {
            "type": "number",
            "format": "float",
            "description": "Length in meters"
          },
          "height": {
            "type": "number",
            "format": "float",
            "description": "Height in meters"
          },
          "base_area": {
            "type": "number",
            "format": "float",
            "description": "Base area in square meter (m2)"
          },
          "capacity": {
            "type": "number",
            "format": "float",
            "description": "Capacity in qubic meter (m3)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "site_id",
          "external_id",
          "area_id",
          "building_id",
          "floor_id",
          "zone_id",
          "name",
          "description",
          "notes",
          "unit_type",
          "level",
          "state",
          "width",
          "length",
          "height",
          "base_area",
          "capacity",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_Unit model"
      },
      "postRestV1SitesSiteIdUnits": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the unit"
          },
          "zone_id": {
            "type": "string",
            "description": "Unique UUID (Type 4) or external ID of the zone this unit belongs to"
          },
          "external_id": {
            "type": "string",
            "description": "External ID for this unit"
          },
          "state": {
            "type": "string",
            "description": "State of the unit",
            "enum": [
              "unspecified",
              "available",
              "booked",
              "demo",
              "disabled",
              "broken",
              "under_construction",
              "archived"
            ]
          },
          "unit_type": {
            "type": "string",
            "description": "Type of the unit",
            "enum": [
              "unspecified",
              "storage_unit",
              "drive_up",
              "room",
              "parcel_room",
              "locker",
              "garage",
              "parking_space",
              "bike_rack",
              "other"
            ]
          },
          "description": {
            "type": "string",
            "description": "Description of the unit"
          },
          "notes": {
            "type": "string",
            "description": "Internal notes about the unit"
          },
          "width": {
            "type": "number",
            "format": "float",
            "description": "Width in meters"
          },
          "length": {
            "type": "number",
            "format": "float",
            "description": "Length in meters"
          },
          "height": {
            "type": "number",
            "format": "float",
            "description": "Height in meters"
          }
        },
        "required": [
          "name",
          "zone_id"
        ],
        "description": "Creates a new unit"
      },
      "putRestV1SitesSiteIdUnitsId": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the unit"
          },
          "external_id": {
            "type": "string",
            "description": "External ID for this unit"
          },
          "zone_id": {
            "type": "string",
            "description": "Unique UUID (Type 4) or external ID of the zone this unit belongs to"
          },
          "state": {
            "type": "string",
            "description": "State of the unit",
            "enum": [
              "unspecified",
              "available",
              "booked",
              "demo",
              "disabled",
              "broken",
              "under_construction",
              "archived"
            ]
          },
          "unit_type": {
            "type": "string",
            "description": "Type of the unit",
            "enum": [
              "unspecified",
              "storage_unit",
              "drive_up",
              "room",
              "parcel_room",
              "locker",
              "garage",
              "parking_space",
              "bike_rack",
              "other"
            ]
          },
          "description": {
            "type": "string",
            "description": "Description of the unit"
          },
          "notes": {
            "type": "string",
            "description": "Internal notes about the unit"
          },
          "width": {
            "type": "number",
            "format": "float",
            "description": "Width in meters"
          },
          "length": {
            "type": "number",
            "format": "float",
            "description": "Length in meters"
          },
          "height": {
            "type": "number",
            "format": "float",
            "description": "Height in meters"
          }
        },
        "description": "Updates a unit"
      },
      "Common_API_RestEntities_Site": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Site ID"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "url": {
            "type": "string",
            "description": "URL of website of site"
          },
          "support_url": {
            "type": "string",
            "description": "URL of dedicated support website for this site"
          },
          "state": {
            "type": "string",
            "description": "State"
          },
          "time_zone": {
            "type": "string",
            "description": "Time zone of site"
          },
          "time_zone_name": {
            "type": "string",
            "description": "Official time zone name"
          },
          "time_zone_offset": {
            "type": "string",
            "description": "Offset to UTC of the time zone of the organization"
          },
          "area_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of all areas for this site"
          },
          "opening_hours": {
            "type": "object",
            "properties": {
              "cleaning_staff": {
                "type": "object",
                "properties": {
                  "access_group_name": {
                    "type": "string",
                    "description": "Name of access right group"
                  },
                  "accessible_unit_states": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "unspecified",
                        "available",
                        "booked",
                        "demo",
                        "disabled",
                        "broken",
                        "under_construction",
                        "archived"
                      ]
                    },
                    "description": "States of a unit the access group \"cleaning_staff\" has access to during opening hours"
                  },
                  "weekday": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "cleaning_staff opening hours on weekday from"
                      },
                      "until": {
                        "type": "string",
                        "description": "cleaning_staff opening hours on weekday until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "cleaning_staff opening hours"
                  },
                  "weekend": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "cleaning_staff opening hours on weekend from"
                      },
                      "until": {
                        "type": "string",
                        "description": "cleaning_staff opening hours on weekend until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "cleaning_staff opening hours"
                  }
                },
                "required": [
                  "access_group_name",
                  "accessible_unit_states",
                  "weekday",
                  "weekend"
                ],
                "description": "cleaning_staff opening hours"
              },
              "facility_manager": {
                "type": "object",
                "properties": {
                  "access_group_name": {
                    "type": "string",
                    "description": "Name of access right group"
                  },
                  "accessible_unit_states": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "unspecified",
                        "available",
                        "booked",
                        "demo",
                        "disabled",
                        "broken",
                        "under_construction",
                        "archived"
                      ]
                    },
                    "description": "States of a unit the access group \"facility_manager\" has access to during opening hours"
                  },
                  "weekday": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "facility_manager opening hours on weekday from"
                      },
                      "until": {
                        "type": "string",
                        "description": "facility_manager opening hours on weekday until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "facility_manager opening hours"
                  },
                  "weekend": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "facility_manager opening hours on weekend from"
                      },
                      "until": {
                        "type": "string",
                        "description": "facility_manager opening hours on weekend until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "facility_manager opening hours"
                  }
                },
                "required": [
                  "access_group_name",
                  "accessible_unit_states",
                  "weekday",
                  "weekend"
                ],
                "description": "facility_manager opening hours"
              },
              "frontdesk_manager": {
                "type": "object",
                "properties": {
                  "access_group_name": {
                    "type": "string",
                    "description": "Name of access right group"
                  },
                  "accessible_unit_states": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "unspecified",
                        "available",
                        "booked",
                        "demo",
                        "disabled",
                        "broken",
                        "under_construction",
                        "archived"
                      ]
                    },
                    "description": "States of a unit the access group \"frontdesk_manager\" has access to during opening hours"
                  },
                  "weekday": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "frontdesk_manager opening hours on weekday from"
                      },
                      "until": {
                        "type": "string",
                        "description": "frontdesk_manager opening hours on weekday until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "frontdesk_manager opening hours"
                  },
                  "weekend": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "frontdesk_manager opening hours on weekend from"
                      },
                      "until": {
                        "type": "string",
                        "description": "frontdesk_manager opening hours on weekend until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "frontdesk_manager opening hours"
                  }
                },
                "required": [
                  "access_group_name",
                  "accessible_unit_states",
                  "weekday",
                  "weekend"
                ],
                "description": "frontdesk_manager opening hours"
              },
              "manager": {
                "type": "object",
                "properties": {
                  "access_group_name": {
                    "type": "string",
                    "description": "Name of access right group"
                  },
                  "accessible_unit_states": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "unspecified",
                        "available",
                        "booked",
                        "demo",
                        "disabled",
                        "broken",
                        "under_construction",
                        "archived"
                      ]
                    },
                    "description": "States of a unit the access group \"manager\" has access to during opening hours"
                  },
                  "weekday": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "manager opening hours on weekday from"
                      },
                      "until": {
                        "type": "string",
                        "description": "manager opening hours on weekday until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "manager opening hours"
                  },
                  "weekend": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "manager opening hours on weekend from"
                      },
                      "until": {
                        "type": "string",
                        "description": "manager opening hours on weekend until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "manager opening hours"
                  }
                },
                "required": [
                  "access_group_name",
                  "accessible_unit_states",
                  "weekday",
                  "weekend"
                ],
                "description": "manager opening hours"
              },
              "tenant_access_group_default": {
                "type": "object",
                "properties": {
                  "access_group_name": {
                    "type": "string",
                    "description": "Name of access right group"
                  },
                  "weekday": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "tenant_access_group_default opening hours on weekday from"
                      },
                      "until": {
                        "type": "string",
                        "description": "tenant_access_group_default opening hours on weekday until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "tenant_access_group_default opening hours"
                  },
                  "weekend": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "tenant_access_group_default opening hours on weekend from"
                      },
                      "until": {
                        "type": "string",
                        "description": "tenant_access_group_default opening hours on weekend until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "tenant_access_group_default opening hours"
                  }
                },
                "required": [
                  "access_group_name",
                  "weekday",
                  "weekend"
                ],
                "description": "tenant_access_group_default opening hours"
              },
              "tenant_access_group_01": {
                "type": "object",
                "properties": {
                  "access_group_name": {
                    "type": "string",
                    "description": "Name of access right group"
                  },
                  "weekday": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "tenant_access_group_01 opening hours on weekday from"
                      },
                      "until": {
                        "type": "string",
                        "description": "tenant_access_group_01 opening hours on weekday until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "tenant_access_group_01 opening hours"
                  },
                  "weekend": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "tenant_access_group_01 opening hours on weekend from"
                      },
                      "until": {
                        "type": "string",
                        "description": "tenant_access_group_01 opening hours on weekend until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "tenant_access_group_01 opening hours"
                  }
                },
                "required": [
                  "access_group_name",
                  "weekday",
                  "weekend"
                ],
                "description": "tenant_access_group_01 opening hours"
              },
              "tenant_access_group_02": {
                "type": "object",
                "properties": {
                  "access_group_name": {
                    "type": "string",
                    "description": "Name of access right group"
                  },
                  "weekday": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "tenant_access_group_02 opening hours on weekday from"
                      },
                      "until": {
                        "type": "string",
                        "description": "tenant_access_group_02 opening hours on weekday until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "tenant_access_group_02 opening hours"
                  },
                  "weekend": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "tenant_access_group_02 opening hours on weekend from"
                      },
                      "until": {
                        "type": "string",
                        "description": "tenant_access_group_02 opening hours on weekend until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "tenant_access_group_02 opening hours"
                  }
                },
                "required": [
                  "access_group_name",
                  "weekday",
                  "weekend"
                ],
                "description": "tenant_access_group_02 opening hours"
              },
              "tenant_access_group_03": {
                "type": "object",
                "properties": {
                  "access_group_name": {
                    "type": "string",
                    "description": "Name of access right group"
                  },
                  "weekday": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "tenant_access_group_03 opening hours on weekday from"
                      },
                      "until": {
                        "type": "string",
                        "description": "tenant_access_group_03 opening hours on weekday until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "tenant_access_group_03 opening hours"
                  },
                  "weekend": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "tenant_access_group_03 opening hours on weekend from"
                      },
                      "until": {
                        "type": "string",
                        "description": "tenant_access_group_03 opening hours on weekend until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "tenant_access_group_03 opening hours"
                  }
                },
                "required": [
                  "access_group_name",
                  "weekday",
                  "weekend"
                ],
                "description": "tenant_access_group_03 opening hours"
              },
              "tenant_access_group_04": {
                "type": "object",
                "properties": {
                  "access_group_name": {
                    "type": "string",
                    "description": "Name of access right group"
                  },
                  "weekday": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "tenant_access_group_04 opening hours on weekday from"
                      },
                      "until": {
                        "type": "string",
                        "description": "tenant_access_group_04 opening hours on weekday until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "tenant_access_group_04 opening hours"
                  },
                  "weekend": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "tenant_access_group_04 opening hours on weekend from"
                      },
                      "until": {
                        "type": "string",
                        "description": "tenant_access_group_04 opening hours on weekend until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "tenant_access_group_04 opening hours"
                  }
                },
                "required": [
                  "access_group_name",
                  "weekday",
                  "weekend"
                ],
                "description": "tenant_access_group_04 opening hours"
              },
              "tenant_access_group_05": {
                "type": "object",
                "properties": {
                  "access_group_name": {
                    "type": "string",
                    "description": "Name of access right group"
                  },
                  "weekday": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "tenant_access_group_05 opening hours on weekday from"
                      },
                      "until": {
                        "type": "string",
                        "description": "tenant_access_group_05 opening hours on weekday until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "tenant_access_group_05 opening hours"
                  },
                  "weekend": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "description": "tenant_access_group_05 opening hours on weekend from"
                      },
                      "until": {
                        "type": "string",
                        "description": "tenant_access_group_05 opening hours on weekend until"
                      }
                    },
                    "required": [
                      "from",
                      "until"
                    ],
                    "description": "tenant_access_group_05 opening hours"
                  }
                },
                "required": [
                  "access_group_name",
                  "weekday",
                  "weekend"
                ],
                "description": "tenant_access_group_05 opening hours"
              }
            },
            "required": [
              "cleaning_staff",
              "facility_manager",
              "frontdesk_manager",
              "manager",
              "tenant_access_group_default",
              "tenant_access_group_01",
              "tenant_access_group_02",
              "tenant_access_group_03",
              "tenant_access_group_04",
              "tenant_access_group_05"
            ],
            "description": "Opening hours of site for different access right groups"
          },
          "street": {
            "type": "string",
            "description": "Street"
          },
          "city": {
            "type": "string",
            "description": "City"
          },
          "zip_code": {
            "type": "string",
            "description": "ZIP code"
          },
          "federal_state": {
            "type": "string",
            "description": "Federal state"
          },
          "country_code": {
            "type": "string",
            "description": "Country code (ISO3166)"
          },
          "country_name": {
            "type": "string",
            "description": "Country name"
          },
          "latitude": {
            "type": "number",
            "format": "float",
            "description": "Latitude"
          },
          "longitude": {
            "type": "number",
            "format": "float",
            "description": "Longitude"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "name",
          "url",
          "support_url",
          "state",
          "time_zone",
          "time_zone_name",
          "time_zone_offset",
          "area_ids",
          "opening_hours",
          "street",
          "city",
          "zip_code",
          "federal_state",
          "country_code",
          "country_name",
          "latitude",
          "longitude",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_Site model"
      },
      "putRestV1SitesId": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the site"
          }
        },
        "required": [
          "name"
        ],
        "description": "Renames a site"
      },
      "Common_API_RestEntities_Zone": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Zone ID"
          },
          "site_id": {
            "type": "string",
            "description": "Site ID"
          },
          "external_id": {
            "type": "string",
            "description": "External identifier"
          },
          "area_id": {
            "type": "string",
            "description": "Area ID"
          },
          "building_id": {
            "type": "string",
            "description": "Building ID"
          },
          "floor_id": {
            "type": "string",
            "description": "Floor ID"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "unit_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of all units in this zone"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "site_id",
          "external_id",
          "area_id",
          "building_id",
          "floor_id",
          "name",
          "unit_ids",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_Zone model"
      },
      "postRestV1SitesSiteIdZones": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the zone"
          },
          "floor_id": {
            "type": "string",
            "description": "Unique UUID (Type 4) or external ID of the floor this zone belongs to"
          },
          "external_id": {
            "type": "string",
            "description": "External ID for this zone"
          }
        },
        "required": [
          "name",
          "floor_id"
        ],
        "description": "Creates a new zone"
      },
      "putRestV1SitesSiteIdZonesId": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the zone"
          },
          "external_id": {
            "type": "string",
            "description": "External ID for this zone"
          }
        },
        "description": "Updates a zone"
      },
      "Common_API_RestEntities_WebhookEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The event id, as the webhook delivery carried it"
          },
          "type": {
            "type": "string",
            "description": "The event type, such as rental_agreement.activated"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "description": "Version of the envelope format"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the event happened"
          },
          "installation": {
            "type": "object",
            "description": "The installation the event belongs to; null when unknown"
          },
          "site": {
            "type": "object",
            "description": "The site the event belongs to; null when unknown"
          },
          "data": {
            "type": "object",
            "description": "The event payload, as delivered"
          },
          "included": {
            "type": "object",
            "description": "The records the event refers to, each as its own show endpoint returns it; only with include"
          }
        },
        "required": [
          "id",
          "type",
          "version",
          "occurred_at",
          "installation",
          "site",
          "data"
        ],
        "description": "Common_API_RestEntities_WebhookEvent model"
      },
      "Common_API_RestEntities_Incident": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Incident ID"
          },
          "site_id": {
            "type": "string",
            "description": "Site ID"
          },
          "problem": {
            "type": "string",
            "enum": [
              "site_unreachable",
              "site_on_backup_uplink",
              "renewals_not_landing",
              "revocation_not_landing",
              "gateway_offline",
              "lock_controller_offline",
              "terminal_offline",
              "ble_connector_offline",
              "lock_cable_broken",
              "battery_low",
              "battery_critical",
              "unitlock_silent",
              "access_lists_invalid",
              "stale_credential_accepted",
              "entrance_marked_broken",
              "flapping",
              "ble_coverage_degraded",
              "terminal_coverage_degraded",
              "entry_help",
              "sabotage_detected",
              "emergency_release_triggered",
              "door_forced_open",
              "motion_outside_opening_hours",
              "door_left_open",
              "unit_left_unlocked",
              "opened_without_sign_in",
              "pin_failures_outside_hours",
              "access_schedule_changed",
              "several_warnings_at_once",
              "cable_cut_suspected",
              "motion_at_unopened_unit",
              "monitored_device_offline",
              "camera_not_recording",
              "blocked_credential_presented",
              "lock_controller_module_fault",
              "imported_pin_code_rejected"
            ],
            "description": "What is wrong"
          },
          "cause_kind": {
            "type": "string",
            "enum": [
              "site",
              "gateway",
              "lock_controller",
              "lock",
              "terminal",
              "ble_connector",
              "entrance",
              "network_device",
              "network_video_recorder",
              "network_camera"
            ],
            "description": "What kind of thing the problem was traced to"
          },
          "cause_id": {
            "type": "string",
            "description": "ID of the thing the problem was traced to"
          },
          "cause_label": {
            "type": "string",
            "description": "Human-readable label for the cause, e.g. a gateway's name"
          },
          "kind": {
            "type": "string",
            "enum": [
              "operations",
              "security"
            ],
            "description": "Which axis this incident sits on. `operations` means something is broken and has to be repaired by a deadline; `security` means something happened and somebody has to go and look. Not two heights of one scale: they are different actions, and nothing here ranks one above the other. A security incident carries no `due_at`: it expires instead, which is why listings put it above the deadlines rather than among them."
          },
          "owner": {
            "type": "string",
            "enum": [
              "operator",
              "provider"
            ],
            "description": "Whose problem it currently is to fix. Re-evaluated on every reconciliation run rather than fixed at opening."
          },
          "close_reason": {
            "type": "string",
            "enum": [
              "recovered",
              "superseded",
              "expired"
            ],
            "description": "Why the incident ended: `recovered` (the fault cleared), `superseded` (a site-wide outage now covers it; do NOT announce this as fixed), `expired` (it stopped being actionable). Null while open."
          },
          "affected_tenancies": {
            "type": "integer",
            "format": "int32",
            "description": "Distinct rental agreements in the active or pending state that depend on the cause, never units and never access-right rows, so two agreements on one unit count twice. `0` is ordinary rather than a missing value: a door with nothing rented behind it blocks nobody, which is why it is not urgent. Recomputed on every reconciliation run, so it follows the world rather than the moment the incident opened (impact_snapshot holds that frozen number). It orders what an operator reads only AFTER the deadline: due soonest first, this as the tiebreak among incidents due at the same time."
          },
          "reopened_count": {
            "type": "integer",
            "format": "int32",
            "description": "How many times this cause/problem pair has reopened after closing"
          },
          "acknowledged_by_account_id": {
            "type": "string",
            "description": "Account that acknowledged this incident"
          },
          "opened_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this incident opened (ISO 8601)"
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this incident is due to be resolved (ISO 8601)"
          },
          "closed_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this incident closed, absent while it is still open (ISO 8601)"
          },
          "acknowledged_at": {
            "type": "string",
            "format": "date-time",
            "description": "When an operator acknowledged this incident (ISO 8601)"
          },
          "help_requested_at": {
            "type": "string",
            "format": "date-time",
            "description": "When an operator requested the provider's help (ISO 8601)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "site_id",
          "problem",
          "cause_kind",
          "cause_id",
          "cause_label",
          "kind",
          "owner",
          "close_reason",
          "affected_tenancies",
          "reopened_count",
          "opened_at",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_Incident model"
      },
      "Common_API_RestEntities_RentalAgreement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Rental Agreement ID"
          },
          "external_id": {
            "type": "string",
            "description": "External identifier"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "site_id": {
            "type": "string",
            "description": "Site ID"
          },
          "tenant_id": {
            "type": "string",
            "description": "Tenant ID"
          },
          "unit_id": {
            "type": "string",
            "description": "Unit ID"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "inactive",
              "unpaid",
              "terminated",
              "archived"
            ],
            "description": "State of the rental agreement"
          },
          "tenant_access_group": {
            "type": "string",
            "description": "Tenant Access Group under which this agreement is scoped"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp, when the tenant membership started (in ISO 8601 format)"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp, when the tenant membership ends / ended (in ISO 8601 format)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "external_id",
          "name",
          "site_id",
          "tenant_id",
          "unit_id",
          "state",
          "tenant_access_group",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_RentalAgreement model"
      },
      "postRestV1RentalAgreements": {
        "type": "object",
        "properties": {
          "tenant_id": {
            "type": "string",
            "description": "Unique UUID (Type 4) or external ID of the tenant"
          },
          "unit_id": {
            "type": "string",
            "description": "Unique UUID (Type 4) or external ID of the unit"
          },
          "name": {
            "type": "string",
            "description": "Name or identifier of the contract"
          },
          "external_id": {
            "type": "string",
            "description": "External ID for this contract"
          },
          "state": {
            "type": "string",
            "description": "State of the rental agreement",
            "enum": [
              "pending",
              "active",
              "inactive",
              "unpaid",
              "terminated",
              "archived"
            ],
            "default": "pending"
          },
          "starts_at": {
            "type": "string",
            "description": "Start of the rental agreement, ISO 8601. Without an offset, local time at the site; a bare date means 00:00:00"
          },
          "ends_at": {
            "type": "string",
            "description": "End of the rental agreement, ISO 8601. Without an offset, local time at the site; a bare date means 23:59:59"
          },
          "tenant_access_group": {
            "type": "string",
            "description": "Access group for this rental agreement",
            "default": "default"
          }
        },
        "required": [
          "tenant_id",
          "unit_id",
          "name"
        ],
        "description": "Creates a new rental agreement"
      },
      "putRestV1RentalAgreementsId": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name or identifier of the contract"
          },
          "external_id": {
            "type": "string",
            "description": "External ID for this contract"
          },
          "state": {
            "type": "string",
            "description": "State of the rental agreement",
            "enum": [
              "pending",
              "active",
              "inactive",
              "unpaid",
              "terminated",
              "archived"
            ]
          },
          "starts_at": {
            "type": "string",
            "description": "Start of the rental agreement, ISO 8601. Without an offset, local time at the site; a bare date means 00:00:00"
          },
          "ends_at": {
            "type": "string",
            "description": "End of the rental agreement, ISO 8601. Without an offset, local time at the site; a bare date means 23:59:59"
          },
          "tenant_access_group": {
            "type": "string",
            "description": "Access group for this rental agreement"
          }
        },
        "description": "Updates a rental agreement"
      },
      "Common_API_RestEntities_Tenant": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Tenant ID"
          },
          "external_id": {
            "type": "string",
            "description": "External identifier"
          },
          "unique_identifier": {
            "type": "string",
            "description": "Unique Identifier"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "tenant_type": {
            "type": "string",
            "description": "Type of the tenant"
          },
          "tenant_membership_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of all tenant memberships for this tenant"
          },
          "rental_agreement_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of all rental agreements for this tenant"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "external_id",
          "unique_identifier",
          "name",
          "tenant_type",
          "tenant_membership_ids",
          "rental_agreement_ids",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_Tenant model"
      },
      "postRestV1Tenants": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the tenant"
          },
          "external_id": {
            "type": "string",
            "description": "External ID for this tenant"
          },
          "unique_identifier": {
            "type": "string",
            "description": "Unique Identifier of the tenant"
          },
          "tenant_type": {
            "type": "string",
            "description": "Type of the tenant",
            "enum": [
              "unspecified",
              "individual",
              "business",
              "organization",
              "other"
            ]
          }
        },
        "required": [
          "name"
        ],
        "description": "Creates a new tenant"
      },
      "putRestV1TenantsId": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the tenant"
          },
          "external_id": {
            "type": "string",
            "description": "External ID for this tenant"
          },
          "tenant_type": {
            "type": "string",
            "description": "Type of the tenant",
            "enum": [
              "unspecified",
              "individual",
              "business",
              "organization",
              "other"
            ]
          }
        },
        "description": "Updates a tenant"
      },
      "Common_API_RestEntities_TenantMembership": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Tenant Membership ID"
          },
          "external_id": {
            "type": "string",
            "description": "External identifier"
          },
          "account_id": {
            "type": "string",
            "description": "Account ID"
          },
          "tenant_id": {
            "type": "string",
            "description": "Tenant ID"
          },
          "rental_agreement_id": {
            "type": "string",
            "description": "ID of the rental agreement this tenant membership is scoped to"
          },
          "invitation_email": {
            "type": "string",
            "description": "Address the invitation to this membership was sent to"
          },
          "role": {
            "type": "string",
            "description": "Role of the account within in Tenant"
          },
          "pin_code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Common_API_RestEntities_PinCode"
              }
            ],
            "description": "PIN Code of the Tenant Membership"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp, when the tenant membership started (in ISO 8601 format)"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp, when the tenant membership ends / ended (in ISO 8601 format)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "external_id",
          "account_id",
          "tenant_id",
          "rental_agreement_id",
          "invitation_email",
          "role",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_TenantMembership model"
      },
      "Common_API_RestEntities_PinCode": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "PIN Code ID"
          },
          "number": {
            "type": "string",
            "description": "8-digit number"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "number",
          "created_at",
          "updated_at"
        ]
      },
      "postRestV1TenantMemberships": {
        "type": "object",
        "properties": {
          "tenant_id": {
            "type": "string",
            "description": "Unique UUID (Type 4) of the tenant"
          },
          "email": {
            "type": "string",
            "description": "Email address of the account. The matching filter on the list endpoint is `invitation_email_eq`."
          },
          "external_id": {
            "type": "string",
            "description": "External ID for this tenant membership"
          },
          "rental_agreement_id": {
            "type": "string",
            "description": "Unique UUID (Type 4) or external ID of the rental agreement this tenant membership should be scoped to"
          },
          "role": {
            "type": "string",
            "description": "Role of the account within in Tenant",
            "enum": [
              "member",
              "manager",
              "owner"
            ],
            "default": "member"
          },
          "starts_at": {
            "type": "string",
            "description": "Start of the tenant membership, ISO 8601. Without an offset, local time at the site; a bare date means 00:00:00"
          },
          "ends_at": {
            "type": "string",
            "description": "End of the tenant membership, ISO 8601. Without an offset, local time at the site; a bare date means 23:59:59"
          }
        },
        "required": [
          "tenant_id",
          "email"
        ],
        "description": "Creates a new tenant membership"
      },
      "putRestV1TenantMembershipsId": {
        "type": "object",
        "properties": {
          "external_id": {
            "type": "string",
            "description": "External ID for this tenant membership"
          },
          "role": {
            "type": "string",
            "description": "Role of the account within in Tenant",
            "enum": [
              "member",
              "manager",
              "owner"
            ]
          },
          "rental_agreement_id": {
            "type": "string",
            "description": "Unique UUID (Type 4) or external ID of the rental agreement this tenant membership should be scoped to"
          },
          "starts_at": {
            "type": "string",
            "description": "Start of the tenant membership, ISO 8601. Without an offset, local time at the site; a bare date means 00:00:00"
          },
          "ends_at": {
            "type": "string",
            "description": "End of the tenant membership, ISO 8601. Without an offset, local time at the site; a bare date means 23:59:59"
          }
        },
        "description": "Updates a tenant membership"
      },
      "putRestV1TenantMembershipsIdMigrateToNewEmailAddress": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "New email address for this tenant membership. The matching filter on the list endpoint is `invitation_email_eq`."
          }
        },
        "required": [
          "email"
        ],
        "description": "Migrates this tenant member onto a new email address"
      },
      "Common_API_RestEntities_Entrance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Entrance ID"
          },
          "site_id": {
            "type": "string",
            "description": "Site ID"
          },
          "area_id": {
            "type": "string",
            "description": "Area ID"
          },
          "floor_id": {
            "type": "string",
            "description": "Floor ID"
          },
          "zone_id": {
            "type": "string",
            "description": "Zone ID"
          },
          "unit_id": {
            "type": "string",
            "description": "Unit ID"
          },
          "elevator_id": {
            "type": "string",
            "description": "Elevator ID"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "entrance_type": {
            "type": "string",
            "enum": [
              "unspecified",
              "main",
              "side",
              "back",
              "front",
              "garage",
              "parking",
              "loading",
              "elevator"
            ],
            "description": "What kind of way in this is"
          },
          "door_type": {
            "type": "string",
            "enum": [
              "unspecified",
              "rollup",
              "swing",
              "double_swing",
              "revolving",
              "sliding",
              "turn_stile"
            ],
            "description": "How the door itself moves"
          },
          "state": {
            "type": "string",
            "enum": [
              "unspecified",
              "open",
              "closed",
              "locked",
              "unlocked",
              "broken"
            ],
            "description": "Last reported condition of the entrance"
          },
          "id_check_type": {
            "type": "string",
            "enum": [
              "never",
              "remote_only",
              "always"
            ],
            "description": "What a person must present to be let through"
          },
          "active": {
            "type": "boolean",
            "description": "Whether the entrance is active"
          },
          "building_id": {
            "type": "string",
            "description": "Building the entrance belongs to, through its unit or its floor"
          },
          "openable_via_api": {
            "type": "boolean",
            "description": "Whether an interaction request through this API can open the entrance"
          },
          "openable_via_ble": {
            "type": "boolean",
            "description": "Whether the entrance can be opened over Bluetooth from the app"
          },
          "openable_via_nfc": {
            "type": "boolean",
            "description": "Whether the entrance can be opened by holding a phone to the lock"
          },
          "available_for_everyone_within_building": {
            "type": "boolean",
            "description": "Whether anyone with access to the building may use this entrance, rather than only those granted it directly"
          },
          "supports_automatic_opening": {
            "type": "boolean",
            "description": "Whether the hardware can open the entrance by itself"
          },
          "supports_automatic_closing": {
            "type": "boolean",
            "description": "Whether the hardware can close the entrance by itself"
          },
          "supports_automatic_locking": {
            "type": "boolean",
            "description": "Whether the hardware can lock the entrance by itself"
          },
          "supports_automatic_unlocking": {
            "type": "boolean",
            "description": "Whether the hardware can unlock the entrance by itself"
          },
          "id_check_for_remote_interactions_enabled": {
            "type": "boolean",
            "description": "Whether opening this entrance remotely asks the person to identify themselves"
          },
          "nearby_hint_for_remote_interactions_enabled": {
            "type": "boolean",
            "description": "Whether the app warns a person opening this entrance from a distance"
          },
          "tenant_can_share_access": {
            "type": "boolean",
            "description": "Whether a renting customer may pass their access to this entrance on to somebody else"
          },
          "tenant_can_view_activities": {
            "type": "boolean",
            "description": "Whether a renting customer sees the history of this entrance being used"
          },
          "tenant_can_request_support": {
            "type": "boolean",
            "description": "Whether a renting customer can ask for help at this entrance"
          },
          "width": {
            "type": "number",
            "format": "float",
            "description": "Width in meters"
          },
          "height": {
            "type": "number",
            "format": "float",
            "description": "Height in meters"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "site_id",
          "area_id",
          "floor_id",
          "zone_id",
          "unit_id",
          "elevator_id",
          "name",
          "entrance_type",
          "door_type",
          "state",
          "id_check_type",
          "active",
          "building_id",
          "openable_via_api",
          "openable_via_ble",
          "openable_via_nfc",
          "available_for_everyone_within_building",
          "supports_automatic_opening",
          "supports_automatic_closing",
          "supports_automatic_locking",
          "supports_automatic_unlocking",
          "id_check_for_remote_interactions_enabled",
          "nearby_hint_for_remote_interactions_enabled",
          "tenant_can_share_access",
          "tenant_can_view_activities",
          "tenant_can_request_support",
          "width",
          "height",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_Entrance model"
      },
      "putRestV1EntrancesId": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the entrance"
          }
        },
        "required": [
          "name"
        ],
        "description": "Renames an entrance"
      },
      "Common_API_RestEntities_InteractionRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Interaction Request ID"
          },
          "site_id": {
            "type": "string",
            "description": "Site ID"
          },
          "entrance_id": {
            "type": "string",
            "description": "Entrance ID"
          },
          "unit_id": {
            "type": "string",
            "description": "Unit ID"
          },
          "account_id": {
            "type": "string",
            "description": "Account ID (actor)"
          },
          "site_membership_id": {
            "type": "string",
            "description": "Site Membership ID (actor)"
          },
          "tenant_membership_id": {
            "type": "string",
            "description": "Tenant Membership ID (actor)"
          },
          "rental_agreement_id": {
            "type": "string",
            "description": "Rental Agreement ID"
          },
          "tenant_id": {
            "type": "string",
            "description": "Tenant ID (the renting customer)"
          },
          "requester_type": {
            "type": "string",
            "description": "Requester type (e.g. Portal::AppIntegration)"
          },
          "requester_id": {
            "type": "string",
            "description": "Requester ID"
          },
          "state": {
            "type": "string",
            "enum": [
              "requested",
              "in_progress",
              "completed",
              "failed"
            ],
            "description": "State"
          },
          "interaction": {
            "type": "string",
            "enum": [
              "unlock",
              "lock",
              "open",
              "close"
            ],
            "description": "Interaction type"
          },
          "mobile_phone_state": {
            "type": "string",
            "description": "State reported by mobile phone"
          },
          "ble_state": {
            "type": "string",
            "description": "State of the BLE interaction"
          },
          "ble_completed_at": {
            "type": "string",
            "format": "date-time",
            "description": "BLE interaction completed at (ISO 8601)"
          },
          "ble_failed_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when BLE interaction failed (ISO 8601)"
          },
          "ble_failure_details": {
            "type": "string",
            "description": "Failure details of the BLE interaction"
          },
          "api_state": {
            "type": "string",
            "description": "State of the API interaction"
          },
          "api_completed_at": {
            "type": "string",
            "format": "date-time",
            "description": "API interaction completed at (ISO 8601)"
          },
          "api_failed_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when API interaction failed (ISO 8601)"
          },
          "api_failure_details": {
            "type": "string",
            "description": "Failure details of the API interaction"
          },
          "requested_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the interaction was requested (ISO 8601)"
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the interaction was completed (ISO 8601)"
          },
          "failed_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the interaction failed (ISO 8601)"
          },
          "confirmed_by_lock_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the lock confirmed the interaction (ISO 8601)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "site_id",
          "entrance_id",
          "unit_id",
          "account_id",
          "site_membership_id",
          "tenant_membership_id",
          "rental_agreement_id",
          "tenant_id",
          "requester_type",
          "requester_id",
          "state",
          "interaction",
          "mobile_phone_state",
          "ble_state",
          "ble_failure_details",
          "api_state",
          "api_failure_details",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_InteractionRequest model"
      },
      "postRestV1InteractionRequests": {
        "type": "object",
        "properties": {
          "entrance_id": {
            "type": "string",
            "description": "Unique UUID (Type 4) of the entrance"
          },
          "unit_id": {
            "type": "string",
            "description": "Unique UUID (Type 4) of the unit (entrance will be inferred)"
          },
          "interaction": {
            "type": "string",
            "description": "Which operation to perform. Defaults to unlock.",
            "enum": [
              "unlock",
              "lock",
              "open",
              "close"
            ]
          },
          "account_id": {
            "type": "string",
            "description": "Unique UUID (Type 4) of the account (actor)"
          },
          "site_membership_id": {
            "type": "string",
            "description": "Unique UUID (Type 4) of the site membership (actor)"
          },
          "tenant_membership_id": {
            "type": "string",
            "description": "Unique UUID (Type 4) of the tenant membership (actor)"
          },
          "rental_agreement_id": {
            "type": "string",
            "description": "Deprecated/ignored: the rental agreement is resolved from the actor's current permissions at the entrance."
          }
        },
        "description": "Create an interaction request"
      },
      "Common_API_RestEntities_WebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Webhook endpoint ID"
          },
          "url": {
            "type": "string",
            "description": "HTTPS URL messages are delivered to"
          },
          "description": {
            "type": "string",
            "description": "Free text, for the operator"
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Event types delivered here; empty means all"
          },
          "subscriptions": {
            "type": "object",
            "description": "Filters by site, entrance, account and unit; empty means unfiltered"
          },
          "health_state": {
            "type": "string",
            "description": "healthy, failing or disabled - as last reported by the delivery engine"
          },
          "last_failure_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last failed delivery"
          },
          "contact_email": {
            "type": "string",
            "description": "Notified when the health state changes"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          }
        },
        "required": [
          "id",
          "url",
          "description",
          "event_types",
          "subscriptions",
          "health_state",
          "last_failure_at",
          "contact_email",
          "created_at",
          "updated_at"
        ],
        "description": "Common_API_RestEntities_WebhookEndpoint model"
      },
      "postRestV1WebhookEndpoints": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "HTTPS URL messages are delivered to"
          },
          "description": {
            "type": "string",
            "description": "Free text, for the operator"
          },
          "event_types": {
            "type": "array",
            "description": "Event types delivered here; empty means all",
            "items": {
              "type": "string"
            }
          },
          "subscriptions": {
            "type": "object",
            "description": "Filters by site, entrance, account and unit; empty means unfiltered",
            "default": {}
          },
          "contact_email": {
            "type": "string",
            "description": "Notified when the health state changes"
          }
        },
        "required": [
          "url"
        ],
        "description": "Creates a webhook endpoint"
      },
      "Common_API_RestEntities_WebhookEndpointWithSecret": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Webhook endpoint ID"
          },
          "url": {
            "type": "string",
            "description": "HTTPS URL messages are delivered to"
          },
          "description": {
            "type": "string",
            "description": "Free text, for the operator"
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Event types delivered here; empty means all"
          },
          "subscriptions": {
            "type": "object",
            "description": "Filters by site, entrance, account and unit; empty means unfiltered"
          },
          "health_state": {
            "type": "string",
            "description": "healthy, failing or disabled - as last reported by the delivery engine"
          },
          "last_failure_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last failed delivery"
          },
          "contact_email": {
            "type": "string",
            "description": "Notified when the health state changes"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at (in ISO 8601 format)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at (in ISO 8601 format)"
          },
          "signing_secret": {
            "type": "string",
            "description": "Secret for verifying delivery signatures. Returned only here, and never again - store it now."
          }
        },
        "required": [
          "id",
          "url",
          "description",
          "event_types",
          "subscriptions",
          "health_state",
          "last_failure_at",
          "contact_email",
          "created_at",
          "updated_at",
          "signing_secret"
        ],
        "description": "Common_API_RestEntities_WebhookEndpointWithSecret model"
      },
      "putRestV1WebhookEndpointsId": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "HTTPS URL messages are delivered to"
          },
          "description": {
            "type": "string",
            "description": "Free text, for the operator"
          },
          "event_types": {
            "type": "array",
            "description": "Event types delivered here; empty means all",
            "items": {
              "type": "string"
            }
          },
          "subscriptions": {
            "type": "object",
            "description": "Filters by site, entrance, account and unit; empty means unfiltered"
          },
          "contact_email": {
            "type": "string",
            "description": "Notified when the health state changes"
          }
        },
        "description": "Updates a webhook endpoint"
      },
      "Common_API_RestEntities_WebhookEndpointSecret": {
        "type": "object",
        "properties": {
          "signing_secret": {
            "type": "string",
            "description": "Secret for verifying delivery signatures. Returned only here, and never again - store it now."
          }
        },
        "required": [
          "signing_secret"
        ],
        "description": "Common_API_RestEntities_WebhookEndpointSecret model"
      },
      "Common_API_RestEntities_WebhookDelivery": {
        "type": "object",
        "properties": {
          "attempted_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this attempt was made"
          },
          "status": {
            "type": "string",
            "description": "success, pending, failed or sending"
          },
          "response_code": {
            "type": "integer",
            "format": "int32",
            "description": "HTTP status your endpoint returned"
          },
          "response_duration_ms": {
            "type": "integer",
            "format": "int32",
            "description": "How long your endpoint took"
          },
          "response": {
            "type": "string",
            "description": "The body your endpoint returned"
          },
          "trigger": {
            "type": "string",
            "description": "scheduled or manual"
          }
        },
        "required": [
          "attempted_at",
          "status",
          "response_code",
          "response_duration_ms",
          "response",
          "trigger"
        ],
        "description": "Common_API_RestEntities_WebhookDelivery model"
      },
      "postRestV1WebhookEndpointsIdRecover": {
        "type": "object",
        "properties": {
          "since": {
            "type": "string",
            "format": "date-time"
          },
          "until": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "since"
        ],
        "description": "Asks the delivery provider to re-send messages in a time window"
      }
    }
  }
}
