Can get a single device enrollment status
This commit is contained in:
@ -17,6 +17,20 @@ def get_root_ca() -> str:
|
||||
return res.text
|
||||
|
||||
|
||||
def device_enrollment_status() -> str:
|
||||
"""
|
||||
Get current device enrollment status
|
||||
"""
|
||||
res = requests.get(
|
||||
f"{args.secure_origin}/devices_api/mgmt/enrollment_status?id={args.dev_id}",
|
||||
verify=args.root_ca_path,
|
||||
)
|
||||
if res.status_code < 200 or res.status_code > 299:
|
||||
print(res.text)
|
||||
raise Exception(f"Failed to check enrollment with status {res.status_code}")
|
||||
return res.json()["status"]
|
||||
|
||||
|
||||
def device_info():
|
||||
"""
|
||||
Get device information to return with enrollment and sync requests
|
||||
|
Reference in New Issue
Block a user