04 Apr 2022 07:44 PM - last edited on 25 May 2023 10:50 AM by Michal_Gebacki
We are trying to create an SLO by invoking a service that contains 11 key requests and about 100 requests, when using service.keyRequest it brings us only the key requests, but in reality we only need 2 URLs of that service. Here some examples:
Will it be possible with Entity selector to only select 2 URLs of type key request and not the other 9?
Thanks!
Solved! Go to Solution.
04 Apr 2022 07:58 PM - edited 04 Apr 2022 08:11 PM
@Marcelo_santand , why so complicated? You should filter it straight away (in the examples the /url1 and /url2 stand for the key request name)
type("SERVICE_METHOD"),entityName.in("/url1","/url2")
If you have multiple key requests (aka SERVICE_METHODs), you can also use entityIds such as:
type("SERVICE_METHOD"),entityId("SERVICE_METHOD-00B7FD10945B403C","SERVICE_METHOD-00F1E23072E6752F")
Or you can narrow it down by the relation (only keyrequests for a particular service):
type("SERVICE_METHOD"),entityName.in("/url1","/url2),fromRelationships.isServiceMethodOfService(entityId(SERVICE-08DB0C98768A0660))
For the same as above but not using entity ID:
type("SERVICE_METHOD"),entityName.in("/url1","/url2"),fromRelationships.isServiceMethodOfService(type(SERVICE),entityName("MyServiceName"))
04 Apr 2022 08:08 PM
Thank you very much, I was going through the documentation but I couldn't find the entity name.in("/url1","/url2). Thanks for the help.
06 Apr 2022 04:30 PM
Hello,
Please find the documentation here : https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/get-entities-list