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:
Route | Function | Method | DataParser |
…/Session | SessionCreate | POST | JSON |
…/Session/:SessionID | SessionGet | GET | JSON |
…/Ticket | TicketCreate | POST | JSON |
…/Ticket/:TicketID | TicketGet | GET | JSON |
…/TicketList | TicketGetList | GET | JSON |
…/TicketHistory/:TicketID | TicketHistoryGet | GET | JSON |
…/Ticket | TicketSearch | GET | JSON |
…/Ticket/:TicketID | TicketUpdate | PATCH | JSON |
Authentication
Every request has to be authenticated. The authentication of the HTTP request is done using one of two methods:
- UserLogin & Password
- 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.
Operation | Link 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