Got to say the Resin SDK documentation is not the clearest and some examples of how to use it would be great but I worked it out. This is my code to authenticate and then get all of the devices that belong to the “Sensors” application, then access the API on each of them.
import resin, requests
from resin import Auth
authenticator = resin.Auth()
device = resin.models.Device()
token = "mytoken"
authenticator.login_with_token(token)
devices = device.get_all_by_application("Sensors")
uuids = []
for device in devices:
uuids.append("https://" + device['uuid'] + ".resindevice.io")
for uuid in uuids:
print requests.get(uuid).json()