{"id":173,"date":"2020-11-10T12:24:20","date_gmt":"2020-11-10T12:24:20","guid":{"rendered":"https:\/\/cupl.co.uk\/?page_id=173"},"modified":"2020-12-18T09:57:40","modified_gmt":"2020-12-18T09:57:40","slug":"cuplbackend","status":"publish","type":"page","link":"https:\/\/cupl.co.uk\/index.php\/software\/cuplbackend\/","title":{"rendered":"cuplbackend"},"content":{"rendered":"\n<p>cuplbackend is a web application built atop of <a href=\"https:\/\/cupl.co.uk\/index.php\/cuplcodec\/\" data-type=\"page\" data-id=\"171\">cuplcodec<\/a>. <\/p>\n\n\n\n<p>It exposes two APIs:<\/p>\n\n\n\n<ul><li><a href=\"https:\/\/cupl.co.uk\/index.php\/cuplbackend-admin-api\/\">Admin API<\/a> for those administering a system of cuplTags.<\/li><li><a href=\"https:\/\/cupl.co.uk\/index.php\/cuplbackend-consumer-api\/\">Consumer API<\/a> for end users. <\/li><\/ul>\n\n\n\n<p>cuplbackend is invoked by <a href=\"https:\/\/cupl.co.uk\/index.php\/cuplfrontend\/\" data-type=\"page\" data-id=\"175\">cuplfrontend<\/a> each time a <a href=\"https:\/\/cupl.co.uk\/index.php\/cuplTag\/\" data-type=\"URL\" data-id=\"https:\/\/cupl.co.uk\/index.php\/cuplTag\/\">tag<\/a> is scanned, as shown in the diagram below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1021\" height=\"869\" src=\"https:\/\/cupl.co.uk\/wp-content\/uploads\/2020\/11\/cuplbackend_uml_sequence.svg\" alt=\"\" class=\"wp-image-498\"\/><\/figure>\n\n\n\n<p>The backend stores the state of your collection of cuplTags using this model:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"456\" height=\"427\" src=\"https:\/\/cupl.co.uk\/wp-content\/uploads\/2020\/11\/backend_er_diagram.png\" alt=\"\" class=\"wp-image-502\" srcset=\"https:\/\/cupl.co.uk\/wp-content\/uploads\/2020\/11\/backend_er_diagram.png 456w, https:\/\/cupl.co.uk\/wp-content\/uploads\/2020\/11\/backend_er_diagram-300x281.png 300w\" sizes=\"(max-width: 456px) 100vw, 456px\" \/><\/figure>\n\n\n\n<ul><li>Each cuplTag (<strong>tag<\/strong>) is referenced by an 8-character serial. <\/li><li>Each <strong>tag <\/strong>is a assigned a secret key, which is <a href=\"https:\/\/cupl.co.uk\/index.php\/cuplcodec-features\/#tamper-resistant\" data-type=\"URL\" data-id=\"https:\/\/cupl.co.uk\/index.php\/cuplcodec-features\/#tamper-resistant\">used<\/a> by cuplcodec.<\/li><li>A new <strong>capture <\/strong>is added to a <strong>tag<\/strong>, whenever data from a cuplURL are decoded.<\/li><li>A <strong>capture <\/strong>contains a timestamped list of <strong>capture_samples<\/strong> (e.g. temperature and humidity).<\/li><li>A <strong>capture <\/strong>also holds status information on a cuplTag, such as its battery voltage and the number of resets that have occurred. <\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>cuplbackend is a web application built atop of cuplcodec. It exposes two APIs: Admin API for those administering a system of cuplTags. Consumer API for end users. cuplbackend is invoked by cuplfrontend each time a tag is scanned, as shown in the diagram below: The backend stores the state of your collection of cuplTags using&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":194,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"spay_email":""},"featured_image_urls":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","1536x1536":"","2048x2048":""},"post_excerpt_stackable":"<p>cuplbackend is a web application built atop of cuplcodec. It exposes two APIs: Admin API for those administering a system of cuplTags.Consumer API for end users. cuplbackend is invoked by cuplfrontend each time a tag is scanned, as shown in the diagram below: The backend stores the state of your collection of cuplTags using this model: Each cuplTag (tag) is referenced by an 8-character serial. Each tag is a assigned a secret key, which is used by cuplcodec.A new capture is added to a tag, whenever data from a cuplURL are decoded.A capture contains a timestamped list of capture_samples (e.g.&hellip;<\/p>\n","category_list":"","author_info":{"name":"malcolmmackay","url":"https:\/\/cupl.co.uk\/index.php\/author\/malcolmmackay\/"},"comments_num":"0 comments","featured_image_urls_v2":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","1536x1536":"","2048x2048":""},"post_excerpt_stackable_v2":"<p>cuplbackend is a web application built atop of cuplcodec. It exposes two APIs: Admin API for those administering a system of cuplTags.Consumer API for end users. cuplbackend is invoked by cuplfrontend each time a tag is scanned, as shown in the diagram below: The backend stores the state of your collection of cuplTags using this model: Each cuplTag (tag) is referenced by an 8-character serial. Each tag is a assigned a secret key, which is used by cuplcodec.A new capture is added to a tag, whenever data from a cuplURL are decoded.A capture contains a timestamped list of capture_samples (e.g.&hellip;<\/p>\n","category_list_v2":"","author_info_v2":{"name":"malcolmmackay","url":"https:\/\/cupl.co.uk\/index.php\/author\/malcolmmackay\/"},"comments_num_v2":"0 comments","_links":{"self":[{"href":"https:\/\/cupl.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/173"}],"collection":[{"href":"https:\/\/cupl.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cupl.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cupl.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cupl.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=173"}],"version-history":[{"count":20,"href":"https:\/\/cupl.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/173\/revisions"}],"predecessor-version":[{"id":799,"href":"https:\/\/cupl.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/173\/revisions\/799"}],"up":[{"embeddable":true,"href":"https:\/\/cupl.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/194"}],"wp:attachment":[{"href":"https:\/\/cupl.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}