[Backlogmanager] [FIWARE-JIRA] (HELP-17193) [fiware-stackoverflow] FIWARE Orion, NGSIv2 subscription in attributes with structured values

Fernando Lopez (JIRA) jira-help-desk at jira.fiware.org
Mon Dec 14 09:21:00 CET 2020


     [ https://jira.fiware.org/browse/HELP-17193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fernando Lopez reassigned HELP-17193:
-------------------------------------

    Assignee: Fermín Galán

> [fiware-stackoverflow] FIWARE Orion, NGSIv2 subscription in attributes with structured values
> ---------------------------------------------------------------------------------------------
>
>                 Key: HELP-17193
>                 URL: https://jira.fiware.org/browse/HELP-17193
>             Project: Help-Desk
>          Issue Type: Monitor
>          Components: FIWARE-TECH-HELP
>            Reporter: Backlog Manager
>            Assignee: Fermín Galán
>              Labels: fiware, fiware-orion
>
> Created question in FIWARE Q/A platform on 08-12-2020 at 14:12
> {color: red}Please, ANSWER this question AT{color} 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":[
>      {
>         "idPattern":".*",
>         "type":"Store"
>      }
>       ],
>       "condition":{
>      "attrs":[
>         "address.streetAddress"
>      ]
>       }
>    },
>    "notification":{
>       "http":{
>      "url":"http://localhost:3000/subscription/store-change"
>       }
>    }
> }'
> 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":{
>                "streetAddress":"Old",
>                "addressRegion":"Berlin"
>             }
>          },
>          "name":{
>             "type":"Text",
>             "value":"Bösebrücke Einkauf"
>          }
>       }
>    ]
> }'
> 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":{
>          "streetAddress":"Bornholmer"
>       }
>    }
> }'
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.1#64016)


More information about the Backlogmanager mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy