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

FIWARE.Question.Tech.FIWARE Orion Context Broker API V2 - accumulator-server.py.

    Details

      Description

      Created question in FIWARE Q/A platform on 24-05-2018 at 09:05
      Please, ANSWER this question AT https://stackoverflow.com/questions/50503798/fiware-orion-context-broker-api-v2-accumulator-server-py

      Question:
      FIWARE Orion Context Broker API V2 - accumulator-server.py

      Description:
      When I try to create a subscription using the next query:

      curl -v localhost:1026/v2/subscriptions -s -S --header 'Content-Type: application/json' \
      > d @ <<EOF
      > {
      > "description": "A subscription to get info about Room1",
      > "subject": {
      > "entities": [
      >

      { > "id": "Room10", > "type": "Room" > }

      > ],
      > "condition":

      { > "attrs": ["pressure"] > }

      > },
      > "notification": {
      > "http":

      { > "url": "http://localhost:1028/publish" > }

      ,
      > "attrs": ["temperature"]
      > },
      > "expires": "2040-01-01T14:00:00.00Z",
      > "throttling": 5
      > }
      > EOF

      An error occurs:

      • About to connect() to localhost port 1026 (#0)
      • Trying ::1... connected
      • Connected to localhost (::1) port 1026 (#0)
        > POST /v2/subscriptions HTTP/1.1
        > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
        > Host: localhost:1026
        > Accept: /
        > Content-Type: application/json
        > Content-Length: 376
        >
        < HTTP/1.1 400 Bad Request
        < Connection: Keep-Alive
        < Content-Length: 72
        < Content-Type: application/json
        < Date: Thu, 24 May 2018 07:38:32 GMT
        <
      • Connection #0 to host localhost left intact
      • Closing connection #0 {"error":"BadRequest","description":"no condition attributes specified"}

      However, if I make the query using the V1 of the API all work right. I do not know why. Please help me!

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2018-05-24 12:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-05-24 12:05|CREATED monitor | # answers= 0, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

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

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

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

        Show
        backlogmanager Backlog Manager added a comment - 2018-05-25 21:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False
        Hide
        jason.fox Jason Fox added a comment -

        The text of the question is either incorrect or incomplete. Writing commands to the Context Broker using the text as written by the User *does not result in an error. *
        Therefore the answer from Fermin is correct - though presumably the User has some other issue.

        There has been no further responses from the User. It is impossible to come up with a better solution unless he responds further and provides more information.

        Show
        jason.fox Jason Fox added a comment - The text of the question is either incorrect or incomplete. Writing commands to the Context Broker using the text as written by the User *does not result in an error. * Therefore the answer from Fermin is correct - though presumably the User has some other issue. There has been no further responses from the User. It is impossible to come up with a better solution unless he responds further and provides more information.

          People

          • Assignee:
            jason.fox Jason Fox
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: