{"result":{"depiction_url":null,"edges":{"refers":{"objects":[{"created":"2026-09-30T09:54:06Z","object_id":{"id":2734,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_cotonic_model_window","title":"model\/window","uri":"https:\/\/zotonic.com\/id\/2734"},"seq":1000000},{"created":"2026-09-30T09:54:06Z","object_id":{"id":2735,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_cotonic_model_document","title":"model\/document","uri":"https:\/\/zotonic.com\/id\/2735"},"seq":1000000},{"created":"2026-09-30T09:54:06Z","object_id":{"id":2736,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_cotonic_model_location","title":"model\/location","uri":"https:\/\/zotonic.com\/id\/2736"},"seq":1000000},{"created":"2026-09-30T09:54:06Z","object_id":{"id":2737,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_cotonic_model_ui","title":"model\/ui","uri":"https:\/\/zotonic.com\/id\/2737"},"seq":1000000},{"created":"2026-09-30T09:54:06Z","object_id":{"id":2738,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_cotonic_model_lifecycle","title":"model\/lifecycle","uri":"https:\/\/zotonic.com\/id\/2738"},"seq":1000000},{"created":"2026-09-30T09:54:06Z","object_id":{"id":2739,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_cotonic_model_autofocus","title":"model\/autofocus","uri":"https:\/\/zotonic.com\/id\/2739"},"seq":1000000},{"created":"2026-09-30T09:54:06Z","object_id":{"id":2740,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_cotonic_model_serviceworker","title":"model\/serviceWorker","uri":"https:\/\/zotonic.com\/id\/2740"},"seq":1000000},{"created":"2026-09-30T09:54:06Z","object_id":{"id":2741,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_cotonic_model_localstorage","title":"model\/localStorage","uri":"https:\/\/zotonic.com\/id\/2741"},"seq":1000000},{"created":"2026-09-30T09:54:06Z","object_id":{"id":2742,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_cotonic_model_sessionstorage","title":"model\/sessionStorage","uri":"https:\/\/zotonic.com\/id\/2742"},"seq":1000000},{"created":"2026-09-30T09:54:06Z","object_id":{"id":2743,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_cotonic_model_sessionid","title":"model\/sessionId","uri":"https:\/\/zotonic.com\/id\/2743"},"seq":1000000},{"created":"2026-09-30T09:54:06Z","object_id":{"id":2744,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_cotonic_model_dedup","title":"model\/dedup","uri":"https:\/\/zotonic.com\/id\/2744"},"seq":1000000}],"predicate":{"id":2409,"is_a":["meta","predicate"],"name":"refers","title":{"_type":"trans","tr":{"en":"Refers"}},"uri":"https:\/\/zotonic.com\/id\/refers"}},"subject":{"objects":[{"created":"2026-09-30T09:11:23Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-30T09:11:23Z","object_id":{"id":2563,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_frontend_developer","title":"Frontend developer","uri":"https:\/\/zotonic.com\/id\/2563"},"seq":2},{"created":"2026-09-30T09:11:23Z","object_id":{"id":2598,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_messaging_and_pubsub","title":"Messaging and publish-subscribe","uri":"https:\/\/zotonic.com\/id\/2598"},"seq":3},{"created":"2026-09-30T09:11:23Z","object_id":{"id":2673,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_javascript","title":"JavaScript","uri":"https:\/\/zotonic.com\/id\/2673"},"seq":4},{"created":"2026-09-30T09:11:23Z","object_id":{"id":2718,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_cotonic","title":"Cotonic","uri":"https:\/\/zotonic.com\/id\/2718"},"seq":5}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":2733,"is_a":["text","documentation","reference","cotonic_reference"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2733"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_cotonic_models","page_url":{"en":"https:\/\/zotonic.com\/cotonic\/models","x-default":"https:\/\/zotonic.com\/cotonic\/models"},"preview_url":null,"resource":{"version":24,"pivot_location_lat":null,"title":"Models","is_authoritative":true,"body":"<a name=\"models\"><\/a>\n\n            <p>\n            Because workers run as independent components it is not possible to directly\n            call api&#39;s. Some api&#39;s are also not available to web workers. Models are\n            special modules, or workers, which publish their data, or are ready to\n            receive calls via mqtt topics.\n            <\/p>\n\n            <p>\n            The convention is that models provide their services via the following topic\n            tree.\n            <\/p>\n            <dl>\n                <dt><tt>model\/+modelName\/get\/+<\/tt><\/dt>\n                <dd>Call topics. When the model receives a publish, it returns the answer\n                to the reply topic.<\/dd>\n\n                <dt><tt>model\/+modelName\/post\/+<\/tt><\/dt>\n                <dd>Topics used to post updates to the model.<\/dd>\n\n                <dt><tt>model\/+modelName\/delete\/+<\/tt><\/dt>\n                <dd>Topics used to delete items managed by the model.<\/dd>\n\n                <dt><tt>model\/+modelName\/event\/+<\/tt><\/dt>\n                <dd>Topics which the model publishes events on.<\/dd>\n            <\/dl>\n\n            <!-- model window -->\n            <ul><li><a href=\"\/id\/doc_cotonic_model_window\">model\/window<\/a><\/li><li><a href=\"\/id\/doc_cotonic_model_document\">model\/document<\/a><\/li><li><a href=\"\/id\/doc_cotonic_model_location\">model\/location<\/a><\/li><li><a href=\"\/id\/doc_cotonic_model_ui\">model\/ui<\/a><\/li><li><a href=\"\/id\/doc_cotonic_model_lifecycle\">model\/lifecycle<\/a><\/li><li><a href=\"\/id\/doc_cotonic_model_autofocus\">model\/autofocus<\/a><\/li><li><a href=\"\/id\/doc_cotonic_model_serviceworker\">model\/serviceWorker<\/a><\/li><li><a href=\"\/id\/doc_cotonic_model_localstorage\">model\/localStorage<\/a><\/li><li><a href=\"\/id\/doc_cotonic_model_sessionstorage\">model\/sessionStorage<\/a><\/li><li><a href=\"\/id\/doc_cotonic_model_sessionid\">model\/sessionId<\/a><\/li><li><a href=\"\/id\/doc_cotonic_model_dedup\">model\/dedup<\/a><\/li><\/ul>","slug":"models","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"24ac0c5875aa8dd2e6381a4c630b4a48658ce16684c978d36956d9ed42e4efcf","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":2722,"is_a":["meta","category"],"name":"cotonic_reference","title":"Cotonic","uri":"https:\/\/zotonic.com\/id\/cotonic_reference"},"doc_source_path":"index.html","publication_start":"2026-09-30T09:11:23Z","page_path":"\/cotonic\/models","github_url":"https:\/\/github.com\/cotonic\/cotonic\/blob\/master\/index.html","pivot_location_lng":null,"doc_source_kind":"cotonic","name":"doc_cotonic_models","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2026-09-30T09:11:23Z","uri":null,"doc_source_anchor":"models","doc_status":"current","is_dependent":false,"publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"f88cc928b997d10f7f19e6bd0ede80e1c8c619bc","creator_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"modified":"2026-09-30T10:06:59Z","title_slug":"models"},"uri":"https:\/\/zotonic.com\/id\/2733","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2733"}},"status":"ok"}