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

Which API?: kubernetes > get list of project ID, project name, namespace, PODs


Use case & Goal: 

Applicable to both "GCP > GKE" and "Openshift". We intend to retrieve list of project ID (gce project id if apply), project name(gce project name if apply), namespace, PODs, cluster name, process group name ( if present).


Question: which API we can use to grab above?  namespace is must-have info.  


DynaMight Leader
DynaMight Leader

Hi @avrildong,


Maybe there is a more simple way but I would use the from the Enviroment Api v2 Monitored entities set.


I have just created a auto tag for Kubernetes entities.



Then I have used thre Get / entities Api with with the Entity Selector Type("Process_Group_Instance"),Tag("Kubernetes"). So I have already received the a list of kubernetes process group list.



From the list I have picked up a process group instance and checked it with the following Api call: GET / entities/({entityId}:




I have already received the properties:



Try and play with these Monitored entities API calls.


I hope it helps. 


Best regards,











Dynatrace Community RockStar 2024, Certified Dynatrace Professional


Thanks for your approach! It works.

FYI one more approach I just got from other parties and it works too, similar principle as yours using same identifier "kubernetesNamespaces".

api/v1/entity/infrastructure/processes > identify via "kubernetesNamespaces" , no need to custom tag (save one step), just straight use that.

So as of now 2 API - either:

  • api/v2/entities?entitySelector=Type("Process_Group_Instance")&fields=firstSeenTms,lastSeenTms,properties,tags,managementZones , then filter by "properties"."metadata"."key" start with "KUBERNETES_%"
  • api/v1/entity/infrastructure/processes

Featured Posts