# Managed Services

Managed services dashboard and ticket operations

## Get managed services dashboard

> Returns dashboard data including service requests, tickets, and activity feed

```json
{"openapi":"3.0.3","info":{"title":"Kaana Service Requests API","version":"1.0.0"},"tags":[{"name":"Managed Services","description":"Managed services dashboard and ticket operations"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"connect.sid","description":"Session-based authentication via HTTP-only cookie"}},"schemas":{"DashboardData":{"type":"object","properties":{"serviceRequests":{"type":"array","items":{"$ref":"#/components/schemas/ServiceRequest"}},"tickets":{"type":"array","items":{"type":"object"}},"metrics":{"type":"object","properties":{"activeEngagements":{"type":"integer"},"avgResolutionTime":{"type":"number"},"hoursSaved":{"type":"number"}}},"activityFeed":{"type":"array","items":{"type":"object"}}}},"ServiceRequest":{"type":"object","required":["id","title","status","priority","creatorId","createdAt","updatedAt"],"properties":{"id":{"type":"integer","description":"Unique service request identifier"},"title":{"type":"string","description":"Service request title"},"description":{"type":"string","nullable":true,"description":"Detailed description of the request"},"status":{"type":"string","enum":["open","in_progress","pending","resolved","closed"],"description":"Current status"},"priority":{"type":"string","enum":["low","medium","high","urgent"],"description":"Priority level"},"category":{"type":"string","nullable":true,"description":"Request category"},"creatorId":{"type":"integer","description":"User ID who created the request"},"assigneeId":{"type":"integer","nullable":true,"description":"User ID assigned to the request"},"referenceType":{"type":"string","nullable":true,"description":"Type of linked reference (project, organization)"},"referenceId":{"type":"integer","nullable":true,"description":"ID of the linked reference"},"metadata":{"type":"object","nullable":true,"description":"Additional request metadata"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"}}}}},"paths":{"/managed-services/dashboard":{"get":{"tags":["Managed Services"],"summary":"Get managed services dashboard","description":"Returns dashboard data including service requests, tickets, and activity feed","operationId":"getManagedServicesDashboard","responses":{"200":{"description":"Dashboard data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardData"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"500":{"description":"Server error"}}}}}}
```

## Get ticket details

> Returns details of a specific support ticket including conversation history

```json
{"openapi":"3.0.3","info":{"title":"Kaana Service Requests API","version":"1.0.0"},"tags":[{"name":"Managed Services","description":"Managed services dashboard and ticket operations"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"connect.sid","description":"Session-based authentication via HTTP-only cookie"}},"schemas":{"TicketWithConversation":{"type":"object","properties":{"ticket":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"content":{"type":"string"},"sender":{"type":"object","properties":{"name":{"type":"string"},"isSupport":{"type":"boolean"}}},"createdAt":{"type":"string","format":"date-time"}}}}}}}},"paths":{"/managed-services/ticket/{ticketId}":{"get":{"tags":["Managed Services"],"summary":"Get ticket details","description":"Returns details of a specific support ticket including conversation history","operationId":"getTicket","parameters":[{"name":"ticketId","in":"path","required":true,"description":"Ticket ID","schema":{"type":"integer"}}],"responses":{"200":{"description":"Ticket details with conversation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketWithConversation"}}}},"401":{"description":"Not authenticated"},"403":{"description":"Access denied"},"404":{"description":"Ticket not found"},"500":{"description":"Server error"}}}}}}
```

## Reply to a ticket

> Adds a reply to an existing support ticket

```json
{"openapi":"3.0.3","info":{"title":"Kaana Service Requests API","version":"1.0.0"},"tags":[{"name":"Managed Services","description":"Managed services dashboard and ticket operations"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"connect.sid","description":"Session-based authentication via HTTP-only cookie"}}},"paths":{"/managed-services/ticket/{ticketId}/reply":{"post":{"tags":["Managed Services"],"summary":"Reply to a ticket","description":"Adds a reply to an existing support ticket","operationId":"replyToTicket","parameters":[{"name":"ticketId","in":"path","required":true,"description":"Ticket ID","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content"],"properties":{"content":{"type":"string","description":"Reply content"}}}}}},"responses":{"200":{"description":"Reply added successfully"},"401":{"description":"Not authenticated"},"403":{"description":"Permission denied"},"404":{"description":"Ticket not found"},"500":{"description":"Server error"}}}}}}
```

## Search for reference items

> Searches projects, organizations, and other items for linking to service requests

```json
{"openapi":"3.0.3","info":{"title":"Kaana Service Requests API","version":"1.0.0"},"tags":[{"name":"Managed Services","description":"Managed services dashboard and ticket operations"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"connect.sid","description":"Session-based authentication via HTTP-only cookie"}}},"paths":{"/managed-services/search-references":{"get":{"tags":["Managed Services"],"summary":"Search for reference items","description":"Searches projects, organizations, and other items for linking to service requests","operationId":"searchReferences","parameters":[{"name":"query","in":"query","description":"Search query","schema":{"type":"string"}},{"name":"type","in":"query","description":"Filter by reference type","schema":{"type":"string","enum":["project","organization","document"]}}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true}}}}}}},"401":{"description":"Not authenticated"},"500":{"description":"Server error"}}}}}}
```
