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

FIWARE.Question.Tech.Data.OrionContextBroker.JSONBadRequest

    Details

      Description

      Created question in FIWARE Q/A platform on 11-01-2016 at 21:01
      Please, ANSWER this question AT http://stackoverflow.com/questions/34730683/orion-json-bad-request

      Question:
      Orion JSON Bad Request

      Description:
      I'm currently trying to subscribe Orion and Cosmos. All data sent to Orion is being updated without any issue. But, when posting to http://xxx.xxx.xx.xx:1026/v1/subscribeContext I'm getting the following error:

      {
      "subscribeError": {
      "errorCode":

      { "code": "400", "reasonPhrase": "Bad Request", "details": "JSON Parse Error" }

      }
      }

      This is the json string I'm sending:

      {
      "entities": [

      { "type": "Location", "isPattern": "false", "id": "Device-1" }

      ],
      "reference": "http://52.31.144.170:5050/notify",
      "duration": "PT10S",
      "notifyConditions": [

      { "type": "ONCHANGE", "condValues": [ "position" ] }

      ],
      "attributes": [
      "position"
      ]
      }

      The entity updating OK in Orion is:

      {
      "type": "Location",
      "isPattern": "false",
      "id": "Device-1",
      "attributes": [
      {
      "name": "position",
      "type": "coords",
      "value": "24,21",
      "metadatas": [

      { "name": "location", "type": "string", "value": "WGS84" }

      ]
      },

      { "name": "id", "type": "device", "value": "1" }

      ]
      }

      I've tried with many different examples from readthedocs, and other responses in StackOverflow unsuccessfully.

      Which is the correct format? Should I call /subscribeContext before or after updating Orion with /contextEntities?

      Orion Context Broker version is 0.26.1.

      Thank you in advance.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        1d 19h 54m 1 Fermín Galán 13/Jan/16 7:57 PM
        In Progress In Progress Impeded Impeded
        2s 1 Fermín Galán 13/Jan/16 7:57 PM
        Impeded Impeded In Progress In Progress
        11d 21h 59m 1 Fermín Galán 25/Jan/16 5:57 PM
        In Progress In Progress Answered Answered
        1s 1 Fermín Galán 25/Jan/16 5:57 PM
        Answered Answered Closed Closed
        1s 1 Fermín Galán 25/Jan/16 5:57 PM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        mev Manuel Escriche made changes -
        HD-Enabler Orion [ 10875 ]
        HD-Chapter Data [ 10838 ]
        fermin Fermín Galán made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        fermin Fermín Galán made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        fermin Fermín Galán made changes -
        Status Impeded [ 10004 ] In Progress [ 3 ]
        Hide
        fermin Fermín Galán added a comment -

        No input recieved yet, so I'm answering the SOF question with partial information (if the user provides input at the end, the answer will be edited). Closing.

        Show
        fermin Fermín Galán added a comment - No input recieved yet, so I'm answering the SOF question with partial information (if the user provides input at the end, the answer will be edited). Closing.
        Hide
        fermin Fermín Galán added a comment -

        Waiting for user input (asked through comment at SOF).

        Show
        fermin Fermín Galán added a comment - Waiting for user input (asked through comment at SOF).
        fermin Fermín Galán made changes -
        Status In Progress [ 3 ] Impeded [ 10004 ]
        fermin Fermín Galán made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        oriondev TID Orion Developer made changes -
        Summary [fiware-stackoverflow] Orion JSON Bad Request FIWARE.Question.Tech.Data.OrionContextBroker.JSONBadRequest
        mev Manuel Escriche made changes -
        Assignee Fermín Galán [ fermin ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2016-01-12 00:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2016-01-12 00:05|CREATED monitor | # answers= 0, accepted answer= False
        backlogmanager Backlog Manager created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved: