Bulk devices state
get
https://api.upswift.io/v1/
get_devices_state
Bulk Devices state

Example

Python
import json
import requests
json_content = {'project_name': 'MYPROJECT',
'group_name': 'Production'
'user_token': 'YYYYYYYYYYYYYYY'}
call_request = requests.get("https://api.upswift.io/v1/get_devices_state", json=json_content)
call_response = json.loads(call_request.text)
if call_request.status_code != 200:
if call_request.status_code == 429:
error = "API limit reached"
else:
error = call_response["error_message"]
print(error)
else:
for device in call_response["message"]:
device_status = device["device_status"]
device_id = device["device_id"]
device_name = device["device_name"]
Copy link
Outline
get
Bulk Devices state