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

Adding A Condition On A Problem API Query Second

crabbylou
Helper

I have an existing query for returning back problems in the V2 Problem API for a particular Kubernetes namespace. 

My question is, how can I tack on an additional condition for a particular Kubernetes workload in that namespace?

https://{environmentid}.live.dynatrace.com/api/v2/problems?pageSize=10&fields=evidenceDetails,impactAnalysis,recentComments&from=1769403600000&to=1769457600000&entitySelector=type(CLOUD_APPLICATION),toRelationships.IS_NAMESPACE_OF_CA(type(CLOUD_APPLICATION_NAMESPACE),entityName("some-namespace-name")) 

Any help greatly appreciated.

(Soon to retire from IT) Crabby Lou

2 REPLIES 2

raksh_hitha
Dynatrace Enthusiast
Dynatrace Enthusiast

Hi @crabbylou 

If you want to add both workload and namespace condition, could you try out this entity selector?
type(CLOUD_APPLICATION),entityName.equals("WORKLOAD-NAME"),toRelationships.IS_NAMESPACE_OF_CA(type(CLOUD_APPLICATION_NAMESPACE),entityName("NAMESPACE-NAME"))

Thank you raksh_hitha

Featured Posts