telefonicaid / fiware-orion

Context Broker and CEF building block for context data management, providing NGSI interfaces.
https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/orion-api.md
GNU Affero General Public License v3.0
210 stars 265 forks source link

Implement metadata value substitution to extend notification templating mechanism #2966

Open LeonanCarvalho opened 7 years ago

LeonanCarvalho commented 7 years ago

NGSIv2 clients can customize HTTP notification messages using a simple template mechanism. Considering the following notification notification.httpCustom object:

    "httpCustom": {
      "url": "http://foo.com/entity/${id}",
      "headers": {
        "Content-Type": "text/plain"
      },
      "method": "PUT",
      "qs": {
        "type": "${type}"
      },
      "payload": "The temperature is ${temperature} degrees"
    }

The token ${temperature} will be parsed by current context value.

Thinking that attribute could have a metadata value could contain custom data like a ${temperature.scale}, to store values of '°C' or '°F' for example.

https://stackoverflow.com/questions/45717033/how-to-use-attribute-metadata-token-in-orion-context-broker-notification-custom

fgalan commented 7 years ago

The answer to the cited SOF question have to be edited in the case this issue gets implemented.

cdupont commented 6 years ago

I am also interested in this feature.