Skip to main content

Hello,

I am trying to create an incident workflow which makes an  HTTP POST requests to en external server. I need to send the incident creation time in epoch timestamp format. It looks like {{incident.created_at}} is ISO 8601 . 

How can I get this timestamp?

 

Alex

Hi ​@alopezme

You’re correct that {{incident.created_at}} is in ISO 8601 format. PagerDuty doesn’t currently provide a built-in variable for epoch (Unix) timestamps in workflow payloads.

The most common approach is to convert the ISO 8601 string to epoch time on your external server after receiving the payload. Most programming languages have built-in functions for this conversion.

Alternatively, you can use a middleware service to intercept the payload, convert the timestamp, and forward it to your server in epoch format.

If you’d like to see native support for epoch timestamps in PagerDuty, consider submitting a feature request through support and/or your account manager.

Hope this helps, enjoy your day!

 


Reply