I am posting data points in pre-execution script and dont know how to create timestamp, trying Date.parse(api.date()) below, What’s the correct way to do this ?
requestBody={<br>"type": "LB",<br>"series": [<br>{<br>"timeseriesId": "custom:alteon.CurrSessions",<br>"dimensions": {<br>"CUSTOM_DEVICE": "Load Balancers"<br>},<br>"dataPoints": [<br>[<br>Date.parse(api.date()),<br>api.randomNextInt()<br>]<br>]<br>}<br>]<br>};<br>request.setBody(requestBody);