4 Commits

Author SHA1 Message Date
1cdfbc6dc5 Updated build number and added dependencies to package
All checks were successful
Build python package / Build (push) Successful in 24s
2026-03-18 20:48:32 +01:00
Jason SECULA
90378bb2e5 updated build number for package
Some checks failed
Build python package / Build (push) Has been cancelled
2026-02-26 13:40:23 +01:00
Jason SECULA
f34f1ae793 Added GetTagDevices
Some checks failed
Build python package / Build (push) Has been cancelled
2026-02-26 13:37:00 +01:00
e53af9bb26 trying workflow fix
All checks were successful
Build python package / Build (push) Successful in 20s
2026-02-20 06:36:26 +01:00
3 changed files with 20 additions and 3 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -1,15 +1,20 @@
[build-system] [build-system]
requires = [ requires = [
"setuptools >= 77.0.3", "setuptools >= 77.0.3",
"requests >= 2.32.5" "requests >= 2.32.5",
"cryptography"
] ]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[project] [project]
name = "AirwatchAPI" name = "AirwatchAPI"
version = "1.0.1" version = "1.0.3"
description = "A module python to make it easier to use Workspace One API" description = "A module python to make it easier to use Workspace One API"
readme = "README.md" readme = "README.md"
dependencies = [
"requests >= 2.32.5",
"cryptography"
]
requires-python = ">=3.7" requires-python = ">=3.7"
classifiers = [ classifiers = [
"Programming Language :: Python :: 3" "Programming Language :: Python :: 3"