# Zammad plugin

# Introduction

Plugin to manage tickets in Zammad, you can create, delete and update tickets.

# Compatibility matrix

<table border="1" id="bkmrk-sistemas-donde-se-ha" style="width: 788px;"><tbody><tr><td style="width: 258px;">**Systems where it has been tested**</td><td style="width: 530px;">CentOS 7, Fedora

</td></tr><tr><td style="width: 258px;">**Systems where it should work**</td><td style="width: 530px;">Any linux system

</td></tr></tbody></table>

# Pre requisites

Required:

- Enable basic or API token authentication
- **\*** Python3
- **\*** Module [requests](https://pypi.org/project/requests/)

**\* In the binary version of the plugin it is not necessary to install these dependencies, since they are already included in the plugin.**

# Configuration

Authentication by token ( **Access Token** ) or basic ( **Access Password** ) must be enabled by clicking on **Manage** and then on **API.**

[![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/scaled-1680-/O9vimage.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/O9vimage.png)

The *token* is created by clicking **Profile** and then **Access token**:

[![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/scaled-1680-/OBtimage.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/OBtimage.png)

For it to work you will have to set `ticket.agent` to permissions.

# Parameters

**Parameter**

<table border="1" id="bkmrk-method--m-get%2Cpost%2Cp" style="height: 435px;"><tbody><tr style="height: 29px;"><td style="height: 29px; width: 114.188px;">Method</td><td style="height: 29px; width: 56.3594px;">-m</td><td style="height: 29px; width: 195.172px;">get,post,put o delete</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 114.188px;">host</td><td style="height: 29px; width: 56.3594px;">-i, --ip</td><td style="height: 29px; width: 195.172px;">name site zammad</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 114.188px;">user</td><td style="height: 29px; width: 56.3594px;">-us</td><td style="height: 29px; width: 195.172px;">name user (email)</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 114.188px;">password</td><td style="height: 29px; width: 56.3594px;">-p</td><td style="height: 29px; width: 195.172px;">pass API</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 114.188px;">token</td><td style="height: 29px; width: 56.3594px;">-t </td><td style="height: 29px; width: 195.172px;">token API</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 114.188px;">ticket name</td><td style="height: 29px; width: 56.3594px;">-tn</td><td style="height: 29px; width: 195.172px;">name ticket</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 114.188px;">ticket comment</td><td style="height: 29px; width: 56.3594px;">-tb</td><td style="height: 29px; width: 195.172px;">content ticket</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 114.188px;">ticket id</td><td style="height: 29px; width: 56.3594px;">-id</td><td style="height: 29px; width: 195.172px;">id ticket</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 114.188px;">ticket status</td><td style="height: 29px; width: 56.3594px;">-ts</td><td style="height: 29px; width: 195.172px;">state</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 114.188px;">ticket priority</td><td style="height: 29px; width: 56.3594px;">-tp</td><td style="height: 29px; width: 195.172px;">priority</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 114.188px;">ticket type</td><td style="height: 29px; width: 56.3594px;">-tt</td><td style="height: 29px; width: 195.172px;">type</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 114.188px;">ticket group</td><td style="height: 29px; width: 56.3594px;">-tg</td><td style="height: 29px; width: 195.172px;">group</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 114.188px;">ticket subject</td><td style="height: 29px; width: 56.3594px;">-tsub</td><td style="height: 29px; width: 195.172px;">subject</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 114.188px;">ticket customer</td><td style="height: 29px; width: 56.3594px;">-tc</td><td style="height: 29px; width: 195.172px;">customer (the customer as such is the e-mail address of the registered customer)</td></tr><tr style="height: 29px;"><td style="height: 29px; width: 114.188px;">ticket note</td><td style="height: 29px; width: 56.3594px;">-tnote</td><td style="height: 29px; width: 195.172px;">note</td></tr></tbody></table>

**Methods**

Get to list, post to create ticket, put to update ticket and delete to delete ticket.

# Create ticket

**Necessary arguments**

-m (post)

-i (host)

-us y -p o -t (user and password or token only depending on authentication)

-tn (name ticket)

-tg (name group)

-tp (priority)

-ts (status)

-tsub (subject)

-tb (content)

-tt (type)

-tc (customer)

-tnote (note)

**Example manual execution :**

```
./pandora_zammad -m post  -i pandoraplugin -t <token> -tn "Test Ticket!" -tg Users -tp 3 -tt note -ts 2 -tsub subject -tb "The content of the incident" -tnote nota -tc <customer>
```

**In the argument -i (host) I have put pandoraplugin because the name of my site is : https://pandoraplugin.zammad.com/**

The ticket will be created:

[![image.png](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/scaled-1680-/V60image.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2025-07/V60image.png)

# Update ticket

**Necessary arguments**

-m (put)

-i (host)

-us y -p o -t (username and password or token only, depending on authentication)

-id (id ticket)

-tn (name ticket)

-tg (name group)

-tp (priority)

-ts (status)

-tsub (subject)

-tb (content)

-tt (type)

-tc (customer)

-tnote (note)

**Example manual execution :**

```
./pandora_zammad -m put -id 3  -i pandoraplugin -t <token> -tn probando123 -tg Users -tp 3 -tt note -ts 2 -tsub <subject> -tb "the content of the incident" -tnote note -tc <email>
```

The ticket will be updated with that id:

[![image-1641911410297.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-01/scaled-1680-/image-1641911410297.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-01/image-1641911410297.png)

# Delete ticket

The ticket will be deleted by searching by id.

**Example with manual execution.**

```bash
./pandora_zammad -m delete  -i pandoraplugin -t <token> -id 13 
```