device.joined
The gateway’s own event: a device joined its tenant and its endpoint’s sync group. It is told when the device is allowed for the first time: registered as allowed, allowed after waiting (PATCH /api/tenants/{tenant}/devices/{endpoint}/{device} with status allowed), or added as it called in at an endpoint that lets strangers in (new_devices = “allow”). It is told once per device. The endpoint’s policy package’s joined hook is called after it is stored. The envelope’s tenant, endpoint, group and device name the device, and package is its endpoint’s package.
Schema id: urn:houradvantage:events:3:device.joined
Fields
| Field | Type | Required | Description |
|---|---|---|---|
device_id | integer | yes | The gateway’s own number for the device in its register. |
group | string or null | yes | The id, within the tenant, of the sync group the device joined: its endpoint’s. |
Example
{ "device_id": 17, "group": "hq"}JSON Schema
device.joined.json
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:houradvantage:events:3:device.joined", "title": "device.joined: data", "description": "The gateway's own event: a device joined its tenant and its endpoint's sync group. It is told when the device is allowed for the first time: registered as allowed, allowed after waiting (PATCH /api/tenants/{tenant}/devices/{endpoint}/{device} with status allowed), or added as it called in at an endpoint that lets strangers in (new_devices = \"allow\"). It is told once per device. The endpoint's policy package's joined hook is called after it is stored. The envelope's tenant, endpoint, group and device name the device, and package is its endpoint's package.", "type": "object", "properties": { "device_id": { "type": "integer", "description": "The gateway's own number for the device in its register." }, "group": { "type": [ "string", "null" ], "description": "The id, within the tenant, of the sync group the device joined: its endpoint's." } }, "required": [ "device_id", "group" ], "examples": [ { "device_id": 17, "group": "hq" } ]}