1

Im working with sth, with ngsi v1 i dont have any problems. When i try to use it with ngsi v2 ( trough legacy values) im having several problems.

Im creating a subscription in v2 in this way:

POST /v2/subscriptions HTTP/1.1
Host: <orion-context-broker-host>:<orion-context-broker-port>
Content-Type: application/json
fiware-service: xxxx
fiware-servicepath: /xxxx
{
"description": "Probando legacy",
"subject": {
"entities": [
  {
    "id": "sthlegacy2",
    "type": "NGSIV2"
  }
],
"condition": {
  "attrs": []
}
},
"notification": {
  "attrsFormat":"legacy",
  "http": {
    "url": "http://<sth-host>:<sth-port>/notify"
  },
  "attrs": []
},
"expires": "2040-01-01T14:00:00.00Z",
"throttling": 0
}

The subscription is well created but when i try to update a value the subscription state changes to "failed", and it does not create anything in sth.

I would appreciate a solution, something I must be doing wrong.

Nacho
  • 11
  • 2
  • Could you edit your question post in order to include the request you use to create the subscription that works in NGSIv1, pls? In addition, could you include the update that you are using to trigger the notification (I assume the update is the same in both cases of subscriptions)? – fgalan Jan 18 '18 at 10:56
  • Also include in the question post the Orion Context Broker version you are using (the output of `contextBroker --version`)? Thx! – fgalan Jan 18 '18 at 10:57

0 Answers0