Compare commits
2 Commits
f5abc6f0f4
...
1.0.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f34f1ae793 | ||
| e53af9bb26 |
@@ -10,7 +10,7 @@ jobs:
|
|||||||
uses: actions/checkout@main
|
uses: actions/checkout@main
|
||||||
- name: Building the package
|
- name: Building the package
|
||||||
run: |
|
run: |
|
||||||
mv ${{ gitea.workspace }}\AirwatchAPI.py ${{ gitea.workspace }}\build\src\AirwatchAPI\
|
powershell mv ${{ gitea.workspace }}\AirwatchAPI.py build\src\AirwatchAPI\
|
||||||
cd ${{ gitea.workspace }}\build
|
cd ${{ gitea.workspace }}\build
|
||||||
python -m build
|
python -m build
|
||||||
- name: Publish package
|
- name: Publish package
|
||||||
|
|||||||
@@ -73,6 +73,18 @@ class AirwatchAPI:
|
|||||||
return devices
|
return devices
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def GetTagDevices(self, tagID):
|
||||||
|
cmdURI = f"/api/mdm/tags/{tagID}/devices"
|
||||||
|
airwatchHeaders = self.GetHeaders(cmdURI)
|
||||||
|
uri = f"{self.Server}{cmdURI}"
|
||||||
|
result = requests.get(uri, headers=airwatchHeaders)
|
||||||
|
devices = []
|
||||||
|
if(result.status_code == 200):
|
||||||
|
for dev in result.json()["Device"]:
|
||||||
|
devices += [dev["DeviceId"]]
|
||||||
|
return devices
|
||||||
|
return []
|
||||||
|
|
||||||
def GetDeviceApps(self, device):
|
def GetDeviceApps(self, device):
|
||||||
cmdURI = f"/api/mdm/devices/{device.Uuid}/apps/search"
|
cmdURI = f"/api/mdm/devices/{device.Uuid}/apps/search"
|
||||||
airwatchHeaders = self.GetHeaders(cmdURI)
|
airwatchHeaders = self.GetHeaders(cmdURI)
|
||||||
|
|||||||
Reference in New Issue
Block a user