Device state
get
https://api.connect.jfrog.io/v1/
get_device_state
Device state

Example

Python
1
import json
2
import requests
3
4
json_content = {'device_id': 'd-1234-abcd',
5
'user_token': 'YYYYYYYYYYYYYYY'}
6
7
call_request = requests.get("https://api.connect.jfrog.io/v1/get_device_state", json=json_content)
8
call_response = json.loads(call_request.text)
9
10
if call_request.status_code != 200:
11
if call_request.status_code == 429:
12
error = "API limit reached"
13
else:
14
error = call_response["error_message"]
15
print(error)
16
17
else:
18
device_status = call_response["message"]["device_status"]
19
device_id = call_response["message"]["device_id"]
20
21
Copied!
Copy link