Skip to content

Instantly share code, notes, and snippets.

@gourneau
Created May 29, 2013 19:56
Show Gist options
  • Save gourneau/5673323 to your computer and use it in GitHub Desktop.
Save gourneau/5673323 to your computer and use it in GitHub Desktop.
Start Ion Torrent plugins via the API using a Python script
import requests
import json
#load config from your json files, and convert it to a python dict
config = {}
payload = {'plugin': ["HelloWorld"], "pluginconfig" : config }
headers = {'content-type': 'application/json'}
#the number is the primary key of the result to run the plugin on
r = requests.post("http://bebop.itw/rundb/api/v1/results/224/plugin/", data=json.dumps(payload), auth=('ionadmin', 'ionadmin'),headers=headers)
print r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment