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

How to give startTime and endTime for events?

Naveen
Guide

I am using events API v2 (https://www.dynatrace.com/support/help/dynatrace-api/environment-api/events-v2/post-event) 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.

5 REPLIES 5

Julius_Loman
DynaMight Legend
DynaMight Legend

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.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Hey @Julius_Loman is it in seconds or milliseconds?

In UTC milliseconds.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Hey @Julius_Loman I have tried below snippet, but getting error

Naveen_0-1669435637299.png

Error:

Naveen_1-1669435712561.png

The timestamps are too old in your case. You cannot push non-problem opening events older than 30 days.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts