{"id":378,"date":"2016-10-18T14:59:55","date_gmt":"2016-10-18T14:59:55","guid":{"rendered":"http:\/\/smart.nettingbt.com\/\/?page_id=378"},"modified":"2016-11-18T10:08:32","modified_gmt":"2016-11-18T10:08:32","slug":"api-reference","status":"publish","type":"page","link":"https:\/\/www.smartdatasystem.es\/it\/api-reference\/","title":{"rendered":"API Reference"},"content":{"rendered":"<p>[vc_row type=&#8221;vc_default&#8221; bg_type=&#8221;image&#8221; parallax_style=&#8221;vcpb-vz-jquery&#8221; bg_image_new=&#8221;id^435|url^http:\/\/smart.nettingbt.com\/\/wp-content\/uploads\/2016\/10\/heading-dark-blue.jpg|caption^null|alt^null|title^heading-dark-blue|description^null&#8221; parallax_sense=&#8221;25&#8243; bg_override=&#8221;ex-full&#8221; css=&#8221;.vc_custom_1476900488402{margin-top: -155px !important;}&#8221;][vc_column][vc_row_inner][vc_column_inner][vc_empty_space height=&#8221;70px&#8221;][\/vc_column_inner][\/vc_row_inner][\/vc_column][\/vc_row][vc_row][vc_column width=&#8221;1\/4&#8243;]<div class=\"ult_row_spacer\"><div class=\"ult-sticky-anchor\"><div class=\"ult-sticky-section ult-sticky \"  data-gutter= '50' data-stick_behaviour= 'stick_with_scroll_row'  data-sticky_position= 'top' data-mobile='no' data-support='no'>[vc_empty_space height=&#8221;55px&#8221;][vc_row_inner css=&#8221;.vc_custom_1476983527217{background-color: #424242 !important;border-radius: 15px !important;}&#8221;][vc_column_inner][vc_empty_space height=&#8221;10px&#8221;][vc_column_text]<\/p>\n<section id=\"presscore-custom-menu-1-2\" class=\"widget widget_presscore-custom-menu-1\">\n<div class=\"widget-title\"><span style=\"color: #ffffff;\">API REFERENCE<\/span><\/div>\n<ul class=\"custom-menu\">\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom current-menu-item menu-item-has-children menu-item-462 act first has-children\"><a href=\"#devicesapi\">Devices API<\/a><\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom current-menu-item current-menu-ancestor menu-item-has-children menu-item-464 act has-children\"><a href=\"#applicationapi\">Applications API<\/a>\n<ul>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-465 first\"><a href=\"#security\">Security<\/a><\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom current-menu-ancestor current-menu-parent menu-item-has-children menu-item-466 act has-children\"><a href=\"#services\">Services<\/a>\n<ul>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-467 first\"><a href=\"#services\">Installations<\/a><\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-468\"><a href=\"#sensors\">Sensors<\/a><\/li>\n<li class=\"menu-item menu-item-type-custom menu-item-object-custom current-menu-item menu-item-469 act\"><a href=\"#measurement\">Measurements<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/section>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;20px&#8221;][\/vc_column_inner][\/vc_row_inner]<\/div><div class=\"ult-space\"><\/div><\/div><\/div>[\/vc_column][vc_column width=&#8221;3\/4&#8243; css=&#8221;.vc_custom_1476983822756{margin-left: 40px !important;border-left-width: 1px !important;padding-left: 40px !important;border-left-color: #c4c4c4 !important;border-left-style: solid !important;}&#8221;][vc_custom_heading text=&#8221;API REFERENCE&#8221; font_container=&#8221;tag:h2|text_align:left|color:%23383838&#8243; google_fonts=&#8221;font_family:Roboto%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:500%20bold%20regular%3A500%3Anormal&#8221;][vc_column_text]<span style=\"color: #808080;\">Find detailed information about the SDS APIs including authentication, methods, parameters, response formats and errors.<\/span><\/p>\n<p><span style=\"color: #808080;\"><strong>Full user guides and manuals are available for active partners.<\/strong><\/span>[\/vc_column_text][vc_column_text]<a id=\"devicesapi\" name=\"devicesapi\"><\/a>[\/vc_column_text][vc_row_inner][vc_column_inner][vc_empty_space height=&#8221;47px&#8221;][vc_separator][vc_empty_space height=&#8221;47px&#8221;][\/vc_column_inner][\/vc_row_inner][vc_custom_heading text=&#8221;DEVICES API&#8221; font_container=&#8221;tag:h3|text_align:left|color:%23383838&#8243; google_fonts=&#8221;font_family:Roboto%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:500%20bold%20regular%3A500%3Anormal&#8221;][vc_column_text]The Devices API is based on <a href=\"http:\/\/www.sentilo.io\" target=\"_blank\" rel=\"noopener\">Sentilo<\/a>, an open source sensor and actuator platform led by Barcelona City Council and backed by a community of companies and individuals that ensure continuous innovation and support.<\/p>\n<p>A complete description of all its objects and methods can be found <a href=\"http:\/\/www.sentilo.io\/xwiki\/bin\/view\/APIDocs\/WebHome\" target=\"_blank\" rel=\"noopener\">here<\/a>.[\/vc_column_text][vc_custom_heading text=&#8221;Resources:&#8221; font_container=&#8221;tag:h4|text_align:left|color:%23383838&#8243; google_fonts=&#8221;font_family:Roboto%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:500%20bold%20regular%3A500%3Anormal&#8221;][vc_custom_heading text=&#8221;Existing resources:&#8221; font_container=&#8221;tag:h4|text_align:left|color:%23383838&#8243; google_fonts=&#8221;font_family:Roboto%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:500%20bold%20regular%3A500%3Anormal&#8221;]<div class=\"standard-arrow list-divider bullet-top\"><ul>\n<li>Sensor (device): hardware or software entity with the ability to generate a reading.<\/li>\n<li>Component: Element of hardware or software, with geospatial location (fixed or mobile) that can contain one or more Sensors.<\/li>\n<li>Provider: Entity that represents a group of components and provides them with connectivity with the platform. Used to send data and receive commands.<\/li>\n<li>Client Application\/Module: entity that consumes the data processed by the platform.<\/li>\n<\/ul>\n<\/div>[vc_custom_heading text=&#8221;Available actions:&#8221; font_container=&#8221;tag:h4|text_align:left|color:%23383838&#8243; google_fonts=&#8221;font_family:Roboto%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:500%20bold%20regular%3A500%3Anormal&#8221;]<div class=\"standard-arrow list-divider bullet-top\"><p><strong><em>Applications\/Modules:<\/em><\/strong><\/p>\n<ul>\n<li>Send orders to providers\/sensors (order service).<\/li>\n<li>Receive data from providers\/sensors (data service).<\/li>\n<li>Subscribe to system events (subscribe service).<\/li>\n<\/ul>\n<p><strong><em>Providers\/sensors:<\/em><\/strong><\/p>\n<ul>\n<li>Register to the platform (catalog service).<\/li>\n<li>Subscribe to system events (subscribe service).<\/li>\n<li>Publish data (data service).<\/li>\n<\/ul>\n<\/div>[vc_custom_heading text=&#8221;Identifier:&#8221; font_container=&#8221;tag:h4|text_align:left|color:%23383838&#8243; google_fonts=&#8221;font_family:Roboto%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:500%20bold%20regular%3A500%3Anormal&#8221;][vc_column_text]Each resource has a URL that uniquely identifies it within the system based on the format described next.[\/vc_column_text][vc_column_text][php][API URL]\/[service][\/php][\/vc_column_text][vc_custom_heading text=&#8221;Data formats&#8221; font_container=&#8221;tag:h4|text_align:left|color:%23383838&#8243; google_fonts=&#8221;font_family:Roboto%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:500%20bold%20regular%3A500%3Anormal&#8221;][vc_column_text]The API currently supports JSON as default data format.[\/vc_column_text][vc_column_text][php]<\/p>\n<p>[API URL]\/service\/[id_provider] ?[PARAMETER]=[VALUE]<\/p>\n<p>[\/php][\/vc_column_text][vc_column_text]Example data in JSON format:[\/vc_column_text][vc_column_text][php]{&#8220;observations&#8221;:[<br \/>\n{&#8220;value&#8221;:&#8221;12.3&#8243;,&#8221;timestamp&#8221;:&#8221;17\/09\/2012T12:34:45&#8243;}<br \/>\n]}<br \/>\n[\/php][\/vc_column_text][vc_column_text]<a id=\"applicationapi\" name=\"applicationapi\"><\/a>[\/vc_column_text][vc_row_inner][vc_column_inner][vc_empty_space height=&#8221;47px&#8221;][vc_separator][vc_empty_space height=&#8221;47px&#8221;][\/vc_column_inner][\/vc_row_inner][vc_custom_heading text=&#8221;APPLICATIONS API&#8221; font_container=&#8221;tag:h3|text_align:left|color:%23383838&#8243; google_fonts=&#8221;font_family:Roboto%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:500%20bold%20regular%3A500%3Anormal&#8221;][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]Find an overview of methods and objects related to deployment sites, sensors and measurements available to developers who want to design external applications in their platform of choice or integrate existing ones.<\/p>\n<p><strong>Full API reference is available on the platform web interface.<\/strong>[\/vc_column_text][vc_column_text]<a id=\"security\" name=\"security\"><\/a>[\/vc_column_text][vc_row_inner][vc_column_inner][vc_empty_space height=&#8221;47px&#8221;][vc_separator][vc_empty_space height=&#8221;47px&#8221;][\/vc_column_inner][\/vc_row_inner][vc_custom_heading text=&#8221;SECURITY&#8221; font_container=&#8221;tag:h4|text_align:left|color:%2381d742&#8243; google_fonts=&#8221;font_family:Roboto%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:500%20bold%20regular%3A500%3Anormal&#8221;][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]The platform will validate any request received by the system based on the AAA architecture (Authentication, Authorization, and Accounting).<\/p>\n<p><strong>Authentication tokens are provided when a partner becomes active on the platform.<\/strong>[\/vc_column_text][vc_column_text]<a id=\"services\" name=\"services\"><\/a>[\/vc_column_text][vc_row_inner][vc_column_inner][vc_empty_space height=&#8221;47px&#8221;][vc_separator][vc_empty_space height=&#8221;47px&#8221;][\/vc_column_inner][\/vc_row_inner][vc_custom_heading text=&#8221;SERVICES&#8221; font_container=&#8221;tag:h4|text_align:left|color:%2381d742&#8243; google_fonts=&#8221;font_family:Roboto%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:500%20bold%20regular%3A500%3Anormal&#8221;][vc_custom_heading text=&#8221;INSTALLATIONS (Deployment Sites)&#8221; font_container=&#8221;tag:h4|text_align:left|color:%23eaba35&#8243; google_fonts=&#8221;font_family:Roboto%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:500%20bold%20regular%3A500%3Anormal&#8221;][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]Through this service, you can retrieve the installations list and related details associated with your user. <strong>All requests for this service must have the following format:<\/strong>[\/vc_column_text][vc_column_text][php][API URL]\/installations?[PARAMETER]=[VALUE][\/php][\/vc_column_text][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]<strong>Parameters:<\/strong>[\/vc_column_text][vc_column_text]<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\"><strong>Key<\/strong><\/span><\/td>\n<td width=\"255\"><span style=\"color: #333333;\"><strong>Description<\/strong><\/span><\/td>\n<td width=\"90\"><span style=\"color: #333333;\"><strong>Mandatory<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">id<\/span><\/td>\n<td width=\"255\"><span style=\"color: #333333;\">Used to filter the list by the installation unique identifier<\/span><\/td>\n<td width=\"90\"><span style=\"color: #333333;\">No<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]In addition to the HTTP status code, this action returns the list of installations for which we have read permission. Each list element will have the following structure:[\/vc_column_text][vc_column_text]<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\"><strong>Key<\/strong><\/span><\/td>\n<td width=\"346\"><span style=\"color: #333333;\"><strong>Description<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">id<\/span><\/td>\n<td width=\"346\"><span style=\"color: #333333;\">Unique installation identifier<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">name<\/span><\/td>\n<td width=\"346\"><span style=\"color: #333333;\">Installation name<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">typology<\/span><\/td>\n<td width=\"346\"><span style=\"color: #333333;\">Installation typology<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">address<\/span><\/td>\n<td width=\"346\"><span style=\"color: #333333;\">Address of the installation<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">zip<\/span><\/td>\n<td width=\"346\"><span style=\"color: #333333;\">ZIP code of the installation<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">city<\/span><\/td>\n<td width=\"346\"><span style=\"color: #333333;\">City of the installation<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">State<\/span><\/td>\n<td width=\"346\"><span style=\"color: #333333;\">State of the installation<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">country<\/span><\/td>\n<td width=\"346\"><span style=\"color: #333333;\">Country of the installation<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">latitude<\/span><\/td>\n<td width=\"346\"><span style=\"color: #333333;\">GPS coordinates of the installation, latitude<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">longitude<\/span><\/td>\n<td width=\"346\"><span style=\"color: #333333;\">GPS coordinates of the installation, longitude<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]<strong>Example: <\/strong>To retrieve details of the installation with ID 142, we have to send the following request:[\/vc_column_text][vc_column_text][php][API URL]\/installations?id=142[\/php][\/vc_column_text][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]<strong>In the response we will receive:<\/strong>[\/vc_column_text][vc_column_text][php]<br \/>\n{&#8220;installations&#8221;:[<br \/>\n{<br \/>\n&#8220;id&#8221;:142,<br \/>\n&#8220;name&#8221;:&#8221;Demo installation&#8221;,<br \/>\n&#8220;typology&#8221;:&#8221;Datacenter&#8221;,<br \/>\n&#8220;address&#8221;:&#8221;Passeig de Gr\u00e0cia, 47&#8243;,<br \/>\n&#8220;zip&#8221;:&#8221;08007&#8243;,<br \/>\n&#8220;city&#8221;:&#8221;Barcelona&#8221;,<br \/>\n&#8220;state&#8221;:&#8221;Barcelona&#8221;,<br \/>\n&#8220;country&#8221;:&#8221;Espa\u00f1a&#8221;,<br \/>\n&#8220;latitude&#8221;:41.392408931363,<br \/>\n&#8220;longitude&#8221;:2.1645916698617<br \/>\n}<br \/>\n]}<\/p>\n<p>[\/php][\/vc_column_text][vc_column_text]<a id=\"sensors\" name=\"sensors\"><\/a>[\/vc_column_text][vc_row_inner][vc_column_inner][vc_empty_space height=&#8221;47px&#8221;][vc_separator][vc_empty_space height=&#8221;47px&#8221;][\/vc_column_inner][\/vc_row_inner][vc_custom_heading text=&#8221;SENSORS&#8221; font_container=&#8221;tag:h4|text_align:left|color:%23eaba35&#8243; google_fonts=&#8221;font_family:Roboto%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:500%20bold%20regular%3A500%3Anormal&#8221;][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]Through this service, you can retrieve the sensors list and related details associated with your user. <strong>All requests for this service must have the following format:<\/strong>[\/vc_column_text][vc_column_text][php][API URL]\/sensors?[PARAMETER]=[VALUE][\/php][\/vc_column_text][vc_column_text]<strong>Parameters:<\/strong>[\/vc_column_text][vc_column_text]<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"54\"><strong>Key<\/strong><\/td>\n<td width=\"255\"><strong>Description<\/strong><\/td>\n<td width=\"90\"><strong>Mandatory<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"54\">id<\/td>\n<td width=\"255\">Used to filter the list by the sensor unique identifier<\/td>\n<td width=\"90\">No<\/td>\n<\/tr>\n<tr>\n<td width=\"54\">installationid<\/td>\n<td width=\"255\">Used to filter the list by the installation unique identifier<\/td>\n<td width=\"90\">No<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>[\/vc_column_text][vc_column_text]In addition to the HTTP status code, this action returns the list of installations for which we have read permission. Each list element will have the following structure:[\/vc_column_text][vc_column_text]<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\"><strong>Key<\/strong><\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\"><strong>Description<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">id<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Unique sensor identifier<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">installationId<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Unique installation identifier<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">name<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Name of the sensor<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">measurementUnit<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Measurement unit associated with the sensor<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">granularity<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Time interval (seconds) between two measurements<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">multiplier<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Value which any measurement will be multiplied by<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">offset<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Constant value added to any measurement after the operation above<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>[\/vc_column_text][vc_column_text]<strong>Example: <\/strong>To retrieve list of sensors associated with the installation with ID 142, we have to send the following request::[\/vc_column_text][vc_column_text][php][API URL]\/sensors?installationid=142[\/php][\/vc_column_text][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]<strong>In the response we will receive:<\/strong>[\/vc_column_text][vc_column_text][php]<br \/>\n{&#8220;sensors&#8221;:[<br \/>\n{<br \/>\n&#8220;id&#8221;:1517,<br \/>\n&#8220;installationId&#8221;:142,<br \/>\n&#8220;name&#8221;:&#8221;Datacenter temperature&#8221;,<br \/>\n&#8220;measurementUnit&#8221;:&#8221;\u00b0C&#8221;,<br \/>\n&#8220;granularity&#8221;:900,<br \/>\n&#8220;multiplier&#8221;:1,<br \/>\n&#8220;offset&#8221;:0<br \/>\n},{<br \/>\n&#8220;id&#8221;:1518,<br \/>\n&#8220;installationId&#8221;:142,<br \/>\n&#8220;name&#8221;:&#8221;Datacenter humidity&#8221;,<br \/>\n&#8220;measurementUnit&#8221;:&#8221;%&#8221;,<br \/>\n&#8220;granularity&#8221;:900,<br \/>\n&#8220;multiplier&#8221;:1,<br \/>\n&#8220;offset&#8221;:0<br \/>\n}<br \/>\n]}<\/p>\n<p>[\/php][\/vc_column_text][vc_column_text]<a id=\"measurement\" name=\"measurement\"><\/a>[\/vc_column_text][vc_row_inner][vc_column_inner][vc_empty_space height=&#8221;47px&#8221;][vc_separator][vc_empty_space height=&#8221;47px&#8221;][\/vc_column_inner][\/vc_row_inner][vc_custom_heading text=&#8221;MEASUREMENT&#8221; font_container=&#8221;tag:h4|text_align:left|color:%23eaba35&#8243; google_fonts=&#8221;font_family:Roboto%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:500%20bold%20regular%3A500%3Anormal&#8221;][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]Through this service, you can retrieve the measurements list received through the platform.<strong> All requests for this service must have the following format:<\/strong>[\/vc_column_text][vc_column_text][php][API URL]\/measurements?[PARAMETER]=[VALUE][\/php][\/vc_column_text][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]<strong>Parameters<\/strong>[\/vc_column_text][vc_column_text]<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\"><strong>Key<\/strong><\/span><\/td>\n<td width=\"255\"><span style=\"color: #333333;\"><strong>Description<\/strong><\/span><\/td>\n<td width=\"90\"><span style=\"color: #333333;\"><strong>Mandatory<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">sensorid<\/span><\/td>\n<td width=\"255\"><span style=\"color: #333333;\">Used to select the sensor<\/span><\/td>\n<td width=\"90\"><span style=\"color: #333333;\"><strong>Yes<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">begin<\/span><\/td>\n<td width=\"255\"><span style=\"color: #333333;\">Begin of the time interval, EPOCH format<\/span><\/td>\n<td width=\"90\"><span style=\"color: #333333;\"><strong>Yes<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">end<\/span><\/td>\n<td width=\"255\"><span style=\"color: #333333;\">End of the time interval, EPOCH format<\/span><\/td>\n<td width=\"90\"><span style=\"color: #333333;\"><strong>Yes<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">sampling<\/span><\/td>\n<td width=\"255\"><span style=\"color: #333333;\">Output data format (view table below)<\/span><\/td>\n<td width=\"90\"><span style=\"color: #333333;\">No<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"54\"><span style=\"color: #333333;\">timeoffset<\/span><\/td>\n<td width=\"255\"><span style=\"color: #333333;\">Time offset (seconds) applied to any timestamp and sampling interval<\/span><\/td>\n<td width=\"90\"><span style=\"color: #333333;\">No<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]<strong>Available output data formats<\/strong>[\/vc_column_text][vc_column_text]<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\"><strong>Value<\/strong><\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\"><strong>Description<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">0 (Default)<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Individual measurements (raw values)<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">10<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Hourly sampling, average value<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">11<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Hourly sampling, minimum value<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">12<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Hourly sampling, maximum value<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">13<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Hourly sampling, minimum and maximum value<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">20<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Daily sampling, average value<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">21<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Daily sampling, minimum value<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">22<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Daily sampling, maximum value<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">23<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Daily sampling, minimum and maximum value<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">30<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Monthly sampling, average value<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">31<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Monthly sampling, minimum value<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">32<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Monthly sampling, maximum value<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">33<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Monthly sampling, minimum and maximum value<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">40<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Yearly sampling, average value<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">41<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Yearly sampling, minimum value<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">42<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Yearly sampling, maximum value<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">43<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Yearly sampling, minimum and maximum value<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]In addition to the HTTP status code, this action returns a list of measurement. This is the output structure if the selected output data format is 0 (individual measurements):[\/vc_column_text][vc_column_text]<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\"><strong>Key<\/strong><\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\"><strong>Description<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">timestamp<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Timestamp of the measurement<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"93\"><span style=\"color: #333333;\">value<\/span><\/td>\n<td width=\"308\"><span style=\"color: #333333;\">Value of the measurement<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>[\/vc_column_text][vc_column_text]In the case the specified output data format is 10, 11, 12, 20, 21, 22, 30, 31 or 32 the output structure will be the same, but with a slightly different meaning:[\/vc_column_text][vc_column_text]<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"93\"><strong>Key<\/strong><\/td>\n<td width=\"308\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"93\">timestamp<\/td>\n<td width=\"308\">Timestamp of the begin of the sampling interval<\/td>\n<\/tr>\n<tr>\n<td width=\"93\">value<\/td>\n<td width=\"308\">Average, lowest (minimum) or highest (maximum) value received in the sampling interval<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>[\/vc_column_text][vc_column_text]In the case the specified output data format is 13, 23, 33 or 43, each list element will have this alternative structure:[\/vc_column_text][vc_column_text]<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"93\"><strong>Key<\/strong><\/td>\n<td width=\"308\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"93\">timestamp<\/td>\n<td width=\"308\">Timestamp of the begin of the sampling interval<\/td>\n<\/tr>\n<tr>\n<td width=\"93\">low<\/td>\n<td width=\"308\">Lowest (minimum) value received in the sampling interval<\/td>\n<\/tr>\n<tr>\n<td width=\"93\">high<\/td>\n<td width=\"308\">Highest (maximum) value received in the sampling interval<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]If the time offset hasn&#8217;t been specified, all the timestamps and sampling intervals will refer to the GMT time zone.<\/p>\n<p><strong>Note<\/strong>: Measurements with timestamp at the beginning of the time interval will be included. Measurement with timestamp at the end of the time interval will be excluded.<\/p>\n<p><strong>Example 1<\/strong>: We need to retrieve the raw list of measurements received from the sensor with ID 1517, from 10th October 2015 08:00:00 CEST until 10th October 2015 10:00:00 CEST, and we want our output to be in the GMT timezone. So, we have to send the following request:<\/p>\n<p>[\/vc_column_text][vc_column_text][php][API URL]\/measurements?sensorid=1517&amp;begin=1444456800&amp;end=1444464000[\/php][\/vc_column_text][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]<strong>In the response we will receive:<\/strong>[\/vc_column_text][vc_column_text][php]<br \/>\n{&#8220;measurements&#8221;:[<br \/>\n{<br \/>\n&#8220;timestamp&#8221;:&#8221;2015-10-10 06:00:01&#8243;,<br \/>\n&#8220;value&#8221;:27.5<br \/>\n},{<br \/>\n&#8220;timestamp&#8221;:&#8221;2015-10-10 06:15:02&#8243;,<br \/>\n&#8220;value&#8221;:27.9<br \/>\n},{<br \/>\n&#8220;timestamp&#8221;:&#8221;2015-10-10 06:30:01&#8243;,<br \/>\n&#8220;value&#8221;:28.1<br \/>\n},{<br \/>\n&#8220;timestamp&#8221;:&#8221;2015-10-10 06:45:02&#8243;,<br \/>\n&#8220;value&#8221;:27.7<br \/>\n},{<br \/>\n&#8220;timestamp&#8221;:&#8221;2015-10-10 07:00:02&#8243;,<br \/>\n&#8220;value&#8221;:27.4<br \/>\n},{<br \/>\n&#8220;timestamp&#8221;:&#8221;2015-10-10 07:15:00&#8243;,<br \/>\n&#8220;value&#8221;:26.9<br \/>\n},{<br \/>\n&#8220;timestamp&#8221;:&#8221;2015-10-10 07:30:01&#8243;,<br \/>\n&#8220;value&#8221;:26.8<br \/>\n},{<br \/>\n&#8220;timestamp&#8221;:&#8221;2015-10-10 07:45:01&#8243;,<br \/>\n&#8220;value&#8221;:27.3<br \/>\n}<br \/>\n]}<br \/>\n[\/php][\/vc_column_text][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]<strong>Example 2: <\/strong>We need to retrieve the hourly average list of measurements received from the sensor with ID 1517, from 10th October 2015 08:00:00 CEST until 10th October 2015 12:00:00 CEST, and we want our output to be in our local CEST timezone. So, we have to send the following request:<strong><br \/>\n<\/strong>[\/vc_column_text][vc_column_text][php][API URL]\/measurements?sensorid=1517&amp;begin=1444456800&amp;end=1444464000[\/php][\/vc_column_text][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]<strong>In the response we will receive:<\/strong>[\/vc_column_text][vc_column_text][php]<br \/>\n{&#8220;measurements&#8221;:[<br \/>\n{<br \/>\n&#8220;timestamp&#8221;:&#8221;2015-10-10 08:00:00&#8243;,<br \/>\n&#8220;value&#8221;:27.6<br \/>\n},{<br \/>\n&#8220;timestamp&#8221;:&#8221;2015-10-10 09:00:00&#8243;,<br \/>\n&#8220;value&#8221;:27.7<br \/>\n},{<br \/>\n&#8220;timestamp&#8221;:&#8221;2015-10-10 10:00:00&#8243;,<br \/>\n&#8220;value&#8221;:28.0<br \/>\n},{<br \/>\n&#8220;timestamp&#8221;:&#8221;2015-10-10 11:00:00&#8243;,<br \/>\n&#8220;value&#8221;:27.9<br \/>\n}<br \/>\n]}<br \/>\n[\/php][\/vc_column_text][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]<strong>Example 3: <\/strong>we need to retrieve the daily minimum+maximum list of measurements received from the sensor with ID 1517, from 08th October 2015 00:00:00 CEST until 10th October 2015 00:00:00 CEST, and we want our output to be in our local CEST timezone. So, we have to send the following request:<\/p>\n<p>[\/vc_column_text][vc_column_text][php][API URL]\/measurements?sensorid=1517&amp;begin=1444255200&amp;end=1444428000&amp;sampling=23&amp;timeoffset=7200[\/php][\/vc_column_text][vc_empty_space height=&#8221;20px&#8221;][vc_column_text]<strong>In the response we will receive:<\/strong>[\/vc_column_text][vc_column_text][php]<br \/>\n{&#8220;measurements&#8221;:[<br \/>\n{<br \/>\n&#8220;timestamp&#8221;:&#8221;2015-10-08 00:00:00&#8243;,<br \/>\n&#8220;low&#8221;:25.4<br \/>\n&#8220;high&#8221;:29.6<br \/>\n},{<br \/>\n&#8220;timestamp&#8221;:&#8221;2015-10-09 00:00:00&#8243;,<br \/>\n&#8220;low&#8221;:25.8<br \/>\n&#8220;high&#8221;:30.3<br \/>\n}<br \/>\n]}<br \/>\n[\/php][\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[vc_row type=&#8221;vc_default&#8221; bg_type=&#8221;image&#8221; parallax_style=&#8221;vcpb-vz-jquery&#8221; bg_image_new=&#8221;id^435|url^http:\/\/smart.nettingbt.com\/\/wp-content\/uploads\/2016\/10\/heading-dark-blue.jpg|caption^null|alt^null|title^heading-dark-blue|description^null&#8221; parallax_sense=&#8221;25&#8243; bg_override=&#8221;ex-full&#8221; css=&#8221;.vc_custom_1476900488402{margin-top: -155px !important;}&#8221;][vc_column][vc_row_inner][vc_column_inner][vc_empty_space height=&#8221;70px&#8221;][\/vc_column_inner][\/vc_row_inner][\/vc_column][\/vc_row][vc_row][vc_column width=&#8221;1\/4&#8243;][\/vc_column][vc_column width=&#8221;3\/4&#8243; css=&#8221;.vc_custom_1476983822756{margin-left: 40px !important;border-left-width: 1px !important;padding-left: 40px !important;border-left-color: #c4c4c4 !important;border-left-style: solid !important;}&#8221;][vc_custom_heading text=&#8221;API REFERENCE&#8221; font_container=&#8221;tag:h2|text_align:left|color:%23383838&#8243; google_fonts=&#8221;font_family:Roboto%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:500%20bold%20regular%3A500%3Anormal&#8221;][vc_column_text]Find detailed information about the SDS APIs including authentication, methods, parameters, response formats and errors. Full user guides and manuals are available for active partners.[\/vc_column_text][vc_column_text][\/vc_column_text][vc_row_inner][vc_column_inner][vc_empty_space height=&#8221;47px&#8221;][vc_separator][vc_empty_space height=&#8221;47px&#8221;][\/vc_column_inner][\/vc_row_inner][vc_custom_heading text=&#8221;DEVICES&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.smartdatasystem.es\/it\/wp-json\/wp\/v2\/pages\/378"}],"collection":[{"href":"https:\/\/www.smartdatasystem.es\/it\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.smartdatasystem.es\/it\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.smartdatasystem.es\/it\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.smartdatasystem.es\/it\/wp-json\/wp\/v2\/comments?post=378"}],"version-history":[{"count":49,"href":"https:\/\/www.smartdatasystem.es\/it\/wp-json\/wp\/v2\/pages\/378\/revisions"}],"predecessor-version":[{"id":449,"href":"https:\/\/www.smartdatasystem.es\/it\/wp-json\/wp\/v2\/pages\/378\/revisions\/449"}],"wp:attachment":[{"href":"https:\/\/www.smartdatasystem.es\/it\/wp-json\/wp\/v2\/media?parent=378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}