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

        Hide
        backlogmanager Backlog Manager added a comment -

        2016-05-17 15:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2016-05-17 15:05|CREATED monitor | # answers= 0, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2016-05-17 18:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2016-05-17 18:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2016-05-17 21:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2016-05-17 21:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False

          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: