Python wrapper for the HaloPSA API
Project description
HaloPSA API package for Python
Inspired by homotechsual's Powershell library for HaloPSA
All base endpoints are currently implemented to some extent. No endpoints have delete functionality yet, as I was worried I would accidentally delete something while testing.
This package should also work for HaloITSM!
Installation and setup
Requirements
- Python (tested from Python 3.9 to 3.13 right now)
- HaloPSA API key
- Some basic understanding of the Halo API (will try to reduce this)
Installing
pip install HaloPSA
Getting an API key from Halo
- Login to your Halo instance and go to HaloPSA API here: (your tenant).halopsa.com/config/integrations/api
- Under Applications, click "View Applications"
- Create a new application, and set type to Client ID and Secret (Service).
- Name it something memorable, so it doesn't get deleted accidentally.
- Set login type to Agent and select any agent (Make sure the account you pick has permissions to do the actions you will be using)
- Make sure that "Active" is ticked and click save (Not: this shouldn't be needed, but I have lost my progress too many times to risk it)
- Note your Client ID and Secret, you will need these later!
- Click on the integration/Application you just created and go to Permissions.
- Set permissions to either All or, if you know what you'll be using, enable just those permissions. (I recommend testing with
all:standardand then disabling permissions selectively, that way you know your connection is working before you start troubleshooting) - Click Save and move on to the next step.
Getting Started in Python
Now that you have your API information, you can get up and running in Python!
- Add your API credentials (Highly recommend putting this in a .env file, or literally anywhere other than hardcoded into your script)
HALO_CLIENT_ID = [Your Client ID]
HALO_SECRET = [Your Secret]
HALO_TENANT = [Your Halo Instance/tenant] Eg: https://[THIS PART OF THE URL].halopsa.com
- Import the HaloPSA package
from HaloPSA import Halo
- Run your first request!
halo = Halo(HALO_TENANT,HALO_ID,HALO_SECRET)
all_users = halo.Users.search() # Get all users
for single_user in all_users: # Print each user, one by one
print(single_user)
Further reading
I highly recommend checking the official Halo API documentation here: https://halo.halopsa.com/apidoc/info and for an even more in depth list, check out the swagger file here: https://halo.halopsa.com/api/swagger/index.html
Feel free to ask questions in the github issues area, I will try my best to answer.
Endpoints
Base/Officially documented Endpoints
All base endpoints are now implemented at some level. No endpoints have delete functionality yet.
Unofficial endpoints
In addition to the base endpoints, the following unofficial endpoints (from the swagger) are implemented at some level
- Distribution Lists
- TopLevel
- Currency
- SoftwareLicences (Subscriptions)
- UserRoles
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file halopsa-2.0.2.tar.gz.
File metadata
- Download URL: halopsa-2.0.2.tar.gz
- Upload date:
- Size: 44.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c66ee4e3265e2a4bfcfd726e6ea03ca6ceef2e32ea6b952c4262dfa766695573
|
|
| MD5 |
b9f0a22f05101f392c60efe36dbc3f5d
|
|
| BLAKE2b-256 |
d8c8fa1db218eb6a3d9cfa70b4aca61e002ed6086bbb14156cd8666b0ce2ae51
|
Provenance
The following attestation bundles were made for halopsa-2.0.2.tar.gz:
Publisher:
python-publish.yml on ItsJustAGitHubMichealWhosGonnaSeeIt5Ppl/HaloPSA-API
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
halopsa-2.0.2.tar.gz -
Subject digest:
c66ee4e3265e2a4bfcfd726e6ea03ca6ceef2e32ea6b952c4262dfa766695573 - Sigstore transparency entry: 991828509
- Sigstore integration time:
-
Permalink:
ItsJustAGitHubMichealWhosGonnaSeeIt5Ppl/HaloPSA-API@5a7463fdef162528fc5dd87a6974582bba66b35f -
Branch / Tag:
refs/tags/2.0.2 - Owner: https://github.com/ItsJustAGitHubMichealWhosGonnaSeeIt5Ppl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5a7463fdef162528fc5dd87a6974582bba66b35f -
Trigger Event:
release
-
Statement type:
File details
Details for the file halopsa-2.0.2-py3-none-any.whl.
File metadata
- Download URL: halopsa-2.0.2-py3-none-any.whl
- Upload date:
- Size: 45.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
429f230647f8960b24e22587f5a105d5db49c43bf3a7cf0526e8b5cae6ac9782
|
|
| MD5 |
5fd9854b707988a88b1771698a884f51
|
|
| BLAKE2b-256 |
6b4d3fbe8d9d8bf191ee5e4d6c728e1bea98cef41a30115b45f938d8186b0735
|
Provenance
The following attestation bundles were made for halopsa-2.0.2-py3-none-any.whl:
Publisher:
python-publish.yml on ItsJustAGitHubMichealWhosGonnaSeeIt5Ppl/HaloPSA-API
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
halopsa-2.0.2-py3-none-any.whl -
Subject digest:
429f230647f8960b24e22587f5a105d5db49c43bf3a7cf0526e8b5cae6ac9782 - Sigstore transparency entry: 991828512
- Sigstore integration time:
-
Permalink:
ItsJustAGitHubMichealWhosGonnaSeeIt5Ppl/HaloPSA-API@5a7463fdef162528fc5dd87a6974582bba66b35f -
Branch / Tag:
refs/tags/2.0.2 - Owner: https://github.com/ItsJustAGitHubMichealWhosGonnaSeeIt5Ppl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5a7463fdef162528fc5dd87a6974582bba66b35f -
Trigger Event:
release
-
Statement type: