{"openapi":"3.1.0","info":{"title":"Iris IoT Portal API v2.7.1","version":"0.1.0"},"paths":{"/user/":{"post":{"tags":["Users"],"summary":"Get or create the current user","description":"Returns the user record for the authenticated login, creating it on first call. Creation takes the email from the auth provider (the body email is ignored) and fails if that email is unverified. Not a read-only lookup.","operationId":"get_or_create_current_user","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/user/current":{"get":{"tags":["Users"],"summary":"Get my user","description":"Returns the logged-in user's email and role.","operationId":"get_current_user","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserBase"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/user/api-keys":{"get":{"tags":["Users"],"summary":"List my API keys","description":"Lists the current user's API keys with id, name, key_hint, created_at and last_used_at. Secrets are never returned; keys are created in the web app.","operationId":"list_api_keys","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyInfo"},"type":"array","title":"Response List Api Keys"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/user/api-key-usage":{"get":{"tags":["Users"],"summary":"Get this month's API key usage","description":"Returns the current user's API call count for the current UTC month, or a zero count when there is no usage yet. Use get_api_key_usage_history for previous months.","operationId":"get_api_key_usage","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyUsage"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/user/api-key-usage-history":{"get":{"tags":["Users"],"summary":"Get API key usage history","description":"Returns the current user's API call counts, one entry per recorded month. Use get_api_key_usage for just the current month.","operationId":"get_api_key_usage_history","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyUsage"},"type":"array","title":"Response Get Api Key Usage History"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/user/{user_id}/devices-total":{"get":{"tags":["Users"],"summary":"Get my device count and limit","description":"Counts billable devices across organisations the user owns. total is the device count, used holds the account device limit, and remaining is the limit minus the count. Only the caller's own user_id is allowed.","operationId":"get_user_device_count","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","description":"Your own user ID, from get_or_create_current_user.","title":"User Id"},"description":"Your own user ID, from get_or_create_current_user."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicesTotals"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/user/options":{"get":{"tags":["Users"],"summary":"Get my display preferences","description":"Returns the current user's display preferences such as date and time format, units, timezone, language and map style.","operationId":"get_user_options","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOptions"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]},"patch":{"tags":["Users"],"summary":"Update my display preferences","description":"Merges the supplied preference fields into the current user's options; omitted fields keep their stored values. Returns the full option set.","operationId":"update_user_options","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOptions"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOptions"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/user/action-logs":{"get":{"tags":["Users"],"summary":"List recent alerts across my organisations","description":"Returns the 100 newest action logs (alerts) for devices in organisations the user owns, newest first. Use list_organisation_alerts for one organisation with pagination.","operationId":"list_user_action_logs","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ActionLogs"},"type":"array","title":"Response List User Action Logs"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/organisation":{"get":{"tags":["Organisations"],"summary":"List my organisations","description":"Lists every organisation you own or are a member of. Start here to find the organisation_id most other tools need.","operationId":"list_organisations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Organisation"},"type":"array","title":"Response List Organisations"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]},"post":{"tags":["Organisations"],"summary":"Create an organisation","description":"Creates a new organisation owned by the current user.","operationId":"create_organisation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organisation"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/organisation/access":{"get":{"tags":["Organisations"],"summary":"Get my permissions per organisation","description":"Lists organisations you own or hold an active admin role in, with your permissions and whether you registered a phone for push notifications there. Organisations where you are a non-admin member are not included.","operationId":"get_my_organisation_access","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"all","in":"query","required":false,"schema":{"type":"boolean","description":"Platform admins only: true returns every organisation on the platform. Ignored for other users, who always get their owned and admin organisations.","default":false,"title":"All"},"description":"Platform admins only: true returns every organisation on the platform. Ignored for other users, who always get their owned and admin organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganisationAccess"},"title":"Response Get My Organisation Access"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/{organisation_id}":{"get":{"tags":["Organisations"],"summary":"Get an organisation","description":"Returns one organisation's details and settings.","operationId":"get_organisation","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organisation"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Organisations"],"summary":"Update an organisation","description":"Overwrites the organisation's name, description and map settings with the supplied values. require_mfa keeps its value when omitted, needs admin permission to change, and enabling it enforces MFA for all members.","operationId":"update_organisation","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organisation"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organisations"],"summary":"Delete an organisation","description":"Permanently deletes an organisation you own, including its trip history and hero image. Refused with status 406 in the body while it still has devices; delete or transfer them first.","operationId":"delete_organisation","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/name/{organisation_name}":{"get":{"tags":["Organisations"],"summary":"Find an organisation by exact name","description":"Returns the organisation whose name matches exactly (case-sensitive), if you can access it. Use list_organisations to browse instead.","operationId":"find_organisation_by_name","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_name","in":"path","required":true,"schema":{"type":"string","description":"Exact organisation name, case-sensitive.","title":"Organisation Name"},"description":"Exact organisation name, case-sensitive."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organisation"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/{organisation_id}/invite":{"post":{"tags":["Organisations"],"summary":"Invite a user to an organisation","description":"Adds the email's user as a member. If no account exists, creates one and emails the invitee a temporary password; existing users are added without an email. Set permissions afterwards with set_member_role.","operationId":"invite_organisation_member","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationMember"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/{organisation_id}/members/{user_id}":{"delete":{"tags":["Organisations"],"summary":"Remove a member from an organisation","description":"Removes a user's membership of this organisation; their account is kept. Anyone can remove themselves, removing others needs admin permission.","operationId":"remove_organisation_member","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","description":"Member's user ID, from list_organisation_members.","title":"User Id"},"description":"Member's user ID, from list_organisation_members."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/{organisation_id}/members":{"get":{"tags":["Organisations"],"summary":"List an organisation's members","description":"Lists members with their email, user_id and role permissions. Requires admin permission in the organisation.","operationId":"list_organisation_members","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganisationMember"},"title":"Response List Organisation Members"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/{organisation_id}/mqtt-credentials":{"get":{"tags":["Organisations"],"summary":"List an organisation's MQTT credentials","description":"Lists broker logins without passwords. Requires edit permission.","operationId":"list_mqtt_credentials","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MqttCredential"},"title":"Response List Mqtt Credentials"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/{organisation_id}/mqtt-credentials/{credential_id}":{"delete":{"tags":["Organisations"],"summary":"Delete an MQTT credential","description":"Removes the broker login. Requires edit permission.","operationId":"delete_mqtt_credential","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."},{"name":"credential_id","in":"path","required":true,"schema":{"type":"integer","title":"Credential Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/{organisation_id}/devices":{"get":{"tags":["Organisations"],"summary":"List an organisation's devices","description":"Lists every device in one organisation, unpaginated. Use list_devices for devices across all your organisations.","operationId":"list_organisation_devices","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Device"},"title":"Response List Organisation Devices"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/{organisation_id}/contact":{"get":{"tags":["Organisations"],"summary":"List an organisation's contacts","description":"Equivalent organisation-scoped route returning the same contacts as list_contacts, which is the canonical choice.","operationId":"list_organisation_contacts","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Contact"},"title":"Response List Organisation Contacts"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/{organisation_id}/contact/{contact_id}":{"delete":{"tags":["Organisations"],"summary":"Delete a contact via its organisation","description":"Permanently deletes the contact record, like delete_contact, after checking it belongs to the given organisation (404 otherwise). It does not just detach the contact; it is removed from all actions and geofences.","operationId":"delete_organisation_contact","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."},{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","description":"Contact ID, from list_contacts.","title":"Contact Id"},"description":"Contact ID, from list_contacts."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/{organisation_id}/logs":{"get":{"tags":["Organisations"],"summary":"List an organisation's audit log","description":"Lists the organisation's audit trail of user changes (who created, updated or deleted what). For device alerts use list_organisation_alerts.","operationId":"list_organisation_logs","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganisationLog"},"title":"Response List Organisation Logs"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/{organisation_id}/roles":{"get":{"tags":["Organisations"],"summary":"List member roles","description":"Lists the permission set (admin, add, edit, delete, transfer) of each member that has a role record in the organisation.","operationId":"list_organisation_roles","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganisationMemberRole"},"title":"Response List Organisation Roles"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/{organisation_id}/roles/{user_id}":{"put":{"tags":["Organisations"],"summary":"Set a member's permissions","description":"Sets the full permission set of an existing member; omitted permissions become false. Requires admin permission.","operationId":"set_member_role","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","description":"Member's user ID, from list_organisation_members.","title":"User Id"},"description":"Member's user ID, from list_organisation_members."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationMemberRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationMemberRole"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/{organisation_id}/remaining-device-limit":{"get":{"tags":["Organisations"],"summary":"Get remaining device slots","description":"Returns how many more devices can be added, as a number. The limit belongs to the organisation owner's account and counts devices across all their organisations.","operationId":"get_remaining_device_limit","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/{organisation_id}/hero-image/{extension}":{"post":{"tags":["Organisations"],"summary":"Upload an organisation hero image","description":"Uploads an image file (multipart form field file) as the organisation's banner, replacing and deleting the previous one. Returns the new image URL.","operationId":"upload_organisation_hero_image","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."},{"name":"extension","in":"path","required":true,"schema":{"type":"string","description":"Image file extension, e.g. png or jpg.","title":"Extension"},"description":"Image file extension, e.g. png or jpg."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_organisation_hero_image"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Upload Organisation Hero Image"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organisation/alerts/{organisation_id}":{"get":{"tags":["Organisations"],"summary":"List an organisation's alerts","description":"Returns a page of action logs (alerts) for the organisation's devices, newest first, with total for pagination. Use list_device_alerts for one device in a time range.","operationId":"list_organisation_alerts","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","description":"Number of records to skip (offset).","default":0,"title":"Skip"},"description":"Number of records to skip (offset)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Maximum number of records to return.","default":200,"title":"Limit"},"description":"Maximum number of records to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionLogsPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/{dashboard_id}":{"get":{"tags":["Dashboards"],"summary":"Get a dashboard","description":"Returns a dashboard with its device memberships and widget instances. Each widgets[].id is the instance ID used by update_dashboard_widget, delete_dashboard_widget and the layout i field.","operationId":"get_dashboard","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"integer","description":"Dashboard ID, from list_dashboards.","title":"Dashboard Id"},"description":"Dashboard ID, from list_dashboards."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Dashboards"],"summary":"Update a dashboard","description":"Changes only the supplied name and description; omitted fields are kept. Supplying devices replaces the dashboard's device set, while omitting it preserves the current devices. Widgets are not changed here.","operationId":"update_dashboard","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"integer","description":"Dashboard ID, from list_dashboards.","title":"Dashboard Id"},"description":"Dashboard ID, from list_dashboards."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Dashboards"],"summary":"Delete a dashboard","description":"Permanently deletes the dashboard and its widgets. The devices themselves are not affected.","operationId":"delete_dashboard","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"integer","description":"Dashboard ID, from list_dashboards.","title":"Dashboard Id"},"description":"Dashboard ID, from list_dashboards."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/{dashboard_id}/share":{"put":{"tags":["Dashboards"],"summary":"Enable or disable public sharing of a dashboard","description":"Sets dashboard sharing to the given state; repeating a call is harmless. Enabling creates a public unique_share_id that lets anyone view the dashboard and its devices without logging in; disabling revokes it.","operationId":"set_dashboard_sharing","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"integer","description":"Dashboard ID, from list_dashboards.","title":"Dashboard Id"},"description":"Dashboard ID, from list_dashboards."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/share/{unique_share_id}":{"get":{"tags":["Dashboards"],"summary":"Get a shared dashboard","description":"Public, unauthenticated read of a dashboard through its share ID. Use get_dashboard for dashboards you can access directly.","operationId":"get_shared_dashboard","parameters":[{"name":"unique_share_id","in":"path","required":true,"schema":{"type":"string","description":"Opaque public share ID: the unique_share_id returned after enabling sharing. Not a numeric device or dashboard ID.","title":"Unique Share Id"},"description":"Opaque public share ID: the unique_share_id returned after enabling sharing. Not a numeric device or dashboard ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/share/{unique_share_id}/devices":{"get":{"tags":["Dashboards"],"summary":"List a shared dashboard's devices","description":"Public, unauthenticated list of the devices on a shared dashboard. Use list_dashboard_devices for dashboards you can access directly.","operationId":"list_shared_dashboard_devices","parameters":[{"name":"unique_share_id","in":"path","required":true,"schema":{"type":"string","description":"Opaque public share ID: the unique_share_id returned after enabling sharing. Not a numeric device or dashboard ID.","title":"Unique Share Id"},"description":"Opaque public share ID: the unique_share_id returned after enabling sharing. Not a numeric device or dashboard ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SharedDevice"},"title":"Response List Shared Dashboard Devices"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/{dashboard_id}/devices":{"get":{"tags":["Dashboards"],"summary":"List a dashboard's devices","description":"Returns the full device records of the devices assigned to this dashboard, not every device in its organisation (see list_organisation_devices).","operationId":"list_dashboard_devices","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"integer","description":"Dashboard ID, from list_dashboards.","title":"Dashboard Id"},"description":"Dashboard ID, from list_dashboards."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Device"},"title":"Response List Dashboard Devices"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/organisation/{organisation_id}":{"get":{"tags":["Dashboards"],"summary":"List an organisation's dashboards","description":"Lists all dashboards of one organisation, each with its device memberships and widget instances.","operationId":"list_dashboards","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Dashboard"},"title":"Response List Dashboards"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/":{"post":{"tags":["Dashboards"],"summary":"Create a dashboard","description":"Creates an empty dashboard in an organisation, optionally with devices assigned. Add widgets afterwards with add_dashboard_widget.","operationId":"create_dashboard","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/dashboard/{dashboard_id}/widget":{"post":{"tags":["Dashboards"],"summary":"Add a widget to a dashboard","description":"Creates a widget instance on this dashboard and returns it; its id is the instance ID for later updates. Body widget_id picks the widget type (default 2, Icon Card) and field holds its settings, including the device.","operationId":"add_dashboard_widget","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"integer","description":"Dashboard ID, from list_dashboards.","title":"Dashboard Id"},"description":"Dashboard ID, from list_dashboards."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardWidgetCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardWidget"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/{dashboard_id}/layout":{"put":{"tags":["Dashboards"],"summary":"Move and resize dashboard widgets","description":"Sets grid position and size for the listed widget instances of this dashboard; list order becomes widget order. Items whose i is not a widget of this dashboard (such as the page header) are ignored.","operationId":"update_dashboard_layout","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"integer","description":"Dashboard ID, from list_dashboards.","title":"Dashboard Id"},"description":"Dashboard ID, from list_dashboards."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardLayoutBase"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/{dashboard_id}/widget/{widget_id}":{"put":{"tags":["Dashboards"],"summary":"Update a dashboard widget","description":"Changes only the supplied widget fields (type, settings, order, position, size) of an existing widget instance and returns it. Omitted fields are kept, and a widget cannot be moved to another dashboard.","operationId":"update_dashboard_widget","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"integer","description":"Dashboard ID, from list_dashboards.","title":"Dashboard Id"},"description":"Dashboard ID, from list_dashboards."},{"name":"widget_id","in":"path","required":true,"schema":{"type":"integer","description":"Dashboard widget instance ID: a widgets[].id from get_dashboard or the id returned by add_dashboard_widget. Not the widget type.","title":"Widget Id"},"description":"Dashboard widget instance ID: a widgets[].id from get_dashboard or the id returned by add_dashboard_widget. Not the widget type."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardWidgetUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardWidget"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Dashboards"],"summary":"Remove a widget from a dashboard","description":"Permanently deletes one widget instance from the dashboard.","operationId":"delete_dashboard_widget","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"integer","description":"Dashboard ID, from list_dashboards.","title":"Dashboard Id"},"description":"Dashboard ID, from list_dashboards."},{"name":"widget_id","in":"path","required":true,"schema":{"type":"integer","description":"Dashboard widget instance ID: a widgets[].id from get_dashboard or the id returned by add_dashboard_widget. Not the widget type.","title":"Widget Id"},"description":"Dashboard widget instance ID: a widgets[].id from get_dashboard or the id returned by add_dashboard_widget. Not the widget type."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/asset/organisation/{organisation_id}":{"get":{"tags":["Assets"],"summary":"List an organisation's assets","description":"Lists the assets (tracked objects grouping device metrics) of one organisation, paginated with skip and limit.","operationId":"list_assets","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","description":"Number of records to skip (offset).","default":0,"title":"Skip"},"description":"Number of records to skip (offset)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Maximum number of records to return.","default":100,"title":"Limit"},"description":"Maximum number of records to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Assets"},"title":"Response List Assets"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/asset/{asset_id}":{"get":{"tags":["Assets"],"summary":"Get an asset","description":"Returns one asset with its metrics.","operationId":"get_asset","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"integer","description":"Asset ID, from list_assets.","title":"Asset Id"},"description":"Asset ID, from list_assets."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assets"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Assets"],"summary":"Update an asset","description":"Overwrites the asset's name and description with the supplied values; other fields are not changed.","operationId":"update_asset","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"integer","description":"Asset ID, from list_assets.","title":"Asset Id"},"description":"Asset ID, from list_assets."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assets"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Assets"],"summary":"Delete an asset","description":"Permanently deletes the asset. Linked devices are not affected.","operationId":"delete_asset","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"integer","description":"Asset ID, from list_assets.","title":"Asset Id"},"description":"Asset ID, from list_assets."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assets"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/asset/":{"post":{"tags":["Assets"],"summary":"Create an asset","description":"Creates an asset in an organisation. Attach readings to it afterwards with add_asset_metric.","operationId":"create_asset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assets"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/asset/metric":{"post":{"tags":["Assets"],"summary":"Add a metric to an asset","description":"Adds a metric to an asset, either a fixed value or a field read from a device in the same organisation.","operationId":"add_asset_metric","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetMetricsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetMetrics"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/asset/history/{asset_id}":{"get":{"tags":["Assets"],"summary":"Get an asset's recent history","description":"Returns the asset's stored history frames from the last 24 hours. There is no date range option.","operationId":"get_asset_history","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"integer","description":"Asset ID, from list_assets.","title":"Asset Id"},"description":"Asset ID, from list_assets."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/report/organisation/{organisation_id}":{"get":{"tags":["Reports"],"summary":"List an organisation's reports","description":"Lists the scheduled reports of one organisation, paginated with skip and limit.","operationId":"list_reports","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","description":"Number of records to skip (offset).","default":0,"title":"Skip"},"description":"Number of records to skip (offset)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Maximum number of records to return.","default":100,"title":"Limit"},"description":"Maximum number of records to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Report"},"title":"Response List Reports"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/report/{report_id}":{"get":{"tags":["Reports"],"summary":"Get a report","description":"Returns one scheduled report's schedule, devices and contacts. Use list_report_files for generated files.","operationId":"get_report","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","description":"Report ID, from list_reports.","title":"Report Id"},"description":"Report ID, from list_reports."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Reports"],"summary":"Update a scheduled report","description":"Overwrites the report's name and schedule with the supplied values. The devices and contacts lists replace the current links, so omitting them removes all.","operationId":"update_report","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","description":"Report ID, from list_reports.","title":"Report Id"},"description":"Report ID, from list_reports."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Reports"],"summary":"Delete a scheduled report","description":"Permanently deletes the report, its schedule and its generated file records.","operationId":"delete_report","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","description":"Report ID, from list_reports.","title":"Report Id"},"description":"Report ID, from list_reports."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/report/":{"post":{"tags":["Reports"],"summary":"Create a scheduled report","description":"Creates a recurring report that is generated on schedule from the given devices' data and emailed to the given contacts.","operationId":"create_report","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/report/file/{report_id}":{"get":{"tags":["Reports"],"summary":"List a report's generated files","description":"Lists the files generated for a report, each with a download URL valid for one hour.","operationId":"list_report_files","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","description":"Report ID, from list_reports.","title":"Report Id"},"description":"Report ID, from list_reports."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/report/file/{report_id}/{file_id}":{"delete":{"tags":["Reports"],"summary":"Delete a generated report file","description":"Deletes one generated file record of the report. The report and its schedule are kept.","operationId":"delete_report_file","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","description":"Report ID, from list_reports.","title":"Report Id"},"description":"Report ID, from list_reports."},{"name":"file_id","in":"path","required":true,"schema":{"type":"integer","description":"Report file ID, from list_report_files.","title":"File Id"},"description":"Report file ID, from list_report_files."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/claim":{"post":{"tags":["Devices"],"summary":"Claim a pre-registered device","description":"Moves an unclaimed, pre-registered device into an organisation using its claim code (or a supported DevEUI-based code) and starts its billing period. Requires a free device slot; repeated failed codes are rate limited.","operationId":"claim_device","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimDevice"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/device/self-host":{"post":{"tags":["Devices"],"summary":"Add a device on your own network server","description":"Registers a device whose LoRaWAN network server you run yourself; nothing is provisioned on a Trackpac network server. Requires a free device slot. Use add_device_manually to have Trackpac host it.","operationId":"add_self_hosted_device","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelfHostedDevice"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/device/manual-add":{"post":{"tags":["Devices"],"summary":"Add a device hosted by Trackpac","description":"Creates a device from its LoRaWAN keys and provisions it on a Trackpac network server so it can join. Requires a free device slot. Use claim_device for devices that came with a claim code.","operationId":"add_device_manually","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedHostedDevice"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/device/brands":{"get":{"tags":["Devices"],"summary":"List device brands","description":"Lists active device brands (models), ordered by description. A brand's id is the device_brand used when adding devices and the brand_id for alert variables.","operationId":"list_device_brands","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","description":"Number of records to skip (offset).","default":0,"title":"Skip"},"description":"Number of records to skip (offset)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Maximum number of records to return.","default":100,"title":"Limit"},"description":"Maximum number of records to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeviceBrand"},"title":"Response List Device Brands"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/brands/{brand_id}/alertable-variables":{"get":{"tags":["Devices"],"summary":"Get a brand's alertable variables","description":"Lists the reading variables that alert actions can watch for this brand, with key, label, unit and type. Use key as variable_key and type as variable_type when creating an action.","operationId":"get_brand_alert_variables","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"brand_id","in":"path","required":true,"schema":{"type":"integer","description":"Device brand ID, from list_device_brands.","title":"Brand Id"},"description":"Device brand ID, from list_device_brands."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertableVariable"},"title":"Response Get Brand Alert Variables"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Devices"],"summary":"Replace a brand's alertable variables","description":"Replaces the full list of alertable variables for a brand. Platform admins only.","operationId":"set_brand_alert_variables","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"brand_id","in":"path","required":true,"schema":{"type":"integer","description":"Device brand ID, from list_device_brands.","title":"Brand Id"},"description":"Device brand ID, from list_device_brands."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertableVariable"},"title":"Variables"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertableVariable"},"title":"Response Set Brand Alert Variables"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/share/{unique_share_id}/{startDate}/{endDate}":{"get":{"tags":["Devices"],"summary":"List a shared device's readings","description":"Public, unauthenticated read of a shared device's frames between two Unix timestamps, newest day first. The range is limited to 31 days. Use list_device_frames for devices you can access directly.","operationId":"list_shared_device_frames","parameters":[{"name":"unique_share_id","in":"path","required":true,"schema":{"type":"string","description":"Opaque public share ID: the unique_share_id returned after enabling sharing. Not a numeric device or dashboard ID.","title":"Unique Share Id"},"description":"Opaque public share ID: the unique_share_id returned after enabling sharing. Not a numeric device or dashboard ID."},{"name":"startDate","in":"path","required":true,"schema":{"type":"integer","description":"Range start as a Unix timestamp in seconds (UTC).","title":"Startdate"},"description":"Range start as a Unix timestamp in seconds (UTC)."},{"name":"endDate","in":"path","required":true,"schema":{"type":"integer","description":"Range end as a Unix timestamp in seconds (UTC).","title":"Enddate"},"description":"Range end as a Unix timestamp in seconds (UTC)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/share/info/{unique_share_id}":{"get":{"tags":["Devices"],"summary":"Get a shared device","description":"Public, unauthenticated read of a device through its share ID. Use get_device for devices you can access directly.","operationId":"get_shared_device","parameters":[{"name":"unique_share_id","in":"path","required":true,"schema":{"type":"string","description":"Opaque public share ID: the unique_share_id returned after enabling sharing. Not a numeric device or dashboard ID.","title":"Unique Share Id"},"description":"Opaque public share ID: the unique_share_id returned after enabling sharing. Not a numeric device or dashboard ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharedDevice"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/share/profile/{unique_share_id}":{"get":{"tags":["Devices"],"summary":"Get a shared device's profile","description":"Public, unauthenticated read of a shared device's profile. Returns an empty profile with id 0 when none is saved.","operationId":"get_shared_device_profile","parameters":[{"name":"unique_share_id","in":"path","required":true,"schema":{"type":"string","description":"Opaque public share ID: the unique_share_id returned after enabling sharing. Not a numeric device or dashboard ID.","title":"Unique Share Id"},"description":"Opaque public share ID: the unique_share_id returned after enabling sharing. Not a numeric device or dashboard ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceProfile"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device":{"get":{"tags":["Devices"],"summary":"List my devices","description":"Lists devices across every organisation you own or are a member of, paginated with skip and limit. Use list_organisation_devices for one organisation, or get_device_by_dev_eui to look up a DevEUI.","operationId":"list_devices","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","description":"Number of records to skip (offset).","default":0,"title":"Skip"},"description":"Number of records to skip (offset)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Maximum number of records to return.","default":100,"title":"Limit"},"description":"Maximum number of records to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Device"},"title":"Response List Devices"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/limit":{"get":{"tags":["Devices"],"summary":"List billable devices in my owned organisations","description":"Lists devices in organisations you own (not ones you are only a member of), excluding brands whose service is included. skip and limit apply per owned organisation, not to the combined list. Prefer list_devices for general use.","operationId":"list_devices_page","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","description":"Devices to skip in each organisation.","default":0,"title":"Skip"},"description":"Devices to skip in each organisation."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Maximum devices returned per organisation.","default":100,"title":"Limit"},"description":"Maximum devices returned per organisation."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Device"},"title":"Response List Devices Page"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/search":{"get":{"tags":["Devices"],"summary":"Search devices","description":"Searches accessible devices by name or DevEUI across all of your organisations. Results are ranked exact, prefix, contains, then fuzzy. Use the returned id with the /device/{device_id} tools, and check match before trusting a fuzzy hit.","operationId":"search_devices","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":100,"description":"Device name or DevEUI (separators allowed), 2-100 chars.","title":"Q"},"description":"Device name or DevEUI (separators allowed), 2-100 chars."},{"name":"organisation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only search this organisation, from list_organisations.","title":"Organisation Id"},"description":"Only search this organisation, from list_organisations."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":1,"description":"Maximum number of results.","default":10,"title":"Limit"},"description":"Maximum number of results."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeviceSearchResult"},"title":"Response Search Devices"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/dev-eui/{dev_eui}":{"get":{"tags":["Devices"],"summary":"Find a device by DevEUI","description":"Looks up a device by its LoRaWAN DevEUI (case-insensitive) and returns it, including the internal id that other device tools take as device_id.","operationId":"get_device_by_dev_eui","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"dev_eui","in":"path","required":true,"schema":{"type":"string","description":"The device's 16-hex-character LoRaWAN DevEUI.","title":"Dev Eui"},"description":"The device's 16-hex-character LoRaWAN DevEUI."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/{device_id}":{"get":{"tags":["Devices"],"summary":"Get a device","description":"Returns one device by its internal ID, including brand, tags, last known location and share state. Use get_device_by_dev_eui if you only have the DevEUI.","operationId":"get_device","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Devices"],"summary":"Update a device's settings","description":"Overwrites the device's editable settings with the supplied values. For non-admins the DevEUI, keys, hosting and organisation are kept; use transfer_device to change organisation and rename_device to rename.","operationId":"update_device","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Devices"],"summary":"Delete a device","description":"Permanently deletes the device, removes it from its network server, and deletes all its stored readings, profile, queued downlinks and its links to actions, dashboards, reports, tags and geofence history.","operationId":"delete_device","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/{device_id}/profile":{"get":{"tags":["Devices"],"summary":"Get a device's profile","description":"Returns the device's saved profile JSON. Returns an empty profile with id 0 when none has been saved.","operationId":"get_device_profile","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceProfile"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Devices"],"summary":"Replace a device's profile","description":"Deletes the device's existing profile, if any, and saves the supplied one as a new record with a new id. Use update_device_profile to change an existing profile in place.","operationId":"replace_device_profile","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceProfileCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceProfile"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Devices"],"summary":"Update a device's profile","description":"Overwrites the profile JSON of the device's existing profile record. The device must already have a profile; use replace_device_profile to create one.","operationId":"update_device_profile","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceProfile"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceProfile"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/{device_id}/actions":{"get":{"tags":["Devices"],"summary":"List actions assigned to a device","description":"Lists the actions (alerts, forwards, geofence actions) assigned to one device. Use list_actions for every action in an organisation.","operationId":"list_device_actions","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Action"},"title":"Response List Device Actions"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/{device_id}/xy":{"put":{"tags":["Devices"],"summary":"Set a device's pin position on an image","description":"Stores where the device pin sits on an uploaded floor-plan or site image as x/y coordinates. This is not a geographic location.","operationId":"set_device_image_position","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceXY"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/{device_id}/transfer":{"put":{"tags":["Devices"],"summary":"Move a device to another organisation","description":"Moves the device to another organisation you can add devices to and removes its tags. Needs transfer permission in the current organisation and a free device slot when the target has a different owner.","operationId":"transfer_device","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceTransfer"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/{device_id}/name":{"put":{"tags":["Devices"],"summary":"Rename a device","description":"Changes only the device's display name. Prefer this over update_device for renames.","operationId":"rename_device","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceName"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/{device_id}/alert/last":{"get":{"tags":["Devices"],"summary":"Get a device's most recent alert","description":"Returns the device's newest action log (alert). Responds with HTTP 404 when the device has never alerted.","operationId":"get_latest_device_alert","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertLog"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/{device_id}/alert":{"get":{"tags":["Devices"],"summary":"List a device's alerts in a time range","description":"Lists the device's action logs (alerts) created between start_time and end_time inclusive, newest first.","operationId":"list_device_alerts","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."},{"name":"start_time","in":"query","required":true,"schema":{"type":"integer","description":"Range start as a Unix timestamp in seconds (UTC).","title":"Start Time"},"description":"Range start as a Unix timestamp in seconds (UTC)."},{"name":"end_time","in":"query","required":true,"schema":{"type":"integer","description":"Range end as a Unix timestamp in seconds (UTC).","title":"End Time"},"description":"Range end as a Unix timestamp in seconds (UTC)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActionLogs"},"title":"Response List Device Alerts"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/{device_id}/share":{"put":{"tags":["Devices"],"summary":"Enable or disable public sharing of a device","description":"Sets device sharing to the given state; repeating a call is harmless. Enabling creates a public unique_share_id that lets anyone read the device and its readings without logging in; disabling revokes it.","operationId":"set_device_sharing","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/{device_id}/downlink":{"post":{"tags":["Devices"],"summary":"Queue a LoRaWAN downlink","description":"Queues a downlink on the device's LoRaWAN network server; the device receives it after its next uplink. This sends a real command to the hardware. Use send_cat_m1_downlink for cellular (Cat-M1/NB-IoT) devices.","operationId":"send_downlink","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Command"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/device/{device_id}/downlink/cat1m":{"post":{"tags":["Devices"],"summary":"Queue a cellular downlink","description":"Stores a command in Trackpac's queue for a cellular (Cat-M1/NB-IoT) device to collect on its next check-in. This sends a real command to the hardware. Use send_downlink for LoRaWAN devices.","operationId":"send_cat_m1_downlink","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownlinkItemCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/frame/days/{device_id}/{days}":{"get":{"tags":["Frames"],"summary":"List a device's readings for the last N days","description":"Returns the device's stored uplink frames (decoded readings) from the last N days up to now, newest day first. Use list_device_frames for an explicit start and end time.","operationId":"list_recent_device_frames","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."},{"name":"days","in":"path","required":true,"schema":{"type":"integer","description":"Number of days back from now.","title":"Days"},"description":"Number of days back from now."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/frame/{device_id}/{startDate}/{endDate}":{"get":{"tags":["Frames"],"summary":"List a device's readings in a time range","description":"Returns the device's stored uplink frames (decoded readings, each with fcnt and created_at) between two Unix timestamps, newest day first. Passing 0 for both returns the last 24 hours. Use list_recent_device_frames for a rolling number of days.","operationId":"list_device_frames","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."},{"name":"startDate","in":"path","required":true,"schema":{"type":"integer","description":"Range start as a Unix timestamp in seconds (UTC).","title":"Startdate"},"description":"Range start as a Unix timestamp in seconds (UTC)."},{"name":"endDate","in":"path","required":true,"schema":{"type":"integer","description":"Range end as a Unix timestamp in seconds (UTC).","title":"Enddate"},"description":"Range end as a Unix timestamp in seconds (UTC)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/frame/delete-batch":{"post":{"tags":["Frames"],"summary":"Delete selected readings","description":"Permanently deletes specific frames of one device, each selected by its fcnt and timestamp. The message reports how many of the requested frames were found and deleted.","operationId":"delete_frames","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameDeleteBatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/frame/{device_id}":{"delete":{"tags":["Frames"],"summary":"Delete all readings of a device","description":"Permanently deletes every stored frame (all historical readings) of the device. The device itself is kept. Cannot be undone.","operationId":"delete_all_device_frames","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/frame/{device_id}/{fCnt}/{date}":{"delete":{"tags":["Frames"],"summary":"Delete one reading","description":"Permanently deletes a single frame of the device. The message says whether a frame with that fcnt was found on that UTC day.","operationId":"delete_frame","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."},{"name":"fCnt","in":"path","required":true,"schema":{"type":"integer","description":"Frame counter (fcnt) of the frame.","title":"Fcnt"},"description":"Frame counter (fcnt) of the frame."},{"name":"date","in":"path","required":true,"schema":{"type":"integer","description":"Unix timestamp in seconds of the frame's created_at; only its UTC day is used to locate the frame.","title":"Date"},"description":"Unix timestamp in seconds of the frame's created_at; only its UTC day is used to locate the frame."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/action/{organisation_id}":{"get":{"tags":["Actions"],"summary":"List an organisation's actions","description":"Lists every action (threshold alert, data forward or geofence action) configured in one organisation. Use list_device_actions for the actions assigned to a single device.","operationId":"list_actions","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Action"},"title":"Response List Actions"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Actions"],"summary":"Create an action","description":"Creates an alert, forward or geofence action in the organisation and links the given devices, contacts, geofences and tags. Alerts notify their contacts by email, SMS or push; forwards send device data to an external URL.","operationId":"create_action","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Action"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/action/{organisation_id}/{action_id}":{"get":{"tags":["Actions"],"summary":"Get an action","description":"Returns one action's configuration including its devices, contacts, geofences and tags. The action must belong to the given organisation.","operationId":"get_action","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"integer","description":"Action ID, from list_actions.","title":"Action Id"},"description":"Action ID, from list_actions."},{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Action"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/action/assign":{"post":{"tags":["Actions"],"summary":"Assign actions to a device","description":"Adds the listed actions to one device so they evaluate its readings; existing assignments are kept. Every action must belong to the device's organisation.","operationId":"assign_action","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionAssign"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/action/unassign":{"post":{"tags":["Actions"],"summary":"Unassign actions from a device","description":"Removes the listed actions from one device. The actions themselves and their other device assignments are kept.","operationId":"unassign_action","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionAssign"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/action/{action_id}":{"put":{"tags":["Actions"],"summary":"Replace an action's configuration","description":"Overwrites every configuration field with the supplied values, so omitted fields are cleared or reset to defaults; send the full configuration. The devices and contacts lists replace the current links, tags only when sent. Use set_action_status to only enable or disable it.","operationId":"update_action","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"integer","description":"Action ID, from list_actions.","title":"Action Id"},"description":"Action ID, from list_actions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Action"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Actions"],"summary":"Delete an action","description":"Permanently deletes the action and its device, contact, geofence and tag links. Devices and contacts themselves are kept.","operationId":"delete_action","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"integer","description":"Action ID, from list_actions.","title":"Action Id"},"description":"Action ID, from list_actions."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Action"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/action/{organisation_id}/{action_id}/status/":{"put":{"tags":["Actions"],"summary":"Enable or disable an action","description":"Sets whether the action is active without changing its configuration. Inactive actions do not alert or forward.","operationId":"set_action_status","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."},{"name":"action_id","in":"path","required":true,"schema":{"type":"integer","description":"Action ID, from list_actions.","title":"Action Id"},"description":"Action ID, from list_actions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionStatus"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Action"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/action/{organisation_id}/{action_id}/logs":{"get":{"tags":["Actions"],"summary":"List an action's logs","description":"Lists every log entry (each alert raised) for one action. action_alert_status true means the alert is still open.","operationId":"list_action_logs","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"integer","description":"Action ID, from list_actions.","title":"Action Id"},"description":"Action ID, from list_actions."},{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActionLogs"},"title":"Response List Action Logs"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/action/{organisation_id}/{action_id}/logs/{log_id}":{"get":{"tags":["Actions"],"summary":"Get an action log entry","description":"Returns one log entry of an action.","operationId":"get_action_log","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"integer","description":"Action ID, from list_actions.","title":"Action Id"},"description":"Action ID, from list_actions."},{"name":"log_id","in":"path","required":true,"schema":{"type":"integer","description":"Action log ID, from list_action_logs.","title":"Log Id"},"description":"Action log ID, from list_action_logs."},{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionLogs"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contact/register-device":{"post":{"tags":["Contacts"],"summary":"Register a phone for push notifications","description":"Registers a mobile app's push token with the push service and creates a push contact in the organisation for the current user. Intended for the mobile app; use create_contact for email or SMS contacts.","operationId":"register_push_device","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileDeviceRegister"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/contact":{"post":{"tags":["Contacts"],"summary":"Create a contact","description":"Creates an alert recipient in an organisation. contact_method decides how alerts reach it: email, phone (SMS), push, both (email and SMS) or all.","operationId":"create_contact","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/contact/organisation/{organisation_id}":{"get":{"tags":["Contacts"],"summary":"List an organisation's contacts","description":"Lists all alert contacts of one organisation. This is the canonical contact list; list_organisation_contacts returns the same data.","operationId":"list_contacts","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Contact"},"title":"Response List Contacts"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contact/{contact_id}":{"get":{"tags":["Contacts"],"summary":"Get a contact","description":"Returns one contact's name, method, email, phone and organisation.","operationId":"get_contact","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","description":"Contact ID, from list_contacts.","title":"Contact Id"},"description":"Contact ID, from list_contacts."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Contacts"],"summary":"Update a contact","description":"Overwrites name, email, phone and contact_method with the supplied values, so send all of them. Push token fields change only when supplied.","operationId":"update_contact","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","description":"Contact ID, from list_contacts.","title":"Contact Id"},"description":"Contact ID, from list_contacts."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Contacts"],"summary":"Delete a contact","description":"Permanently deletes the contact record and removes it from every action and geofence it was linked to.","operationId":"delete_contact","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","description":"Contact ID, from list_contacts.","title":"Contact Id"},"description":"Contact ID, from list_contacts."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/geofence/organisation/{organisation_id}":{"get":{"tags":["Geofences"],"summary":"List an organisation's geofences","description":"Lists the geofences of one organisation with presence_count, the number of devices currently inside. Returns all geofences unless limit is given.","operationId":"list_geofences","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"path","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","description":"Number of records to skip (offset).","default":0,"title":"Skip"},"description":"Number of records to skip (offset)."},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum number of geofences to return; omit for all.","title":"Limit"},"description":"Maximum number of geofences to return; omit for all."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Geofence"},"title":"Response List Geofences"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/geofence/{geofence_id}":{"get":{"tags":["Geofences"],"summary":"Get a geofence","description":"Returns one geofence's shape, alert schedule and linked contacts.","operationId":"get_geofence","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"geofence_id","in":"path","required":true,"schema":{"type":"integer","description":"Geofence ID, from list_geofences.","title":"Geofence Id"},"description":"Geofence ID, from list_geofences."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Geofence"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Geofences"],"summary":"Update a geofence","description":"Overwrites the geofence's shape, schedule and contacts with the supplied values; send the full configuration.","operationId":"update_geofence","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"geofence_id","in":"path","required":true,"schema":{"type":"integer","description":"Geofence ID, from list_geofences.","title":"Geofence Id"},"description":"Geofence ID, from list_geofences."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeofenceCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Geofence"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Geofences"],"summary":"Delete a geofence","description":"Permanently deletes the geofence. Use deactivate_geofence to pause it instead.","operationId":"delete_geofence","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"geofence_id","in":"path","required":true,"schema":{"type":"integer","description":"Geofence ID, from list_geofences.","title":"Geofence Id"},"description":"Geofence ID, from list_geofences."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Geofence"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/geofence":{"post":{"tags":["Geofences"],"summary":"Create a geofence","description":"Creates a circular or polygon geofence in an organisation. Contacts linked here are notified when devices enter or exit, within the optional time window.","operationId":"create_geofence","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeofenceCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Geofence"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}},"/geofence/{geofence_id}/contacts":{"get":{"tags":["Geofences"],"summary":"List a geofence's contacts","description":"Lists the contacts notified by this geofence.","operationId":"list_geofence_contacts","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"geofence_id","in":"path","required":true,"schema":{"type":"integer","description":"Geofence ID, from list_geofences.","title":"Geofence Id"},"description":"Geofence ID, from list_geofences."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Contact"},"title":"Response List Geofence Contacts"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/geofence/{geofence_id}/deactivate":{"put":{"tags":["Geofences"],"summary":"Pause a geofence","description":"Marks the geofence inactive so it stops tracking presence and alerting; its configuration is kept.","operationId":"deactivate_geofence","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"geofence_id","in":"path","required":true,"schema":{"type":"integer","description":"Geofence ID, from list_geofences.","title":"Geofence Id"},"description":"Geofence ID, from list_geofences."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Geofence"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/geofence/{geofence_id}/activate":{"put":{"tags":["Geofences"],"summary":"Resume a geofence","description":"Marks a paused geofence active again so it tracks presence and alerts.","operationId":"activate_geofence","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"geofence_id","in":"path","required":true,"schema":{"type":"integer","description":"Geofence ID, from list_geofences.","title":"Geofence Id"},"description":"Geofence ID, from list_geofences."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Geofence"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/geofence/{geofence_id}/presence":{"get":{"tags":["Geofences"],"summary":"List devices currently in a geofence","description":"Returns the latest enter event of each device currently inside the geofence. Use list_geofence_presence_history for past enters and exits.","operationId":"list_geofence_presence","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"geofence_id","in":"path","required":true,"schema":{"type":"integer","description":"Geofence ID, from list_geofences.","title":"Geofence Id"},"description":"Geofence ID, from list_geofences."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GeofencePresenceEvent"},"title":"Response List Geofence Presence"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/geofence/{geofence_id}/presence/history":{"get":{"tags":["Geofences"],"summary":"List a geofence's enter and exit history","description":"Returns a page of enter and exit events for the geofence, newest first, with total for pagination.","operationId":"list_geofence_presence_history","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"geofence_id","in":"path","required":true,"schema":{"type":"integer","description":"Geofence ID, from list_geofences.","title":"Geofence Id"},"description":"Geofence ID, from list_geofences."},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","description":"Number of records to skip (offset).","default":0,"title":"Skip"},"description":"Number of records to skip (offset)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Maximum number of records to return.","default":200,"title":"Limit"},"description":"Maximum number of records to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeofencePresenceHistoryPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tags":{"post":{"tags":["Tags"],"summary":"Create a tag","description":"Creates a tag in an organisation, or returns the existing tag when one with the same name (case-insensitive) exists. Supplying device_ids replaces the tag's full device set.","operationId":"create_tag","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Tags"],"summary":"List tags in an organisation","description":"Lists all tags defined in one organisation.","operationId":"list_tags","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"organisation_id","in":"query","required":true,"schema":{"type":"integer","description":"Organisation ID, from list_organisations.","title":"Organisation Id"},"description":"Organisation ID, from list_organisations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"title":"Response List Tags"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tags/{tag_id}":{"get":{"tags":["Tags"],"summary":"Get a tag","description":"Returns one tag's name, colour and organisation.","operationId":"get_tag","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"integer","description":"Tag ID, from list_tags.","title":"Tag Id"},"description":"Tag ID, from list_tags."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Tags"],"summary":"Update a tag","description":"Updates only the supplied name and colour. Supplying device_ids replaces the tag's full device set (an empty list removes it from all devices); omitting it keeps the current assignments.","operationId":"update_tag","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"integer","description":"Tag ID, from list_tags.","title":"Tag Id"},"description":"Tag ID, from list_tags."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Tags"],"summary":"Delete a tag","description":"Deletes the tag and removes it from every device and action it was assigned to. The devices and actions themselves are kept.","operationId":"delete_tag","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"integer","description":"Tag ID, from list_tags.","title":"Tag Id"},"description":"Tag ID, from list_tags."}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tags/{tag_id}/devices/{device_id}":{"post":{"tags":["Tags"],"summary":"Attach a tag to a device","description":"Adds one tag to one device without touching its other tags. The device and tag must belong to the same organisation.","operationId":"attach_tag_to_device","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"integer","description":"Tag ID, from list_tags.","title":"Tag Id"},"description":"Tag ID, from list_tags."},{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceTag"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Tags"],"summary":"Detach a tag from a device","description":"Removes one tag from one device. The tag and device are kept; use delete_tag to remove the tag everywhere.","operationId":"detach_tag_from_device","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"integer","description":"Tag ID, from list_tags.","title":"Tag Id"},"description":"Tag ID, from list_tags."},{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tags/{tag_id}/devices":{"get":{"tags":["Tags"],"summary":"List devices with a tag","description":"Lists every device that currently has the given tag.","operationId":"list_devices_by_tag","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"integer","description":"Tag ID, from list_tags.","title":"Tag Id"},"description":"Tag ID, from list_tags."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Device"},"title":"Response List Devices By Tag"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tags/devices/{device_id}/tags":{"get":{"tags":["Tags"],"summary":"List a device's tags","description":"Lists the tags currently attached to one device.","operationId":"list_device_tags","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI.","title":"Device Id"},"description":"Internal numeric device ID from list_devices, list_organisation_devices or get_device_by_dev_eui. Not the DevEUI."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"title":"Response List Device Tags"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/dragino/d23-nb":{"post":{"tags":["Ingest"],"summary":"Ingest Dragino D23 Nb Uplink","operationId":"ingest_dragino_d23_nb_uplink_ingest_dragino_d23_nb_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Uplink"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/dragino/lms01-nb":{"post":{"tags":["Ingest"],"summary":"Ingest Dragino Lms01 Nb Uplink","operationId":"ingest_dragino_lms01_nb_uplink_ingest_dragino_lms01_nb_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Uplink"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/dragino/sph01-nb":{"post":{"tags":["Ingest"],"summary":"Ingest Dragino Sph01 Nb Uplink","operationId":"ingest_dragino_sph01_nb_uplink_ingest_dragino_sph01_nb_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Uplink"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/dragino/se01-nb":{"post":{"tags":["Ingest"],"summary":"Ingest Dragino Se01 Nb Uplink","operationId":"ingest_dragino_se01_nb_uplink_ingest_dragino_se01_nb_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Uplink"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/flex-track":{"post":{"tags":["Ingest"],"summary":"Ingest Flex Track Uplink","operationId":"ingest_flex_track_uplink_ingest_flex_track_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UplinkChirpstack"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UplinkChirpstack"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/lorawan-gps-tracker":{"post":{"tags":["Ingest"],"summary":"Ingest Lorawan Gps Uplink","operationId":"ingest_lorawan_gps_uplink_ingest_lorawan_gps_tracker_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UplinkChirpstack"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UplinkChirpstack"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/water-leak-probe":{"post":{"tags":["Ingest"],"summary":"Ingest Senso8 Water Leak Probe Uplink","operationId":"ingest_senso8_water_leak_probe_uplink_ingest_water_leak_probe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UplinkWaterLeak"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/indoor-air-quality":{"post":{"tags":["Ingest"],"summary":"Ingest Indoor Air Quality Uplink","operationId":"ingest_indoor_air_quality_uplink_ingest_indoor_air_quality_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Uplink"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/temperature-humidity":{"post":{"tags":["Ingest"],"summary":"Ingest Temperature Humidity Uplink","operationId":"ingest_temperature_humidity_uplink_ingest_temperature_humidity_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Uplink"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/dry-contact":{"post":{"tags":["Ingest"],"summary":"Ingest Dry Contact Uplink","operationId":"ingest_dry_contact_uplink_ingest_dry_contact_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Uplink"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/motion":{"post":{"tags":["Ingest"],"summary":"Ingest Motion Uplink","operationId":"ingest_motion_uplink_ingest_motion_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Uplink"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/iris/tracker":{"post":{"tags":["Ingest"],"summary":"Ingest Iris Tracker","operationId":"ingest_iris_tracker_ingest_iris_tracker_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Uplink"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/indoor-air-quality-go":{"post":{"tags":["Ingest"],"summary":"Ingest Indoor Air Quality Go","operationId":"ingest_indoor_air_quality_go_ingest_indoor_air_quality_go_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UplinkGoiot"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/energy-meter":{"post":{"tags":["Ingest"],"summary":"Ingest Energy Meter Uplink","operationId":"ingest_energy_meter_uplink_ingest_energy_meter_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UplinkSenso8EnergyMeter"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/iris/5in1":{"post":{"tags":["Ingest"],"summary":"Ingest Iris 5In1","operationId":"ingest_iris_5in1_ingest_iris_5in1_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UplinkIris5in1"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/iris/7in1":{"post":{"tags":["Ingest"],"summary":"Ingest Iris 7In1 Uplink","operationId":"ingest_iris_7in1_uplink_ingest_iris_7in1_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Uplink"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/digitalmatter/oyster3fusion":{"post":{"tags":["Ingest"],"summary":"Ingest Oyster3Fusion Uplink","operationId":"ingest_oyster3fusion_uplink_ingest_digitalmatter_oyster3fusion_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UplinkDigitalMatterOysterFusion"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/weiot/wimass":{"post":{"tags":["Ingest"],"summary":"Ingest Weiot Wimass Uplink","operationId":"ingest_weiot_wimass_uplink_ingest_weiot_wimass_post","parameters":[{"name":"event","in":"query","required":false,"schema":{"type":"string","title":"Event"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UplinkChirpstack"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/iaq-tracker-merge/merge":{"get":{"tags":["IAQ Tracker Merge"],"summary":"Merge Gps Iaq Data","description":"Merge GPS tracker and IAQ sensor data and return GeoJSON or CSV output\n\nThis endpoint takes device IDs, date range, and filtering parameters,\nthen returns the data for stationary air quality readings in the specified format.\n\nArgs:\n    gps_device_id: GPS tracker device ID\n    iaq_device_id: Air quality sensor device ID\n    start_date: Start date (YYYY-MM-DD)\n    end_date: End date (YYYY-MM-DD)\n    movement_speed_threshold: Speed threshold for movement detection (km/h)\n    stationary_time_threshold: Minimum stationary time (seconds)\n    output_format: Output format - 'geojson' (default) or 'csv'\n\nReturns:\n    GeoJSON FeatureCollection or CSV data with filtered air quality data points\n\nExample:\n    GET /iaq-tracker-merge/merge?gps_device_id=1655&iaq_device_id=1641&start_date=2025-07-03&end_date=2025-07-04&output_format=csv","operationId":"merge_gps_iaq_data_iaq_tracker_merge_merge_get","security":[{"HTTPBearer":[]},{"ApiKey":[]}],"parameters":[{"name":"gps_device_id","in":"query","required":true,"schema":{"type":"integer","description":"GPS tracker device ID","title":"Gps Device Id"},"description":"GPS tracker device ID"},{"name":"iaq_device_id","in":"query","required":true,"schema":{"type":"integer","description":"Air quality sensor device ID","title":"Iaq Device Id"},"description":"Air quality sensor device ID"},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Start date in YYYY-MM-DD format","title":"Start Date"},"description":"Start date in YYYY-MM-DD format"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"End date in YYYY-MM-DD format","title":"End Date"},"description":"End date in YYYY-MM-DD format"},{"name":"movement_speed_threshold","in":"query","required":false,"schema":{"type":"number","maximum":50.0,"minimum":0.0,"description":"Movement speed threshold in km/h","default":5.0,"title":"Movement Speed Threshold"},"description":"Movement speed threshold in km/h"},{"name":"stationary_time_threshold","in":"query","required":false,"schema":{"type":"integer","maximum":3600,"minimum":10,"description":"Minimum stationary time in seconds","default":30,"title":"Stationary Time Threshold"},"description":"Minimum stationary time in seconds"},{"name":"output_format","in":"query","required":false,"schema":{"type":"string","pattern":"^(geojson|csv)$","description":"Output format: 'geojson' (default) or 'csv'","default":"geojson","title":"Output Format"},"description":"Output format: 'geojson' (default) or 'csv'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lns":{"get":{"tags":["LNS"],"summary":"List LoRaWAN network servers","description":"Lists the LoRaWAN network servers (LNS) devices can be hosted on. Use an entry's id as lns_id when adding a device with add_device_manually.","operationId":"list_network_servers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LNS"},"type":"array","title":"Response List Network Servers"}}}},"404":{"description":"Not found"}},"security":[{"HTTPBearer":[]},{"ApiKey":[]}]}}},"components":{"schemas":{"Action":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"organisation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organisation Id"},"action_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold"},"recipient_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Type"},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient"},"forwarder_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forwarder Url"},"forwarder_headers":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forwarder Headers"},"out_of_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Out Of Hours"},"start_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Time"},"true_false":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"True False"},"devices":{"anyOf":[{"items":{"$ref":"#/components/schemas/ActionDevice"},"type":"array"},{"type":"null"}],"title":"Devices"},"contacts":{"anyOf":[{"items":{"$ref":"#/components/schemas/ActionContact"},"type":"array"},{"type":"null"}],"title":"Contacts"},"geofences":{"anyOf":[{"items":{"$ref":"#/components/schemas/ActionGeofence"},"type":"array"},{"type":"null"}],"title":"Geofences"},"geofence_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geofence Action"},"geofence_action_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geofence Action Type"},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command"},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port"},"device_brand_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Brand Id"},"variable_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variable Key"},"variable_type":{"anyOf":[{"type":"string","enum":["numeric","boolean","categorical"]},{"type":"null"}],"title":"Variable Type"},"operator":{"anyOf":[{"type":"string","enum":["above","below","equals","between","outside"]},{"type":"null"}],"title":"Operator"},"categorical_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categorical Value"},"threshold_high":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold High"},"trigger_lock":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Trigger Lock"},"trigger_lock_interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trigger Lock Interval"},"send_resolve_message":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Send Resolve Message"},"forwarder_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forwarder Type","default":"slim"},"tags":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Tags"},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"time_created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"active":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active"}},"type":"object","title":"Action"},"ActionAssign":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/ActionRef"},"type":"array","minItems":1,"title":"Actions","description":"Actions to (un)assign, as objects like {\"id\": <action id>}."},"device_id":{"type":"integer","title":"Device Id","description":"Internal device ID from list_devices or get_device_by_dev_eui."}},"type":"object","required":["actions","device_id"],"title":"ActionAssign"},"ActionContact":{"properties":{"action_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Action Id"},"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"organisation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organisation Id"}},"type":"object","title":"ActionContact"},"ActionCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"organisation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organisation Id"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","default":true},"action_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Type","description":"alert (threshold alert), forward (send device data to a URL) or geofence (on geofence enter/exit)."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Custom text included in alert notifications."},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold","description":"Numeric alert threshold; the lower bound for between and outside."},"recipient_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Type"},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient"},"forwarder_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forwarder Url","description":"forward only: public http(s) URL that receives each uplink."},"forwarder_headers":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forwarder Headers","description":"forward only: JSON object string of extra HTTP headers."},"out_of_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Out Of Hours"},"start_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Time"},"true_false":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"True False","description":"Boolean alerts only: the value that triggers the alert."},"devices":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Devices","description":"Device IDs the action applies to."},"contacts":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Contacts","description":"Contact IDs, from list_contacts, to notify."},"geofences":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Geofences","description":"geofence only: geofence IDs, from list_geofences."},"geofence_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geofence Action","description":"geofence only: enter, exit or both."},"geofence_action_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geofence Action Type","description":"geofence only: downlink sends command on port to the device; otherwise contacts are alerted."},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command","description":"Downlink payload for geofence downlink actions."},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port","description":"LoRaWAN FPort for the downlink."},"device_brand_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Brand Id","description":"alert only: brand whose alertable variables apply, from list_device_brands."},"variable_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variable Key","description":"alert only: variable key from get_brand_alert_variables."},"variable_type":{"anyOf":[{"type":"string","enum":["numeric","boolean","categorical"]},{"type":"null"}],"title":"Variable Type","description":"alert only: the variable type from get_brand_alert_variables."},"operator":{"anyOf":[{"type":"string","enum":["above","below","equals","between","outside"]},{"type":"null"}],"title":"Operator","description":"Numeric comparison; categorical alerts use equals."},"categorical_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categorical Value","description":"Categorical alerts only: value that triggers the alert, case-insensitive."},"threshold_high":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold High","description":"Upper bound for between and outside."},"trigger_lock":{"type":"boolean","title":"Trigger Lock","description":"false alerts on every matching reading; true opens one alert until readings return to normal.","default":false},"trigger_lock_interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trigger Lock Interval","description":"With trigger_lock: minutes between repeat notifications while the alert stays open; empty for none."},"send_resolve_message":{"type":"boolean","title":"Send Resolve Message","description":"With trigger_lock: notify contacts when the alert closes.","default":true},"forwarder_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forwarder Type","description":"forward only: slim sends a compact payload, full the whole uplink.","default":"slim"},"tags":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Tag IDs, from list_tags."}},"type":"object","title":"ActionCreate"},"ActionDevice":{"properties":{"action_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Action Id"},"device_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Id"},"organisation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organisation Id"}},"type":"object","title":"ActionDevice"},"ActionGeofence":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"action_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Action Id"},"geofence_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Geofence Id"}},"type":"object","title":"ActionGeofence"},"ActionLogs":{"properties":{"id":{"type":"integer","title":"Id"},"action_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Action Id"},"device_id":{"type":"integer","title":"Device Id"},"time_created":{"type":"string","format":"date-time","title":"Time Created"},"message":{"type":"string","title":"Message"},"action_alert_status":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Action Alert Status"},"action_alert_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Action Alert End"}},"type":"object","required":["id"],"title":"ActionLogs"},"ActionLogsPage":{"properties":{"total":{"type":"integer","title":"Total"},"items":{"items":{"$ref":"#/components/schemas/ActionLogs"},"type":"array","title":"Items"}},"type":"object","required":["total","items"],"title":"ActionLogsPage"},"ActionRef":{"properties":{"id":{"type":"integer","title":"Id","description":"Action ID, from list_actions."}},"type":"object","required":["id"],"title":"ActionRef"},"ActionStatus":{"properties":{"action_status":{"type":"boolean","title":"Action Status","description":"true to activate the action, false to deactivate it."}},"type":"object","title":"ActionStatus"},"ActionUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"organisation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organisation Id"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active","default":true},"action_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Type","description":"alert (threshold alert), forward (send device data to a URL) or geofence (on geofence enter/exit)."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Custom text included in alert notifications."},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold","description":"Numeric alert threshold; the lower bound for between and outside."},"recipient_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Type"},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient"},"forwarder_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forwarder Url","description":"forward only: public http(s) URL that receives each uplink."},"forwarder_headers":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forwarder Headers","description":"forward only: JSON object string of extra HTTP headers."},"out_of_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Out Of Hours"},"start_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Time"},"true_false":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"True False","description":"Boolean alerts only: the value that triggers the alert."},"devices":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Devices","description":"Device IDs the action applies to."},"contacts":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Contacts","description":"Contact IDs, from list_contacts, to notify."},"geofences":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Geofences","description":"geofence only: geofence IDs, from list_geofences."},"geofence_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geofence Action","description":"geofence only: enter, exit or both."},"geofence_action_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geofence Action Type","description":"geofence only: downlink sends command on port to the device; otherwise contacts are alerted."},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command","description":"Downlink payload for geofence downlink actions."},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port","description":"LoRaWAN FPort for the downlink."},"device_brand_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Brand Id","description":"alert only: brand whose alertable variables apply, from list_device_brands."},"variable_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variable Key","description":"alert only: variable key from get_brand_alert_variables."},"variable_type":{"anyOf":[{"type":"string","enum":["numeric","boolean","categorical"]},{"type":"null"}],"title":"Variable Type","description":"alert only: the variable type from get_brand_alert_variables."},"operator":{"anyOf":[{"type":"string","enum":["above","below","equals","between","outside"]},{"type":"null"}],"title":"Operator","description":"Numeric comparison; categorical alerts use equals."},"categorical_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categorical Value","description":"Categorical alerts only: value that triggers the alert, case-insensitive."},"threshold_high":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold High","description":"Upper bound for between and outside."},"trigger_lock":{"type":"boolean","title":"Trigger Lock","description":"false alerts on every matching reading; true opens one alert until readings return to normal.","default":false},"trigger_lock_interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trigger Lock Interval","description":"With trigger_lock: minutes between repeat notifications while the alert stays open; empty for none."},"send_resolve_message":{"type":"boolean","title":"Send Resolve Message","description":"With trigger_lock: notify contacts when the alert closes.","default":true},"forwarder_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forwarder Type","description":"forward only: slim sends a compact payload, full the whole uplink.","default":"slim"},"tags":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Tag IDs, from list_tags."}},"type":"object","title":"ActionUpdate"},"AlertLog":{"properties":{"alert_id":{"type":"integer","title":"Alert Id","default":0},"device_id":{"type":"integer","title":"Device Id","default":0},"message":{"type":"string","title":"Message","default":0},"id":{"type":"integer","title":"Id"},"time_created":{"type":"string","format":"date-time","title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"device":{"$ref":"#/components/schemas/Device"},"location_id":{"type":"integer","title":"Location Id"}},"type":"object","required":["id"],"title":"AlertLog"},"AlertableVariable":{"properties":{"key":{"type":"string","title":"Key","description":"Reading field name; used as an action's variable_key."},"label":{"type":"string","title":"Label"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"type":{"type":"string","enum":["numeric","boolean","categorical"],"title":"Type","description":"Used as an action's variable_type."}},"type":"object","required":["key","label","type"],"title":"AlertableVariable"},"ApiKeyInfo":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"key_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Hint"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["id"],"title":"ApiKeyInfo","description":"API key list item (no secret)."},"ApiKeyUsage":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Month"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"},"usage_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Usage Type"}},"type":"object","title":"ApiKeyUsage"},"AssetMetrics":{"properties":{"asset_id":{"type":"integer","title":"Asset Id","description":"Asset ID, from list_assets."},"metric_type_id":{"type":"integer","title":"Metric Type Id"},"value":{"type":"string","title":"Value","description":"Fixed metric value, when not reading from a device."},"device_id":{"type":"integer","title":"Device Id","description":"Device to read the metric from; must be in the asset's organisation."},"device_field":{"type":"string","title":"Device Field","description":"Reading field of that device to use as the metric value."},"label":{"type":"string","title":"Label"},"id":{"type":"integer","title":"Id"},"time_created":{"type":"string","format":"date-time","title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"}},"type":"object","required":["id"],"title":"AssetMetrics"},"AssetMetricsCreate":{"properties":{"asset_id":{"type":"integer","title":"Asset Id","description":"Asset ID, from list_assets."},"metric_type_id":{"type":"integer","title":"Metric Type Id"},"value":{"type":"string","title":"Value","description":"Fixed metric value, when not reading from a device."},"device_id":{"type":"integer","title":"Device Id","description":"Device to read the metric from; must be in the asset's organisation."},"device_field":{"type":"string","title":"Device Field","description":"Reading field of that device to use as the metric value."},"label":{"type":"string","title":"Label"}},"type":"object","title":"AssetMetricsCreate"},"Assets":{"properties":{"name":{"type":"string","title":"Name"},"organisation_id":{"type":"integer","title":"Organisation Id"},"description":{"type":"string","title":"Description"},"image":{"type":"string","title":"Image"},"id":{"type":"integer","title":"Id"},"time_created":{"type":"string","format":"date-time","title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"active":{"type":"integer","title":"Active"},"metrics":{"items":{"$ref":"#/components/schemas/AssetMetrics"},"type":"array","title":"Metrics","default":[]}},"type":"object","required":["id"],"title":"Assets"},"AssetsCreate":{"properties":{"name":{"type":"string","title":"Name"},"organisation_id":{"type":"integer","title":"Organisation Id"},"description":{"type":"string","title":"Description"},"image":{"type":"string","title":"Image"}},"type":"object","title":"AssetsCreate"},"AssetsUpdate":{"properties":{"name":{"type":"string","title":"Name"},"organisation_id":{"type":"integer","title":"Organisation Id"},"description":{"type":"string","title":"Description"},"image":{"type":"string","title":"Image"}},"type":"object","title":"AssetsUpdate"},"Body_upload_organisation_hero_image":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_organisation_hero_image"},"ClaimDevice":{"properties":{"claimCode":{"type":"string","title":"Claimcode","description":"Claim code supplied with the device, or a supported DevEUI-based code."},"organisation_id":{"type":"integer","title":"Organisation Id","description":"Organisation to claim the device into, from list_organisations."}},"type":"object","title":"ClaimDevice"},"Command":{"properties":{"command":{"type":"string","title":"Command","description":"Downlink payload bytes as a hex string, e.g. 0102ff."},"port":{"type":"integer","title":"Port","description":"LoRaWAN FPort to send the downlink on."}},"type":"object","title":"Command"},"Contact":{"properties":{"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"contact_method":{"type":"string","title":"Contact Method","description":"How alerts are sent: email, phone (SMS), push, both (email and SMS) or all."},"push_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Push Token"},"push_device_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Push Device Name"},"organisation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organisation Id"},"id":{"type":"integer","title":"Id"}},"type":"object","required":["name","contact_method","id"],"title":"Contact"},"ContactCreate":{"properties":{"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"contact_method":{"type":"string","title":"Contact Method","description":"How alerts are sent: email, phone (SMS), push, both (email and SMS) or all."},"push_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Push Token"},"push_device_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Push Device Name"},"organisation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organisation Id"}},"type":"object","required":["name","contact_method"],"title":"ContactCreate"},"ContactUpdate":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"phone":{"type":"string","title":"Phone"},"contact_method":{"type":"string","title":"Contact Method"},"push_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Push Token"},"push_device_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Push Device Name"},"organisation_id":{"type":"integer","title":"Organisation Id"}},"type":"object","title":"ContactUpdate"},"Dashboard":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"organisation_id":{"type":"integer","title":"Organisation Id"},"id":{"type":"integer","title":"Id"},"time_created":{"type":"string","format":"date-time","title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"active":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active"},"devices":{"items":{"$ref":"#/components/schemas/DashboardDevice"},"type":"array","title":"Devices","default":[]},"widgets":{"items":{"$ref":"#/components/schemas/DashboardWidget"},"type":"array","title":"Widgets","default":[]},"unique_share_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unique Share Id"}},"type":"object","required":["id"],"title":"Dashboard"},"DashboardCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"organisation_id":{"type":"integer","title":"Organisation Id"},"devices":{"items":{"type":"integer"},"type":"array","title":"Devices","description":"Device IDs to assign to the dashboard."}},"type":"object","title":"DashboardCreate"},"DashboardDevice":{"properties":{"device_id":{"type":"integer","title":"Device Id"},"dashboard_id":{"type":"integer","title":"Dashboard Id"}},"type":"object","title":"DashboardDevice"},"DashboardLayoutBase":{"properties":{"layout":{"items":{"$ref":"#/components/schemas/DashboardLayoutItem"},"type":"array","title":"Layout","default":[]}},"type":"object","title":"DashboardLayoutBase"},"DashboardLayoutItem":{"properties":{"i":{"type":"string","title":"I","description":"Dashboard widget instance ID (a widgets[].id from get_dashboard), as a string."},"x":{"type":"integer","minimum":0.0,"title":"X","description":"Grid column of the top-left corner."},"y":{"type":"integer","minimum":0.0,"title":"Y","description":"Grid row of the top-left corner."},"w":{"type":"integer","minimum":1.0,"title":"W","description":"Width in grid columns."},"h":{"type":"integer","minimum":1.0,"title":"H","description":"Height in grid rows."}},"type":"object","required":["i","x","y","w","h"],"title":"DashboardLayoutItem","description":"A react-grid-layout item; extra keys the grid adds are ignored."},"DashboardUpdate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"organisation_id":{"type":"integer","title":"Organisation Id"},"id":{"type":"integer","title":"Id"},"time_created":{"type":"string","format":"date-time","title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"active":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active"},"devices":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Devices","description":"Replaces the device set when sent, as objects like {\"id\": <device id>}; omit to keep the current devices.","default":[]}},"type":"object","title":"DashboardUpdate"},"DashboardWidget":{"properties":{"dashboard_id":{"type":"integer","title":"Dashboard Id","description":"Dashboard the widget belongs to; on writes the path dashboard is used."},"order":{"type":"integer","title":"Order","default":0},"x":{"type":"integer","title":"X","description":"Grid column of the top-left corner, at least 0.","default":0},"y":{"type":"integer","title":"Y","description":"Grid row of the top-left corner, at least 0.","default":0},"w":{"type":"integer","title":"W","description":"Width in grid columns, at least 1.","default":2},"h":{"type":"integer","title":"H","description":"Height in grid rows, at least 1.","default":2},"widget_id":{"type":"integer","title":"Widget Id","description":"Widget type ID, not a widget instance ID. 2 Icon Card (one current reading), 3 Map (device locations), 5 Title (heading text), 6 Device Card (all readings of one device), 7 Boolean (on/off reading), 8 Break (spacer), 9 Fluid Level (tank level from a distance reading), 10 Graph (reading history over days), 11 Downlink Switch, 12 IFrame, 13 Image. Each type reads its own keys from field.","default":2},"field":{"type":"string","title":"Field","default":""},"id":{"type":"integer","title":"Id"},"time_created":{"type":"string","format":"date-time","title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"}},"type":"object","required":["id"],"title":"DashboardWidget"},"DashboardWidgetCreate":{"properties":{"dashboard_id":{"type":"integer","title":"Dashboard Id","description":"Dashboard the widget belongs to; on writes the path dashboard is used."},"order":{"type":"integer","title":"Order","default":0},"x":{"type":"integer","title":"X","description":"Grid column of the top-left corner, at least 0.","default":0},"y":{"type":"integer","title":"Y","description":"Grid row of the top-left corner, at least 0.","default":0},"w":{"type":"integer","title":"W","description":"Width in grid columns, the dashboard is 12 columns wide. Omit w and h to use the widget type's starting size: Icon Card 3x5, Boolean 3x4, Device Card 4x6, Graph 6x8, Map 8x10."},"h":{"type":"integer","title":"H","description":"Height in grid rows of 30px. Smaller than the type's starting size clips the widget, e.g. an Icon Card needs 5."},"widget_id":{"type":"integer","title":"Widget Id","description":"Widget type ID, not a widget instance ID. 2 Icon Card (one current reading), 3 Map (device locations), 5 Title (heading text), 6 Device Card (all readings of one device), 7 Boolean (on/off reading), 8 Break (spacer), 9 Fluid Level (tank level from a distance reading), 10 Graph (reading history over days), 11 Downlink Switch, 12 IFrame, 13 Image. Each type reads its own keys from field.","default":2},"field":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}],"title":"Field","description":"Widget settings as a JSON object with the keys of the widget_id type; the device is chosen here. <device id> is a dashboard device and <key> a reading key from its latest data, e.g. co2. 2 Icon Card: {\"Title\": \"CO2\", \"Value_Field\": <device id>, \"Field\": \"<key>\", \"Unit\": \"ppm\"}. 10 Graph: {\"Title\": \"CO2 trend\", \"Values\": [\"<device id>,<key>\"], \"DaysOfHistory\": 7}, one line per Values entry. 6 Device Card: {\"Device\": <device id>}. 7 Boolean: {\"Title\": \"Door\", \"Boolean Field\": <device id>, \"Field\": \"<key>\"}. 9 Fluid Level: {\"Title\": \"Tank\", \"Value Field\": <device id>, \"Field\": \"<distance key>\", \"Full\": <distance when full>, \"Empty\": <distance when empty>}. 3 Map: {\"MapType\": \"roadmap\" or \"satellite\", \"selectedDevices\": [\"<device id>,true\"]}, all dashboard devices when selectedDevices is empty. 5 Title: {\"Title\": \"Living room\", \"Alignment\": \"left\", \"Font Size\": \"24\"}. 12 IFrame and 13 Image: {\"Title\": \"...\", \"URL\": \"https://...\"}.","default":""}},"type":"object","title":"DashboardWidgetCreate"},"DashboardWidgetUpdate":{"properties":{"dashboard_id":{"type":"integer","title":"Dashboard Id","description":"Dashboard the widget belongs to; on writes the path dashboard is used."},"order":{"type":"integer","title":"Order","default":0},"x":{"type":"integer","title":"X","description":"Grid column of the top-left corner, at least 0.","default":0},"y":{"type":"integer","title":"Y","description":"Grid row of the top-left corner, at least 0.","default":0},"w":{"type":"integer","title":"W","description":"Width in grid columns of 12, omit to keep the current width."},"h":{"type":"integer","title":"H","description":"Height in 30px grid rows, omit to keep the current height."},"widget_id":{"type":"integer","title":"Widget Id","description":"Widget type ID, not a widget instance ID. 2 Icon Card (one current reading), 3 Map (device locations), 5 Title (heading text), 6 Device Card (all readings of one device), 7 Boolean (on/off reading), 8 Break (spacer), 9 Fluid Level (tank level from a distance reading), 10 Graph (reading history over days), 11 Downlink Switch, 12 IFrame, 13 Image. Each type reads its own keys from field.","default":2},"field":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}],"title":"Field","description":"Widget settings as a JSON object with the keys of the widget_id type; the device is chosen here. <device id> is a dashboard device and <key> a reading key from its latest data, e.g. co2. 2 Icon Card: {\"Title\": \"CO2\", \"Value_Field\": <device id>, \"Field\": \"<key>\", \"Unit\": \"ppm\"}. 10 Graph: {\"Title\": \"CO2 trend\", \"Values\": [\"<device id>,<key>\"], \"DaysOfHistory\": 7}, one line per Values entry. 6 Device Card: {\"Device\": <device id>}. 7 Boolean: {\"Title\": \"Door\", \"Boolean Field\": <device id>, \"Field\": \"<key>\"}. 9 Fluid Level: {\"Title\": \"Tank\", \"Value Field\": <device id>, \"Field\": \"<distance key>\", \"Full\": <distance when full>, \"Empty\": <distance when empty>}. 3 Map: {\"MapType\": \"roadmap\" or \"satellite\", \"selectedDevices\": [\"<device id>,true\"]}, all dashboard devices when selectedDevices is empty. 5 Title: {\"Title\": \"Living room\", \"Alignment\": \"left\", \"Font Size\": \"24\"}. 12 IFrame and 13 Image: {\"Title\": \"...\", \"URL\": \"https://...\"}.","default":""},"id":{"type":"integer","title":"Id","description":"Ignored; the path widget_id identifies the widget instance."},"time_created":{"type":"string","format":"date-time","title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"}},"type":"object","title":"DashboardWidgetUpdate"},"Device":{"properties":{"name":{"type":"string","title":"Name"},"dev_eui":{"type":"string","title":"Dev Eui"},"app_eui":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Eui"},"hosted":{"type":"string","title":"Hosted","default":"hosted"},"forwarder_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Forwarder Id"},"device_type":{"type":"integer","title":"Device Type","default":1},"organisation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organisation Id"},"device_brand_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Brand Id"},"id":{"type":"integer","title":"Id"},"last_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Location"},"forwarder":{"anyOf":[{"$ref":"#/components/schemas/Forwarder"},{"type":"null"}]},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"},"usage":{"type":"integer","title":"Usage","default":0},"time_created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"last_heard":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Heard"},"batteryMv":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batterymv"},"unique_share_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unique Share Id"},"owner_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner Id"},"last_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Data"},"lns_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lns Id"},"device_brand":{"anyOf":[{"$ref":"#/components/schemas/DeviceBrand"},{"type":"null"}]},"lora_fallback_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lora Fallback Enabled","default":false},"trip_registry_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Trip Registry Enabled","default":false},"tags":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array","title":"Tags","default":[]},"x":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"X"},"y":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Y"},"claim_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claim Code"},"claimed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Claimed","default":false}},"type":"object","required":["name","dev_eui","id"],"title":"Device"},"DeviceBrand":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"device_type":{"type":"integer","title":"Device Type","default":1},"batteryMaxMV":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batterymaxmv"},"batteryMinMV":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batteryminmv"},"id":{"type":"integer","title":"Id"},"time_created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"active":{"type":"boolean","title":"Active","default":true},"inc_service":{"type":"boolean","title":"Inc Service","default":false},"non_lora":{"type":"boolean","title":"Non Lora","default":false},"downlink_transport":{"type":"string","title":"Downlink Transport","default":"lorawan"},"alertable_variables":{"anyOf":[{"items":{"$ref":"#/components/schemas/AlertableVariable"},"type":"array"},{"type":"null"}],"title":"Alertable Variables"}},"type":"object","required":["name","id"],"title":"DeviceBrand"},"DeviceCreate":{"properties":{"name":{"type":"string","title":"Name"},"dev_eui":{"type":"string","title":"Dev Eui"},"app_eui":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Eui"},"hosted":{"type":"string","title":"Hosted","default":"hosted"},"forwarder_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Forwarder Id"},"device_type":{"type":"integer","title":"Device Type","default":1},"organisation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organisation Id"},"device_brand_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Brand Id"},"app_key":{"type":"string","title":"App Key"},"lns_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lns Id"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"claim_code":{"anyOf":[{"type":"string","minLength":8},{"type":"null"}],"title":"Claim Code"}},"type":"object","required":["name","dev_eui"],"title":"DeviceCreate"},"DeviceName":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"DeviceName"},"DeviceProfile":{"properties":{"profile":{"type":"string","title":"Profile","description":"Profile settings as a JSON string."},"device_id":{"type":"integer","title":"Device Id","description":"Device the profile belongs to; on writes the path device is used."},"id":{"type":"integer","title":"Id"},"time_created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"}},"type":"object","required":["profile","device_id","id"],"title":"DeviceProfile"},"DeviceProfileCreate":{"properties":{"profile":{"type":"string","title":"Profile","description":"Profile settings as a JSON string."},"device_id":{"type":"integer","title":"Device Id","description":"Device the profile belongs to; on writes the path device is used."}},"type":"object","required":["profile","device_id"],"title":"DeviceProfileCreate"},"DeviceSearchResult":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"dev_eui":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dev Eui"},"organisation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organisation Id"},"organisation_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organisation Name"},"device_brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Brand"},"last_heard":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Heard"},"match":{"type":"string","enum":["exact","prefix","contains","fuzzy"],"title":"Match"},"score":{"type":"number","title":"Score"}},"type":"object","required":["id","match","score"],"title":"DeviceSearchResult"},"DeviceTag":{"properties":{"device_id":{"type":"integer","title":"Device Id"},"tag_id":{"type":"integer","title":"Tag Id"},"id":{"type":"integer","title":"Id"},"time_created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Created"}},"type":"object","required":["device_id","tag_id","id"],"title":"DeviceTag"},"DeviceTransfer":{"properties":{"organisation_id":{"type":"integer","title":"Organisation Id","description":"Target organisation ID, from list_organisations."}},"type":"object","title":"DeviceTransfer"},"DeviceXY":{"properties":{"x":{"type":"integer","title":"X","description":"Horizontal pin position as a percentage (0-100) of the image width, as the web app writes it; values above 100 are legacy pixel positions.","default":0},"y":{"type":"integer","title":"Y","description":"Vertical pin position as a percentage (0-100) of the image height, as the web app writes it; values above 100 are legacy pixel positions.","default":0}},"type":"object","title":"DeviceXY"},"DevicesTotals":{"properties":{"total":{"type":"integer","title":"Total","default":0},"used":{"type":"integer","title":"Used","default":0},"remaining":{"type":"integer","title":"Remaining","default":0}},"type":"object","title":"DevicesTotals"},"DownlinkItemCreate":{"properties":{"device_id":{"type":"integer","title":"Device Id","description":"Ignored on writes; the path device is used."},"command":{"type":"string","title":"Command","description":"Command string for the device to collect, in the format its firmware expects."}},"type":"object","title":"DownlinkItemCreate"},"Forwarder":{"properties":{"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"},"type":{"type":"string","title":"Type"},"status":{"type":"boolean","title":"Status","default":true},"id":{"type":"integer","title":"Id"},"owner_id":{"type":"integer","title":"Owner Id"},"time_created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"usage":{"type":"integer","title":"Usage","default":0}},"type":"object","required":["name","url","type","id","owner_id"],"title":"Forwarder"},"FrameDeleteBatch":{"properties":{"device_id":{"type":"integer","title":"Device Id","description":"Internal device ID from list_devices or get_device_by_dev_eui."},"frames":{"items":{"$ref":"#/components/schemas/FrameDeleteItem"},"type":"array","title":"Frames","description":"Frames to delete, as returned by list_device_frames."}},"type":"object","required":["device_id","frames"],"title":"FrameDeleteBatch"},"FrameDeleteItem":{"properties":{"fcnt":{"type":"integer","title":"Fcnt","description":"Frame counter (fcnt) of the frame to delete."},"time_created":{"type":"integer","title":"Time Created","description":"Unix timestamp in seconds of the frame's created_at; only its UTC day is used."}},"type":"object","required":["fcnt","time_created"],"title":"FrameDeleteItem"},"Geofence":{"properties":{"name":{"type":"string","title":"Name"},"radius":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Radius"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"polygon_data":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Polygon Data"},"geofence_type":{"type":"string","title":"Geofence Type","default":"circular"},"organisation_id":{"type":"integer","title":"Organisation Id"},"out_of_hours":{"type":"integer","title":"Out Of Hours"},"start_time":{"type":"string","title":"Start Time"},"end_time":{"type":"string","title":"End Time"},"timezone":{"type":"string","title":"Timezone"},"contacts":{"items":{"$ref":"#/components/schemas/Contact"},"type":"array","title":"Contacts"},"alert_type":{"type":"string","title":"Alert Type"},"id":{"type":"integer","title":"Id"},"time_created":{"type":"string","format":"date-time","title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"active":{"type":"integer","title":"Active"},"presence_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Presence Count"}},"type":"object","required":["id","time_created","active"],"title":"Geofence"},"GeofenceCreate":{"properties":{"name":{"type":"string","title":"Name"},"radius":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Radius"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"polygon_data":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Polygon Data"},"geofence_type":{"type":"string","title":"Geofence Type","default":"circular"},"organisation_id":{"type":"integer","title":"Organisation Id"},"out_of_hours":{"type":"integer","title":"Out Of Hours"},"start_time":{"type":"string","title":"Start Time"},"end_time":{"type":"string","title":"End Time"},"timezone":{"type":"string","title":"Timezone"},"contacts":{"items":{"$ref":"#/components/schemas/Contact"},"type":"array","title":"Contacts"},"alert_type":{"type":"string","title":"Alert Type"}},"type":"object","title":"GeofenceCreate"},"GeofencePresenceEvent":{"properties":{"id":{"type":"integer","title":"Id"},"geofence_id":{"type":"integer","title":"Geofence Id"},"device_id":{"type":"integer","title":"Device Id"},"organisation_id":{"type":"integer","title":"Organisation Id"},"event_type":{"type":"string","title":"Event Type"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"}},"type":"object","required":["id","geofence_id","device_id","organisation_id","event_type","occurred_at"],"title":"GeofencePresenceEvent"},"GeofencePresenceHistoryPage":{"properties":{"total":{"type":"integer","title":"Total"},"items":{"items":{"$ref":"#/components/schemas/GeofencePresenceEvent"},"type":"array","title":"Items"}},"type":"object","required":["total","items"],"title":"GeofencePresenceHistoryPage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LNS":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"time_created":{"type":"string","format":"date-time","title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"active":{"type":"integer","title":"Active"}},"type":"object","title":"LNS"},"ManagedHostedDevice":{"properties":{"name":{"type":"string","title":"Name"},"dev_eui":{"type":"string","title":"Dev Eui","description":"The device's 16-hex-character LoRaWAN DevEUI."},"app_eui":{"type":"string","title":"App Eui","description":"LoRaWAN AppEUI/JoinEUI, 16 hex characters."},"app_key":{"type":"string","title":"App Key","description":"LoRaWAN AppKey, 32 hex characters."},"lns_id":{"type":"integer","title":"Lns Id","description":"Network server ID, from list_network_servers."},"organisation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organisation Id","description":"Organisation ID, from list_organisations."},"device_brand":{"type":"integer","title":"Device Brand","description":"Device brand ID, from list_device_brands."},"region":{"type":"string","title":"Region","description":"LoRaWAN region: EU868, US915 or AU915; anything else uses EU868."}},"type":"object","title":"ManagedHostedDevice"},"MobileDeviceRegister":{"properties":{"organisation_id":{"type":"integer","title":"Organisation Id","description":"Organisation ID, from list_organisations."},"device_token":{"type":"string","title":"Device Token","description":"Push token issued to the mobile app."},"platform":{"type":"string","title":"Platform","description":"ios or android."},"device_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Name"}},"type":"object","required":["organisation_id","device_token","platform"],"title":"MobileDeviceRegister","description":"Schema for mobile device push notification registration."},"MqttCredential":{"properties":{"id":{"type":"integer","title":"Id"},"organisation_id":{"type":"integer","title":"Organisation Id"},"username":{"type":"string","title":"Username"},"kind":{"type":"string","title":"Kind"},"label":{"type":"string","title":"Label"},"root_topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Topic"},"time_created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Created"}},"type":"object","required":["id","organisation_id","username","kind","label"],"title":"MqttCredential"},"Organisation":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hero":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hero"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"centerandzoom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Centerandzoom","default":"false"},"center":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Center"},"zoom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zoom"},"require_mfa":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Mfa","default":false},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"time_created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"active":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active"},"owner_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner Id"},"devices":{"items":{"$ref":"#/components/schemas/Device"},"type":"array","title":"Devices","default":[]}},"type":"object","title":"Organisation"},"OrganisationAccess":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"push_registered":{"type":"boolean","title":"Push Registered"},"permissions":{"$ref":"#/components/schemas/OrganisationAccessPermissions"}},"type":"object","required":["id","name","push_registered","permissions"],"title":"OrganisationAccess"},"OrganisationAccessPermissions":{"properties":{"is_owner":{"type":"boolean","title":"Is Owner","default":false},"admin_permission":{"type":"boolean","title":"Admin Permission","default":false},"add_permission":{"type":"boolean","title":"Add Permission","default":false},"edit_permission":{"type":"boolean","title":"Edit Permission","default":false},"delete_permission":{"type":"boolean","title":"Delete Permission","default":false},"transfer_permission":{"type":"boolean","title":"Transfer Permission","default":false}},"type":"object","title":"OrganisationAccessPermissions"},"OrganisationCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hero":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hero"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"centerandzoom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Centerandzoom","default":"false"},"center":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Center"},"zoom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zoom"},"require_mfa":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Mfa","default":false},"owner_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner Id"}},"type":"object","title":"OrganisationCreate"},"OrganisationLog":{"properties":{"organisation_id":{"type":"integer","title":"Organisation Id"},"user_email":{"type":"string","title":"User Email"},"action":{"type":"string","title":"Action"},"id":{"type":"integer","title":"Id"},"time_created":{"type":"string","format":"date-time","title":"Time Created"}},"type":"object","required":["id"],"title":"OrganisationLog"},"OrganisationMember":{"properties":{"id":{"type":"integer","title":"Id"},"organisation_id":{"type":"integer","title":"Organisation Id"},"user_id":{"type":"integer","title":"User Id"},"time_created":{"type":"string","format":"date-time","title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"active":{"type":"integer","title":"Active"},"email":{"type":"string","title":"Email"},"organisationRoles":{"$ref":"#/components/schemas/OrganisationMemberRole"}},"type":"object","title":"OrganisationMember"},"OrganisationMemberRole":{"properties":{"organisation_id":{"type":"integer","title":"Organisation Id"},"user_id":{"type":"integer","title":"User Id"},"admin_permission":{"type":"boolean","title":"Admin Permission","default":false},"add_permission":{"type":"boolean","title":"Add Permission","default":false},"edit_permission":{"type":"boolean","title":"Edit Permission","default":false},"delete_permission":{"type":"boolean","title":"Delete Permission","default":false},"transfer_permission":{"type":"boolean","title":"Transfer Permission","default":false},"id":{"type":"integer","title":"Id"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"time_created":{"type":"string","format":"date-time","title":"Time Created"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","title":"OrganisationMemberRole"},"OrganisationMemberRoleUpdate":{"properties":{"organisation_id":{"type":"integer","title":"Organisation Id"},"user_id":{"type":"integer","title":"User Id"},"admin_permission":{"type":"boolean","title":"Admin Permission","default":false},"add_permission":{"type":"boolean","title":"Add Permission","default":false},"edit_permission":{"type":"boolean","title":"Edit Permission","default":false},"delete_permission":{"type":"boolean","title":"Delete Permission","default":false},"transfer_permission":{"type":"boolean","title":"Transfer Permission","default":false}},"type":"object","title":"OrganisationMemberRoleUpdate"},"OrganisationUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hero":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hero"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"centerandzoom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Centerandzoom","default":"false"},"center":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Center"},"zoom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zoom"},"require_mfa":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Mfa","default":false}},"type":"object","title":"OrganisationUpdate"},"Report":{"properties":{"name":{"type":"string","title":"Name"},"organisation_id":{"type":"integer","title":"Organisation Id","description":"Organisation ID, from list_organisations."},"schedule_id":{"type":"integer","title":"Schedule Id","description":"Report period in days, e.g. 1 daily, 7 weekly; also the data window."},"schedule_time":{"type":"string","title":"Schedule Time","description":"UTC hour to run at, as HH:00."},"schedule_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schedule Day","description":"Optional run day: weekday 0 (Monday) to 6 when schedule_id is 7, otherwise day of month 1-31."},"id":{"type":"integer","title":"Id"},"time_created":{"type":"string","format":"date-time","title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"active":{"type":"integer","title":"Active"},"devices":{"items":{"$ref":"#/components/schemas/ReportDevice"},"type":"array","title":"Devices","default":[]},"contacts":{"items":{"$ref":"#/components/schemas/ReportContact"},"type":"array","title":"Contacts","default":[]}},"type":"object","required":["id"],"title":"Report"},"ReportContact":{"properties":{"id":{"type":"integer","title":"Id"},"contact_id":{"type":"integer","title":"Contact Id"},"report_id":{"type":"integer","title":"Report Id"}},"type":"object","title":"ReportContact"},"ReportCreate":{"properties":{"name":{"type":"string","title":"Name"},"organisation_id":{"type":"integer","title":"Organisation Id","description":"Organisation ID, from list_organisations."},"schedule_id":{"type":"integer","title":"Schedule Id","description":"Report period in days, e.g. 1 daily, 7 weekly; also the data window."},"schedule_time":{"type":"string","title":"Schedule Time","description":"UTC hour to run at, as HH:00."},"schedule_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schedule Day","description":"Optional run day: weekday 0 (Monday) to 6 when schedule_id is 7, otherwise day of month 1-31."},"devices":{"items":{"type":"integer"},"type":"array","title":"Devices","description":"Device IDs whose data the report covers."},"contacts":{"items":{"type":"integer"},"type":"array","title":"Contacts","description":"Contact IDs, from list_contacts, that receive the report by email."}},"type":"object","title":"ReportCreate"},"ReportDevice":{"properties":{"id":{"type":"integer","title":"Id"},"device_id":{"type":"integer","title":"Device Id"},"report_id":{"type":"integer","title":"Report Id"}},"type":"object","title":"ReportDevice"},"ReportUpdate":{"properties":{"name":{"type":"string","title":"Name"},"organisation_id":{"type":"integer","title":"Organisation Id","description":"Organisation ID, from list_organisations."},"schedule_id":{"type":"integer","title":"Schedule Id","description":"Report period in days, e.g. 1 daily, 7 weekly; also the data window."},"schedule_time":{"type":"string","title":"Schedule Time","description":"UTC hour to run at, as HH:00."},"schedule_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schedule Day","description":"Optional run day: weekday 0 (Monday) to 6 when schedule_id is 7, otherwise day of month 1-31."},"id":{"type":"integer","title":"Id"},"time_created":{"type":"string","format":"date-time","title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"active":{"type":"integer","title":"Active"},"devices":{"items":{"type":"integer"},"type":"array","title":"Devices","default":[]},"contacts":{"items":{"type":"integer"},"type":"array","title":"Contacts","default":[]}},"type":"object","title":"ReportUpdate"},"ResponseMessage":{"properties":{"message":{"type":"string","title":"Message"},"status":{"type":"integer","title":"Status"}},"type":"object","title":"ResponseMessage"},"SelfHostedDevice":{"properties":{"name":{"type":"string","title":"Name"},"dev_eui":{"type":"string","title":"Dev Eui","description":"The device's 16-hex-character LoRaWAN DevEUI."},"organisation_id":{"type":"integer","title":"Organisation Id","description":"Organisation ID, from list_organisations."},"device_brand":{"type":"integer","title":"Device Brand","description":"Device brand ID, from list_device_brands."}},"type":"object","title":"SelfHostedDevice"},"ShareUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"true to enable public sharing, false to disable it."}},"type":"object","required":["enabled"],"title":"ShareUpdate"},"SharedDevice":{"properties":{"name":{"type":"string","title":"Name"},"hosted":{"type":"string","title":"Hosted","default":"hosted"},"forwarder_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Forwarder Id"},"device_type":{"type":"integer","title":"Device Type","default":1},"organisation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organisation Id"},"device_brand_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Brand Id"},"id":{"type":"integer","title":"Id"},"last_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Location"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"},"usage":{"type":"integer","title":"Usage","default":0},"time_created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"},"last_heard":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Heard"},"batteryMv":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batterymv"},"unique_share_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unique Share Id"},"last_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Data"},"device_brand":{"anyOf":[{"$ref":"#/components/schemas/DeviceBrand"},{"type":"null"}]},"lora_fallback_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lora Fallback Enabled","default":false},"trip_registry_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Trip Registry Enabled","default":false},"tags":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array","title":"Tags","default":[]},"x":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"X"},"y":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Y"},"claimed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Claimed","default":false}},"type":"object","required":["name","id"],"title":"SharedDevice","description":"Device as shown on public share links: no identifiers that allow forging uplinks or claiming."},"Tag":{"properties":{"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color"},"id":{"type":"integer","title":"Id"},"organisation_id":{"type":"integer","title":"Organisation Id"},"normalized":{"type":"string","title":"Normalized"},"time_created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"}},"type":"object","required":["name","color","id","organisation_id","normalized"],"title":"Tag"},"TagCreate":{"properties":{"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color"},"organisation_id":{"type":"integer","title":"Organisation Id","description":"Organisation ID, from list_organisations."},"device_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Device Ids","description":"Device IDs to tag; replaces the tag's full device set when given."}},"type":"object","required":["name","color","organisation_id"],"title":"TagCreate"},"TagUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"device_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Device Ids","description":"Replaces the tag's full device set when given; an empty list untags all devices."}},"type":"object","title":"TagUpdate"},"UplinkChirpstack":{"properties":{"deduplicationId":{"type":"string","title":"Deduplicationid"},"phy_payload":{"additionalProperties":true,"type":"object","title":"Phy Payload"},"decoded":{"title":"Decoded"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"time":{"type":"string","title":"Time"},"deviceInfo":{"additionalProperties":true,"type":"object","title":"Deviceinfo"},"object":{"additionalProperties":true,"type":"object","title":"Object"},"devAddr":{"type":"string","title":"Devaddr"},"adr":{"type":"boolean","title":"Adr"},"dr":{"type":"integer","title":"Dr"},"fCnt":{"type":"integer","title":"Fcnt"},"fPort":{"type":"integer","title":"Fport"},"confirmed":{"type":"boolean","title":"Confirmed"},"data":{"type":"string","title":"Data"},"rxInfo":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rxinfo","default":[]},"txInfo":{"additionalProperties":true,"type":"object","title":"Txinfo"},"msg":{"type":"string","title":"Msg","default":""},"name":{"type":"string","title":"Name"},"batteryLevelUnavailable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Batterylevelunavailable"},"batteryLevel":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Batterylevel"}},"type":"object","title":"UplinkChirpstack"},"UplinkDigitalMatterOysterFusion":{"properties":{"FW":{"type":"string","title":"Fw"},"ICCID":{"type":"string","title":"Iccid"},"IMEI":{"type":"string","title":"Imei"},"ProdId":{"type":"integer","title":"Prodid"},"Records":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Records","default":[]},"SerNo":{"type":"integer","title":"Serno"}},"type":"object","title":"UplinkDigitalMatterOysterFusion"},"UplinkGoiot":{"properties":{"device_id":{"type":"string","title":"Device Id"},"payload":{"type":"string","title":"Payload"}},"type":"object","title":"UplinkGoiot"},"UplinkIris5in1":{"properties":{"data":{"type":"string","title":"Data"}},"type":"object","title":"UplinkIris5in1"},"UplinkSenso8EnergyMeter":{"properties":{"ver":{"type":"integer","title":"Ver"},"msg":{"type":"integer","title":"Msg"},"time":{"type":"integer","title":"Time"},"sn":{"type":"string","title":"Sn"},"type":{"type":"integer","title":"Type"},"power":{"additionalProperties":true,"type":"object","title":"Power"},"bat":{"type":"integer","title":"Bat"},"RAT":{"type":"string","title":"Rat"},"rssi":{"type":"integer","title":"Rssi"},"rsrp":{"type":"integer","title":"Rsrp"},"rsrq":{"type":"integer","title":"Rsrq"},"ci":{"type":"string","title":"Ci"},"tac":{"type":"string","title":"Tac"},"low_batt":{"type":"integer","title":"Low Batt"},"batt_pow":{"type":"integer","title":"Batt Pow"},"event":{"type":"integer","title":"Event"},"debug":{"items":{"type":"integer"},"type":"array","title":"Debug","default":[]}},"type":"object","title":"UplinkSenso8EnergyMeter"},"UplinkWaterLeak":{"properties":{"leak":{"type":"integer","title":"Leak"},"analog":{"type":"integer","title":"Analog"},"bat":{"type":"integer","title":"Bat"},"rssi":{"type":"integer","title":"Rssi"},"msg":{"type":"integer","title":"Msg"},"sn":{"type":"string","title":"Sn"},"time":{"type":"integer","title":"Time"}},"type":"object","title":"UplinkWaterLeak"},"User":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role","default":"user"},"sub":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub"},"id":{"type":"integer","title":"Id"},"is_active":{"type":"boolean","title":"Is Active","default":true},"devices":{"items":{"$ref":"#/components/schemas/Device"},"type":"array","title":"Devices","default":[]},"contacts":{"items":{"$ref":"#/components/schemas/Contact"},"type":"array","title":"Contacts","default":[]},"forwarders":{"items":{"$ref":"#/components/schemas/Forwarder"},"type":"array","title":"Forwarders","default":[]},"current_usage":{"type":"integer","title":"Current Usage","default":0},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Subscription Id"},"stripe_billing_status":{"type":"string","title":"Stripe Billing Status","default":"inactive"},"stripe_payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Payment Method"},"renewal_period":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Renewal Period"},"renewal_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Renewal Date"},"device_limit":{"type":"integer","title":"Device Limit","default":3},"sms_credits":{"type":"integer","title":"Sms Credits","default":0},"time_created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Created"},"time_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time Updated"}},"type":"object","required":["email","id"],"title":"User"},"UserBase":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role","default":"user"},"sub":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub"}},"type":"object","required":["email"],"title":"UserBase"},"UserCreate":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role","default":"user"},"sub":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub"}},"type":"object","required":["email"],"title":"UserCreate"},"UserOptions":{"properties":{"date_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Format","description":"One of ['DD/MM/YYYY', 'MM/DD/YYYY', 'YYYY-MM-DD']."},"time_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time Format","description":"One of ['HH:mm', 'HH:mm:ss', 'h:mm:ssa', 'h:mma']."},"temperature_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temperature Unit","description":"One of ['C', 'F']."},"speed_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speed Unit","description":"One of ['km/h', 'mph']."},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","description":"IANA timezone name, e.g. Europe/Amsterdam."},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"One of ['de', 'en', 'fr', 'nl']."},"map_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Map Style","description":"One of ['roadmap', 'satellite']."},"decimal_separator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decimal Separator","description":"Either '.' or ','."}},"type":"object","title":"UserOptions"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"ApiKey":{"type":"apiKey","description":"X-API-Key: <your-key>","in":"header","name":"X-API-Key"}}}}