11 Dec 2023 01:29 PM
I have tons of API queries for extracting OpenShift metrics. With that, I am trying to develop a query (without pulling back tons of data) to validate if a Kubernetes Namespace exists in the Dynatrace instance.
What would be the best way to do this? It would be nice if the DT V2 API has the equivalent of a SQL "count" or boolean flag if the supplied namespace exists.
Any ideas appreciated.
Thanks,
Lou
Solved! Go to Solution.
12 Dec 2023 10:44 AM
Hi,
api/v2/entities
could be ok.
As entity selector, you could use:
type(cloud_application_namespace),entityName.equals(YOUR_NAMESPACE)
+ possibile other attributes to add more filtering if needed.