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

V2 API - Get Platform and Get Number of CPUs


Which API do I use to get the configuration for an host entity. I am particularly interested in the number of CPUs, and in the platform (Windows, Linux, other).


Any help would be greatly appreciated.




Dynatrace Advisor
Dynatrace Advisor

You can use the Monitoring Entities API, here you can find the osType, logicalCpuCores and cpuCores parameters with the info you are looking for:



Thank you. I have already started using that API to get this information.

So what's the actual API query to get this? 


Their documentation has no examples in the EntitySelector section and this is the only google result I get for how to get this data, but I don't actually know what the API call is to get this returned.


You can use Monitored entities API.

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

Yes, I can see that in the comment I replied to... My question was more what the exact query was because there are no good examples of using the Monitored Entities API in their documentation.  There's little snippets here and there, but no full examples like they provide in their Metrics API docs.


For example, you make a GET request against "https://{environmentid}"HOST")" 

And you received host list:



    "totalCount": 1,
    "pageSize": 200,
    "entities": [
            "entityId": "HOST-XXXXXXXXXXXXXXXX",
            "type": "HOST",
            "displayName": "YYYYYYYYY"



Using entityId, you can get more details makinng another GET request against "https://{environmentid}".

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl


when you get into  API V2  search  for entities 


you have field call : entityselector, put the parameter      type("host")

seconded field call : fields, put the parameter    properties.logicalCpuCores,properties.cpucores,properties.ostype

that give you the CPU cores ,CPU logical cores and operation system

**when you run that API from the Dynatrace you will get a window with the query that you can use later on 



Featured Posts