[Backlogmanager] [FIWARE-JIRA] (HELP-8863) [fiware-stackoverflow] Orion JSON Bad Request

José Ignacio Carretero Guarde (JIRA) jira-help-desk at jira.fiware.org
Mon May 29 11:34:00 CEST 2017


     [ https://jira.fiware.org/browse/HELP-8863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

José Ignacio Carretero Guarde reassigned HELP-8863:
---------------------------------------------------

    Assignee: Fermín Galán

> [fiware-stackoverflow] Orion JSON Bad Request
> ---------------------------------------------
>
>                 Key: HELP-8863
>                 URL: https://jira.fiware.org/browse/HELP-8863
>             Project: Help-Desk
>          Issue Type: Monitor
>          Components: FIWARE-TECH-HELP
>            Reporter: Backlog Manager
>            Assignee: Fermín Galán
>              Labels: fiware, fiware-cygnus, fiware-orion
>
> Created question in FIWARE Q/A platform on 11-01-2016 at 21:01
> {color: red}Please, ANSWER this question AT{color} https://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.



--
This message was sent by Atlassian JIRA
(v6.4.1#64016)


More information about the Backlogmanager mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy