Bot & Automation
jorgasisten
/root/hermes-projects/jorgasisten
get_instance_info.py
text
import http.client
import json
conn = http.client.HTTPConnection("localhost", 8082)
headers = {
'apikey': 'ApiKeyJorgAsisten2026',
'Content-Type': 'application/json'
}
try:
conn.request("GET", "/instance/fetchInstances", "", headers)
res = conn.getcall = conn.getcall if hasattr(conn, 'getcall') else conn.getresponse
res = conn.getresponse()
data = res.read().decode("utf-8")
print("INSTANCES:", json.dumps(json.loads(data), indent=2))
except Exception as e:
print("ERROR:", str(e))