that would be
curl --user <your gtmetrix user/ email>:<your api key> --form url=<your url> https://gtmetrix.com/api/0.1/test
upon which you’d get a response like;
{"credits_left":81,"test_id":"2bi9vIGK","poll_state_url":"https://gtmetrix.com/api/0.1/test/2bi9vIGK"}
and then you can poll for the result with:
curl --user <your gtmetrix user/ email>:<your api key> https://gtmetrix.com/api/0.1/test/2bi9vIGK
which in my case resulted in status queued;
{"resources":{},"error":"","results":{},"state":"queued"}
until after a couple of minutes I got;
{"resources":{"report_pdf":"https://gtmetrix.com/api/0.1/test/2bi9vIGK/report-pdf","pagespeed":"https://gtmetrix.com/api/0.1/test/2bi9vIGK/pagespeed","har":"https://gtmetrix.com/api/0.1/test/2bi9vIGK/har","pagespeed_files":"https://gtmetrix.com/api/0.1/test/2bi9vIGK/pagespeed-files","report_pdf_full":"https://gtmetrix.com/api/0.1/test/2bi9vIGK/report-pdf?full=1","yslow":"https://gtmetrix.com/api/0.1/test/2bi9vIGK/yslow","screenshot":"https://gtmetrix.com/api/0.1/test/2bi9vIGK/screenshot"},"error":"","results":{"onload_time":830,"first_contentful_paint_time":465,"page_elements":15,"report_url":"https://gtmetrix.com/reports/blog.futtta.be/cEAXfT0q","redirect_duration":0,"first_paint_time":465,"dom_content_loaded_duration":null,"dom_content_loaded_time":829,"dom_interactive_time":545,"page_bytes":143946,"page_load_time":830,"html_bytes":15231,"fully_loaded_time":1890,"html_load_time":338,"rum_speed_index":1026,"yslow_score":95,"pagespeed_score":100,"backend_duration":163,"onload_duration":2,"connect_duration":175},"state":"completed"}
So what might be leading to the timeout you mention (if not a connection issue) is the fact that a the GTMetrix job stays on the queue for too long a time. Guess we need debug logging in AsyncJS ??
frank