Skip to content

Instantly share code, notes, and snippets.

@JoeFurfaro
Created June 23, 2023 21:01
Show Gist options
  • Save JoeFurfaro/23a6f90ff4492943b5b7040cc9dcab50 to your computer and use it in GitHub Desktop.
Save JoeFurfaro/23a6f90ff4492943b5b7040cc9dcab50 to your computer and use it in GitHub Desktop.
import requests
import time
import json
# Get the cell meta
resp1 = requests.post("http://10.99.12.100:8000/api/addons/atom/services/GetCells")
print(resp1.json())
time = int(time.time())
data = json.dumps([{"time": time, "cycleTime": 10.34, "weldTime": 5.56}])
# Post some new results to TestCell (ID = 2, as obtained above)
resp2 = requests.post("http://10.99.12.100:8000/api/addons/atom/services/AddDataPoints", {"cell": 2, "data": data})
print(resp2.json())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment