- route definition
- Url: /api/v1/tickets
- Method: GET
- Request:
TicketsListRequest - Response:
TicketsListResponse
- request definition
type TicketsListRequest struct {
Page int `form:"page,optional,default=1"`
PageSize int `form:"pageSize,optional,default=20"`
Status string `form:"status,optional"`
Category string `form:"category,optional"`
Priority string `form:"priority,optional"`
Assignee string `form:"assignee,optional"`
}
- response definition
type TicketsListResponse struct {
Items []Ticket `json:"items"`
Total int64 `json:"total"`
Page int `json:"page"`
Size int `json:"pageSize"`
}
- route definition
- Url: /api/v1/tickets
- Method: POST
- Request:
TicketCreateRequest - Response:
TicketDetailResponse
- request definition
type TicketCreateRequest struct {
Title string `json:"title"`
Content string `json:"content"`
Category string `json:"category"`
Priority string `json:"priority,optional,default=medium"`
Tags []string `json:"tags,optional"`
PlayerId string `json:"playerId,optional"`
Contact string `json:"contact,optional"`
GameId string `json:"gameId,optional"`
Env string `json:"env,optional"`
}
- response definition
type TicketDetailResponse struct {
Id int64 `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Category string `json:"category"`
Priority string `json:"priority"`
Status string `json:"status"`
Assignee string `json:"assignee"`
Tags []string `json:"tags"`
PlayerId string `json:"playerId"`
Contact string `json:"contact"`
GameId string `json:"gameId"`
Env string `json:"env"`
Source string `json:"source"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
Comments []Comment `json:"comments,omitempty"`
}
type Ticket struct {
Id int64 `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Category string `json:"category"`
Priority string `json:"priority"`
Status string `json:"status"`
Assignee string `json:"assignee"`
Tags []string `json:"tags"`
PlayerId string `json:"playerId"`
Contact string `json:"contact"`
GameId string `json:"gameId"`
Env string `json:"env"`
Source string `json:"source"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
- route definition
- Url: /api/v1/tickets/:id
- Method: GET
- Request:
TicketDetailRequest - Response:
TicketDetailResponse
- request definition
type TicketDetailRequest struct {
ID string `path:"id"`
}
- response definition
type TicketDetailResponse struct {
Id int64 `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Category string `json:"category"`
Priority string `json:"priority"`
Status string `json:"status"`
Assignee string `json:"assignee"`
Tags []string `json:"tags"`
PlayerId string `json:"playerId"`
Contact string `json:"contact"`
GameId string `json:"gameId"`
Env string `json:"env"`
Source string `json:"source"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
Comments []Comment `json:"comments,omitempty"`
}
type Ticket struct {
Id int64 `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Category string `json:"category"`
Priority string `json:"priority"`
Status string `json:"status"`
Assignee string `json:"assignee"`
Tags []string `json:"tags"`
PlayerId string `json:"playerId"`
Contact string `json:"contact"`
GameId string `json:"gameId"`
Env string `json:"env"`
Source string `json:"source"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
- route definition
- Url: /api/v1/tickets/:id
- Method: PUT
- Request:
TicketUpdateRequest - Response:
TicketDetailResponse
- request definition
type TicketUpdateRequest struct {
ID string `path:"id"`
Title string `json:"title,optional"`
Content string `json:"content,optional"`
Category string `json:"category,optional"`
Priority string `json:"priority,optional"`
Assignee string `json:"assignee,optional"`
Tags []string `json:"tags,optional"`
}
- response definition
type TicketDetailResponse struct {
Id int64 `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Category string `json:"category"`
Priority string `json:"priority"`
Status string `json:"status"`
Assignee string `json:"assignee"`
Tags []string `json:"tags"`
PlayerId string `json:"playerId"`
Contact string `json:"contact"`
GameId string `json:"gameId"`
Env string `json:"env"`
Source string `json:"source"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
Comments []Comment `json:"comments,omitempty"`
}
type Ticket struct {
Id int64 `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Category string `json:"category"`
Priority string `json:"priority"`
Status string `json:"status"`
Assignee string `json:"assignee"`
Tags []string `json:"tags"`
PlayerId string `json:"playerId"`
Contact string `json:"contact"`
GameId string `json:"gameId"`
Env string `json:"env"`
Source string `json:"source"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
- route definition
- Url: /api/v1/tickets/:id
- Method: DELETE
- Request:
TicketDeleteRequest - Response:
-
- request definition
type TicketDeleteRequest struct {
ID string `path:"id"`
}
- response definition
- route definition
- Url: /api/v1/tickets/:id/transition
- Method: POST
- Request:
TicketTransitionRequest - Response:
TicketDetailResponse
- request definition
type TicketTransitionRequest struct {
ID string `path:"id"`
Status string `json:"status"` // open, in_progress, resolved, closed
Note string `json:"note,optional"`
}
- response definition
type TicketDetailResponse struct {
Id int64 `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Category string `json:"category"`
Priority string `json:"priority"`
Status string `json:"status"`
Assignee string `json:"assignee"`
Tags []string `json:"tags"`
PlayerId string `json:"playerId"`
Contact string `json:"contact"`
GameId string `json:"gameId"`
Env string `json:"env"`
Source string `json:"source"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
Comments []Comment `json:"comments,omitempty"`
}
type Ticket struct {
Id int64 `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Category string `json:"category"`
Priority string `json:"priority"`
Status string `json:"status"`
Assignee string `json:"assignee"`
Tags []string `json:"tags"`
PlayerId string `json:"playerId"`
Contact string `json:"contact"`
GameId string `json:"gameId"`
Env string `json:"env"`
Source string `json:"source"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
- route definition
- Url: /api/v1/tickets/:ticketId/comments
- Method: GET
- Request:
TicketCommentsRequest - Response:
TicketCommentsResponse
- request definition
type TicketCommentsRequest struct {
TicketID string `path:"ticketId"`
}
- response definition
type TicketCommentsResponse struct {
Items []Comment `json:"items"`
}
- route definition
- Url: /api/v1/tickets/:ticketId/comments
- Method: POST
- Request:
TicketCommentCreateRequest - Response:
TicketCommentsResponse
- request definition
type TicketCommentCreateRequest struct {
TicketID string `path:"ticketId"`
Content string `json:"content"`
}
- response definition
type TicketCommentsResponse struct {
Items []Comment `json:"items"`
}