... | ... | @@ -37,13 +37,14 @@ Querying context broker at: 5.53.108.182 |
|
|
100 649 100 649 0 0 16508 0 --:--:-- --:--:-- --:--:-- 16641
|
|
|
[
|
|
|
{
|
|
|
"address": {
|
|
|
"metadata": {},
|
|
|
"type": "StructuredValue",
|
|
|
"location": {
|
|
|
"type": "geo:json",
|
|
|
"value": {
|
|
|
"addressCountry": "Switzerland",
|
|
|
"adressLocality": "Carouge",
|
|
|
"streetAddress": "Place de Sardaigne"
|
|
|
"type": "Point",
|
|
|
"coordinates": [
|
|
|
0,
|
|
|
0
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"category": {
|
... | ... | @@ -60,7 +61,7 @@ Querying context broker at: 5.53.108.182 |
|
|
},
|
|
|
"dateModified": {
|
|
|
"metadata": {},
|
|
|
"type": "Text",
|
|
|
"type": "DateTime",
|
|
|
"value": "2017-03-31T08:00"
|
|
|
},
|
|
|
"id": "urn:ngsi-ld:FlowerBed:FlowerBed-1",
|
... | ... | @@ -84,9 +85,7 @@ Querying context broker at: 5.53.108.182 |
|
|
]
|
|
|
```
|
|
|
|
|
|
In the following we propose a simpler type-less query.
|
|
|
|
|
|
Getting keyvalues only simplify post-processing, use this unless you are parsing ngsi-ld object with libraries which require `type` information!
|
|
|
**In the following we propose a simpler type-less query, to be used just when you do a GET (if you push data using keyValues then the types of the attributes are overwritten to TEXT type, not good!)**
|
|
|
|
|
|
```bash
|
|
|
>> ./watering_03_retrieve_entity_keyValues_by_id.sh
|
... | ... | @@ -126,7 +125,7 @@ watering_06_update_specific_attrs.sh |
|
|
|
|
|
## Subscriptions
|
|
|
|
|
|
This will demostrate how a WMS or GUI backend component can subscribe to changes/updates of entities
|
|
|
This will demonstrate how a WMS or GUI backend component can subscribe to changes/updates of entities
|
|
|
|
|
|
What you need:
|
|
|
|
... | ... | @@ -283,7 +282,6 @@ echo "Querying context broker at: ${ORION_HOST}" |
|
|
curl --location --request POST \
|
|
|
"http://$ORION_HOST:1026/v2/subscriptions/" \
|
|
|
--header "Fiware-Service: carouge" \
|
|
|
--header "Fiware-ServicePath: /Watering" \
|
|
|
--header "Content-Type: application/json" \
|
|
|
--header "Accept: application/json" \
|
|
|
--data '{
|
... | ... | |