{"info":{"_postman_id":"dd7b3ba8-5aa3-405a-b054-47608a483f77","name":"FIWARE Getting Started","description":"<html><head></head><body><p>Let’s start with the data from a supermarket chain’s store finder and create a very simple <em>“Powered by FIWARE”</em> application by passing in the address and location of each store as context data to the FIWARE context broker.</p>\n<p>The <code>docker-compose</code> file for this tutorial can be found on GitHub: </p>\n<p><img src=\"https://fiware.github.io/tutorials.Getting-Started/icon/GitHub-Mark-32px.png\" alt=\"GitHub\"> <a href=\"https://github.com/Fiware/tutorials.Getting-Started\">FIWARE 101: An Introduction to the FIWARE Platform</a></p>\n<h1 id=\"architecture\">Architecture</h1>\n<p>Our demo application will only make use of one FIWARE component - the <a href=\"https://catalogue.fiware.org/enablers/publishsubscribe-context-broker-orion-context-broker\">Orion Context Broker</a> . Usage of the Orion Context Broker is sufficient for an application to qualify as <em>“Powered by FIWARE”</em>.</p>\n<p>Currently, the Orion Context Broker  relies on open source <a href=\"https://www.mongodb.com/\">MongoDB</a> technology to keep persistence of the context data it holds. Therefore, the architecture will consist of two elements:</p>\n<ul>\n<li>The  Orion Context Broker server which will receive requests using NGSI</li>\n<li>The underlying MongoDB database associated to the Orion Context Broker server</li>\n</ul>\n<p>Since all interactions between the two elements are initiated by HTTP requests, the entities can be containerized and run from exposed ports. </p>\n<p><img src=\"https://fiware.github.io/tutorials.Getting-Started/img//architecture.png\" alt=\"\"></p>\n<h1 id=\"prerequisites\">Prerequisites</h1>\n<h2 id=\"docker\">Docker</h2>\n<p>To keep things simple both components will be run using <a href=\"https://www.docker.com\">Docker</a>. <strong>Docker</strong> is a container technology which allows to different components isolated into their respective environments. </p>\n<ul>\n<li>To install Docker on Windows follow the instructions <a href=\"https://docs.docker.com/docker-for-windows/\">here</a></li>\n<li>To install Docker on Mac follow the instructions <a href=\"https://docs.docker.com/docker-for-mac/\">here</a></li>\n<li>To install Docker on Linux follow the instructions <a href=\"https://docs.docker.com/install/\">here</a></li>\n</ul>\n<h1 id=\"starting-the-containers\">Starting the Containers</h1>\n<h2 id=\"initialization\">Initialization</h2>\n<p>First  pull the necessary Docker images from Docker Hub and create a network for our containers to connect to:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-console\">docker pull mongo:3.6\ndocker pull fiware/orion\ndocker network create fiware_default\n</code></pre>\n<h2 id=\"start-up\">Start Up</h2>\n<p>A Docker container running a MongoDB database can be started and connected to the network with the following command:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-console\">docker run -d --name=context-db --network=fiware_default \\\n  --expose=27017 mongo:3.6 --bind_ip_all --smallfiles\n</code></pre>\n<p>The Orion Context Broker can be started and connected to the network with the following command:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-console\">docker run -d --name orion  --network=fiware_default \\\n  -p 1026:1026  fiware/orion -dbhost context-db\n</code></pre>\n<p>You can check if the Orion Context Broker is running by making an HTTP request to the exposed port:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-console\">curl -X GET http://localhost:1026/version\n</code></pre>\n<p>Alternatively run all your curl commands from within the container network:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-console\">docker run --network fiware_default --rm appropriate/curl -s \\\n  -X GET http://orion:1026/version\n</code></pre>\n<p><strong>What if I get an error response?</strong></p>\n<p>If you get an error response, the Orion Content Broker cannot be found where expected\nfor this tutorial  - you will need to substitute the URL and port in each Postman request \nwith the corrected ip address. All the Postman requests in this tutorial assume \nthat orion is available on <code>localhost:1026</code>. </p>\n<p>Try the following remedies:</p>\n<ul>\n<li>To check that the dockers container are running try the following:</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-console\">docker ps\n</code></pre>\n<p>You should see two containers running. If orion is not running, you can restart the \ncontainers as necessary. This command will also display open port information.</p>\n<ul>\n<li>If you have installed <a href=\"https://docs.docker.com/machine/\"><code>docker-machine</code></a> and <a href=\"https://www.virtualbox.org/\">Virtual Box</a>, you will need to retrieve the virtual host ip as shown:</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-console\">curl -X GET http://$(docker-machine ip default):1026/version\n</code></pre>\n<p>If you need to update the location of orion:</p>\n<ol>\n<li>Click on the elipsis <code>...</code> at the head of the imported postman collection</li>\n<li>Select <code>edit</code> from the dropdown</li>\n<li>Click on the <code>variables</code> tab and alter the value from <code>localhost:1026</code> as necessary.</li>\n</ol>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Architecture","slug":"architecture"},{"content":"Prerequisites","slug":"prerequisites"},{"content":"Starting the Containers","slug":"starting-the-containers"}],"owner":"513743","collectionId":"dd7b3ba8-5aa3-405a-b054-47608a483f77","publishedId":"RVu5kp1c","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"4C4C4C","highlight":"233C68"},"publishDate":"2018-05-31T09:50:57.000Z"},"item":[{"name":"Obtaining Version Information","id":"8d1d967d-462a-4482-8f86-e543ca64606e","request":{"method":"GET","header":[],"url":"http://localhost:1026/version/","description":"<p>As usual, you can check if the Orion Context Broker is running by making an HTTP request to the exposed port.</p>\n<p>The format of the version response has not changed for Orion NGSI-LD The <code>release_date</code> must be 16th July 2019 or later to be able to\nwork with the requests defined below.</p>\n","urlObject":{"protocol":"http","path":["version",""],"host":["localhost:1026"],"query":[],"variable":[]}},"response":[],"_postman_id":"8d1d967d-462a-4482-8f86-e543ca64606e"},{"name":"Creating your first Data Entity","id":"0f9de5f1-ef79-4324-bebe-6def3f08b9fe","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"id\": \"urn:ngsi-ld:Store:001\",\n    \"type\": \"Store\",\n    \"address\": {\n        \"type\": \"PostalAddress\",\n        \"value\": {\n            \"streetAddress\": \"Bornholmer Straße 65\",\n            \"addressRegion\": \"Berlin\",\n            \"addressLocality\": \"Prenzlauer Berg\",\n            \"postalCode\": \"10439\"\n        },\n        \"metadata\": {\n    \t\t\"verified\": {\n        \t\t\"value\": true,\n        \t\t\"type\": \"Boolean\"\n    \t\t}\n    \t}\n    },\n    \"location\": {\n        \"type\": \"geo:json\",\n        \"value\": {\n             \"type\": \"Point\",\n             \"coordinates\": [13.3986, 52.5547]\n        }\n    },\n    \"name\": {\n        \"type\": \"Text\",\n        \"value\": \"Bösebrücke Einkauf\"\n    }\n}"},"url":"http://localhost:1026/v2/entities/","description":"<p>When creating linked data entities, it is important to use common data models. This will allow us to easily combine data\nfrom multiple sources and remove ambiguity when comparing data coming from different sources.</p>\n<p>Creating linked data using full qualified names throughout would be painful, as each attribute would need to be a URN,\nso JSON-LD introduces the idea of an <code>@context</code> attribute which can hold pointers to context definitions. To add a\nFIWARE <a href=\"https://fiware-datamodels.readthedocs.io/en/latest/Building/Building/doc/spec/index.html\">Building</a> data entity,\nthe following <code>@context</code> would be required</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"urn:ngsi-ld:Building:store001\",\n    \"type\": \"Building\",\n    ...  other data attributes\n    \"@context\": [\n        \"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld\",\n        \"https://schema.lab.fiware.org/ld/fiware-datamodels-context.jsonld\"\n    ]\n}\n</code></pre>\n<h3 id=\"core-context\">Core Context</h3>\n<p><a href=\"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld\">https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld</a>\nrefers to the Core <code>@context</code> of NSGI-LD, this defines element such as <code>id</code> and <code>type</code> which are common to all NGSI\nentities, as well as defining terms such as <code>Property</code> and <code>Relationship</code>. The core context is so fundamental to\nNGSI-LD, that it is added by default to any <code>@context</code> sent to a request.</p>\n<h3 id=\"fiware-data-models\">FIWARE Data Models</h3>\n<p><a href=\"https://schema.lab.fiware.org/ld/fiware-datamodels-context.jsonld\">https://schema.lab.fiware.org/ld/fiware-datamodels-context.jsonld</a>\nrefers to the definition of standard data models supplied by FIWARE. Adding this to the <code>@context</code> will load the\ndefinitions of all the <a href=\"https://fiware-datamodels.readthedocs.io\">data models</a> defined by the FIWARE Foundation, a\nsummary of the FQNs related to <strong>Building</strong> can be seen below:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"@context\": {\n        \"Building\": \"https://uri.fiware.org/ns/datamodels/Building\",\n        ... etc\n        \"address\": \"http://schema.org/address\",\n        \"category\": \"https://uri.fiware.org/ns/datamodels/category\",\n        \"location\": \"http://uri.etsi.org/ngsi-ld/location\",\n        \"name\": \"http://schema.org/name\",\n        ...etc\n    }\n}\n</code></pre>\n<p>If we include this context definition, it means that we will be able to use short names for <code>Building</code>, <code>address</code>,\n<code>location</code> for our entities, but computers will also be able to read the FNQs when comparing with other sources.</p>\n<p>To create a valid <strong>Building</strong> data entity in the context broker, make a POST request to the\n<code>http://localhost:1026/ngsi-ld/v1/entities</code> endpoint as shown below. It is essential that the appropriate\n<code>Content-Type: application/ld+json</code> is also used, so that the data entity is recognized as Linked data.</p>\n<p>The first request will take some time, as the context broker must navigate and load all of the files mentioned in the\n<code>@context</code>.</p>\n","urlObject":{"protocol":"http","path":["v2","entities",""],"host":["localhost:1026"],"query":[],"variable":[]}},"response":[],"_postman_id":"0f9de5f1-ef79-4324-bebe-6def3f08b9fe"},{"name":"Creating your Second Data Entity","id":"b503e293-b212-48db-bbb6-b1861793b3bc","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"type\": \"Store\",\n    \"id\": \"urn:ngsi-ld:Store:002\",\n    \"address\": {\n        \"type\": \"PostalAddress\",\n        \"value\": {\n            \"streetAddress\": \"Friedrichstraße 44\",\n            \"addressRegion\": \"Berlin\",\n            \"addressLocality\": \"Kreuzberg\",\n            \"postalCode\": \"10969\"\n        },\n        \"metadata\": {\n    \t\t\"verified\": {\n        \t\t\"value\": true,\n        \t\t\"type\": \"Boolean\"\n    \t\t}\n    \t}\n    },\n    \"location\": {\n        \"type\": \"geo:json\",\n        \"value\": {\n             \"type\": \"Point\",\n             \"coordinates\": [13.3903, 52.5075]\n        }\n    },\n    \"name\": {\n        \"type\": \"Text\",\n        \"value\": \"Checkpoint Markt\"\n    }\n}"},"url":"http://localhost:1026/v2/entities/","description":"<p>Each subsequent entity must have a unique <code>id</code> for the given <code>type</code></p>\n<h3 id=\"defining-properties-within-the-ngsi-ld-entity-definition\">Defining Properties within the NGSI-LD entity definition</h3>\n<p>The attributes <code>id</code> and <code>type</code> should be familiar to anyone who has used NSGI v2, and these have not changed. As\nmentioned above, the type should refer to an included data model, in this case <code>Building</code> is being used as a short name\nfor the inclued URN <code>https://uri.fiware.org/ns/datamodels/Building</code>. Thereafter each <em>property</em> is defined as a JSON\nelement containing two attributes, a <code>type</code> and a <code>value</code>.</p>\n<p>The <code>type</code> of a <em>property</em> attribute must be one of the following:</p>\n<ul>\n<li><code>\"GeoProperty\"</code>: <code>\"http://uri.etsi.org/ngsi-ld/GeoProperty\"</code> for locations. Locations should be specified as\nLongitude-Latitude pairs in <a href=\"https://tools.ietf.org/html/rfc7946\">GeoJSON format</a>. The preferred name for the\nprimary location attribute is <code>location</code></li>\n<li><code>\"TemporalProperty\"</code>: <code>\"http://uri.etsi.org/ngsi-ld/TemporalProperty\"</code> for time-based values. Temporal properties\nshould be Date, Time or DateTime strings encoded be <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601 format</a> - e.g.\n<code>YYYY-MM-DDThh:mm:ssZ</code></li>\n<li><code>\"Property\"</code>: <code>\"http://uri.etsi.org/ngsi-ld/Property\"</code> - for everything else</li>\n</ul>\n<blockquote>\n<p><strong>Note:</strong> that for simplicity, this data entity has no relationships defined. Relationships must be given the\n<code>type=\"Relationship</code>. Relationships will be discusssed in a subsequent tutorial.</p>\n</blockquote>\n<h3 id=\"defining-properties-of-properties-within-the-ngsi-ld-entity-definition\">Defining Properties-of-Properties within the NGSI-LD entity definition</h3>\n<p><em>Properties-of-Properties</em> is the NGSI-LD equivalent of metadata (i.e. <em>\"data about data\"</em>), it is use to describe\nproperties of the attribute value itself like accuracy, provider, or the units to be used. Some built-in metadata\nattributes already exist and these names are reserved:</p>\n<ul>\n<li><code>createdAt</code> (type: DateTime): attribute creation date as an ISO 8601 string.</li>\n<li><code>modifiedAt</code> (type: DateTime): attribute modification date as an ISO 8601 string.</li>\n</ul>\n<p>Additionally <code>observedAt</code>, <code>datasetId</code> and <code>instanceId</code> may optionally be added in some cases, and <code>location</code>,\n<code>observationSpace</code> and <code>operationSpace</code> have special meaning for Geoproperties.</p>\n<p>In the examples given above, one element of metadata (i.e. a <em>property-of-a-property</em>) can be found within the <code>address</code>\nattribute. a <code>verified</code> flag indicates whether the address has been confirmed. The commonest <em>property-of-a-property</em> is\n<code>unitCode</code> which should be used to hold the UN/CEFACT\n<a href=\"http://wiki.goodrelations-vocabulary.org/Documentation/UN/CEFACT_Common_Codes\">Common Codes</a> for Units of Measurement.</p>\n","urlObject":{"protocol":"http","path":["v2","entities",""],"host":["localhost:1026"],"query":[],"variable":[]}},"response":[],"_postman_id":"b503e293-b212-48db-bbb6-b1861793b3bc"},{"name":"Retrieving Context Information","id":"0dd59299-1a8a-4830-bb4d-ddcb86e69550","request":{"method":"GET","header":[],"url":"http://localhost:1026/v2/entities","description":"<p>A consuming application can now request context data by making NGSI-LD HTTP requests to the Orion Context Broker. The\nexisting NGSI-LD interface enables us to make complex queries and filter results and retrieve data with FNQs or with\nshort names.</p>\n<h3 id=\"obtain-entity-data-by-fnq-type\">Obtain entity data by FNQ Type</h3>\n<p>This example returns the data of all <code>Building</code> entities within the context data The <code>type</code> parameter is mandatory for\nNGSI-LD and is used to filter the response.</p>\n<p>The response returns the Core <code>@context</code> by default\n(<code>https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/defaultContext/defaultContext.jsonld</code>) and all attributes are\nexpanded whenever possible.</p>\n<ul>\n<li><code>id</code>, <code>type</code> and <code>location</code> are defined in the core context and are not expanded.</li>\n<li><code>address</code> has been mapped to <code>http://schema.org/address</code></li>\n<li><code>name</code> has been mapped to <code>http://schema.org/name</code></li>\n<li><code>category</code> has been mapped to <code>https://uri.fiware.org/ns/datamodels/category</code></li>\n</ul>\n<p>Note that if an attribute has not been not associated to an FNQ when the entity was created, the short name will\n<strong>always</strong> be displayed.</p>\n","urlObject":{"protocol":"http","path":["v2","entities"],"host":["localhost:1026"],"query":[],"variable":[]}},"response":[],"_postman_id":"0dd59299-1a8a-4830-bb4d-ddcb86e69550"},{"name":"Obtain Entity Data by id","id":"a7c40a56-c5aa-4bb3-b2d0-c54b99461d1f","request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://localhost:1026/v2/entities/urn:ngsi-ld:Store:001?options=keyValues","description":"<p>This example returns the data of <code>urn:ngsi-ld:Store:001</code>.</p>\n<p>The response returns the Core <code>@context</code> by default\n(<code>https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/defaultContext/defaultContext.jsonld</code>) and all attributes are\nexpanded whenever possible.</p>\n","urlObject":{"protocol":"http","path":["v2","entities","urn:ngsi-ld:Store:001"],"host":["localhost:1026"],"query":[{"description":{"content":"<ul>\n<li><code>keyValues</code> option in order to get a more compact and brief representation, including just attribute values</li>\n<li><code>values</code> option combined with a list of attribute values  <code>attrs</code>  for an ordered list of attributes only</li>\n</ul>\n","type":"text/plain"},"key":"options","value":"keyValues"},{"disabled":true,"description":{"content":"<p>Entity type, to avoid ambiguity in case there are several entities with the same entity id</p>\n","type":"text/plain"},"key":"type","value":"Store"},{"disabled":true,"description":{"content":"<p>Ordered list of attribute names to display</p>\n","type":"text/plain"},"key":"attrs","value":"name"}],"variable":[]}},"response":[],"_postman_id":"a7c40a56-c5aa-4bb3-b2d0-c54b99461d1f"},{"name":"Obtain Entity Data by type","id":"186559d1-b3bd-4990-a03a-306728b94765","request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://localhost:1026/v2/entities/?type=Store&options=keyValues","description":"<p>If a reference to the supplied data is supplied, it is possible to return short name data and limit responses to a\nspecific <code>type</code> of data. For example, the request below returns the data of all <code>Building</code> entities within the context\ndata. Use of the <code>type</code> parameter limits the response to <code>Building</code> entities only, use of the <code>options=keyValues</code> query\nparameter reduces the response down to standard JSON-LD.</p>\n<p>A <a href=\"https://www.w3.org/wiki/LinkHeader\"><code>Link</code> header</a> must be supplied to associate the short form <code>type=\"Building\"</code>\nwith the FNQ <code>https://uri.fiware.org/ns/datamodels/Building</code>. The full link header syntax can be seen below:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-text\">Link: &lt;https://schema.lab.fiware.org/ld/fiware-datamodels-context.jsonld&gt;; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\n</code></pre>\n<p>The standard HTTP <code>Link</code> header allows metadata (in this case the <code>@context</code>) to be passed in without actually touching\nthe resource in question. In the case of NGSI-LD, the metadata is a file of in <code>application/ld+json</code> format.</p>\n<p>Because of the use of the <code>options=keyValues</code>, the response consists of JSON only without the attribute defintions\n<code>type=\"Property\"</code> or any <em>properties-of-properties</em> elements. You can see that <code>Link</code> header from the request has been\nused as the <code>@context</code> returned in the response.</p>\n","urlObject":{"protocol":"http","path":["v2","entities",""],"host":["localhost:1026"],"query":[{"description":{"content":"<p>Entity type, to avoid ambiguity in case there are several entities with the same entity id</p>\n","type":"text/plain"},"key":"type","value":"Store"},{"description":{"content":"<ul>\n<li><code>keyValues</code> option in order to get a more compact and brief representation, including just attribute values</li>\n<li><code>values</code> option combined with a list of attribute values  <code>attrs</code>  for an ordered list of attributes only</li>\n</ul>\n","type":"text/plain"},"key":"options","value":"keyValues"},{"disabled":true,"description":{"content":"<p>Ordered list of attribute names to display</p>\n","type":"text/plain"},"key":"attrs","value":"name"}],"variable":[]}},"response":[],"_postman_id":"186559d1-b3bd-4990-a03a-306728b94765"},{"name":"Filter context data by attribute value","id":"fd1485b5-71e6-4da0-bd5b-b234d4bcd8c3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Link","value":"<https://schema.lab.fiware.org/ld/context>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"","type":"text"}],"url":"http://localhost:1026/v2/entities/?q=name=='Checkpoint Markt'&type=Store&options=keyValues","description":"<p>This example returns all <code>Building</code> entiies with the <code>name</code> attribute <em>Checkpoint Markt</em>. Filtering can be done using\nthe <code>q</code> parameter - if a string has spaces in it, it can be URL encoded and held within single quote characters <code>'</code> =\n<code>%27</code>.</p>\n<p>The <code>Link</code> header <code>https://schema.lab.fiware.org/ld/context</code> holds an array of <code>@context</code> as shown:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"@context\": [\n        \"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld\",\n        \"https://schema.lab.fiware.org/ld/fiware-datamodels-context.jsonld\"\n    ]\n}\n</code></pre>\n<p>and therefore includes the FIWARE Building model.</p>\n<p>This means that use of the <code>Link</code> header and the <code>options=keyValues</code> parameter reduces the response to short form\nJSON-LD as shown below:</p>\n","urlObject":{"protocol":"http","path":["v2","entities",""],"host":["localhost:1026"],"query":[{"key":"q","value":"name=='Checkpoint Markt'"},{"description":{"content":"<p>Entity type, to avoid ambiguity in case there are several entities with the same entity id</p>\n","type":"text/plain"},"key":"type","value":"Store"},{"description":{"content":"<ul>\n<li><code>keyValues</code> option in order to get a more compact and brief representation, including just attribute values</li>\n<li><code>values</code> option combined with a list of attribute values  <code>attrs</code>  for an ordered list of attributes only</li>\n</ul>\n","type":"text/plain"},"key":"options","value":"keyValues"},{"disabled":true,"description":{"content":"<p>Ordered list of attribute names to display</p>\n","type":"text/plain"},"key":"attrs","value":"name"}],"variable":[]}},"response":[],"_postman_id":"fd1485b5-71e6-4da0-bd5b-b234d4bcd8c3"},{"name":"Filter context data by comparing the values of an attribute in an Array","id":"83714a3f-566a-46d5-a42c-682925a27f50","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Link","value":"<https://schema.lab.fiware.org/ld/context>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"","type":"text"}],"url":"http://localhost:1026/v2/entities/?q=category==%27commercial%27,%27office%27&type=Building&options=keyValues","description":"<p>Within the standard <code>Building</code> model, the <code>category</code> attribute refers to an array of strings. This example returns all\n<code>Building</code> entities with a <code>category</code> attribute which contains either <code>commercial</code> or <code>office</code> strings. Filtering can be\ndone using the <code>q</code> parameter, comma separating the acceptable values.</p>\n<p>The response is returned in JSON-LD format with short form attribute names:</p>\n","urlObject":{"protocol":"http","path":["v2","entities",""],"host":["localhost:1026"],"query":[{"key":"q","value":"category==%27commercial%27,%27office%27"},{"description":{"content":"<p>Entity type, to avoid ambiguity in case there are several entities with the same entity id</p>\n","type":"text/plain"},"key":"type","value":"Building"},{"description":{"content":"<ul>\n<li><code>keyValues</code> option in order to get a more compact and brief representation, including just attribute values</li>\n<li><code>values</code> option combined with a list of attribute values  <code>attrs</code>  for an ordered list of attributes only</li>\n</ul>\n","type":"text/plain"},"key":"options","value":"keyValues"},{"disabled":true,"description":{"content":"<p>Ordered list of attribute names to display</p>\n","type":"text/plain"},"key":"attrs","value":"name"}],"variable":[]}},"response":[],"_postman_id":"83714a3f-566a-46d5-a42c-682925a27f50"},{"name":"Filter context data by sub-attribute value","id":"5a9358e1-f54f-49e1-8115-cf8175552ace","request":{"method":"GET","header":[],"url":"http://localhost:1026/v2/entities/?q=address.addressLocality=='Kreuzberg'&type=Store&options=keyValues","description":"<h2 id=\"filter-context-data-by-comparing-the-values-of-an-attribute\">Filter context data by comparing the values of an attribute</h2>\n<p>This example returns the data of all <code>Store</code> entities found in the <strong>Kreuzberg</strong> district of Berlin.</p>\n<p>Filtering can be done using the <code>q</code> parameter - sub-attributes are annotated using the dot syntax e.g. <code>address.addressLocality</code></p>\n<p>Because of the use of the <code>options=keyValues</code>, the response consists of JSON only without the attribute <code>type</code> and <code>metadata</code> elements.</p>\n","urlObject":{"protocol":"http","path":["v2","entities",""],"host":["localhost:1026"],"query":[{"key":"q","value":"address.addressLocality=='Kreuzberg'"},{"description":{"content":"<p>Entity type, to avoid ambiguity in case there are several entities with the same entity id</p>\n","type":"text/plain"},"key":"type","value":"Store"},{"description":{"content":"<ul>\n<li><code>keyValues</code> option in order to get a more compact and brief representation, including just attribute values</li>\n<li><code>values</code> option combined with a list of attribute values  <code>attrs</code>  for an ordered list of attributes only</li>\n</ul>\n","type":"text/plain"},"key":"options","value":"keyValues"}],"variable":[]}},"response":[],"_postman_id":"5a9358e1-f54f-49e1-8115-cf8175552ace"},{"name":"Filter context data by querying metadata","id":"15f9ad0a-ea73-467a-acf6-10abb6fbe9b1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:1026/v2/entities/?mq=address.verified==true&type=Store&options=keyValues","description":"<h2 id=\"filter-context-data-by-comparing-the-values-of-an-metadata-attribute\">Filter context data by comparing the values of an metadata attribute</h2>\n<p>This example returns the data of all <code>Store</code> entities with a verified address.</p>\n<p>Metadata queries can be made using the <code>mq</code> parameter.</p>\n","urlObject":{"protocol":"http","path":["v2","entities",""],"host":["localhost:1026"],"query":[{"key":"mq","value":"address.verified==true"},{"description":{"content":"<p>Entity type, to avoid ambiguity in case there are several entities with the same entity id</p>\n","type":"text/plain"},"key":"type","value":"Store"},{"description":{"content":"<ul>\n<li><code>keyValues</code> option in order to get a more compact and brief representation, including just attribute values</li>\n<li><code>values</code> option combined with a list of attribute values  <code>attrs</code>  for an ordered list of attributes only</li>\n</ul>\n","type":"text/plain"},"key":"options","value":"keyValues"}],"variable":[]}},"response":[],"_postman_id":"15f9ad0a-ea73-467a-acf6-10abb6fbe9b1"},{"name":"Filter context data by distance","id":"1823197e-92c7-437f-93d7-35d276b79e86","request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://localhost:1026/v2/entities/?georel=near;maxDistance:1500&geometry=point&coords=52.5162,13.3777&type=Store&options=keyValues","description":"<h2 id=\"filter-context-data-by-comparing-the-values-of-a-geopoint-attribute\">Filter context data by comparing the values of a geo:point attribute</h2>\n<p>This example returns the data of all <code>Store</code> entities found within 1.5km the <strong>Brandenburg Gate</strong>  in <strong>Berlin</strong> (<em>52.5162N 13.3777W</em>)</p>\n","urlObject":{"protocol":"http","path":["v2","entities",""],"host":["localhost:1026"],"query":[{"key":"georel","value":"near;maxDistance:1500"},{"key":"geometry","value":"point"},{"key":"coords","value":"52.5162,13.3777"},{"description":{"content":"<p>Entity type, to avoid ambiguity in case there are several entities with the same entity id</p>\n","type":"text/plain"},"key":"type","value":"Store"},{"description":{"content":"<ul>\n<li><code>keyValues</code> option in order to get a more compact and brief representation, including just attribute values</li>\n<li><code>values</code> option combined with a list of attribute values  <code>attrs</code>  for an ordered list of attributes only</li>\n</ul>\n","type":"text/plain"},"key":"options","value":"keyValues"},{"disabled":true,"description":{"content":"<p>Ordered list of attribute names to display</p>\n","type":"text/plain"},"key":"attrs","value":"name"}],"variable":[]}},"response":[],"_postman_id":"1823197e-92c7-437f-93d7-35d276b79e86"}],"event":[{"listen":"prerequest","script":{"id":"581cc060-de73-4283-915a-fcaa1c126830","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"5215414e-418f-4c32-8070-b68d62c90ea4","type":"text/javascript","exec":[""]}}],"variable":[{"id":"df0c7c83-8325-4d8f-8b3f-bea47630872d","key":"orion","value":"localhost:1026","type":"string"}]}