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!
- 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)
pip install HaloPSA
- 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.
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)
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.
All base endpoints are now implemented at some level. No endpoints have delete functionality yet.
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