I am using events API v2 (Events API v2 - POST an event — Dynatrace Docs) and trying to post an CUSTOM_DEPLOYMENT event but don’t know how to give startTime and endTime as per documentation it should be integer value.
I have also tried passing current timestamp but it’s giving an error.
Both parameters are in the epoch time format. You need to convert your timestamp into epoch format.
Keep in mind both parameters are optional. If you do not specify startTime, current time is used.