Details
-
Type:
Monitor
-
Status: Closed
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
Description
Created question in FIWARE Q/A platform on 08-12-2020 at 14:12
Please, ANSWER this question AT https://stackoverflow.com/questions/65200347/fiware-orion-ngsiv2-subscription-in-attributes-with-structured-values
Question:
FIWARE Orion, NGSIv2 subscription in attributes with structured values
Description:
I'm working with Orion Contex Broker and I need to receive notifications when a parameter in a structured attribute changes its value. An example:
Subscription:
curl -iX POST \
--url 'http://localhost:1026/v2/subscriptions' \
--header 'content-type: application/json' \
--data '{
"description":"Notify me of Store changes in street Address",
"subject":{
"entities":[
],
"condition":
},
"notification":{
"http":
}
}'
Create entity:
curl -iX POST \
--url 'http://localhost:1026/v2/op/update' \
-H 'Content-Type: application/json' \
-d '{
"actionType":"append",
"entities":[
{
"type":"Store",
"id":"urn:ngsi-ld:Store:001",
"address":{
"type":"PostalAddress",
"value":
},
"name":
}
]
}'
Update the entity:
curl -iX PATCH \
--url 'http://localhost:1026/v2/entities/urn:ngsi-ld:Store:001/attrs' \
-H 'Content-Type: application/json' \
-d '{
"address":{
"type":"PostalAddress",
"value":
}
}'
The expected result would be to receive a notification when the entity was created and update. Another possibility could be the "condition expressions". However one of kind: "q": "address.streetAddress!=$
{previousValue}" is not implemented yet.
2020-12-11 09:34|CREATED monitor | # answers= 0, accepted answer= False