Batches
...
Batches API
Batches

Stop All Batches

3min
stop all batches stop all batches on your account that are currently in the queued or running state by making an http get request to the /batches/stopall endpoint the batches will be set back to the idle state for batches that are currently queued you will be refunded for the credits allocated for that batch run if the batch has already started running (i e it is in the state running ) then a credit refund will not be issued, but the batch will still be stopped example get get /batches/stopall http https //api serpwow\ com/live/batches/stopall?api key=demo$ curl "https //api serpwow\ com/live/batches/stopall?api key=demo"const axios = require('axios'); const params = { api key 'demo' } axios get('https //api serpwow\ com/live/batches/stopall', { params }) then(response => { const apiresponse = response data; console log('batches stopped '); }) catch(error => { console log(error); });import requests params = { 'api key' 'demo' } api result = requests get('https //api serpwow\ com/live/batches/stopall', params) api response = api result json() print "batches stopped "\<?php $querystring = http build query(\[ 'api key' => 'demo', ]); $ch = curl init(sprintf('%s?%s', 'https //api serpwow\ com/live/batches/stopall', $querystring)); curl setopt($ch, curlopt returntransfer, true); curl setopt($ch, curlopt followlocation, true); \# the following options are required if you're using an outdated openssl version \# more details https //www openssl org/blog/blog/2021/09/13/letsencryptrootcertexpire/ curl setopt($ch, curlopt ssl verifyhost, false); curl setopt($ch, curlopt ssl verifypeer, false); curl setopt($ch, curlopt timeout, 180); $json = curl exec($ch); curl close($ch); $api result = json decode($json, true); print r($api result); echo "batches stopped ", php eol; ?> serpwow responds with a json object confirming that the batches have been stopped { "request info" { "success" true, "message" "23 batches stopped" }, "batches stopped" 23, "batches failed to stop" 0 } next steps get batches https //docs trajectdata com/serpwow/batches api/batches/get list batches https //docs trajectdata com/serpwow/batches api/batches/list