Events on particular to CSV

We have a requirement to retrieve all the events on a particular host into a sheet(excel/CSV).

I tried using Event API-2 to get the event, but the output I am receiving is for all the hosts, when tried using Entity selector with HostId, then we are getting no response body.

I am using the below API call,

curl -X GET "https://xxxxxx.live.dynatrace.com/api/v2/events?from=-24h&to=now&eventSelector=eventType(“PROCESS\_RESTART”)&entitySelector=entityId("HOST-xxxxxxxxxxxx22) " -H “accept: application/json; charset=utf-8” -H “Authorization: Api-Token dtxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”

Hi @Pranav1

Since you are looking for process restarts the information you are getting back are not including the host id or name.

So for each entry in the response you will need to check the process entity with v2/entities/{entityId}  rest IP to check if its belong to the host

For example

HTH

Yos

Here is the time to convert this into an Idea @Pranav1