Skip to content

Instantly share code, notes, and snippets.

@sdelamo
Created November 24, 2015 08:08
Show Gist options
  • Save sdelamo/86abf8d7d9f3bbd659da to your computer and use it in GitHub Desktop.
Save sdelamo/86abf8d7d9f3bbd659da to your computer and use it in GitHub Desktop.
A script to remove a list of tags from mandrill
def apiKey = 'yoursecretApiKey'
[
'tagNameA', 'tagNameB'].each { tagName ->
def process = [ 'bash', '-c', "curl -v -k -X POST -H \"Content-Type: application/json\" -d '{\"key\":\"${apiKey}\", \"tag\":\"${tagName}\"}' https://mandrillapp.com/api/1.0/tags/delete.json" ].execute()
process.waitFor()
println process.err.text
println process.text
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment