cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dynatrace API v2 - Develop an API Query to validate a Kubernetes Namespace?

crabbylou
Helper

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

1 REPLY 1

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.

Featured Posts