{"basePath":"/auth","definitions":{"auth-callback-response-error":{"properties":{"errors":{"items":{"properties":{"code":{"description":"error integer code","type":"integer"},"reason":{"description":"error message string","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"auth-callback-response-ok":{"properties":{"result":{"items":{"properties":{"token":{"$ref":"#/definitions/token"},"url":{"description":"Consent or OAuth client continuation URL returned for Realm OAuth login.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"checksum":{"description":"data validation checksum","pattern":"^[a-fA-f0-9]{32}$","type":"string","x-schema-errors":{"pattern":"invalid checksum"}},"confirmation-data":{"description":"User registration confirmation data","properties":{"state":{"destription":"Encrypted state with account data","type":"string"}},"required":["state"],"type":"object"},"dialog-decode-request":{"properties":{"state":{"$ref":"#/definitions/dialog-state"}},"required":["state"],"type":"object"},"dialog-decode-response":{"properties":{"result":{"items":{"properties":{"answers":{"description":"Accepted answers for consent dialogs","items":{"properties":{"accent":{"description":"Answer visual accent","enum":["positive","negative","neutral"],"type":"string"},"name":{"description":"Displayed answer name","type":"string"},"value":{"description":"Backend accepted answer value","type":"string"}},"required":["name","value","accent"],"type":"object"},"type":"array"},"body":{"description":"Dialog text body","type":"string"},"expire":{"description":"Dialog expiration UNIX timestamp","format":"uint32","type":"integer","x-view-type":"datetime"},"mode":{"$ref":"#/definitions/dialog-mode"},"realm_public_id":{"description":"Realm public ID associated with the dialog","type":"string"},"severity":{"$ref":"#/definitions/dialog-severity"},"title":{"description":"Dialog title","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"dialog-mode":{"enum":["consent","notice"],"type":"string"},"dialog-severity":{"enum":["info","notice","warning","alert"],"type":"string"},"dialog-state":{"description":"Encrypted dialog state","type":"string"},"dialog-submit-request":{"properties":{"answer":{"description":"Dialog answer. Available values are defined by decoded dialog data.","type":"string"},"state":{"$ref":"#/definitions/dialog-state"}},"required":["state","answer"],"type":"object"},"dialog-submit-response":{"properties":{"result":{"items":{"properties":{"url":{"description":"URL where Web UI should redirect user after submit","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"email":{"description":"Account email address","format":"email","maxLength":255,"minLength":5,"title":"e-mail","type":"string","x-schema-errors":{"format":"invalid email format"},"x-view-enter-submit":true,"x-view-type":"email"},"email-confirm":{"description":"New email address confirmation data","properties":{"checksum":{"$ref":"#/definitions/checksum"},"email":{"$ref":"#/definitions/email"},"token":{"$ref":"#/definitions/token"}},"required":["email","checksum","token"],"type":"object","x-view-order":["email","checksum","token"]},"email-confirmation":{"description":"Email address confirmation","format":"email","maxLength":255,"minLength":5,"title":"e-mail confirmation","type":"string","x-schema-errors":{"format":"invalid email format"},"x-view-type":"email"},"email-revert":{"description":"Email address reversion data","properties":{"checksum":{"$ref":"#/definitions/checksum"},"email":{"$ref":"#/definitions/email"},"token":{"$ref":"#/definitions/token"}},"required":["email","checksum","token"],"type":"object","x-view-order":["email","checksum","token"]},"email-template":{"format":"email","maxLength":255,"minLength":5,"type":"string","x-schema-errors":{"format":"invalid email format"},"x-view-type":"email"},"email-update":{"description":"New email address and confirmation","properties":{"confirmation":{"$ref":"#/definitions/email-confirmation"},"email":{"$ref":"#/definitions/email"}},"required":["email","confirmation"],"title":"Change E-Mail","type":"object","x-view-order":["email","confirmation"]},"errors":{"items":{"description":"Object with error code and message","properties":{"code":{"description":"Error code for failed operations","type":"integer"},"reason":{"description":"Error description string","type":"string"}},"type":"object"},"type":"array"},"login-credentials":{"description":"Login credentials (email and password)","properties":{"email":{"$ref":"#/definitions/email"},"password":{"$ref":"#/definitions/password"}},"required":["email","password"],"type":"object"},"login-passwordless":{"description":"Login via email (received callback link)","properties":{"email":{"$ref":"#/definitions/email"}},"required":["email"],"type":"object"},"login-passwordless-confirmation":{"description":"Passwordless login confirmation data","properties":{"checksum":{"$ref":"#/definitions/checksum"},"email":{"$ref":"#/definitions/email"},"token":{"$ref":"#/definitions/token"}},"required":["email","token","checksum"],"type":"object"},"name":{"description":"User name","maxLength":255,"minLength":1,"title":"name","type":"string"},"name-update":{"description":"New name","properties":{"name":{"$ref":"#/definitions/name"}},"required":["name"],"title":"New name","type":"object"},"new-password":{"description":"Account new password","maxLength":255,"minLength":1,"title":"new password","type":"string","x-view-type":"password"},"new-user":{"description":"New user information","properties":{"email":{"$ref":"#/definitions/email"},"name":{"$ref":"#/definitions/name"},"password":{"$ref":"#/definitions/password"}},"required":["name","email","password"],"title":"Registration details","type":"object","x-view-order":["name","email","password"]},"notification-response":{"properties":{"notifications":{"$ref":"#/definitions/notifications"}},"type":"object"},"notifications":{"items":{"description":"Object with notification code and message","properties":{"code":{"description":"Notification code for completed operations","type":"integer"},"reason":{"description":"Notification description string","type":"string"}},"type":"object"},"type":"array"},"oauth-providers-response":{"properties":{"result":{"items":{"description":"OAuth provider name which may be used in OAuth-related queries","type":"string"},"type":"array"}},"type":"object"},"oauth-url-response":{"properties":{"result":{"items":{"properties":{"url":{"description":"URL to OAuth provider with all the required variables","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"password":{"description":"Account password","maxLength":255,"minLength":1,"title":"password","type":"string","x-view-enter-submit":true,"x-view-type":"password"},"password-confirmation":{"description":"Password confirmation","maxLength":255,"minLength":1,"title":"password confirmation","type":"string","x-view-type":"password"},"password-template":{"maxLength":255,"minLength":1,"type":"string","x-view-type":"password"},"password-update":{"description":"New password and update confirmation","properties":{"confirmation":{"$ref":"#/definitions/password-confirmation"},"password":{"$ref":"#/definitions/new-password"}},"required":["password","confirmation"],"title":"Change password","type":"object","x-view-order":["password","confirmation"]},"regions-response":{"properties":{"result":{"description":"Regions list","items":{"description":"Region access points","properties":{"apps":{"description":"Application access points","properties":{"flowbox":{"description":"Flowbox application URL","type":"string"},"formbox":{"description":"Formbox application URL","type":"string"},"helpbox":{"description":"Helpbox application URL","type":"string"},"login":{"description":"Login application URL","type":"string"},"mediabox":{"description":"Mediabox application URL","type":"string"},"mqttboard":{"description":"MQTT Board application URL","type":"string"},"mqtttiles":{"description":"MQTT Tiles application URL","type":"string"},"setbox":{"description":"Setbox application URL","type":"string"},"tachobox":{"description":"Tachobox application URL","type":"string"},"teambox":{"description":"Teambox application URL","type":"string"},"toolbox":{"description":"Toolbox application URL","type":"string"},"trackbox":{"description":"Trackbox application URL","type":"string"},"trackit":{"description":"TrackIt application URL","type":"string"}},"type":"object"},"cdn":{"description":"CDN access point","type":"string"},"default":{"description":"Region is used by defaut","type":"boolean"},"gw":{"description":"Gateway access host","type":"string"},"gw-ftp":{"description":"Gateway FTP server","type":"string"},"gw-ip":{"description":"Gateway IP host","type":"string"},"media":{"description":"Media access point","type":"string"},"mqtt":{"description":"Access point for native MQTT connections","type":"string"},"mqtt-ws":{"description":"Access point for MQTT connections through websockets","type":"string"},"name":{"description":"Region short name","type":"string"},"registration-allowed":{"description":"Whether registration is allowed in this region","type":"boolean"},"rest":{"description":"REST access point","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"token":{"description":"flespi token string","pattern":"^[a-zA-Z0-9]{64}$","type":"string","x-schema-errors":{"pattern":"invalid token format"}},"token-info-response":{"properties":{"result":{"description":"Token information. For detailed fields information see flespi platform API\ndocumentation\n","items":{"properties":{"access":{"$ref":"#/definitions/token.access.result"},"accessed":{"$ref":"#/definitions/token.accessed"},"blocked":{"description":"Block reason. 0 means not blocked, any non-zero value means token is currently blocked","type":"integer"},"cid":{"description":"Token customer ID","type":"integer"},"enabled":{"description":"Whether the token is enabled","type":"boolean"},"expire":{"$ref":"#/definitions/token.expire"},"id":{"$ref":"#/definitions/token.id"},"info":{"$ref":"#/definitions/token.info"},"ips":{"$ref":"#/definitions/token.ips"},"ttl":{"$ref":"#/definitions/token.ttl"}},"type":"object"},"type":"array"}},"type":"object"},"token-value-response":{"properties":{"result":{"items":{"properties":{"token":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"token.access.result":{"description":"Access permissions assigned to the token","properties":{"acl":{"$ref":"#/definitions/token.acl"},"type":{"$ref":"#/definitions/token.result.flags"}},"type":"object"},"token.accessed":{"description":"UNIX timestamp of last REST request using given token","format":"uint32","type":"integer"},"token.ace":{"anyOf":[{"$ref":"#/definitions/token.ace.gw.channels"},{"$ref":"#/definitions/token.ace.gw.devices"},{"$ref":"#/definitions/token.ace.gw.groups"},{"$ref":"#/definitions/token.ace.gw.streams"},{"$ref":"#/definitions/token.ace.gw.modems"},{"$ref":"#/definitions/token.ace.gw.calcs"},{"$ref":"#/definitions/token.ace.gw.plugins"},{"$ref":"#/definitions/token.ace.gw.geofences"},{"$ref":"#/definitions/token.ace.gw.assets"},{"$ref":"#/definitions/token.ace.storage.containers"},{"$ref":"#/definitions/token.ace.storage.cdns"},{"$ref":"#/definitions/token.ace.mqtt"},{"$ref":"#/definitions/token.ace.ai"},{"$ref":"#/definitions/token.ace.ai.mcp"},{"$ref":"#/definitions/token.ace.ai.tools"},{"$ref":"#/definitions/token.ace.ai.agents"},{"$ref":"#/definitions/token.ace.ai.connectors"}],"description":"Access control entry (ACE) - allows to perform specified HTTP methods on the specified module or with the specified items","x-key-property":"uri"},"token.ace.ai":{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get-post"},"uri":{"const":"ai","default":"ai","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"ai","type":"object","x-view-order":["methods"]},"token.ace.ai.agents":{"properties":{"ids":{"$ref":"#/definitions/token.ace.ids.agents"},"methods":{"$ref":"#/definitions/token.ace.methods-all-default"},"submodules":{"$ref":"#/definitions/token.ace.ai.agents.submodules"},"uri":{"const":"ai/agents","default":"ai/agents","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"ai/agents","type":"object","x-schema-allOf":[{"if":{"additionalProperties":true,"required":["submodules"],"type":"object"},"then":{"additionalProperties":true,"required":["ids"],"type":"object"},"x-schema-errors":{"then":"ids field is required when submodule is selected"}}],"x-view-order":["methods","ids","submodules"]},"token.ace.ai.agents.submodules":{"description":"Per-submodule access overrides. List a submodule with `methods: [...]` to\ngrant exactly those methods on it; submodules NOT listed in this array\nare denied. Omit the array entirely to grant the module-level methods on\nthe entity and all its submodules alike, write methods included - scope\nan ACE with submodule entries whenever its submodules need narrower\nrights than the entity itself.\n","items":{"anyOf":[{"$ref":"#/definitions/token.ace.submodule.logs"},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-post-get"},"name":{"const":"approvals","default":"approvals","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"approvals","type":"object","x-view-order":["methods"]},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-no-patch"},"name":{"const":"connectors","default":"connectors","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"connectors","type":"object","x-view-order":["methods"]},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get-post-delete"},"name":{"const":"messages","default":"messages","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"messages","type":"object","x-view-order":["methods"]}],"x-key-property":"name"},"maxItems":4,"type":"array"},"token.ace.ai.connectors":{"properties":{"ids":{"$ref":"#/definitions/token.ace.ids.connectors"},"methods":{"$ref":"#/definitions/token.ace.methods-all-default"},"submodules":{"$ref":"#/definitions/token.ace.ai.connectors.submodules"},"uri":{"const":"ai/connectors","default":"ai/connectors","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"ai/connectors","type":"object","x-schema-allOf":[{"if":{"additionalProperties":true,"required":["submodules"],"type":"object"},"then":{"additionalProperties":true,"required":["ids"],"type":"object"},"x-schema-errors":{"then":"ids field is required when submodule is selected"}}],"x-view-order":["methods","ids","submodules"]},"token.ace.ai.connectors.submodules":{"description":"Per-submodule access overrides. List a submodule with `methods: [...]` to\ngrant exactly those methods on it; submodules NOT listed in this array\nare denied. Omit the array entirely to grant the module-level methods on\nthe entity and all its submodules alike, write methods included - scope\nan ACE with submodule entries whenever its submodules need narrower\nrights than the entity itself.\n","items":{"anyOf":[{"$ref":"#/definitions/token.ace.submodule.logs"}],"x-key-property":"name"},"maxItems":1,"type":"array"},"token.ace.ai.mcp":{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get-post"},"uri":{"const":"ai/mcp","default":"ai/mcp","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"ai/mcp","type":"object","x-view-order":["methods"]},"token.ace.ai.tools":{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get-post"},"uri":{"const":"ai/tools","default":"ai/tools","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"ai/tools","type":"object","x-view-order":["methods"]},"token.ace.gw.assets":{"properties":{"ids":{"$ref":"#/definitions/token.ace.ids.assets"},"methods":{"$ref":"#/definitions/token.ace.methods-all-default"},"submodules":{"$ref":"#/definitions/token.ace.gw.assets.submodules"},"uri":{"const":"gw/assets","default":"gw/assets","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"gw/assets","type":"object","x-schema-allOf":[{"if":{"additionalProperties":true,"required":["submodules"],"type":"object"},"then":{"additionalProperties":true,"required":["ids"],"type":"object"},"x-schema-errors":{"then":"ids field is required when submodule is selected"}}],"x-view-order":["methods","ids","submodules"]},"token.ace.gw.assets.submodules":{"description":"Per-submodule access overrides. List a submodule with `methods: [...]` to\ngrant exactly those methods on it; submodules NOT listed in this array\nare denied. Omit the array entirely to grant the module-level methods on\nthe entity and all its submodules alike, write methods included - scope\nan ACE with submodule entries whenever its submodules need narrower\nrights than the entity itself.\n","items":{"anyOf":[{"$ref":"#/definitions/token.ace.submodule.logs"},{"properties":{"methods":{"description":"Allowed HTTP methods array for the current URI","items":{"enum":["GET","POST"],"type":"string"},"maxItems":2,"title":"methods","type":"array","uniqueItems":true},"name":{"const":"intervals","default":"intervals","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"intervals","type":"object","x-view-order":["methods"]}],"x-key-property":"name"},"maxItems":2,"type":"array"},"token.ace.gw.calcs":{"properties":{"ids":{"$ref":"#/definitions/token.ace.ids.calcs"},"methods":{"$ref":"#/definitions/token.ace.methods-all-default"},"submodules":{"$ref":"#/definitions/token.ace.gw.calcs.submodules"},"uri":{"const":"gw/calcs","default":"gw/calcs","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"gw/calcs","type":"object","x-schema-allOf":[{"if":{"additionalProperties":true,"required":["submodules"],"type":"object"},"then":{"additionalProperties":true,"required":["ids"],"type":"object"},"x-schema-errors":{"then":"ids field is required when submodule is selected"}}],"x-view-order":["methods","ids","submodules"]},"token.ace.gw.calcs.submodules":{"description":"Per-submodule access overrides. List a submodule with `methods: [...]` to\ngrant exactly those methods on it; submodules NOT listed in this array\nare denied. Omit the array entirely to grant the module-level methods on\nthe entity and all its submodules alike, write methods included - scope\nan ACE with submodule entries whenever its submodules need narrower\nrights than the entity itself.\n","items":{"anyOf":[{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-no-patch"},"name":{"const":"devices","default":"devices","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"devices","type":"object","x-view-order":["methods"]},{"$ref":"#/definitions/token.ace.submodule.logs"},{"$ref":"#/definitions/token.ace.submodule.groups"},{"$ref":"#/definitions/token.ace.submodule.geofences"}],"x-key-property":"name"},"maxItems":4,"type":"array"},"token.ace.gw.channels":{"properties":{"ids":{"$ref":"#/definitions/token.ace.ids.channels"},"methods":{"$ref":"#/definitions/token.ace.methods-all-default"},"submodules":{"$ref":"#/definitions/token.ace.gw.channels.submodules"},"uri":{"const":"gw/channels","default":"gw/channels","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"gw/channels","type":"object","x-schema-allOf":[{"if":{"additionalProperties":true,"required":["submodules"],"type":"object"},"then":{"additionalProperties":true,"required":["ids"],"type":"object"},"x-schema-errors":{"then":"ids field is required when submodule is selected"}}],"x-view-order":["methods","ids","submodules"]},"token.ace.gw.channels.submodules":{"description":"Per-submodule access overrides. List a submodule with `methods: [...]` to\ngrant exactly those methods on it; submodules NOT listed in this array\nare denied. Omit the array entirely to grant the module-level methods on\nthe entity and all its submodules alike, write methods included - scope\nan ACE with submodule entries whenever its submodules need narrower\nrights than the entity itself.\n","items":{"anyOf":[{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get-delete"},"name":{"const":"connections","default":"connections","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"connections","type":"object","x-view-order":["methods"]},{"$ref":"#/definitions/token.ace.submodule.logs"},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get-delete"},"name":{"const":"messages","default":"messages","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"messages","type":"object","x-view-order":["methods"]},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get"},"name":{"const":"idents","default":"idents","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"idents","type":"object","x-view-order":["methods"]}],"x-key-property":"name"},"maxItems":6,"type":"array"},"token.ace.gw.devices":{"properties":{"ids":{"$ref":"#/definitions/token.ace.ids.devices"},"methods":{"$ref":"#/definitions/token.ace.methods-all-default"},"submodules":{"$ref":"#/definitions/token.ace.gw.devices.submodules"},"uri":{"const":"gw/devices","default":"gw/devices","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"gw/devices","type":"object","x-schema-allOf":[{"if":{"additionalProperties":true,"required":["submodules"],"type":"object"},"then":{"additionalProperties":true,"required":["ids"],"type":"object"},"x-schema-errors":{"then":"ids field is required when submodule is selected"}}],"x-view-order":["methods","ids","submodules"]},"token.ace.gw.devices.submodules":{"description":"Per-submodule access overrides. List a submodule with `methods: [...]` to\ngrant exactly those methods on it; submodules NOT listed in this array\nare denied. Omit the array entirely to grant the module-level methods on\nthe entity and all its submodules alike, write methods included - scope\nan ACE with submodule entries whenever its submodules need narrower\nrights than the entity itself.\n","items":{"anyOf":[{"$ref":"#/definitions/token.ace.submodule.calculate"},{"$ref":"#/definitions/token.ace.submodule.logs"},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-post-get"},"name":{"const":"messages","default":"messages","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"messages","type":"object","x-view-order":["methods"]},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get-put-delete"},"name":{"const":"settings","default":"settings","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"settings","type":"object","x-view-order":["methods"]},{"$ref":"#/definitions/token.ace.submodule.media"},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get-delete"},"name":{"const":"telemetry","default":"telemetry","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"telemetry","type":"object","x-view-order":["methods"]},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get"},"name":{"const":"packets","default":"packets","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"packets","type":"object","x-view-order":["methods"]},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-post"},"name":{"const":"commands","default":"commands","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"commands","type":"object","x-view-order":["methods"]},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get-post-delete"},"name":{"const":"commands-queue","default":"commands-queue","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"commands-queue","type":"object","x-view-order":["methods"]},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get"},"name":{"const":"commands-result","default":"commands-result","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"commands-result","type":"object","x-view-order":["methods"]},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-post-get"},"name":{"const":"sms","default":"sms","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"sms","type":"object","x-view-order":["methods"]},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get-delete"},"name":{"const":"connections","default":"connections","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"connections","type":"object","x-view-order":["methods"]},{"$ref":"#/definitions/token.ace.submodule.geofences-no-put"}],"x-key-property":"name"},"maxItems":13,"type":"array"},"token.ace.gw.geofences":{"properties":{"ids":{"$ref":"#/definitions/token.ace.ids.geofences"},"methods":{"$ref":"#/definitions/token.ace.methods-all-default"},"uri":{"const":"gw/geofences","default":"gw/geofences","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"gw/geofences","type":"object","x-schema-allOf":[{"if":{"additionalProperties":true,"required":["submodules"],"type":"object"},"then":{"additionalProperties":true,"required":["ids"],"type":"object"},"x-schema-errors":{"then":"ids field is required when submodule is selected"}}],"x-view-order":["methods","ids"]},"token.ace.gw.groups":{"properties":{"ids":{"$ref":"#/definitions/token.ace.ids.groups"},"methods":{"$ref":"#/definitions/token.ace.methods-all-default"},"uri":{"const":"gw/groups","default":"gw/groups","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"gw/groups","type":"object","x-schema-allOf":[{"if":{"additionalProperties":true,"required":["submodules"],"type":"object"},"then":{"additionalProperties":true,"required":["ids"],"type":"object"},"x-schema-errors":{"then":"ids field is required when submodule is selected"}}],"x-view-order":["methods","ids"]},"token.ace.gw.modems":{"properties":{"ids":{"$ref":"#/definitions/token.ace.ids.modems"},"methods":{"$ref":"#/definitions/token.ace.methods-all-default"},"submodules":{"$ref":"#/definitions/token.ace.gw.modems.submodules"},"uri":{"const":"gw/modems","default":"gw/modems","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"gw/modems","type":"object","x-schema-allOf":[{"if":{"additionalProperties":true,"required":["submodules"],"type":"object"},"then":{"additionalProperties":true,"required":["ids"],"type":"object"},"x-schema-errors":{"then":"ids field is required when submodule is selected"}}],"x-view-order":["methods","ids","submodules"]},"token.ace.gw.modems.submodules":{"description":"Per-submodule access overrides. List a submodule with `methods: [...]` to\ngrant exactly those methods on it; submodules NOT listed in this array\nare denied. Omit the array entirely to grant the module-level methods on\nthe entity and all its submodules alike, write methods included - scope\nan ACE with submodule entries whenever its submodules need narrower\nrights than the entity itself.\n","items":{"anyOf":[{"$ref":"#/definitions/token.ace.submodule.logs"}],"x-key-property":"name"},"maxItems":1,"type":"array"},"token.ace.gw.plugins":{"properties":{"ids":{"$ref":"#/definitions/token.ace.ids.plugins"},"methods":{"$ref":"#/definitions/token.ace.methods-all-default"},"submodules":{"$ref":"#/definitions/token.ace.gw.plugins.submodules"},"uri":{"const":"gw/plugins","default":"gw/plugins","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"gw/plugins","type":"object","x-schema-allOf":[{"if":{"additionalProperties":true,"required":["submodules"],"type":"object"},"then":{"additionalProperties":true,"required":["ids"],"type":"object"},"x-schema-errors":{"then":"ids field is required when submodule is selected"}}],"x-view-order":["methods","ids","submodules"]},"token.ace.gw.plugins.submodules":{"description":"Per-submodule access overrides. List a submodule with `methods: [...]` to\ngrant exactly those methods on it; submodules NOT listed in this array\nare denied. Omit the array entirely to grant the module-level methods on\nthe entity and all its submodules alike, write methods included - scope\nan ACE with submodule entries whenever its submodules need narrower\nrights than the entity itself.\n","items":{"anyOf":[{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-all"},"name":{"const":"devices","default":"devices","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"devices","type":"object","x-view-order":["methods"]},{"$ref":"#/definitions/token.ace.submodule.logs"},{"$ref":"#/definitions/token.ace.submodule.groups"},{"$ref":"#/definitions/token.ace.submodule.geofences"}],"x-key-property":"name"},"maxItems":4,"type":"array"},"token.ace.gw.streams":{"properties":{"ids":{"$ref":"#/definitions/token.ace.ids.streams"},"methods":{"$ref":"#/definitions/token.ace.methods-all-default"},"submodules":{"$ref":"#/definitions/token.ace.gw.streams.submodules"},"uri":{"const":"gw/streams","default":"gw/streams","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"gw/streams","type":"object","x-schema-allOf":[{"if":{"additionalProperties":true,"required":["submodules"],"type":"object"},"then":{"additionalProperties":true,"required":["ids"],"type":"object"},"x-schema-errors":{"then":"ids field is required when submodule is selected"}}],"x-view-order":["methods","ids","submodules"]},"token.ace.gw.streams.submodules":{"description":"Per-submodule access overrides. List a submodule with `methods: [...]` to\ngrant exactly those methods on it; submodules NOT listed in this array\nare denied. Omit the array entirely to grant the module-level methods on\nthe entity and all its submodules alike, write methods included - scope\nan ACE with submodule entries whenever its submodules need narrower\nrights than the entity itself.\n","items":{"anyOf":[{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-no-patch"},"name":{"const":"devices","default":"devices","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"devices","type":"object","x-view-order":["methods"]},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get-post-delete"},"name":{"const":"channels","default":"channels","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"channels","type":"object","x-view-order":["methods"]},{"$ref":"#/definitions/token.ace.submodule.groups"},{"$ref":"#/definitions/token.ace.submodule.geofences"},{"$ref":"#/definitions/token.ace.submodule.logs"},{"properties":{"methods":{"description":"Allowed HTTP methods array for the current URI","items":{"enum":["POST","DELETE"],"type":"string"},"maxItems":2,"title":"methods","type":"array","uniqueItems":true},"name":{"const":"messages","default":"messages","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"messages","type":"object","x-view-order":["methods"]}],"x-key-property":"name"},"maxItems":6,"type":"array"},"token.ace.ids-base":{"description":"Select which items are affected: by ids or just all\n","title":"ids","x-view-type":"buttontoggle"},"token.ace.ids.agents":{"description":"Select which items are affected: by ids or just all\n","oneOf":[{"const":"all","default":"all","description":"Keyword for all the items IDs accessible by the token","readOnly":true,"title":"all","type":"string"},{"description":"Affected items IDs array","items":{"format":"uint32","minimum":1,"type":"number"},"maxItems":4096,"minItems":1,"title":"list","type":"array","x-view-selector":"agents"}],"title":"ids","x-view-type":"buttontoggle"},"token.ace.ids.all":{"const":"all","default":"all","description":"Keyword for all the items IDs accessible by the token","readOnly":true,"title":"all","type":"string"},"token.ace.ids.assets":{"description":"Select which items are affected: by ids or just all\n","oneOf":[{"const":"all","default":"all","description":"Keyword for all the items IDs accessible by the token","readOnly":true,"title":"all","type":"string"},{"description":"Affected items IDs array","items":{"format":"uint32","minimum":1,"type":"number"},"maxItems":4096,"minItems":1,"title":"list","type":"array","x-view-selector":"assets"}],"title":"ids","x-view-type":"buttontoggle"},"token.ace.ids.calcs":{"description":"Select which items are affected: by ids or just all\n","oneOf":[{"const":"all","default":"all","description":"Keyword for all the items IDs accessible by the token","readOnly":true,"title":"all","type":"string"},{"description":"Affected items IDs array","items":{"format":"uint32","minimum":1,"type":"number"},"maxItems":4096,"minItems":1,"title":"list","type":"array","x-view-selector":"calcs"}],"title":"ids","x-view-type":"buttontoggle"},"token.ace.ids.cdns":{"description":"Select which items are affected: by ids or just all\n","oneOf":[{"const":"all","default":"all","description":"Keyword for all the items IDs accessible by the token","readOnly":true,"title":"all","type":"string"},{"description":"Affected items IDs array","items":{"format":"uint32","minimum":1,"type":"number"},"maxItems":4096,"minItems":1,"title":"list","type":"array","x-view-selector":"cdns"}],"title":"ids","x-view-type":"buttontoggle"},"token.ace.ids.channels":{"description":"Select which items are affected: by ids or just all\n","oneOf":[{"const":"all","default":"all","description":"Keyword for all the items IDs accessible by the token","readOnly":true,"title":"all","type":"string"},{"description":"Affected items IDs array","items":{"format":"uint32","minimum":1,"type":"number"},"maxItems":4096,"minItems":1,"title":"list","type":"array","x-view-selector":"channels"}],"title":"ids","x-view-type":"buttontoggle"},"token.ace.ids.connectors":{"description":"Select which items are affected: by ids or just all\n","oneOf":[{"const":"all","default":"all","description":"Keyword for all the items IDs accessible by the token","readOnly":true,"title":"all","type":"string"},{"description":"Affected items IDs array","items":{"format":"uint32","minimum":1,"type":"number"},"maxItems":4096,"minItems":1,"title":"list","type":"array","x-view-selector":"connectors"}],"title":"ids","x-view-type":"buttontoggle"},"token.ace.ids.containers":{"description":"Select which items are affected: by ids or just all\n","oneOf":[{"const":"all","default":"all","description":"Keyword for all the items IDs accessible by the token","readOnly":true,"title":"all","type":"string"},{"description":"Affected items IDs array","items":{"format":"uint32","minimum":1,"type":"number"},"maxItems":4096,"minItems":1,"title":"list","type":"array","x-view-selector":"containers"}],"title":"ids","x-view-type":"buttontoggle"},"token.ace.ids.devices":{"description":"Select which items are affected: by ids or just all\n","oneOf":[{"const":"all","default":"all","description":"Keyword for all the items IDs accessible by the token","readOnly":true,"title":"all","type":"string"},{"const":"in-groups","default":"in-groups","description":"Keyword for groupped items accessible by the token","readOnly":true,"title":"in-groups","type":"string"},{"description":"Affected items IDs array","items":{"format":"uint32","minimum":1,"type":"number"},"maxItems":4096,"minItems":1,"title":"list","type":"array","x-view-selector":"devices"}],"title":"ids","x-view-type":"buttontoggle"},"token.ace.ids.geofences":{"description":"Select which items are affected: by ids or just all\n","oneOf":[{"const":"all","default":"all","description":"Keyword for all the items IDs accessible by the token","readOnly":true,"title":"all","type":"string"},{"const":"in-groups","default":"in-groups","description":"Keyword for groupped items accessible by the token","readOnly":true,"title":"in-groups","type":"string"},{"description":"Affected items IDs array","items":{"format":"uint32","minimum":1,"type":"number"},"maxItems":4096,"minItems":1,"title":"list","type":"array","x-view-selector":"geofences"}],"title":"ids","x-view-type":"buttontoggle"},"token.ace.ids.groups":{"description":"Select which items are affected: by ids or just all\n","oneOf":[{"const":"all","default":"all","description":"Keyword for all the items IDs accessible by the token","readOnly":true,"title":"all","type":"string"},{"description":"Affected items IDs array","items":{"format":"uint32","minimum":1,"type":"number"},"maxItems":4096,"minItems":1,"title":"list","type":"array","x-view-selector":"groups"}],"title":"ids","x-view-type":"buttontoggle"},"token.ace.ids.in-groups":{"const":"in-groups","default":"in-groups","description":"Keyword for groupped items accessible by the token","readOnly":true,"title":"in-groups","type":"string"},"token.ace.ids.list-base":{"description":"Affected items IDs array","items":{"format":"uint32","minimum":1,"type":"number"},"maxItems":4096,"minItems":1,"title":"list","type":"array"},"token.ace.ids.modems":{"description":"Select which items are affected: by ids or just all\n","oneOf":[{"const":"all","default":"all","description":"Keyword for all the items IDs accessible by the token","readOnly":true,"title":"all","type":"string"},{"description":"Affected items IDs array","items":{"format":"uint32","minimum":1,"type":"number"},"maxItems":4096,"minItems":1,"title":"list","type":"array","x-view-selector":"modems"}],"title":"ids","x-view-type":"buttontoggle"},"token.ace.ids.plugins":{"description":"Select which items are affected: by ids or just all\n","oneOf":[{"const":"all","default":"all","description":"Keyword for all the items IDs accessible by the token","readOnly":true,"title":"all","type":"string"},{"description":"Affected items IDs array","items":{"format":"uint32","minimum":1,"type":"number"},"maxItems":4096,"minItems":1,"title":"list","type":"array","x-view-selector":"plugins"}],"title":"ids","x-view-type":"buttontoggle"},"token.ace.ids.streams":{"description":"Select which items are affected: by ids or just all\n","oneOf":[{"const":"all","default":"all","description":"Keyword for all the items IDs accessible by the token","readOnly":true,"title":"all","type":"string"},{"description":"Affected items IDs array","items":{"format":"uint32","minimum":1,"type":"number"},"maxItems":4096,"minItems":1,"title":"list","type":"array","x-view-selector":"streams"}],"title":"ids","x-view-type":"buttontoggle"},"token.ace.methods-all":{"description":"Allowed HTTP methods array for the current URI","items":{"enum":["GET","POST","PUT","PATCH","DELETE"],"type":"string"},"maxItems":5,"title":"methods","type":"array","uniqueItems":true},"token.ace.methods-all-default":{"default":["GET"],"description":"Allowed HTTP methods array for the current URI","items":{"enum":["GET","POST","PUT","PATCH","DELETE"],"type":"string"},"maxItems":5,"title":"methods","type":"array","uniqueItems":true},"token.ace.methods-get":{"description":"Allowed HTTP methods array for the current URI","items":{"enum":["GET"],"type":"string"},"maxItems":1,"title":"methods","type":"array","uniqueItems":true},"token.ace.methods-get-delete":{"description":"Allowed HTTP methods array for the current URI","items":{"enum":["GET","DELETE"],"type":"string"},"maxItems":2,"title":"methods","type":"array","uniqueItems":true},"token.ace.methods-get-post":{"description":"Allowed HTTP methods array for the current URI","items":{"enum":["GET","POST"],"type":"string"},"maxItems":2,"title":"methods","type":"array","uniqueItems":true},"token.ace.methods-get-post-delete":{"description":"Allowed HTTP methods array for the current URI","items":{"enum":["GET","POST","DELETE"],"type":"string"},"maxItems":3,"title":"methods","type":"array","uniqueItems":true},"token.ace.methods-get-put-delete":{"description":"Allowed HTTP methods array for the current URI","items":{"enum":["GET","PUT","DELETE"],"type":"string"},"maxItems":3,"title":"methods","type":"array","uniqueItems":true},"token.ace.methods-no-patch":{"description":"Allowed HTTP methods array for the current URI","items":{"enum":["GET","PUT","POST","DELETE"],"type":"string"},"maxItems":4,"title":"methods","type":"array","uniqueItems":true},"token.ace.methods-no-patch-default":{"default":["GET"],"description":"Allowed HTTP methods array for the current URI","items":{"enum":["GET","PUT","POST","DELETE"],"type":"string"},"maxItems":4,"title":"methods","type":"array","uniqueItems":true},"token.ace.methods-no-post":{"description":"Allowed HTTP methods array for the current URI","items":{"enum":["GET","PUT","PATCH","DELETE"],"type":"string"},"maxItems":4,"title":"methods","type":"array","uniqueItems":true},"token.ace.methods-post":{"description":"Allowed HTTP methods array for the current URI","items":{"enum":["POST"],"type":"string"},"maxItems":1,"title":"methods","type":"array","uniqueItems":true},"token.ace.methods-post-get":{"description":"Allowed HTTP methods array for the current URI","items":{"enum":["POST","GET"],"type":"string"},"maxItems":2,"title":"methods","type":"array","uniqueItems":true},"token.ace.mqtt":{"properties":{"actions":{"description":"Allowed MQTT actions array for the current topic mask.","items":{"enum":["publish","subscribe"],"type":"string"},"maxItems":2,"minItems":1,"title":"actions","type":"array","uniqueItems":true},"methods":{"$ref":"#/definitions/token.ace.methods-get-post-delete"},"topic":{"description":"Authorize token to publish and subscribe topics matched given mask. Mask has a regular format of MQTT subscriptions.","maxLength":1024,"minLength":1,"pattern":"^(?!flespi$)(?!flespi\\/).*$","type":"string","x-schema-errors":{"pattern":"direct ACL to flespi/ namespace is forbidden"}},"uri":{"const":"mqtt","default":"mqtt","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"mqtt","type":"object","x-view-order":["topic","actions","methods"]},"token.ace.restrictions":{"x-schema-allOf":[{"if":{"additionalProperties":true,"required":["submodules"],"type":"object"},"then":{"additionalProperties":true,"required":["ids"],"type":"object"},"x-schema-errors":{"then":"ids field is required when submodule is selected"}}]},"token.ace.storage.cdns":{"properties":{"ids":{"$ref":"#/definitions/token.ace.ids.cdns"},"methods":{"$ref":"#/definitions/token.ace.methods-all-default"},"submodules":{"$ref":"#/definitions/token.ace.storage.cdns.submodules"},"uri":{"const":"storage/cdns","default":"storage/cdns","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"storage/cdns","type":"object","x-schema-allOf":[{"if":{"additionalProperties":true,"required":["submodules"],"type":"object"},"then":{"additionalProperties":true,"required":["ids"],"type":"object"},"x-schema-errors":{"then":"ids field is required when submodule is selected"}}],"x-view-order":["methods","ids","submodules"]},"token.ace.storage.cdns.submodules":{"description":"Per-submodule access overrides. List a submodule with `methods: [...]` to\ngrant exactly those methods on it; submodules NOT listed in this array\nare denied. Omit the array entirely to grant the module-level methods on\nthe entity and all its submodules alike, write methods included - scope\nan ACE with submodule entries whenever its submodules need narrower\nrights than the entity itself.\n","items":{"anyOf":[{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get-post-delete"},"name":{"const":"files","default":"files","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"files","type":"object","x-view-order":["methods"]},{"$ref":"#/definitions/token.ace.submodule.logs"}],"x-key-property":"name"},"maxItems":2,"type":"array"},"token.ace.storage.containers":{"properties":{"ids":{"$ref":"#/definitions/token.ace.ids.containers"},"methods":{"$ref":"#/definitions/token.ace.methods-all-default"},"submodules":{"$ref":"#/definitions/token.ace.storage.containers.submodules"},"uri":{"const":"storage/containers","default":"storage/containers","description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"}},"required":["uri"],"title":"storage/containers","type":"object","x-schema-allOf":[{"if":{"additionalProperties":true,"required":["submodules"],"type":"object"},"then":{"additionalProperties":true,"required":["ids"],"type":"object"},"x-schema-errors":{"then":"ids field is required when submodule is selected"}}],"x-view-order":["methods","ids","submodules"]},"token.ace.storage.containers.submodules":{"description":"Per-submodule access overrides. List a submodule with `methods: [...]` to\ngrant exactly those methods on it; submodules NOT listed in this array\nare denied. Omit the array entirely to grant the module-level methods on\nthe entity and all its submodules alike, write methods included - scope\nan ACE with submodule entries whenever its submodules need narrower\nrights than the entity itself.\n","items":{"anyOf":[{"$ref":"#/definitions/token.ace.submodule.calculate"},{"$ref":"#/definitions/token.ace.submodule.logs"},{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get-post-delete"},"name":{"const":"messages","default":"messages","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"messages","type":"object","x-view-order":["methods"]}],"x-key-property":"name"},"maxItems":3,"type":"array"},"token.ace.submodule.calculate":{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-post"},"name":{"const":"calculate","default":"calculate","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"calculate","type":"object","x-view-order":["methods"]},"token.ace.submodule.geofences":{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-no-patch"},"name":{"const":"geofences","default":"geofences","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"geofences","type":"object","x-view-order":["methods"]},"token.ace.submodule.geofences-no-put":{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get-post-delete"},"name":{"const":"geofences","default":"geofences","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"geofences","type":"object","x-view-order":["methods"]},"token.ace.submodule.groups":{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get-post-delete"},"name":{"const":"groups","default":"groups","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"groups","type":"object","x-view-order":["methods"]},"token.ace.submodule.groups-no-patch":{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-no-patch"},"name":{"const":"groups","default":"groups","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"groups","type":"object","x-view-order":["methods"]},"token.ace.submodule.logs":{"properties":{"methods":{"$ref":"#/definitions/token.ace.methods-get"},"name":{"const":"logs","default":"logs","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"logs","type":"object","x-view-order":["methods"]},"token.ace.submodule.media":{"properties":{"methods":{"description":"Allowed HTTP methods array for the current URI","items":{"enum":["GET","PUT","DELETE","POST"],"type":"string"},"maxItems":4,"title":"methods","type":"array","uniqueItems":true},"name":{"const":"media","default":"media","readOnly":true,"title":"name","type":"string"}},"required":["name"],"title":"media","type":"object","x-view-order":["methods"]},"token.ace.template.submodule-base":{"description":"Per-submodule access overrides. List a submodule with `methods: [...]` to\ngrant exactly those methods on it; submodules NOT listed in this array\nare denied. Omit the array entirely to grant the module-level methods on\nthe entity and all its submodules alike, write methods included - scope\nan ACE with submodule entries whenever its submodules need narrower\nrights than the entity itself.\n","type":"array"},"token.ace.template.submodule-name":{"readOnly":true,"title":"name","type":"string"},"token.ace.template.uri":{"description":"URI affected by ACE (access control entry)","readOnly":true,"title":"uri","type":"string"},"token.acl":{"description":"Access control list (ACL) - list of granted permissions to work with the specified modules and/or items","items":{"$ref":"#/definitions/token.ace"},"maxItems":32,"type":"array"},"token.expire":{"description":"UNIX timestamp when token will be automatically removed. Zero value if expiration time is not set.","format":"uint32","maximum":2147483647,"type":"integer","x-view-type":"datetimezero"},"token.id":{"description":"Token's unique ID","type":"integer"},"token.info":{"description":"user defined description typically contains the purpose of token","maxLength":255,"type":"string"},"token.ips":{"description":"CSV list of masks (wildcards are supported) of IP addresses which are\nallowed to use the token. Example: 10.100.*.*,192.168.56.1?,127.0.0.1\n","maxLength":128,"pattern":"^(?:(?:[0-9*?]{1,3}\\.){3}[0-9*?]{1,3})(?:,(?:[0-9*?]{1,3}\\.){3}[0-9*?]{1,3})*$|^$","title":"IPs whitelist","type":"string","x-schema-errors":{"pattern":"invalid list of IP addresses"}},"token.result.flags":{"description":"Token's internal flags: 0x0 - standard token; 0x1 - token can manage other tokens; 0x2 - enable ACL for the token; 0x3 - NOAPI token(controlled by flespi platform and unavailable to user)","enum":[0,1,2,3],"format":"uint32","title":"Type","type":"integer","x-view-enum-labels":["Standard","Master","ACL","NOAPI"]},"token.ttl":{"description":"Token's time-to-leave. If not zero, specifies interval that is used to automatically update token expiration time with value of current-time + ttl, whenever you are doing any REST request or have active MQTT session with this token.","format":"uint32","maximum":31536000,"minimum":0,"title":"TTL","type":"integer","x-view-divider":60,"x-view-unit":"min."}},"host":"flespi.io","info":{"description":"This API provides methods to authenticate in flespi platform. Some methods are REST API methods,\nbut other serves entry points for further redirection to the point of interest. In case of a failure\nREST API methods return one of the following error codes:\n\nReason code | Description\n-|-\n1|Internal error\n2|Invalid parameters\n1001|Invalid credentials\n1002|Invalid or non-existing token\n1003|Invalid confirmation field value\n1004|Invalid or expired email confirmation link\n1005|Failed to link third-party account via OAuth\n1006|Account with such email address already exists\n1007|Invalid or expired email reversion link\n1008|Invalid or expired account confirmation link\n1009|Invalid or expired login link\n1010|Account is not confirmed yet\n1011|Invalid unsubscribe link\n1012|Attempt to use email address generated by flespi\n1013|Registration is disabled. Try to register at https://flespi.io or contact us info@flespi.com\n1034|Attempt to use token from forbidden IP address or Web origin\n1101|Unable to continue because of denied authorization\n1102|Received invalid email from OAuth provider\n1103|Unsupported OAuth provider\n1104|Failed to perform OAuth\n1105|Invalid or expired OAuth link\n1201|Realm is not found\n1202|There is no corresponding identity provider bound to this realm\n1203|Identity provider is disabled for this realm\n1204|Identity provider is blocked\n1205|User is not found in this realm\n1206|This third-party account is already linked to another user of this realm\n1207|User with this third-party account is not found in this realm\n1208|User with the same e-mail address already exists in this realm\n1209|Identity provider response doesn't contain verified e-mail address\n1210|Failed to register new user\n1211|User already has another linked account from this identity provider\n","title":"flespi authentication REST API","version":"1.0"},"parameters":{"oauth-callback-code":{"description":"Authorization code returned by the identity provider after successful authentication. Normally omitted when `error` is present.","in":"query","name":"code","required":false,"type":"string"},"oauth-callback-error":{"description":"Error code returned by the identity provider when authentication fails, such as `access_denied`. Takes precedence if `code` is also present.","in":"query","name":"error","required":false,"type":"string"},"oauth-callback-error-description":{"description":"Optional human-readable error detail returned by the identity provider with `error`.","in":"query","name":"error_description","required":false,"type":"string"},"oauth-callback-state":{"description":"Opaque state token issued by flespi when initiating identity-provider authorization. The identity provider must return it unchanged.","in":"query","name":"state","required":true,"type":"string"}},"paths":{"/account/confirm":{"post":{"description":"Confirm or deny flespi account creation according to the agreement with all the\nnecessary legal statements.\n\nThis method is intended to be used solely by the flespi.io panel for flespi account management purposes and can be changed any time. Please do not use it in your integration!\n","parameters":[{"description":"Account confirmation data","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/confirmation-data"},"type":"string"}],"responses":{"200":{"description":"Operation completion result or error code","schema":{"oneOf":[{"$ref":"#/definitions/notification-response"},{"$ref":"#/definitions/token-value-response"}]}},"default":{"description":"Unexpected behaviour, internal error."}},"summary":"Accept/deny flespi account rules","tags":["auth"],"x-view-group":"Account creation"}},"/account/register":{"post":{"description":"Register new customer by its email.\n\nThis method is intended to be used solely by the flespi.io panel for flespi account management purposes and can be changed any time. Please do not use it in your integration!\n","parameters":[{"description":"Accouint registration data","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/new-user"}}],"responses":{"200":{"description":"Operation completion result or error code","schema":{"$ref":"#/definitions/notification-response"}},"default":{"description":"Unexpected behaviour, internal error."}},"summary":"Register new flespi account by email","tags":["auth"],"x-view-group":"Account creation"}},"/callback":{"get":{"description":"Generic identity-provider callback used as the `redirect_uri` for identity providers.\nSuccessful callbacks normally contain `state` and `code`; failed callbacks normally\ncontain `state` and `error`, optionally accompanied by `error_description`.\n","parameters":[{"$ref":"#/parameters/oauth-callback-state"},{"$ref":"#/parameters/oauth-callback-code"},{"$ref":"#/parameters/oauth-callback-error"},{"$ref":"#/parameters/oauth-callback-error-description"}],"responses":{"303":{"description":"The `Location` response header contains the redirect URI selected for the callback outcome:\n  - linking a third-party account redirects to `/#/notification/{notification-code}`\n  - flespi or Realm login for an existing account or user redirects to `/#/token/{token}`\n  - flespi registration requiring confirmation redirects to `/#/confirmation/{confirmation-state}`\n  - handled failures not returned to a Realm OAuth client redirect to `/#/error/{error-code}`\n  - successful identity-provider login carrying a Realm OAuth authorization continuation\n    redirects to the Realm OAuth consent dialog at `/#/dialog/{dialog-state}`\n  - failure of a Realm OAuth authorization continuation redirects to the OAuth client's\n    redirect URI with OAuth error parameters and the client's original state\n"},"default":{"description":"Unexpected failure that prevents the callback from producing its normal 303 redirect response."}},"summary":"Identity provider callback","tags":["oauth"],"x-view-group":"Identity providers entry point"}},"/callback/proxy":{"get":{"description":"Realm identity-provider callback proxy. It accepts only Realm callback flows and\nreturns the result URL or token in JSON instead of redirecting the browser.\n\nUse this method when an identity provider requires a fixed custom `redirect_uri`. Forward all\nquery parameters received from the identity provider to complete the flow on the flespi side.\n","parameters":[{"$ref":"#/parameters/oauth-callback-state"},{"$ref":"#/parameters/oauth-callback-code"},{"$ref":"#/parameters/oauth-callback-error"},{"$ref":"#/parameters/oauth-callback-error-description"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/auth-callback-response-ok"}},"default":{"description":"Failed to perform OAuth flow","schema":{"$ref":"#/definitions/auth-callback-response-error"}}},"summary":"Identity provider proxy callback","tags":["oauth"],"x-view-group":"Identity providers entry point"}},"/dialog/decode":{"post":{"description":"Decode encrypted dialog state into Web UI display data.\n\nThis method is intended to be used solely by the flespi.io panel and can be changed any time. Please do not use it in your integration!\n","parameters":[{"description":"Encrypted dialog state","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/dialog-decode-request"}}],"responses":{"200":{"description":"Dialog display data","schema":{"$ref":"#/definitions/dialog-decode-response"}},"default":{"description":"Unexpected behaviour, internal error."}},"summary":"Decode public dialog state","tags":["auth"],"x-view-group":"Dialog"}},"/dialog/submit":{"post":{"description":"Submit an answer for encrypted consent dialog state.\n\nThis method is intended to be used solely by the flespi.io panel and can be changed any time. Please do not use it in your integration!\n","parameters":[{"description":"Dialog answer data","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/dialog-submit-request"}}],"responses":{"200":{"description":"URL where Web UI should redirect user after submit","schema":{"$ref":"#/definitions/dialog-submit-response"}},"default":{"description":"Unexpected behaviour, internal error."}},"summary":"Submit public dialog answer","tags":["auth"],"x-view-group":"Dialog"}},"/email/confirm":{"post":{"description":"Email verification callback.\nThis method is intended to be used solely by the flespi.io panel for flespi account management purposes and can be changed any time. Please do not use it in your integration!","parameters":[{"in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/email-confirm"}}],"responses":{"200":{"description":"Return notification code and message about successful email update\n","schema":{"$ref":"#/definitions/notification-response"}},"default":{"description":"Unexpected behaviour, internal error."}},"summary":"Email verification callback","tags":["auth"],"x-view-group":"Account management"}},"/email/revert":{"post":{"description":"Cance email updates. Used to revert email changes and/or to invalidate\nemail verification link.\n\nThis method is intended to be used solely by the flespi.io panel for flespi account management purposes and can be changed any time. Please do not use it in your integration!\n","parameters":[{"in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/email-revert"}}],"responses":{"200":{"description":"Email reversion succeeded; notification code in the body identifies the outcome\n(the panel uses it to redirect the user to a confirmation page).\n","schema":{"$ref":"#/definitions/notification-response"}},"default":{"description":"Unexpected behaviour, internal error."}},"summary":"Email verification fallback","tags":["auth"],"x-view-group":"Account management"}},"/email/update":{"put":{"description":"Update email for the logged in profile. This action only initate email update\nprocess. User then recives a message with verification link by the new email\naddress. Email is updated only after user follows recevied verification link.\n\nThis method is intended to be used solely by the flespi.io panel for flespi account management purposes and can be changed any time. Please do not use it in your integration!\n","parameters":[{"in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/email-update"}}],"responses":{"200":{"description":"Operation completion result code or error code.","schema":{"$ref":"#/definitions/notification-response"}},"default":{"description":"Unexpected behaviour, internal error."}},"security":[{"FlespiToken":[]}],"summary":"Update email stored in the flespi profile","tags":["auth"],"x-view-group":"Account management"}},"/info":{"get":{"description":"Retrieve information about the token which is used for authentication.\n\nThis is the simplest method which works for all token types to validate the token and retrieve information about it.\n\nCall format: **GET /auth/info**\n","responses":{"200":{"description":"Information about the token. Invalid or non-existing tokens return an errors envelope.","schema":{"$ref":"#/definitions/token-info-response"}},"default":{"description":"Unexpected behaviour, internal error."}},"security":[{"FlespiToken":[]}],"summary":"Retrieve token information","tags":["utils"]}},"/login/credentials":{"post":{"description":"Login to the flespi panel using email and password.\n\nThis method is intended to be used solely by the flespi.io panel for flespi account management purposes and can be changed any time. Please do not use it in your integration!\n","parameters":[{"description":"Login credentials","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/login-credentials"}}],"responses":{"200":{"description":"Returns object with token in result field on success or with error\nobject in errors field.\n","schema":{"$ref":"#/definitions/token-value-response"}},"default":{"description":"Unexpected behaviour, internal error."}},"summary":"Login to the flespi panel using email and password","tags":["auth"],"x-view-group":"Login to account"}},"/login/passwordless":{"post":{"description":"Request passwordless login link for logging into the flespi account using email only.\n\nThis method is intended to be used solely by the flespi.io panel for flespi account management purposes and can be changed any time. Please do not use it in your integration!\n","parameters":[{"description":"Account email address","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/login-passwordless"}}],"responses":{"200":{"description":"Returns object with token in result field on success or with error\nobject in errors field.\n","schema":{"$ref":"#/definitions/token-value-response"}},"default":{"description":"Unexpected behaviour, internal error."}},"summary":"Request passwordless login link","tags":["auth"],"x-view-group":"Login to account"}},"/login/passwordless/confirm":{"post":{"description":"Passwordless login confirmation.\n\nThis method is intended to be used solely by the flespi.io panel for flespi account management purposes and can be changed any time. Please do not use it in your integration!\n","parameters":[{"description":"Confiration data received via email","in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/login-passwordless-confirmation"}}],"responses":{"200":{"description":"Returns object with token in result field on success or with error\nobject in errors field.\n","schema":{"$ref":"#/definitions/token-value-response"}},"default":{"description":"Unexpected behaviour, internal error."}},"summary":"Passwordless login confirmation","tags":["auth"],"x-view-group":"Login to account"}},"/oauth/link":{"get":{"description":"Link OAuth account to the flespi account.\n\nThis method is intended to be used solely by the flespi.io panel for flespi account management purposes and can be changed any time. Please do not use it in your integration!\n","parameters":[{"description":"OAuth provider name (may be obtain via GET /auth/oauth/providers)","in":"query","name":"provider","required":true,"type":"string"}],"responses":{"200":{"description":"Returns object with OAuth URL for account linkage","schema":"#/definitions/oauth-url-response"},"default":{"description":"Unexpected behaviour, internal error."}},"security":[{"FlespiToken":[]}],"summary":"Link OAuth account to the flespi account","tags":["oauth"],"x-view-group":"Account management"}},"/oauth/login":{"get":{"description":"Login (and register if it is necessary) as a flespi account.\n\nThis method is intended to be used solely by the flespi.io panel for flespi account management purposes and can be changed any time. Please do not use it in your integration!\n","parameters":[{"description":"OAuth provider name (may be obtain via GET /auth/oauth/providers)","in":"query","name":"provider","required":true,"type":"string"}],"responses":{"200":{"description":"Returns object with OAuth URL for logging into flespi","schema":"#/definitions/oauth-url-response"},"default":{"description":"Unexpected behaviour, internal error."}},"summary":"Login and register to flespi","tags":["oauth"],"x-view-group":"Account management"}},"/oauth/providers":{"get":{"description":"List OAuth providers supported by flespi for account authorization under master token.\n\nThis method is intended to be used solely by the flespi.io panel for flespi account management purposes and can be changed any time. Please do not use it in your integration!\n","responses":{"200":{"description":"Object with providers and their authentication links.","schema":{"$ref":"#/definitions/oauth-providers-response"}},"default":{"description":"Unexpected behaviour, internal error."}},"summary":"List supported OAuth providers","tags":["oauth"],"x-view-group":"Account management"}},"/password":{"put":{"description":"Update password for the logged in flespi profile.\n\nThis method is intended to be used solely by the flespi.io panel for flespi account management purposes and can be changed any time. Please do not use it in your integration!\n","parameters":[{"in":"body","name":"data","required":true,"schema":{"$ref":"#/definitions/password-update"}}],"responses":{"200":{"description":"Operation completion result and optional error code.","schema":{"$ref":"#/definitions/notification-response"}},"default":{"description":"Unexpected behaviour, internal error."}},"security":[{"FlespiToken":[]}],"summary":"Update profile password","tags":["auth"],"x-view-group":"Account management"}},"/regions":{"get":{"description":"Retrieve information about available flespi regions.\n\nCall format: **GET /auth/regions**\n","responses":{"200":{"description":"Information about available flespi regions","schema":{"$ref":"#/definitions/regions-response"}},"default":{"description":"Unexpected behaviour, internal error."}},"summary":"Fetch available flespi regions","tags":["utils"]}}},"produces":["application/json"],"schemes":["https","http"],"securityDefinitions":{"FlespiToken":{"description":"Authorization through FlespiToken","in":"header","name":"Authorization","type":"apiKey"}},"swagger":"2.0","tags":[{"name":"auth"},{"name":"oauth"}]}