Skip to main content

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

  1. Python (tested from Python 3.9 to 3.13 right now)
  2. HaloPSA API key
  3. Some basic understanding of the Halo API (will try to reduce this)

Installing

pip install HaloPSA

Getting an API key from Halo

  1. Login to your Halo instance and go to HaloPSA API here: (your tenant).halopsa.com/config/integrations/api
  2. Under Applications, click "View Applications"
  3. Create a new application, and set type to Client ID and Secret (Service).
  4. Name it something memorable, so it doesn't get deleted accidentally.
  5. 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)
  6. 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)
  7. Note your Client ID and Secret, you will need these later!
  8. Click on the integration/Application you just created and go to Permissions.
  9. Set permissions to either All or, if you know what you'll be using, enable just those permissions. (I recommend testing with all:standard and then disabling permissions selectively, that way you know your connection is working before you start troubleshooting)
  10. 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!

  1. 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
  1. Import the HaloPSA package
from HaloPSA import Halo
  1. 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

halopsa-2.0.2.tar.gz (44.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

halopsa-2.0.2-py3-none-any.whl (45.2 kB view details)

Uploaded Python 3

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

Hashes for halopsa-2.0.2.tar.gz
Algorithm Hash digest
SHA256 c66ee4e3265e2a4bfcfd726e6ea03ca6ceef2e32ea6b952c4262dfa766695573
MD5 b9f0a22f05101f392c60efe36dbc3f5d
BLAKE2b-256 d8c8fa1db218eb6a3d9cfa70b4aca61e002ed6086bbb14156cd8666b0ce2ae51

See more details on using hashes here.

Provenance

The following attestation bundles were made for halopsa-2.0.2.tar.gz:

Publisher: python-publish.yml on ItsJustAGitHubMichealWhosGonnaSeeIt5Ppl/HaloPSA-API

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for halopsa-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 429f230647f8960b24e22587f5a105d5db49c43bf3a7cf0526e8b5cae6ac9782
MD5 5fd9854b707988a88b1771698a884f51
BLAKE2b-256 6b4d3fbe8d9d8bf191ee5e4d6c728e1bea98cef41a30115b45f938d8186b0735

See more details on using hashes here.

Provenance

The following attestation bundles were made for halopsa-2.0.2-py3-none-any.whl:

Publisher: python-publish.yml on ItsJustAGitHubMichealWhosGonnaSeeIt5Ppl/HaloPSA-API

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page