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

Viewed 29

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.

P.S:

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: /'
1 Answers

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.

Related