Workflows and integrations
Web services, processes, and connections that fit your landscape.
The OTOBO API is the REST-API package. After install, Admin has API, API reference, and Webhooks. Calls go to otai-api.pl/v1 and carry a bearer token.
OTOBOsince 11.0
The manifest REST-API-OTOBO.sopm targets OTOBO 11.0.x and 11.1.x.
Source and the GPL-3.0 license: openticketai/otobo_znuny_rest_api. Tokens and the admin route list are in the REST API guide. After the token, continue with authentication.
The OTOBO manifest is REST-API-OTOBO.sopm. The build writes REST-API-<version>.opm. The version is the one in the manifest. Install that file.
From the cloned repository directory, on the OTOBO host. otobo-web-1 is the web container of a Docker Compose install. Replace the name when your container is named differently.
docker cp . otobo-web-1:/tmp/otai-opmdocker exec otobo-web-1 /opt/otobo/bin/otobo.Console.pl \ Dev::Package::Build --module-directory /tmp/otai-opm \ /tmp/otai-opm/REST-API-OTOBO.sopm /tmp/otai-outThe file is then under /tmp/otai-out/ inside the container. Copy it out when you want to upload it in Package Manager.
REST-API-<version>.opm as a local package and install it.Package Manager checks the framework. If this OTOBO version is not 11.0.x or 11.1.x, install stops.
On a host that does not use that Docker name, the console is /opt/otobo/bin/otobo.Console.pl. The path is the .opm from the build.
/opt/otobo/bin/otobo.Console.pl Admin::Package::Install /path/REST-API-VERSION.opmReplace REST-API-VERSION.opm with the file name Dev::Package::Build wrote.
Install creates the user otai-webservice when that login is missing. The account is in the ai-agent group, not in users, and cannot sign in to the agent interface. The password is random and is not shown. You do not supply a password before install.
Admin → API removes the users group again if someone adds it later. Grant FAQ categories to ai-agent when that user should read FAQ.
An upgrade removes the old Generic Interface webservices OpenTicketAI, OpenTicketAI-RuntimeEvents, and OpenTicketAI-SearchEvents when they are still installed. The API itself is not a webservice in that builder.
Then send Authorization: Bearer and Accept: application/json.
Open Admin → API reference, or the same page in the browser:
https://helpdesk.example.com/otobo/otai-api.pl/v1/docshelpdesk.example.com is your helpdesk host. A first call:
curl -sS \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Accept: application/json" \ "https://helpdesk.example.com/otobo/otai-api.pl/v1/tickets?state=new&limit=1"200 and JSON mean the package, the switch, and the token agree. 401 means a wrong, revoked, or expired token. One language per page: Python, TypeScript, Java, and PHP.
These variables are optional. SysConfig is the admin fallback when they are empty.
| Variable | Default | Purpose |
|---|---|---|
OTAI_TICKETSYSTEM_USERNAME |
otai-webservice |
API user login |
OTAI_WEBHOOK_URL |
empty | Where ticket and FAQ events are sent |
OTAI_API_TOKEN |
empty | Webhook send token, if set before start |
OpenTicketAIConnector::ApiEnabled1Turns the REST API on or off.
OpenTicketAIConnector::TokenTTLHours12Lifetime in hours for API, agent, and customer tokens.
Build the package file from the manifest REST-API-OTOBO.sopm. The result is named REST-API-, the version from the manifest, and .opm. Upload that file under Admin, Package Manager, or install it with otobo.Console.pl Admin::Package::Install.
Install creates the user otai-webservice when that login is missing. The account is in the ai-agent group, not in users, and cannot sign in to the agent interface. You do not type a password. Then open Admin, API, switch the API on, and copy the token. The screen shows it once.
Sources
The manifest REST-API-OTOBO.sopm lists frameworks 11.0.x and 11.1.x. Install that manifest on OTOBO. The second manifest in the same repository is for a different ticket system and does not belong on this instance.
After install, open Admin, API reference, or otai-api.pl/v1/docs on the helpdesk. A call with Authorization Bearer and Accept application/json returns tickets once the token is valid.
Sources
Workflows and integrations
Web services, processes, and connections that fit your landscape.