WebPagetest Forums
api questions - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Private Instances (/forumdisplay.php?fid=12)
+--- Thread: api questions (/showthread.php?tid=14183)



api questions - ebridges - 01-28-2016 01:17 AM

Thanks for providing such a terrific product & service, it's much appreciated!

I was wondering if two API endpoints might be enhanced (or please let me know if they exist already). Failing this, we may just end up forking the code to make the changes ourselves, but wanted to reach out to see what kind of support there may be.

We have a private instance running, and these changes would help us to avoid hardcoding data in our scripts in one case, and can aid us in reporting in the other case.

Firstly: /getLocations.php?f=
Can this endpoint be enhanced to include the same value (highlighted in attached screenshot) that is provided in the "Connection" dropdown on the UI (which is called "location" behind the scenes):
[Image: 2Uuf5kKpCMpr]
We use this value when executing tests (passed as the "location" parameter to /runtest.php), and have the choices hardcoded in our scripts.

Secondly: Can an endpoint be provided (or an existing one enhanced) that can list out the test IDs for a given website domain or some other criteria?

Thanks,
Edward Bridges
Engineering Manager
Squarespace, Inc.


RE: api questions - andydavies - 01-29-2016 04:52 AM

I can't see the screenshot to understand exactly what you want but are you after the ability to see the connection speeds supported by each location in a format you can submit them to the API?

One way to support the second request would be to extend testlog.php to return a JSON response (I might have a look at this on the w/e)


RE: api questions - ebridges - 01-29-2016 08:36 AM

Thanks for the reply!

To clarify, when selecting a value from the "Connection" dropdown via the web ui, it submits a value like Dulles:Chrome.Cable.

That's the value we send as the location parameter to /getLocations.php

I was hoping to obtain that list from an endpoint so we don't need to have it hardcoded somewhere.

(01-29-2016 04:52 AM)andydavies Wrote:  I can't see the screenshot to understand exactly what you want but are you after the ability to see the connection speeds supported by each location in a format you can submit them to the API?

One way to support the second request would be to extend testlog.php to return a JSON response (I might have a look at this on the w/e)