Fiware Orion subscription to STH in NGSI V2 with legacy values

151 Views Asked by At

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.

0

There are 0 best solutions below