Skip to main content

topdesk

An API client for TOPdesk in Python, using requests.

Installation

topdesk can be obtained through pip:

pip install topdesk

Usage

All requests are encapsulated in a Topdesk object. To construct this object, you need to supply it with a URL and username/token pair:

from topdesk import Topdesk

topdesk = Topdesk("<topdesk url>" app_creds=("<username>", "<token>"))

Then you can start requesting. Let’s get the API version!

print(topdesk.version())

This will return a dictionary representing the JSON body of the response. If it fails it will throw an exception that inherits from topdesk.HttpException, for instance topdesk.NotFound for 404 Not Found errors.

If you don’t have a token, you can also login as a person or operator. I wholeheartedly recommend tokens, though.

topdesk.login_person("<username>", "<password>")
# or alternatively
topdesk.login_operator("<username>", "<password>")

Then we can try and request some information! Let’s get a list of incidents that are not resolved, and order them by their target date!

print(topdesk.incidents({'order_by': "target_date+ASC", 'resolved': False}))

The API is somewhat well documented. You can explore it from your REPL through the help function or look at the autogenerated documentation.

Caveats

The Knowledge Base API is currently not supported, because it uses GraphQL whereas the rest of the API uses REST. If you have experience with and/or interest in GraphQL, I invite you to submit a patch!

The Supporting Files API is not yet supported. It’s a large swath of useful API functions that we do not wrap until now. If you need to use any of the endpoints, you’ll have to fall back to the lower-level get, put, patch, post, and delete methods.


Have fun!

Metadata

Release files for topdesk 0.0.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for topdesk 0.0.17
File Size Uploaded Provenance Actions
topdesk-0.0.17.tar.gz 24.7 kB Without provenance Details for topdesk-0.0.17.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for topdesk 0.0.17
File Interpreter ABI Platform Actions
topdesk-0.0.17-py3-none-any.whl Python 3 none any Details for topdesk-0.0.17-py3-none-any.whl

Total release size: 49.0 kB

Release files / topdesk-0.0.17.tar.gz

Download URL topdesk-0.0.17.tar.gz
Size 24.7 kB
Tags Source
SHA-256 checksum
How to use checksums
25939c445539ade12baddcfe7e679d25301f995e5c32fef1e0a81a71997ededc
BLAKE2b-256 checksum
How to use checksums
571030b900529f473dd0e45bbf8b9bb8f55fb5f25b3a174252731cefed34f356
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.10

Release files / topdesk-0.0.17-py3-none-any.whl

Download URL topdesk-0.0.17-py3-none-any.whl
Size 24.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
529584b88c24545a872ee34399ea33df71f4b1da214a97f9cf8a21c8bef498c6
BLAKE2b-256 checksum
How to use checksums
4a7dfc69889b6866a16811239fa205e120aafdacabcc1d676a753cd8deb66823
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.10

Security for topdesk 0.0.17

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page