Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-6613

FIWARE.Question.Tech.Data.OrionContextBroker.how to make an Orion NGSIv2 subscription that notifies cygnus in NGSIv1?

    Details

      Description

      Created question in FIWARE Q/A platform on 17-05-2016 at 15:05
      Please, ANSWER this question AT http://stackoverflow.com/questions/37277048/how-to-make-an-orion-ngsiv2-subscription-that-notifies-cygnus-in-ngsiv1

      Question:
      how to make an Orion NGSIv2 subscription that notifies cygnus in NGSIv1?

      Description:
      As said in other question :

      EDIT: note also that you can use NGSIv2 to create/update entities at
      Orion and have notifications in NGSIv1 if you:

      Create the subscription using NGSIv1 operations

      Create the subscription using NGSIv2 operations with attrsFormat equal to legacy.
      Have a look to more detailed information here.

      So I made up this subscription:

      curl --include \
      --header 'Content-Type: application/json' \
      --request POST \
      --data-binary '{
      "description": "Day subscription",
      "subject": {
      "entities": [

      { "idPattern": "es-leon-.*", "type": "Event" }

      ],
      "condition": {
      "attributes": [
      "Title",
      "dFlag"
      ],
      "expression":

      { "q": "dFlag > 0" }

      }
      },
      "notification":

      { "callback": "http://localhost:5050/notify", "attributes": [ "Title", "dFlag" ] }

      }' \
      'http://localhost:1026/v1/subscriptions'

      but orion don't let me register it throwing this error:

      HTTP/1.1 400 Bad Request
      Connection: Keep-Alive
      Content-Length: 67
      Content-Type: application/json
      Fiware-Correlator: 2ecdfc74-1c2f-11e6-82d7-000d3a23bf27
      Date: Tue, 17 May 2016 12:59:25 GMT

      {"error":"BadRequest","description":"no condition attrs specified"}

      Is this the way to use legacy attributes so it can work with cygnus with NGSIv2?
      Thanks for the help.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        2h 59m 1 Backlog Manager 17/May/16 6:07 PM
        In Progress In Progress Answered Answered
        3h 1 Backlog Manager 17/May/16 9:07 PM
        Answered Answered Closed Closed
        12h 9m 1 Fermín Galán 18/May/16 9:16 AM

          People

          • Assignee:
            fermin Fermín Galán
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: