fiwarefiware-orion

How to get the servicePath from /v2/entities GET call


I'm interested to get the servicePath when I make a GET call on entities (/v2/entities). I also found this topic(Get all Fiware-ServicePath for a specific Fiware-Service) but I'm asking if it was implemented. Is foreseen an option in the query?

Thanks a lot


Solution

  • Usually you must specify a concrete ServicePath header in order to GET a list of entities. So I assume you are using some kind of wildchar: /# to retrieve entities from several ServicePaths at once.

    I'm almost sure there is no functionality to label, or group, each retrieved entity with its ServicePath for those kind of open queries. It's not on any roadmap also.

    ServicePaths are intended to provide some kind of isolation, so it's not usual to make open queries over them (sometimes it may happen at DB Level, but not at Context Level).

    Maybe you don't need to use different ServicePath but just to define some classification attribute within the same SP. If ServicePath are your only option I think you will need to make separate queries for each one of them.

    Best.