简体   繁体   English

无法从 FIWARE Orion Context Broker 检索实体类型

[英]Not be able to retrieve entity types from FIWARE Orion Context Broker

I want to retrieve all the entity types that has been defined in the Orion context broker.我想检索在 Orion 上下文代理中定义的所有实体类型。 I searched the tutorials and find this .我搜索了教程并找到了这个 But this API give an empty message: [] .但是这个 API 给出一个空消息: []

I have also tried to add other headers like fiware-service and fiware-servicepath but it made no difference.我还尝试添加其他标头,例如fiware-servicefiware-servicepath但没有任何区别。

PS: PS:

this is the API I used for getting all the entity types:这是我用来获取所有实体类型的 API:

curl localhost:1026/v2/types -s -S -H 'Accept: application/json'

and this is another one with two aforementioned headers:这是另一个带有两个上述标题的标题:

curl 178.252.170.26:1026/v2/types -s -S -H 'Accept: application/json'\
  -H 'fiware-service: openiot' \
  -H 'fiware-servicepath: /'

The most probable cause of getting [] as response to GET /v2/types is that you don't have any entity in that service/subservice at all.获得[]作为对GET /v2/types的响应的最可能原因是您在该服务/子服务中根本没有任何实体。

Do GET /v2/entities to check it.GET /v2/entities来检查它。 If the result is [] then my hypothesis gets confirmed.如果结果是[]那么我的假设得到证实。 You can try to create some entity (using POST /v2/entities ) and try again.您可以尝试创建一些实体(使用POST /v2/entities )并重试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM