10 Mar 2022 06:11 PM - last edited on 14 Mar 2022 11:02 AM by MaciejNeumann
I'm trying to list Service Methods (entityId and name) of a given Service ID using API. I tried v2/entities API but it lists the Service Method Group ID and not Service Methods. Looking for assistance on this.
Example:
/api/v2/entities?entitySelector=entityId%28%22SERVICE-****%22%29&fields=fromRelationships%2C%20toRelationships
Solved! Go to Solution.
01 Apr 2022 11:47 AM
Hi @shreyas_shivapr ,
that should be possible with e.g. following selector using Service ID
type(service_method),fromRelationships.isServiceMethodOf(type(service_method_group),fromRelationships.isGroupOf(type(service),entityId("SERVICE-008E1A2A04B8303E")))
Best,
Mark
25 Apr 2022 09:27 AM
Hi mark_bley
I tried the same approach but for me the results were coming to be empty, can you help here. I replaced the enitityId wrt my application
type(service_method),fromRelationships.isServiceMethodOf(type(service_method_group),fromRelationships.isGroupOf(type(service),entityId("SERVICE-E497A5840A6A5468")))
25 Apr 2022 02:05 PM
Hi @Harsh,
please try the query bit by bit, i.e. starting with
type(service),entityId("SERVICE-008E1A2A04B8303E")
and then
type(service_method_group),fromRelationships.isGroupOf(type(service),entityId("SERVICE-008E1A2A04B8303E"))
and check when you are not getting any more results.
26 Apr 2022 11:23 AM - edited 26 Apr 2022 12:18 PM
Tried the above approach but still now able to get the results. can you suggest the right metric selector that would help
type(SERVICE_METHOD),fromRelationships.isServiceMethodOf(type(service_method_group)
till the above selector i am able to see all service_methods , how can we sort further using the EnitiyID - if i add that then result comes to be empty