Skip to content

REST API Reference

The Zammad-AI service provides a REST API for synchronous triage and processing. This is useful for testing, manual trigger, or integration with systems that do not use Kafka.

Base URL

By default, the API is available at http://localhost:8080/api/v1.

Endpoints

Triage

Analyze text and determine the best action.

  • URL: /triage
  • Method: POST
  • Request Body: TriageInput
FieldTypeDescription
textstringThe text to be analyzed (e.g., ticket content).
session_idstring (optional)A unique identifier for the request. If not provided, a UUID will be generated.
  • Response Body: TriageOutput
FieldTypeDescription
session_idstringThe request ID.
triageobjectThe result of the triage process.

Triage Result Object

FieldTypeDescription
categoryobjectThe determined category (ID and name).
actionobjectThe determined action (ID, name, and description).
reasoningstringThe LLM's reasoning for the categorization.
confidencefloatConfidence score between 0 and 1.
  • Example Request:
json
{
  "text": "My email is not working and I cannot see any new messages.",
  "session_id": "req-123"
}
  • Example Response:
json
{
  "session_id": "req-123",
  "triage": {
    "category": { "id": 1, "name": "Technical Support" },
    "action": {
      "id": 2,
      "name": "Auto-Reply",
      "description": "Send standard help article link."
    },
    "reasoning": "The user mentions email issues which typically falls under technical support.",
    "confidence": 0.95
  }
}

Internal Endpoints

Health Check

Check the status of the service.

  • URL: /health
  • Method: GET
  • Response: {"status": "healthy"}