14 Commits
1.0 ... 1.0.2

Author SHA1 Message Date
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
Jason SECULA
f5abc6f0f4 removed file creation in gitlab-ci
All checks were successful
Build python package / Build (push) Successful in 14s
2026-02-19 10:41:19 +01:00
Jason SECULA
14b48e7f41 fixed __init__
Some checks failed
Build python package / Build (push) Has been cancelled
2026-02-19 10:38:43 +01:00
Jason SECULA
930927b489 updated build number for package
All checks were successful
Build python package / Build (push) Successful in 17s
2026-02-19 10:30:18 +01:00
Jason SECULA
9c468adf7d added __all__ list
Some checks failed
Build python package / Build (push) Failing after 25s
2026-02-19 10:27:29 +01:00
Jason Secula
465064f412 Update .gitlab-ci.yml file 2026-02-13 14:45:12 +01:00
Jason Secula
069caaf2d1 Update .gitlab-ci.yml file 2026-02-13 14:35:50 +01:00
Jason Secula
73f21ac6cd Update .gitlab-ci.yml file 2026-02-13 14:29:22 +01:00
Jason Secula
23a617ef62 Update .gitlab-ci.yml file 2026-02-13 14:25:21 +01:00
Jason Secula
cfd6c2acb9 Update .gitlab-ci.yml file 2026-02-13 14:16:03 +01:00
Jason Secula
3645ecc257 Update .gitlab-ci.yml file 2026-02-13 14:12:41 +01:00
Jason Secula
d7dbbda2f9 Update .gitlab-ci.yml file 2026-02-13 14:11:57 +01:00
Jason Secula
5f0556c5c9 Update .gitlab-ci.yml file 2026-02-13 14:09:10 +01:00
5 changed files with 31 additions and 2 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

16
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,16 @@
image: python:latest
variables:
TWINE_USERNAME: gitlab-ci-token
TWINE_PASSWORD: $CI_JOB_TOKEN
build: # This job runs in the build stage, which runs first.
script:
- pip install build twine
- mv AirwatchAPI.py build/src/AirwatchAPI/
- cd build/
- python -m build
- python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
rules:
- if: $CI_COMMIT_TAG

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

@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "AirwatchAPI" name = "AirwatchAPI"
version = "1.0.0" version = "1.0.1"
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"
requires-python = ">=3.7" requires-python = ">=3.7"

View File

@@ -0,0 +1 @@
__all__ = ["AirwatchAPI"]