Created
June 21, 2015 15:28
-
-
Save jhoguet/95c36c64c02cf17684f4 to your computer and use it in GitHub Desktop.
How do I delete all the jobs in my sauce labs account?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SauceLabs = require('saucelabs'); | |
var myAccount = new SauceLabs({ | |
username: "...", | |
password: "..." | |
}); | |
myAccount.getJobs(function (err, jobs) { | |
jobs.forEach(function(job){ | |
myAccount.send({ | |
method : 'DELETE', | |
path : ':username/jobs/' + job.id | |
}, function(err){ | |
if (err){ | |
console.log('failed to delete ' + job.id + ' ' + err.toString()); | |
} | |
else { | |
console.log('deleted', job.id); | |
} | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
there appears to be some caching where the api will return none, but you still may seem them in the ui...