Fiware-Orion: Subscribe to all entities

做~自己de王妃 提交于 2019-12-24 02:18:24

问题


In Orion 1.4.0 I used the following JSON to subscribe for all entities:

{
  "description": "Update average rating",
  "subject": {
    "entities": [
      {
        "idPattern": ".*",
        "type": ""
      }
    ],
    "condition": {
      "attrs": []
    }
  },
  "notification": {
    "http": {
      "url": "http://URL:1026/v2"
    }
  },
  "expires": "2020-01-01T00:00:00.00Z",
  "throttling": 5
}

Today I tried this JSON with an Orion 1.7.0 and this doesn't work anymore. It returns the following error:

ERROR 400
{"error":"BadRequest","description":"entity type length: 0, min length supported: 1"}

I realized, that it's because of the "type": "". I changed it to "type": "*". The subscription works, now but I do not get any notifications. Probably the * is not the correct pattern to subscripbe for all entities.

For the reference: https://github.com/telefonicaid/fiware-orion/issues/2876


回答1:


Try using "typePattern": ".*" instead of "type": "".



来源:https://stackoverflow.com/questions/43230064/fiware-orion-subscribe-to-all-entities

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!