I want to retrieve all the entity types that has been defined in the Orion context broker. I searched the tutorials and find this . But this API give an empty message: []
.
I have also tried to add other headers like fiware-service
and fiware-servicepath
but it made no difference.
PS:
this is the API I used for getting all the entity types:
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.
Do GET /v2/entities
to check it. If the result is []
then my hypothesis gets confirmed. You can try to create some entity (using POST /v2/entities
) and try again.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.