openapi: 3.1.0 info: title: Api version: 0.1.0 description: GovAssist employee helpdesk API servers: - url: /api tags: - name: health - name: dashboard - name: chat - name: documents - name: tickets - name: admin paths: /healthz: get: operationId: healthCheck tags: [health] summary: Health check responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /dashboard: get: operationId: getDashboard tags: [dashboard] summary: Get employee dashboard responses: "200": description: Dashboard summary content: application/json: schema: $ref: "#/components/schemas/Dashboard" /chat/query: post: operationId: queryChat tags: [chat] summary: Query verified knowledge base requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ChatQueryInput" responses: "200": description: Answer and confidence content: application/json: schema: $ref: "#/components/schemas/ChatAnswer" /documents: get: operationId: listDocuments tags: [documents] summary: Search knowledge center documents parameters: - in: query name: search schema: { type: string } - in: query name: department schema: { type: string } - in: query name: type schema: { type: string } responses: "200": description: Matching documents content: application/json: schema: type: array items: { $ref: "#/components/schemas/Document" } /tickets: get: operationId: listTickets tags: [tickets] summary: List tickets responses: "200": description: Tickets content: application/json: schema: type: array items: { $ref: "#/components/schemas/Ticket" } post: operationId: createTicket tags: [tickets] summary: Create a helpdesk ticket requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TicketInput" responses: "201": description: Created ticket content: application/json: schema: $ref: "#/components/schemas/Ticket" /tickets/{id}: get: operationId: getTicket tags: [tickets] summary: Get ticket details parameters: - in: path name: id required: true schema: { type: string } responses: "200": description: Ticket detail content: application/json: schema: $ref: "#/components/schemas/TicketDetail" patch: operationId: updateTicket tags: [tickets] summary: Update ticket status and assignment parameters: - in: path name: id required: true schema: { type: string } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TicketUpdate" responses: "200": description: Updated ticket content: application/json: schema: $ref: "#/components/schemas/Ticket" /tickets/{id}/messages: post: operationId: addTicketMessage tags: [tickets] summary: Add a message to a ticket parameters: - in: path name: id required: true schema: { type: string } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/MessageInput" responses: "201": description: Message content: application/json: schema: $ref: "#/components/schemas/TicketMessage" /admin/analytics: get: operationId: getAdminAnalytics tags: [admin] summary: Get admin dashboard analytics responses: "200": description: Analytics data content: application/json: schema: $ref: "#/components/schemas/Analytics" components: schemas: HealthStatus: type: object properties: status: { type: string } required: [status] Dashboard: type: object properties: employee: { $ref: "#/components/schemas/Employee" } stats: type: object properties: open: { type: number } pending: { type: number } resolved: { type: number } queries: { type: number } required: [open, pending, resolved, queries] tickets: type: array items: { $ref: "#/components/schemas/Ticket" } quickQuestions: type: array items: { type: string } required: [employee, stats, tickets, quickQuestions] Employee: type: object properties: name: { type: string } employeeId: { type: string } department: { type: string } designation: { type: string } role: { type: string } required: [name, employeeId, department, designation, role] ChatQueryInput: type: object properties: question: { type: string, minLength: 1 } required: [question] Source: type: object properties: title: { type: string } department: { type: string } updated: { type: string } type: { type: string } required: [title, department, updated, type] ChatAnswer: type: object properties: answer: { type: string } confidence: { type: number } category: { type: string } verified: { type: boolean } source: { $ref: "#/components/schemas/Source" } escalation: { type: boolean } required: [answer, confidence, category, verified, escalation] Document: type: object properties: id: { type: string } title: { type: string } description: { type: string } department: { type: string } type: { type: string } year: { type: number } published: { type: string } updated: { type: string } pages: { type: number } prototype: { type: boolean } required: [id, title, description, department, type, year, published, updated, pages, prototype] TicketInput: type: object properties: subject: { type: string, minLength: 1 } description: { type: string, minLength: 1 } department: { type: string } category: { type: string } priority: { type: string } required: [subject, description, department, category, priority] TicketUpdate: type: object properties: status: { type: string } priority: { type: string } assignedTo: { type: string } Ticket: type: object properties: id: { type: string } ticketNumber: { type: string } subject: { type: string } department: { type: string } category: { type: string } priority: { type: string } status: { type: string } created: { type: string } updated: { type: string } assignee: { type: ["string", "null"] } required: [id, ticketNumber, subject, department, category, priority, status, created, updated] TicketMessage: type: object properties: id: { type: string } sender: { type: string } role: { type: string } message: { type: string } timestamp: { type: string } required: [id, sender, role, message, timestamp] TicketDetail: allOf: - $ref: "#/components/schemas/Ticket" - type: object properties: messages: type: array items: { $ref: "#/components/schemas/TicketMessage" } required: [messages] MessageInput: type: object properties: message: { type: string, minLength: 1 } required: [message] Analytics: type: object properties: stats: type: object additionalProperties: { type: number } departmentQueries: type: array items: type: object properties: department: { type: string } queries: { type: number } required: [department, queries] statusBreakdown: type: array items: type: object properties: status: { type: string } count: { type: number } required: [status, count] queryTrend: type: array items: type: object properties: month: { type: string } queries: { type: number } resolved: { type: number } required: [month, queries, resolved] topQuestions: type: array items: type: object properties: question: { type: string } count: { type: number } required: [question, count] required: [stats, departmentQueries, statusBreakdown, queryTrend, topQuestions]