Skip to content

Instantly share code, notes, and snippets.

@moonstruck
Forked from jfinstrom/astari.py
Last active August 29, 2015 14:17
Show Gist options
  • Save moonstruck/89ae5b0f20663e5c6f2a to your computer and use it in GitHub Desktop.
Save moonstruck/89ae5b0f20663e5c6f2a to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import requests
from requests.auth import HTTPBasicAuth
IPADD='192.168.0.32:8088/ari/'
ENDPOINT = 'events'
ARIUSER=''
ARIPASS=''
r = requests.get('http://%s%s' % (IPADD,ENDPOINT),auth=HTTPBasicAuth(ARIUSER,ARIPASS))
results = r.text
#results = r.json()
print results
#for r in results:
#print "Device: %s Status is %s" % (r['resource'],r['state'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment