Add cancel to API
|
06-27-2013, 06:25 AM
Post: #1
|
|||
|
|||
Add cancel to API
Marcel was telling me about some weird hack he had to allow tests to be cancelled via his wrapper.
Suspect he really needs a cancel endpoint in the API that takes the test id and api key Andy Using WebPageTest - http://usingwpt.com/ |
|||
06-28-2013, 12:27 AM
Post: #2
|
|||
|
|||
RE: Add cancel to API
That was a documentation (lack of) problem. I just documented the cancellation entrypoint: https://sites.google.com/a/webpagetest.o...ling-Tests
Right now it spits back HTML but it is trivial to also add JSON support. |
|||
06-28-2013, 02:25 AM
Post: #3
|
|||
|
|||
RE: Add cancel to API
Cool, Thanks
Andy Using WebPageTest - http://usingwpt.com/ |
|||
07-17-2013, 04:20 AM
Post: #4
|
|||
|
|||
RE: Add cancel to API
(06-28-2013 12:27 AM)pmeenan Wrote: That was a documentation (lack of) problem. I just documented the cancellation entrypoint: https://sites.google.com/a/webpagetest.o...ling-Tests I'm trying to implement a call to the canceltest API, and I always seem to get the following message: "<h3>Sorry, the test could not be cancelled. It may have already started or been cancelled</h3><form><input type="button" value="Back" onClick="history.go(-1);return true;"> </form>" The test I'm trying to cancel right now says "Testing: Waiting behind 22 other tests." I guess my question is: Why won't it let me cancel the test, even though that test isn't running right now, it's just sitting in a queue? BTW, I think it's great you added this feature, I can't wait to add this to eliminate tests that are "mistakes" |
|||
07-17-2013, 04:44 AM
Post: #5
|
|||
|
|||
RE: Add cancel to API
(06-28-2013 12:27 AM)pmeenan Wrote: That was a documentation (lack of) problem. I just documented the cancellation entrypoint: https://sites.google.com/a/webpagetest.o...ling-Tests I was speaking to a developer who's been using the API for awhile, and he mentioned once it's picked up, even if it's sitting in a queue, it can't be cancelled. Is it possible to get the agent to poll for cancelled tests before running the test, or remove it from the queue (maybe by polling or removing it from the list)? |
|||
07-20-2013, 03:08 AM
Post: #6
|
|||
|
|||
RE: Add cancel to API
I just tested to be sure and the canceling looks to be working fine. Are you trying to cancel a test that was run through a relay? If so that isn't currently supported. Tests managed by the local server should cancel fine as long as they are still in the queue (I just tested it on the public instance to be sure: http://www.webpagetest.org/result/130719...03e5fa095/ )
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)