{"info":{"_postman_id":"dceacf1d-ab06-4cdb-a217-9956d295e6ab","name":"FIWARE Querying Time Series Data (QuantumLeap)","description":"<html><head></head><body><p>This tutorial is an introduction to\n<a href=\"https://smartsdk.github.io/ngsi-timeseries-api/\">FIWARE QuantumLeap</a> - a\ngeneric enabler which is used to persist context data into a <strong>CrateDB</strong>\ndatabase. The tutorial activates the IoT sensors connected in the\n<a href=\"https://github.com/Fiware/tutorials.IoT-Agent\">previous tutorial</a> and persists\nmeasurements from those sensors into the database. To retrieve time-based\naggregations of such data, users can either use <strong>QuantumLeap</strong> query API or\nconnect directly to the <strong>CrateDB</strong> HTTP endpoint. Results are visualised on a\ngraph or via the <strong>Grafana</strong> time series analytics tool.</p>\n<p>The tutorial uses <a href=\"https://ec.haxx.se/\">cUrl</a> commands throughout, but is also\navailable as\n<a href=\"https://fiware.github.io/tutorials.Time-Series-Data/\">Postman documentation</a></p>\n<p>The <code>docker-compose</code> files for this tutorial can be found on GitHub: </p>\n<p><img src=\"https://fiware.github.io/tutorials.Time-Series-Data/icon/GitHub-Mark-32px.png\" alt=\"GitHub\"> <a href=\"https://github.com/Fiware/tutorials.Time-Series-Data\">FIWARE 304: Time-Series Data</a></p>\n<h1 id=\"persisting-and-querying-time-series-data-cratedb\">Persisting and Querying Time Series Data (CrateDB)</h1>\n<blockquote>\n<p>\"Forever is composed of nows.\"</p>\n<p>— Emily Dickinson</p>\n</blockquote>\n<p><a href=\"https://github.com/Fiware/tutorials.Historic-Context\">Previous tutorials</a> have\nshown how to persist historic context data into a range of databases such as\n<strong>MySQL</strong> and <strong>PostgreSQL</strong>. Furthermore, the\n<a href=\"https://github.com/Fiware/tutorials.Short-Term-History\">Short Term Historic</a>\ntutorial has introduced the\n<a href=\"https://fiware-sth-comet.readthedocs.io/\">STH-Comet</a> generic enabler for\npersisting and querying historic context data using a <strong>MongoDB</strong> database.</p>\n<p>FIWARE <a href=\"https://smartsdk.github.io/ngsi-timeseries-api/\">QuantumLeap</a> is an\nalternative generic enabler created specifically for data persistence into the\n<strong>CrateDB</strong> time-series database, and therefore offers an alternative to the\n<a href=\"https://fiware-sth-comet.readthedocs.io/\">STH-Comet</a>.</p>\n<p><a href=\"https://crate.io/\">CrateDB</a> is a distributed SQL DBMS designed for use with the\ninternet of Things. It is capable of ingesting a large number of data points per\nsecond and can be queried in real-time. The database is designed for the\nexecution of complex queries such as geospatial and time series data. Retrieval\nof this historic context data allows for the creation of graphs and dashboards\ndisplaying trends over time.</p>\n<p>A summary of the differences can be seen below:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>QuantumLeap</th>\n<th>STH-Comet</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Offers an NGSI v2 interface for notifications</td>\n<td>Offers an NGSI v1 interface for notifications</td>\n</tr>\n<tr>\n<td>Persists Data to a CrateDB database</td>\n<td>Persists Data to MongoDB database</td>\n</tr>\n<tr>\n<td>Offers its own HTTP endpoint for queries, but you can also query CrateDB</td>\n<td>Offers its own HTTP endpoint for queries - MongoDB database cannot be accessed directly</td>\n</tr>\n<tr>\n<td>QuantumLeap supports complex data queries (thanks to CrateDB)</td>\n<td>STH-Comet offers a limited set of queries</td>\n</tr>\n<tr>\n<td>CrateDB is a distributed and scalable SQL DBMS built atop NoSQL storage</td>\n<td>MongoDB is a document based NoSQL database</td>\n</tr>\n<tr>\n<td>QuantumLeap's API is docummented in OpenAPI <a href=\"https://app.swaggerhub.com/apis/smartsdk/ngsi-tsdb\">here</a></td>\n<td>STH-Comet's API is explained in its docs <a href=\"https://fiware-sth-comet.readthedocs.io/en/latest\">here</a></td>\n</tr>\n</tbody>\n</table>\n</div><p>Further details about the differences between the underlying database engines\ncan be found <a href=\"https://db-engines.com/en/system/CrateDB%3BMongoDB\">here</a>.</p>\n<h2 id=\"analyzing-time-series-data\">Analyzing time series data</h2>\n<p>The appropriate use of time series data analysis will depend on your use case\nand the reliability of the data measurements you receive. Time series data\nanalysis can be used to answer questions such as:</p>\n<ul>\n<li>What was the maximum measurement of a device within a given time period?</li>\n<li>What was the average measurement of a device within a given time period?</li>\n<li>What was the sum of the measurements sent by a device within a given time\nperiod?</li>\n</ul>\n<p>It can also be used to reduce the significance of each individual data point to\nexclude outliers by smoothing.</p>\n<h4 id=\"grafana\">Grafana</h4>\n<p><a href=\"https://grafana.com/\">Grafana</a> is an open source software for time series\nanalytics tool which will be used during this tutorial. It integrates with a\nvariety of time-series databases including <strong>CrateDB</strong>. It is available licensed\nunder the Apache License 2.0. More information can be found at\n<a href=\"https://grafana.com/\">https://grafana.com/</a>.</p>\n<h4 id=\"device-monitor\">Device Monitor</h4>\n<p>For the purpose of this tutorial, a series of dummy IoT devices have been\ncreated, which will be attached to the context broker. Details of the\narchitecture and protocol used can be found in the\n<a href=\"https://github.com/Fiware/tutorials.IoT-Sensors\">IoT Sensors tutorial</a>. The\nstate of each device can be seen on the UltraLight device monitor web page found\nat: <code>http://localhost:3000/device/monitor</code></p>\n<p><img src=\"https://fiware.github.io/tutorials.Time-Series-Data/img/device-monitor.png\" alt=\"FIWARE Monitor\"></p>\n<h4 id=\"device-history\">Device History</h4>\n<p>Once <strong>QuantumLeap</strong> has started aggregating data, the historical state of each\ndevice can be seen on the device history web page found at:\n<code>http://localhost:3000/device/history/urn:ngsi-ld:Store:001</code></p>\n<p><img src=\"https://fiware.github.io/tutorials.Time-Series-Data/img/history-graphs.png\" alt=\"\"></p>\n<h1 id=\"architecture\">Architecture</h1>\n<p>This application builds on the components and dummy IoT devices created in\n<a href=\"https://github.com/Fiware/tutorials.IoT-Agent/\">previous tutorials</a>. It will\nuse three FIWARE components: the\n<a href=\"https://fiware-orion.readthedocs.io/en/latest/\">Orion Context Broker</a>, the\n<a href=\"https://fiware-iotagent-ul.readthedocs.io/en/latest/\">IoT Agent for Ultralight 2.0</a>,\nand <a href=\"https://smartsdk.github.io/ngsi-timeseries-api/\">QuantumLeap</a> .</p>\n<p>Therefore the overall architecture will consist of the following elements:</p>\n<ul>\n<li><p>The <strong>FIWARE Generic Enablers</strong>:</p>\n<ul>\n<li>The FIWARE\n<a href=\"https://fiware-orion.readthedocs.io/en/latest/\">Orion Context Broker</a>\nwhich will receive requests using\n<a href=\"https://fiware.github.io/specifications/OpenAPI/ngsiv2\">NGSI</a></li>\n<li>The FIWARE\n<a href=\"https://fiware-iotagent-ul.readthedocs.io/en/latest/\">IoT Agent for Ultralight 2.0</a>\nwhich will receive northbound measurements from the dummy IoT devices in\n<a href=\"https://fiware-iotagent-ul.readthedocs.io/en/latest/usermanual/index.html#user-programmers-manual\">Ultralight 2.0</a>\nformat and convert them to\n<a href=\"https://fiware.github.io/specifications/OpenAPI/ngsiv2\">NGSI</a> requests\nfor the context broker to alter the state of the context entities</li>\n<li>FIWARE <a href=\"https://smartsdk.github.io/ngsi-timeseries-api/\">QuantumLeap</a>\nsubscribed to context changes and persisting them into a <strong>CrateDB</strong>\ndatabase</li>\n</ul>\n</li>\n<li><p>A <a href=\"https://www.mongodb.com/\">MongoDB</a> database:</p>\n<ul>\n<li>Used by the <strong>Orion Context Broker</strong> to hold context data information\nsuch as data entities, subscriptions and registrations</li>\n<li>Used by the <strong>IoT Agent</strong> to hold device information such as device URLs\nand Keys</li>\n</ul>\n</li>\n<li><p>A <a href=\"https://crate.io/\">CrateDB</a> database:</p>\n<ul>\n<li>Used as a data sink to hold time-based historical context data</li>\n<li>offers an HTTP endpoint to interpret time-based data queries</li>\n</ul>\n</li>\n<li><p>A <strong>Context Provider</strong>: - A webserver acting as set of\n<a href=\"https://github.com/Fiware/tutorials.IoT-Sensors\">dummy IoT devices</a> using\nthe\n<a href=\"https://fiware-iotagent-ul.readthedocs.io/en/latest/usermanual/index.html#user-programmers-manual\">Ultralight 2.0</a>\nprotocol running over HTTP. - Note the <strong>Stock Management Frontend</strong> and\n<strong>Context Provider NGSI</strong> proxy are not used in this tutorial.</p>\n</li>\n</ul>\n<p>Since all interactions between the elements are initiated by HTTP requests, the\nentities can be containerized and run from exposed ports.</p>\n<p>The overall architecture can be seen below:</p>\n<p><img src=\"https://fiware.github.io/tutorials.Time-Series-Data/img/architecture.png\" alt=\"\"></p>\n<h1 id=\"prerequisites\">Prerequisites</h1>\n<h2 id=\"docker-and-docker-compose\">Docker and Docker Compose</h2>\n<p>To keep things simple all components will be run using\n<a href=\"https://www.docker.com\">Docker</a>. <strong>Docker</strong> is a container technology which\nallows to different components isolated into their respective environments.</p>\n<ul>\n<li>To install Docker on Windows follow the instructions\n<a href=\"https://docs.docker.com/docker-for-windows/\">here</a></li>\n<li>To install Docker on Mac follow the instructions\n<a href=\"https://docs.docker.com/docker-for-mac/\">here</a></li>\n<li>To install Docker on Linux follow the instructions\n<a href=\"https://docs.docker.com/install/\">here</a></li>\n</ul>\n<p><strong>Docker Compose</strong> is a tool for defining and running multi-container Docker\napplications. A series of\n<a href=\"https://raw.githubusercontent.com/Fiware/tutorials.Historic-Context/master/cygnus\">YAML files</a>\nare used to configure the required services for the application. This means all\ncontainer services can be brought up in a single command. Docker Compose is\ninstalled by default as part of Docker for Windows and Docker for Mac, however\nLinux users will need to follow the instructions found\n<a href=\"https://docs.docker.com/compose/install/\">here</a></p>\n<p>You can check your current <strong>Docker</strong> and <strong>Docker Compose</strong> versions using the\nfollowing commands:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-console\">docker-compose -v\ndocker version\n</code></pre>\n<p>Please ensure that you are using Docker version 18.03 or higher and Docker\nCompose 1.21 or higher and upgrade if necessary.</p>\n<h2 id=\"cygwin-for-windows\">Cygwin for Windows</h2>\n<p>We will start up our services using a simple Bash script. Windows users should\ndownload <a href=\"http://www.cygwin.com/\">cygwin</a> to provide a command-line\nfunctionality similar to a Linux distribution on Windows.</p>\n<h1 id=\"start-up\">Start Up</h1>\n<p>Before you start, you should ensure that you have obtained or built the\nnecessary Docker images locally. Please clone the repository and create the\nnecessary images by running the commands as shown:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-console\">git clone git@github.com:Fiware/tutorials.Time-Series-Data.git\ncd tutorials.Time-Series-Data\n\n./services create\n</code></pre>\n<p>Thereafter, all services can be initialized from the command-line by running the\n<a href=\"https://github.com/Fiware/tutorials.Time-Series-Data/blob/master/services\">services</a>\nBash script provided within the repository:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-console\">./services start\n</code></pre>\n<blockquote>\n<p>:information_source: <strong>Note:</strong> If you want to clean up and start over again\nyou can do so with the following command:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-console\">./services stop\n</code></pre>\n</blockquote>\n<h1 id=\"connecting-fiware-to-a-cratedb-database-via-quantumleap\">Connecting FIWARE to a CrateDB Database via QuantumLeap</h1>\n<p>In the configuration, <strong>QuantumLeap</strong> listens to NGSI v2 notifications on port\n<code>8868</code> and persists historic context data to the <strong>CrateDB</strong>. <strong>CrateDB</strong> is\naccessible using port <code>4200</code> and can either be queried directly or attached to\nthe Grafana analytics tool. The rest of the system providing the context data\nhas been described in previous tutorials</p>\n<h2 id=\"cratedb-database-server-configuration\">CrateDB Database Server Configuration</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-yaml\">cratedb:\n    image: crate:2.3\n    hostname: cratedb\n    ports:\n        - \"4200:4200\"\n        - \"4300:4300\"\n    command:\n        -Ccluster.name=democluster -Chttp.cors.enabled=true\n        -Chttp.cors.allow-origin=\"*\"\n</code></pre>\n<h2 id=\"quantumleap-configuration\">QuantumLeap Configuration</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-yaml\">quantumleap:\n    image: smartsdk/quantumleap\n    hostname: quantumleap\n    ports:\n        - \"8668:8668\"\n    depends_on:\n        - cratedb\n    environment:\n        - CRATE_HOST=cratedb\n</code></pre>\n<h2 id=\"grafana-configuration\">Grafana Configuration</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-yaml\">grafana:\n    image: grafana/grafana\n    depends_on:\n        - cratedb\n    ports:\n        - \"3003:3000\"\n    environment:\n        - GF_INSTALL_PLUGINS=crate-datasource,grafana-clock-panel,grafana-worldmap-panel\n</code></pre>\n<p>The <code>quantumleap</code> container is listening on one port:</p>\n<ul>\n<li>The Operations for port for QuantumLeap - <code>8668</code> is where the service will\nbe listening for notifications from the Orion context broker and where users\ncan query data from.</li>\n</ul>\n<p>The <code>CRATE_HOST</code> environment variable defines the location where the data will\nbe persisted.</p>\n<p>The <code>cratedb</code> container is listening on two ports:</p>\n<ul>\n<li>The Admin UI is available on port <code>4200</code></li>\n<li>The transport protocol is available on <code>port 4300</code></li>\n</ul>\n<p>The <code>grafana</code> container has connected up port <code>3000</code> internally with port <code>3003</code>\nexternally. This is because the Grafana UI is usually available on port <code>3000</code>,\nbut this port has already been taken by the dummy devices UI so it has been\nshifted to another port. The Grafana Environment variables are described within\ntheir own <a href=\"http://docs.grafana.org/installation/configuration/\">documentation</a>.\nThe configuration ensures we will be able to connect to the <strong>CrateDB</strong> database\nlater on in the tutorial</p>\n<h3 id=\"generating-context-data\">Generating Context Data</h3>\n<p>For the purpose of this tutorial, we must be monitoring a system where the\ncontext is periodically being updated. The dummy IoT Sensors can be used to do\nthis. Open the device monitor page at <code>http://localhost:3000/device/monitor</code> and\nunlock a <strong>Smart Door</strong> and switch on a <strong>Smart Lamp</strong>. This can be done by\nselecting an appropriate command from the drop down list and pressing the <code>send</code>\nbutton. The stream of measurements coming from the devices can then be seen on\nthe same page:</p>\n<p><img src=\"https://fiware.github.io/tutorials.IoT-Sensors/img/door-open.gif\" alt=\"\"></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Persisting and Querying Time Series Data (CrateDB)","slug":"persisting-and-querying-time-series-data-cratedb"},{"content":"Architecture","slug":"architecture"},{"content":"Prerequisites","slug":"prerequisites"},{"content":"Start Up","slug":"start-up"},{"content":"Connecting FIWARE to a CrateDB Database via QuantumLeap","slug":"connecting-fiware-to-a-cratedb-database-via-quantumleap"}],"owner":"513743","collectionId":"dceacf1d-ab06-4cdb-a217-9956d295e6ab","publishedId":"RWEnkvDc","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"233C68"},"publishDate":"2020-01-02T11:08:15.000Z"},"item":[{"name":"Setting up Subscriptions","item":[{"name":"Orion - QuantumLeap - Aggregate Motion Sensor Count Events","id":"8d18556c-e676-4d0e-8eb7-6fa091cbcaba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"fiware-service","value":"openiot"},{"key":"fiware-servicepath","value":"/"}],"body":{"mode":"raw","raw":"{\n  \"description\": \"Notify QuantumLeap of all Motion Sensor count changes\",\n  \"subject\": {\n    \"entities\": [\n      {\n        \"idPattern\": \"Motion.*\"\n      }\n    ],\n    \"condition\": {\n      \"attrs\": [\n        \"count\"\n      ]\n    }\n  },\n  \"notification\": {\n    \"http\": {\n      \"url\": \"http://quantumleap:8668/v2/notify\"\n    },\n    \"attrs\": [\n      \"count\"\n    ],\n    \"metadata\": [\"dateCreated\", \"dateModified\"]\n  }\n}"},"url":"http://localhost:1026/v2/subscriptions/","description":"<p>The rate of change of the <strong>Motion Sensor</strong> is driven by events in the real-world. We need to receive\nevery event to be able to aggregate the results.</p>\n<p>This is done by making a POST request to the <code>/v2/subscription</code> endpoint of the Orion Context Broker.</p>\n<ul>\n<li>The <code>fiware-service</code> and <code>fiware-servicepath</code> headers are used to filter the subscription to only listen to measurements from the attached IoT Sensors</li>\n<li>The <code>idPattern</code> in the request body ensures that <strong>Quantum Leap</strong> will be informed of all <strong>Motion Sensor</strong> data changes.</li>\n<li>The notification <code>url</code> must match the exposed port.</li>\n</ul>\n<p>The <code>metadata</code> attribute ensures that the <code>time_index</code> column within the Crate-DB database will match the data found within the <strong>Orion Context Broker</strong> rather than using the creation time of the record within the Crate-DB itself.</p>\n","urlObject":{"protocol":"http","path":["v2","subscriptions",""],"host":["localhost:1026"],"query":[],"variable":[]}},"response":[],"_postman_id":"8d18556c-e676-4d0e-8eb7-6fa091cbcaba"},{"name":"Orion - QuantumLeap - Sample Lamp Luminosity","id":"1a714f7f-b89b-4828-8a49-f27ae90e6f72","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"fiware-service","value":"openiot"},{"key":"fiware-servicepath","value":"/"}],"body":{"mode":"raw","raw":"{\n  \"description\": \"Notify Quantum Leap to sample Lamp changes every five seconds\",\n  \"subject\": {\n    \"entities\": [\n      {\n        \"idPattern\": \"Lamp.*\"\n      }\n    ],\n    \"condition\": {\n      \"attrs\": [\n        \"luminosity\",\n        \"location\"\n      ]\n    }\n  },\n  \"notification\": {\n    \"http\": {\n      \"url\": \"http://quantumleap:8668/v2/notify\"\n    },\n    \"attrs\": [\n      \"luminosity\", \"location\"\n    ],\n    \"metadata\": [\"dateCreated\", \"dateModified\"]\n  },\n  \"throttling\": 5\n}"},"url":"http://localhost:1026/v2/subscriptions/","description":"<p>The luminosity of the <strong>Smart Lamp</strong> is constantly changing, we only need to <strong>sample</strong> the values to be\nable to work out relevant statistics such as minimum and maximum values and rates of change.</p>\n<p>This is done by making a POST request to the <code>/v2/subscription</code> endpoint of the Orion Context Broker\nand including the <code>throttling</code> attribute in the request body.</p>\n<ul>\n<li>The <code>fiware-service</code> and <code>fiware-servicepath</code> headers are used to filter the subscription to only listen to measurements from the attached IoT Sensors</li>\n<li>The <code>idPattern</code> in the request body ensures that <strong>Quantum Leap</strong> will be informed of all <strong>Smart Lamp</strong> data changes only</li>\n<li>The notification <code>url</code> must match the configured <code>STH_PORT</code></li>\n<li>The <code>throttling</code> value defines the rate that changes are sampled.</li>\n<li></li>\n</ul>\n<p>The <code>metadata</code> attribute ensures that the <code>time_index</code> column within the Crate-DB database will match the data found within the <strong>Orion Context Broker</strong> rather than using the creation time of the record within the Crate-DB itself.</p>\n","urlObject":{"protocol":"http","path":["v2","subscriptions",""],"host":["localhost:1026"],"query":[],"variable":[]}},"response":[],"_postman_id":"1a714f7f-b89b-4828-8a49-f27ae90e6f72"},{"name":"Orion - Check Subscription is working","id":"42fe8e2e-11c0-4918-b60e-23d9b8b9bfd8","request":{"method":"GET","header":[{"key":"fiware-service","value":"openiot"},{"key":"fiware-servicepath","value":"/"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:1026/v2/subscriptions/","description":"<p>If the subscriptions have been created, you can check to see if they are firing by making a GET \nrequest to the <code>/v2/subscriptions</code> endpoint.</p>\n<p>Within the <code>notification</code> section of the response, you can see several additional <code>attributes</code> which describe the health of the subscription</p>\n<p>If the criteria of the subscription have been met, <code>timesSent</code> should be greater than <code>0</code>.\nA zero value would indicate that the <code>subject</code> of the subscription is incorrect or the subscription \nhas created with the wrong <code>fiware-service-path</code> or <code>fiware-service</code> header</p>\n<p>The <code>lastNotification</code> should be a recent timestamp - if this is not the case, then the devices\nare not regularly sending data. Remember to unlock the <strong>Smart Door</strong> and switch on the <strong>Smart Lamp</strong></p>\n<p>The <code>lastSuccess</code> should match the <code>lastNotification</code> date - if this is not the case \nthen <strong>Quantum Leap</strong> is not receiving the subscription properly. Check that the host name\nand port are correct. </p>\n<p>Finally, check that the <code>status</code> of the subscription is <code>active</code> - an expired subscription\nwill not fire.</p>\n","urlObject":{"protocol":"http","path":["v2","subscriptions",""],"host":["localhost:1026"],"query":[],"variable":[]}},"response":[],"_postman_id":"42fe8e2e-11c0-4918-b60e-23d9b8b9bfd8"}],"id":"aefaee72-1ee9-4cb0-ad3c-483135f36940","description":"<p>Once a dynamic context system is up and running, we need to inform <strong>Quantum\nLeap</strong> directly of changes in context. As expected this is done using the\nsubscription mechanism of the <strong>Orion Context Broker</strong>. The <code>attrsFormat=legacy</code>\nattribute is not required since <strong>QuantumLeap</strong> accepts NGSI v2 notifications\ndirectly.</p>\n<p>Subscriptions will be covered in the next subsections. More details about\nsubscriptions can be found in previous tutorials or in the\n<a href=\"https://quantumleap.readthedocs.io/en/latest/user/#orion-subscription\">subscriptions section</a>\nof QuantumLeap docs.</p>\n","event":[{"listen":"prerequest","script":{"id":"0ea31757-bc61-4572-84e0-9e15b337dcae","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"11352768-823c-4114-a385-7058433368ce","type":"text/javascript","exec":[""]}}],"_postman_id":"aefaee72-1ee9-4cb0-ad3c-483135f36940"},{"name":"Time Series Data Queries (QuantumLeap API)","item":[{"name":"QuantumLeap - Obtain version information","id":"2969dab8-c270-4ad0-be18-8854ace65077","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8668/v2/version","urlObject":{"protocol":"http","path":["v2","version"],"host":["localhost:8668"],"query":[],"variable":[]}},"response":[],"_postman_id":"2969dab8-c270-4ad0-be18-8854ace65077"},{"name":"List the first N Sampled Values","id":"fc69ccae-c5a1-4e1d-878a-28e844a5ab67","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"},{"key":"Fiware-Service","value":"openiot","type":"text"},{"key":"Fiware-ServicePath","value":"/","type":"text"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:8668/v2/entities/Lamp:001/attrs/luminosity?=3&limit=3","description":"<p>This example shows the first 3 sampled <code>luminosity</code> values from <code>Lamp:001</code>. </p>\n<p>Note the use of <code>Fiware-Service</code> and <code>Fiware-ServicePath</code> headers. These are\nrequired only when data are pushed to orion using such headers (in multitenancy\nscenarios). Failing to align these headers will result in no data being\nreturned.</p>\n","urlObject":{"protocol":"http","path":["v2","entities","Lamp:001","attrs","luminosity"],"host":["localhost:8668"],"query":[{"key":"","value":"3"},{"key":"limit","value":"3"}],"variable":[]}},"response":[],"_postman_id":"fc69ccae-c5a1-4e1d-878a-28e844a5ab67"},{"name":"List N Sampled Values at an Offset","id":"3de8c2d3-239d-4bfe-8949-747ffa72d81f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"},{"key":"Fiware-Service","value":"openiot","type":"text"},{"key":"Fiware-ServicePath","value":"/","type":"text"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:8668/v2/entities/Motion:001/attrs/count?offset=3&limit=3","description":"<p>This example shows the fourth, fifth and sixth sampled count values from Motion:001.</p>\n","urlObject":{"protocol":"http","path":["v2","entities","Motion:001","attrs","count"],"host":["localhost:8668"],"query":[{"key":"offset","value":"3"},{"key":"limit","value":"3"}],"variable":[]}},"response":[],"_postman_id":"3de8c2d3-239d-4bfe-8949-747ffa72d81f"},{"name":"List the latest N Sampled Values","id":"ce821bdb-d6f0-4b83-a6f3-4e0e630bafff","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"},{"key":"Fiware-Service","value":"openiot","type":"text"},{"key":"Fiware-ServicePath","value":"/","type":"text"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:8668/v2/entities/Motion:001/attrs/count?lastN=3","description":"<p>This example shows latest three sampled <code>count</code> values from <code>Motion:001</code>.</p>\n","urlObject":{"protocol":"http","path":["v2","entities","Motion:001","attrs","count"],"host":["localhost:8668"],"query":[{"key":"lastN","value":"3"}],"variable":[]}},"response":[],"_postman_id":"ce821bdb-d6f0-4b83-a6f3-4e0e630bafff"},{"name":"List the Sum of values over a time period","id":"61dabad4-ea3c-44e1-8a3c-ad606f0d6b3d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"},{"key":"Fiware-Service","value":"openiot","type":"text"},{"key":"Fiware-ServicePath","value":"/","type":"text"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:8668/v2/entities/Motion:001/attrs/count?aggrMethod=count&aggrPeriod=minute&lastN=3","description":"<p>This example shows total <code>count</code> values from <code>Motion:001</code> over each minute.</p>\n<p>You need QuantumLeap <strong>version &gt;= 0.4.1</strong>. You can check your version with a\nsimple GET like:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>curl -X GET \\\n  'http://localhost:8668/v2/version' \\\n  -H 'Accept: application/json'\n</code></pre>","urlObject":{"protocol":"http","path":["v2","entities","Motion:001","attrs","count"],"host":["localhost:8668"],"query":[{"key":"aggrMethod","value":"count"},{"key":"aggrPeriod","value":"minute"},{"key":"lastN","value":"3"}],"variable":[]}},"response":[],"_postman_id":"61dabad4-ea3c-44e1-8a3c-ad606f0d6b3d"},{"name":"List the Minimum Values over a Time Period","id":"a87e4c95-f5c8-4a3d-963e-9931198c37ca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"},{"key":"Fiware-Service","value":"openiot","type":"text"},{"key":"Fiware-ServicePath","value":"/","type":"text"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:8668/v2/entities/Lamp:001/attrs/luminosity?aggrMethod=min&aggrPeriod=minute&lastN=3","description":"<p>This example shows minimum <code>luminosity</code> values from <code>Lamp:001</code> over each minute.</p>\n<p>You need QuantumLeap <strong>version &gt;= 0.4.1</strong>. You can check your version with a\nsimple GET like:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-console\">curl -X GET \\\n  'http://localhost:8668/v2/version' \\\n  -H 'Accept: application/json'\n</code></pre>\n","urlObject":{"protocol":"http","path":["v2","entities","Lamp:001","attrs","luminosity"],"host":["localhost:8668"],"query":[{"key":"aggrMethod","value":"min"},{"key":"aggrPeriod","value":"minute"},{"key":"lastN","value":"3"}],"variable":[]}},"response":[],"_postman_id":"a87e4c95-f5c8-4a3d-963e-9931198c37ca"},{"name":"List the Maximum Values over a Time Period","id":"fa2abbd7-f0e0-4067-8216-274863f8123c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Fiware-Service","value":"openiot","type":"text"},{"key":"Fiware-ServicePath","value":"/","type":"text"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:8668/v2/entities/Lamp:001/attrs/luminosity?aggrMethod=max&fromDate=2018-06-27T09:00:00&toDate=2018-06-30T23:59:59","description":"<p>This example shows maximum <code>luminosity</code> value of <code>Lamp:001</code> that occurred\nbetween from <code>2018-06-27T09:00:00</code> to <code>2018-06-30T23:59:59</code>.</p>\n<p>Alter the <code>fromDate</code> and <code>toDate</code> parameters to retrieve your current data</p>\n","urlObject":{"protocol":"http","path":["v2","entities","Lamp:001","attrs","luminosity"],"host":["localhost:8668"],"query":[{"key":"aggrMethod","value":"max"},{"key":"fromDate","value":"2018-06-27T09:00:00"},{"key":"toDate","value":"2018-06-30T23:59:59"}],"variable":[]}},"response":[],"_postman_id":"fa2abbd7-f0e0-4067-8216-274863f8123c"},{"name":"List the latest N Sampled Values of Devices near a Point","id":"a593c659-e8db-4564-8065-7a351c678fc5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Fiware-Service","type":"text","value":"openiot"},{"key":"Fiware-ServicePath","type":"text","value":"/"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:8668/v2/types/Lamp/attrs/luminosity?lastN=4&georel=near;maxDistance:5000&geometry=point&coords=52.5547,13.3986\n","description":"<p>This example shows the latest four sampled <code>luminosity</code> values of lamps that\nare within a 5 km radius from <code>52°33'16.9\"N 13°23'55.0\"E</code> (Bornholmer Straße\n65, Berlin, Germany). If you have turned on all the lamps available on the\ndevice monitor page, you should be able to see data for <code>Lamp:001</code> and\n<code>Lamp:004</code>.</p>\n<blockquote>\n<p><strong>Note:</strong> Geographical queries are only available\nstarting from version <code>0.5</code> of QuantumLeap which implements the full\nset of queries detailed in the Geographical Queries section of the\n<a href=\"http://fiware.github.io/specifications/ngsiv2/stable/\">NGSI v2 specification</a>.</p>\n</blockquote>\n","urlObject":{"protocol":"http","path":["v2","types","Lamp","attrs","luminosity"],"host":["localhost:8668"],"query":[{"key":"lastN","value":"4"},{"key":"georel","value":"near;maxDistance:5000"},{"key":"geometry","value":"point"},{"key":"coords","value":"52.5547,13.3986\n"}],"variable":[]}},"response":[],"_postman_id":"a593c659-e8db-4564-8065-7a351c678fc5"},{"name":"List the latest N Sampled Values of Devices in an Area","id":"0cdf4bb0-a82f-4e5d-98ec-bf0849b8f8a5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Fiware-Service","type":"text","value":"openiot"},{"key":"Fiware-ServicePath","type":"text","value":"/"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:8668/v2/types/Lamp/attrs/luminosity?lastN=4&georel=coveredBy&geometry=polygon&coords=52.5537,13.3996;52.5557,13.3996;52.5557,13.3976;52.5537,13.3976;52.5537,13.3996","description":"<p>This example shows the latest four sampled <code>luminosity</code> values of lamps that\nare inside a square of side 200 m centred at <code>52°33'16.9\"N 13°23'55.0\"E</code>\n(Bornholmer Straße 65, Berlin, Germany). Even if you have turned on all the\nlamps available on the device monitor page, you should only see data for\n<code>Lamp:001</code>.</p>\n<blockquote>\n<p><strong>Note:</strong> Geographical queries are only available\nstarting from version <code>0.5</code> of QuantumLeap which implements the full\nset of queries detailed in the Geographical Queries section of the\n<a href=\"http://fiware.github.io/specifications/ngsiv2/stable/\">NGSI v2 specification</a>.</p>\n</blockquote>\n","urlObject":{"protocol":"http","path":["v2","types","Lamp","attrs","luminosity"],"host":["localhost:8668"],"query":[{"key":"lastN","value":"4"},{"key":"georel","value":"coveredBy"},{"key":"geometry","value":"polygon"},{"key":"coords","value":"52.5537,13.3996;52.5557,13.3996;52.5557,13.3976;52.5537,13.3976;52.5537,13.3996"}],"variable":[]}},"response":[],"_postman_id":"0cdf4bb0-a82f-4e5d-98ec-bf0849b8f8a5"}],"id":"5b69283e-bda5-488c-a091-9f4af0e72e2c","description":"<p><strong>CrateDB</strong> offers an\n<a href=\"https://crate.io/docs/crate/reference/en/latest/interfaces/http.html\">HTTP Endpoint</a>\nthat can be used to submit SQL queries. The endpoint is accessible under\n<code>&lt;servername:port&gt;/_sql</code>.</p>\n<p>SQL statements are sent as the body of POST requests in JSON format, where the\nSQL statement is the value of the <code>stmt</code> attribute.</p>\n<blockquote>\n<p>When to query <strong>CrateDB</strong> and when <strong>QuantumLeap</strong>?. As a rule of thumb,\nprefer working always with <strong>QuantumLeap</strong> for the following reasons:</p>\n<ul>\n<li>Your experience will be closer to FIWARE NGSI APIs like Orion's.</li>\n<li>Your application will not be tied to CrateDB's specifics nor QuantumLeap's\nimplementation details, which could change and break your app.</li>\n<li>QuantumLeap can be easily extended to other backends and your app will get\ncompatibility for free.</li>\n<li>If your deployment is distributed, you won't need to expose the ports of\nyour database to the outside.</li>\n</ul>\n</blockquote>\n<p>If your are sure your query is not supported by <strong>QuantumLeap</strong>, you may have to\nend up querying <strong>CrateDB</strong>, however, please open an issue in\n<a href=\"https://github.com/smartsdk/ngsi-timeseries-api/issues\">QuantumLeap's repo</a> so\nthe team is aware.</p>\n","event":[{"listen":"prerequest","script":{"id":"d9f95699-2277-4b49-a5fb-a4d830c96eaf","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"abacb9de-37b5-4464-bfe7-25f784aa1a9a","type":"text/javascript","exec":[""]}}],"_postman_id":"5b69283e-bda5-488c-a091-9f4af0e72e2c"},{"name":"Time Series Data Queries (Crate-DB)","item":[{"name":"Read Schemas","id":"6714ba7f-0a65-4864-8007-166631fc6d97","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"stmt\":\"SHOW SCHEMAS\"}"},"url":"http://localhost:4200/_sql","description":"<p>Another way to see if data are being persisted is to check if a <code>table_schema</code>\nhas been created. This can be done by making a request to the <strong>CrateDB</strong> HTTP\nendpoint as shown below.</p>\n<p>Schema names are formed with the <code>mt</code> prefix followed by <code>fiware-service</code> header\nin lower case. The IoT Agent is forwarding measurements from the dummy IoT\ndevices, with the <code>FIWARE-Service</code> header <code>openiot</code>. These are being persisted\nunder the <code>mtopeniot</code> schema.</p>\n<p>If the <code>mtopeniot</code> does not exist, then the subscription to <strong>QuantumLeap</strong> has\nnot been set up correctly. Check that the subscription exists, and has been\nconfigured to send data to the correct location.</p>\n","urlObject":{"protocol":"http","path":["_sql"],"host":["localhost:4200"],"query":[],"variable":[]}},"response":[],"_postman_id":"6714ba7f-0a65-4864-8007-166631fc6d97"},{"name":"Read Tables","id":"426fd1e5-cfd2-4f08-9c6d-303b3ee901a2","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"stmt\":\"SHOW TABLES\"}"},"url":"http://localhost:4200/_sql","description":"<p><strong>Quantum Leap</strong> will persist data into separate tables within the Crate-DB database based on the entity type. Table names are formed with the <code>et</code> prefix and the entity type name in lowercase.</p>\n<p>The response shows that both <strong>Motion Sensor</strong> data and <strong>Smart Lamp</strong> data are being persisted in the database.</p>\n","urlObject":{"protocol":"http","path":["_sql"],"host":["localhost:4200"],"query":[],"variable":[]}},"response":[],"_postman_id":"426fd1e5-cfd2-4f08-9c6d-303b3ee901a2"},{"name":"List the first N Sampled Values","id":"a3db4647-6a11-461e-8326-5ab66132b09b","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"stmt\":\"SELECT * FROM mtopeniot.etlamp WHERE entity_id = 'Lamp:001'  ORDER BY time_index ASC LIMIT 3\"}"},"url":"http://localhost:4200/_sql","description":"<p>This example shows the first 3 sampled <code>luminosity</code> values from <code>Lamp:001</code>. </p>\n<p>The SQL statement uses <code>ORDER BY</code> and <code>LIMIT</code> clauses to sort the data. More details can be found under within the Crate-DB <a href=\"https://crate.io/docs/crate/reference/en/latest/sql/statements/select.html\">documentation</a></p>\n","urlObject":{"protocol":"http","path":["_sql"],"host":["localhost:4200"],"query":[],"variable":[]}},"response":[],"_postman_id":"a3db4647-6a11-461e-8326-5ab66132b09b"},{"name":"List N Sampled Values at an Offset","id":"28ddc811-fc58-4562-a34c-a5e748cc039a","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"stmt\":\"SELECT * FROM mtopeniot.etmotion WHERE entity_id = 'Motion:001' ORDER BY time_index ASC  LIMIT 3 OFFSET 3\"}"},"url":"http://localhost:4200/_sql","description":"<p>This example shows the fourth, fifth and sixth sampled count values from Motion:001.</p>\n<p>The SQL statement uses an <code>OFFSET</code> clause to retrieve the required rows. \nMore details can be found under within the Crate-DB <a href=\"https://crate.io/docs/crate/reference/en/latest/sql/statements/select.html\">documentation</a></p>\n","urlObject":{"protocol":"http","path":["_sql"],"host":["localhost:4200"],"query":[],"variable":[]}},"response":[],"_postman_id":"28ddc811-fc58-4562-a34c-a5e748cc039a"},{"name":"List the latest N Sampled Values","id":"53404340-b5e1-4eb4-a1ce-a749f6572b4b","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"stmt\":\"SELECT * FROM mtopeniot.etmotion WHERE entity_id = 'Motion:001'  ORDER BY time_index DESC LIMIT 3\"}"},"url":"http://localhost:4200/_sql","description":"<p>This example shows latest three sampled <code>count</code> values from <code>Motion:001</code>. </p>\n<p>The SQL statement uses an <code>ORDER BY ... DESC</code> clause combined with a <code>LIMIT</code> clause to retrieve \nthe last N rows. More details can be found under within the Crate-DB <a href=\"https://crate.io/docs/crate/reference/en/latest/sql/statements/select.html\">documentation</a></p>\n","urlObject":{"protocol":"http","path":["_sql"],"host":["localhost:4200"],"query":[],"variable":[]}},"response":[],"_postman_id":"53404340-b5e1-4eb4-a1ce-a749f6572b4b"},{"name":"List the Sum of values over a time period","id":"56c9c81e-b58e-4c3c-ad1f-ee4ecb3dd9db","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"stmt\":\"SELECT DATE_FORMAT (DATE_TRUNC ('minute', time_index)) AS minute, SUM (count) AS sum FROM mtopeniot.etmotion WHERE entity_id = 'Motion:001' GROUP BY minute ORDER BY minute\"}"},"url":"http://localhost:4200/_sql","description":"<p>This example shows total <code>count</code> values from <code>Motion:001</code> over each minute.</p>\n<p>The SQL statement uses a <code>SUM</code> function and <code>GROUP BY</code> clause to retrieve the relevant data.\nCrate-DB offers a range of <a href=\"https://crate.io/docs/crate/reference/en/latest/general/builtins/scalar.html#date-and-time-functions\">Date-Time Function</a> to truncate and convert the timestamps into data which can be grouped.</p>\n","urlObject":{"protocol":"http","path":["_sql"],"host":["localhost:4200"],"query":[],"variable":[]}},"response":[],"_postman_id":"56c9c81e-b58e-4c3c-ad1f-ee4ecb3dd9db"},{"name":"List the Minimum Values over a Time Period","id":"6f7fb5b7-e202-431a-8d91-e1982f21e4b0","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"stmt\":\"SELECT DATE_FORMAT (DATE_TRUNC ('minute', time_index)) AS minute, MIN (luminosity) AS min FROM mtopeniot.etlamp WHERE entity_id = 'Lamp:001' GROUP BY minute ORDER BY minute\"}"},"url":"http://localhost:4200/_sql","description":"<p>This example shows minimum <code>luminosity</code> values from <code>Lamp:001</code> over each minute.</p>\n<p>The SQL statement uses a <code>MIN</code> function and <code>GROUP BY</code> clause to retrieve the relevant data.\nCrate-DB offers a range of <a href=\"https://crate.io/docs/crate/reference/en/latest/general/builtins/scalar.html#date-and-time-functions\">Date-Time Function</a> to truncate and convert the timestamps into data which can be grouped.</p>\n","urlObject":{"protocol":"http","path":["_sql"],"host":["localhost:4200"],"query":[],"variable":[]}},"response":[],"_postman_id":"6f7fb5b7-e202-431a-8d91-e1982f21e4b0"},{"name":"List the Maximum Values over a Time Period","id":"ca17c007-9ccc-41fc-b549-b2095a2a06e1","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"stmt\":\"SELECT DATE_FORMAT (DATE_TRUNC ('minute', time_index)) AS minute, MAX (luminosity) AS max FROM mtopeniot.etlamp WHERE entity_id = 'Lamp:001' GROUP BY minute ORDER BY minute\"}"},"url":"http://localhost:4200/_sql","description":"<p>This example shows maximum <code>luminosity</code> values from <code>Lamp:001</code> over each minute.</p>\n<p>The SQL statement uses a <code>MAX</code> function and <code>GROUP BY</code> clause to retrieve the relevant data.\nCrate-DB offers a range of <a href=\"https://crate.io/docs/crate/reference/en/latest/general/builtins/scalar.html#date-and-time-functions\">Date-Time Function</a> to truncate and convert the timestamps into data which can be grouped.</p>\n","urlObject":{"protocol":"http","path":["_sql"],"host":["localhost:4200"],"query":[],"variable":[]}},"response":[],"_postman_id":"ca17c007-9ccc-41fc-b549-b2095a2a06e1"},{"name":"List the Average Values over a Time Period","id":"0e25e6ac-8eb0-43da-a725-497e43480cc7","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"stmt\":\"SELECT DATE_FORMAT (DATE_TRUNC ('minute', time_index)) AS minute, AVG (luminosity) AS average FROM mtopeniot.etlamp WHERE entity_id = 'Lamp:001' GROUP BY minute ORDER BY minute\"}"},"url":"http://localhost:4200/_sql","description":"<p>This example shows the average of <code>luminosity</code> values from <code>Lamp:001</code> over each minute.</p>\n<p>The SQL statement uses a <code>AVG</code> function and <code>GROUP BY</code> clause to retrieve the relevant data.\nCrate-DB offers a range of <a href=\"https://crate.io/docs/crate/reference/en/latest/general/builtins/scalar.html#date-and-time-functions\">Date-Time Function</a> to truncate and convert the timestamps into data which can be grouped.</p>\n","urlObject":{"protocol":"http","path":["_sql"],"host":["localhost:4200"],"query":[],"variable":[]}},"response":[],"_postman_id":"0e25e6ac-8eb0-43da-a725-497e43480cc7"}],"id":"87a63492-bafd-455b-8366-19f3c14bd971","description":"<p><strong>Crate-DB</strong> offers an <a href=\"https://crate.io/docs/crate/reference/en/latest/interfaces/http.html\">HTTP Endpoint</a> that can be used to submit SQL queries. The endpoint is accessible under <code>&lt;servername:port&gt;/_sql</code>.</p>\n<p>SQL statements are sent as the body of POST requests in JSON format, where the SQL statement is the value of the <code>stmt</code> attribute.</p>\n","event":[{"listen":"prerequest","script":{"id":"d9f95699-2277-4b49-a5fb-a4d830c96eaf","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"abacb9de-37b5-4464-bfe7-25f784aa1a9a","type":"text/javascript","exec":[""]}}],"_postman_id":"87a63492-bafd-455b-8366-19f3c14bd971"}],"event":[{"listen":"prerequest","script":{"id":"d1cff9ac-8932-417c-b6e2-582ba712ff79","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"cc3f098c-a786-4112-a15e-b1c8c83cc657","type":"text/javascript","exec":[""]}}],"variable":[{"key":"orion","value":"localhost:1026"},{"key":"quantumleap","value":"localhost:8668"},{"key":"crate","value":"localhost:4200"}]}