Skip to content

Zammad

flowtask.interfaces.zammad

zammad

zammad(**kwargs)

Bases: HTTPService

zammad

Overview

The `zammad` class provides a generic interface for managing Zammad instances via its RESTful API.
It extends the HTTPService class and offers methods for creating users and generating user tokens with
specific permissions in a Zammad instance. This class is pre-configured with the necessary Zammad instance
settings, such as tokens and default roles, making it easier to interact with the Zammad API.

.. table:: Properties :widths: auto

+------------------+----------+-----------+--------------------------------------------------------------------------------------+
| Name             | Required | Description                                                                                      |
+------------------+----------+-----------+--------------------------------------------------------------------------------------+
| credentials      |   No     | A dictionary holding authentication credentials.                                                 |
+------------------+----------+-----------+--------------------------------------------------------------------------------------+
| auth             |   Yes    | Authentication token for the Zammad API, derived from the ZAMMAD_TOKEN configuration.            |
+------------------+----------+-----------+--------------------------------------------------------------------------------------+
| article_base     |   No     | Default base dictionary for articles, specifying type and visibility.                            |
+------------------+----------+-----------+--------------------------------------------------------------------------------------+
| permissions_base |   No     | Base permissions for creating user tokens.                                                       |
+------------------+----------+-----------+--------------------------------------------------------------------------------------+

Return

The methods in this class facilitate interaction with the Zammad API, including creating users and generating
user access tokens. Each method returns the relevant response from the Zammad API, or an error if the operation fails.

create_user async

create_user(**kwargs)

create_user.

Create a new User.

TODO: Adding validation with dataclasses.

get_user_token async

get_user_token(**kwargs)

get_user_token.

Usage: using X-On-Behalf-Of to getting User Token.