I have created a “proof of concept” synthetics api test script that gets one of our apis. I’ve implemented an assert for response status and time(created timer at start/end of request/response). However, what I’d really like to validate for each api response the information in the Overview -> “time to first byte” is under some number like 500ms. However, I’m having trouble finding an example or steps to access that information from my script. Is there an article, example, or post on how to do this? Thanks
Hi, @david.isaman: I don’t know of a way to get this data from within your script, other than using a timer as you have already done. You may, however, use NRQL to query data about completed checks:
SELECT duration FROM SyntheticRequest WHERE monitorName = 'Your Monitor Name' AND URL = 'https://endpoint'
Thanks for the quick response. I expected that would be the answer, but I wanted to confirm since I’m new to using the Synthetic api tests.