# Zammad plugin # Introduction Plugin to manage tickets in Zammad. # Compatibility matrix
**Systems where it has been tested**CentOS 7, Fedora
**Systems where it should work**Any linux system
# Pre requisites Required: - Enable basic or API token authentication - **\*** Python3 - **\*** Module 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 You have to enable token or basic authentication by clicking on manage and then API. [![image-1641910296796.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-01/scaled-1680-/image-1641910296796.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-01/image-1641910296796.png) The token can be created by clicking on profile and then on "access token": [![image-1641910414865.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-01/scaled-1680-/image-1641910414865.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-01/image-1641910414865.png) For it to work you will have to set ticket.agent to permissions. # Parameters **Parámeter**
Method-mget,post,put o delete
host-i, --ipname site zammad
user-usname user (email)
password-ppass API
token-t token API
ticket name-tnname ticket
ticket comment-tbcontent ticket
ticket id-idid ticket
ticket status-tsstate
ticket priority-tppriority
ticket type-tttype
ticket group-tggroup
ticket subject-tsubsubject
ticket customer-tccustomer (the customer as such is the e-mail address of the registered customer)
ticket note-tnotenote
**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 (contenido) -tt (type) -tc (customer) -tnote (note) Example manual execution : ``` ./pandora_zammad -m post -i pandoraplugin -t -tn "ejemplo creacion" -tg Users -tp 3 -tt note -ts 2 -tsub subject -tb "el contenido de la incidencia" -tnote nota -tc ``` 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-1641912120586.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-01/scaled-1680-/image-1641912120586.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-01/image-1641912120586.png) # Update ticket **Necessary arguments** -m (put) -i (host) -us y -p o -t (user y password o solo token dependiendo de la autenticación) -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 -tn probando123 -tg Users -tp 3 -tt note -ts 2 -tsub -tb "el contenido de la incidencia" -tnote nota -tc ``` 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.** ``` ./pandora_zammad -m delete -i pandoraplugin -t -id 13 ```