July 29, 2022

Znuny & OTRS REST API URLs & Routes

Learn in this article what the default WebService APIs routes of OTRS & Znuny are. Often it is unclear what Routes / URLs and operations to use.

In the previous article Access Znuny & OTRS API via REST, we guide you thru the configuration steps of REST API in the role of the service provider. If you followed the steps your system is now accessible via new REST API routes and is providing data in response to REST API requests.

REST API routes

The default configuration of the REST API web service introduces new routes which are created in the branch:

http://{{znunyHostName}}/otrs/nph-genericinterface.pl/Webservice/{{webservice name}}

as we have chosen “Ticket REST API” use it HTML-encoded string in the form “Ticket%20REST%20API” in URL instead, so our base URL or REST API will look like this:

http://{{znunyHostName}}/otrs/nph-genericinterface.pl/Webservice/Ticket%20REST%20API/

The configured REST API is exposing the following web service routes to us under this root:

RouteFunctionMethodDataParser
…/SessionSessionCreatePOSTJSON
…/Session/:SessionIDSessionGetGETJSON
…/TicketTicketCreatePOSTJSON
…/Ticket/:TicketIDTicketGetGETJSON
…/TicketListTicketGetListGETJSON
…/TicketHistory/:TicketIDTicketHistoryGetGETJSON
…/TicketTicketSearchGETJSON
…/Ticket/:TicketIDTicketUpdatePATCHJSON
Table 1: REST API Routes mapping

Authentication

Every request has to be authenticated. The authentication of the HTTP request is done using one of two methods:

  1. UserLogin & Password
  2. Session Auth (recommended)

The details which authentication to use in your case, you can find in Authenticate to Znuny / OTRS REST API

REST API Request options for request body or query params

The OTRS/Znuny is open source as such the best documentation of all actual options can be found in the source code. The web service source code is located in the “Kernel/GenericInterface/Operation/” folder.

OperationLink to GitHub
Ticket Create …/Ticket/TicketCreate.pm
Ticket Update…/Ticket/TicketUpdate.pm

Related articles

Access Znuny & OTRS API via REST
Authenticate to Znuny / OTRS REST API
Examples Calling REST API of Znuny & OTRS with cURL

Do you need help with Znuny / OTRS?
We have lot of experiences with OTRS and Znuny and can help you with your issues. Get in touch with us and we will check if and how we can help you.

Leave a Comment

Your email address will not be published. Required fields are marked *

Do you need help with Znuny / OTRS?​

We have lot of experiences with OTRS and Znuny.
We can help you with your issues to solve them.

From giving you support up to implementing integrations to your existing systems.

Get in touch with us and we will check if and how we can help you.​

Get OTRS/Znuny/OTOBO Support
Our support experts prepare themself, by reviewing your business. Please Share your website URL
To get a quick and efficient clearance of your needs, our experts will call you.
We communicate in English.
Maybe we can communicate in your native language too. So please let us know your native written and spoken language.