PyOTRS
Use
import pyotrs
or from pyotrs import Article, Attachment, Client, DynamicField, Ticket
Example
- instantiate a
Client
object called client - create a session ("login") on client
- get the
Ticket
with ID 1 - add an
Article
toTicket
with ID 1
>>> from pyotrs import Article, Client, Ticket
>>> client = Client("http://otrs.example.com", "GenericTicketConnectorREST", "root@localhost", "password")
>>> client.session_create()
True
>>> client.ticket_get_by_id(1)
True
>>> client.list__ticket_get_results
[<Ticket: 1>]
>>> my_ticket = client.list_ticket_get_results[0]
>>> my_ticket.TicketNumber
u'2010080210123456'
>>> my_ticket.Title
u'Welcome to OTRS!'
>>> my_article = Article({"Subject": "Subj", "Body": "New Body"})
>>> client.ticket_update(1, article=my_article)
True
>> client.ticket_get_by_id(1, all_articles=1)
Full Docs
The Docs are hosted here: https://sys.denm.de/PyOTRS/docs/
Dist
The Docs are hosted here: https://sys.denm.de/PyOTRS/dist/
Coverage
The Docs are hosted here: https://sys.denm.de/PyOTRS/htmlcov/