Group members:
- 301247, MOHAMED AMINE HAMDI
- 303474, LUIGI GIUSEPPE DIEGO MOLINENGO
- 304684, GIOVANNI GENNA
- 306151, MASSIMILIANO PELLEGRINO
GitHub Repository: https://github.com/MolinengoLuigi/wa2-G13
- POST
/API/tickets/
- Request parameters: none
- Request body
TicketPostDto
- Result:
- status:
201
if tickets is correctly created- body:
TicketDTO
- body:
- status:
422
if body validation fails - status:
404
if product or profile contained inTicketPostDto
don't exist
- status:
- PUT
/API/tickets/{ticketId}/changeStatus
- Request parameters: id of the target ticket
- Request body:
{"status": "in_progress"} (example)
- Result:
- status:
200
if modify succeeds- body:
true
- body:
- status:
422
if body validation fails - status:
404
if ticket in request param doesn't exist - status:
409
if ticket state change is not allowed
- status:
- PUT
/API/tickets/{ticketId}/changePriority
- Request parameters: id of the target ticket
- Request body:
{"priorityLevel": 0} (example)
- Result:
- status:
200
if modify succeeds- body:
true
- body:
- status:
422
if body validation fails - status:
404
if ticket in request param doesn't exist
- status:
- PUT
/API/tickets/{ticketId}/changeExpert
- Request parameters: id of the target ticket
- Request body:
{"expertId": 1} (example)
- Result:
- status:
200
if modify succeeds- body:
true
- body:
- status:
422
if body validation fails - status:
404
if ticket in request param or expert in body don't exist
- status:
- GET
/API/tickets/
- Request parameters: none
- Request body: none
- Result:
- status:
200
- body:
List<TicketDTO>
- body:
- status:
- GET
/API/tickets/{ticketId}
- Request parameters: ID of the desired ticket
- Request body: none
- Result:
- status:
200
- body:
TicketDTO
- body:
- status:
404
if ticket not found
- status:
GET /API/tickets/API/tickets/?ean={ean}&profileId={profileId}&priorityLevel={priorityLevel}&expertId={expertId}&status={status}&creationDateStart={creationDateStart}&creationDateStop={creationDateStop}
- Request parameters: ean, profileId, priorityLevel, expertId, status, creationDateStart & creationDateStop to use
for searching the tickets
- Request body: none
- Result:
- status: 200
- body: List<TicketDTO>
- status: 422
if priorityLevel outside [0-4]
or if status not
in [open-closed-resolved-in_progress-reopened]
or if profileId not in email format
-
PUT
/API/ticket/
- Request parameters: none
- Request body:
TicketDTO
ticket to modify - Result:
- status:
200
- body:
true
if ticket exist and modify succeeds
- body:
- status:
422
if ticket validation fails - status:
404
if no ticket are found with the passed ticketId
- status:
-
GET
/API/experts
-
Request parameters: none
-
Request body: none
-
Result:
- status:
200
- body:
List<ExpertDTO>
- body:
- status:
-
POST
/API/experts/
- Request parameters: none
- Request body:
ExpertDTO
expert to create - Result:
- status:
201
- body:
true
if expert creation succeeds
- body:
- status:
422
if expert validation fails - status:
409
if an expert with the selected email address already exists
- status:
-
GET
/API/experts/{id}
- Request parameters: ID of the desired expert
- Request body: none
- Result:
- status:
200
- body:
ExpertDTO
- body:
- status:
404
if no expert is found with the passed expertId
- status:
-
PUT
/API/experts/{id}
- Request parameters: ID of the desired expert
- Request body: ExpertDTO
- Result:
- status:
200
- body: true
- status:
404
if no experts are found with the passed expertId - status:
409
if an expert with the selected email address already exists - status:
422
if expert validation fails
- status:
-
GET
/API/experts/?sectorName={sectorName}
- Request parameters: sector name
- Request body: none
- Result:
- status:
200
- body:
List<ExpertDTO>
- body:
- status:
404
if there are currently no sectors in the DB or the selected sector does not exist or is not linked with the selected expert
- status:
-
DELETE
/API/experts/{id}
- Request parameters: ID of the desired expert
- Request body: none
- Result:
- status:
200
- body:
1
- body:
- status:
404
if no expert is found with the passed expertId
- status:
-
GET
/API/experts/sectors
- Request parameters: none
- Request body: none
- Result:
- status:
200
- body:
List<ExpertDTO>
- body:
- status:
404
if there are currently no sectors in the DB
- status:
-
GET
/API/experts/{id}/sectors
- Request parameters: ID of the desired expert
- Request body: none
- Result:
- status:
200
- body:
List<ExpertDTO>
- body:
- status:
404
if there are currently no sectors in the DB or there are no sectors associated with the selected expert
- status:
-
Post
/API/experts/{id}/sectors
- Request parameters: ID of the desired expert
- Request body: sectorDTO
- Result:
- status:
200
- body: true
- status:
404
if no expert is found with the passed expertId - status:
422
if the inserted input for the sector is not valid
- status:
-
DELETE
/API/experts/{expertId}/sectors/{sectorId}
- Request parameters: ID of the desired expert, ID of the desired sector
- Request body: none
- Result:
- status:
200
- body:
1
- body:
- status:
404
if no expert is found with the passed expertId or there are currently no sectors in the DB or the selected sector does not exist or there are no sectors associated with the selected expert or the selected sector is not linked with the selected expert
- status:
-
POST
/API/tickets/{ticketId}/messages
- Request parameters: none
- Request body: 'multipart/form-data' request like {attachments: [list of files], fromUser : ['False' or 'True'], text: 'string...'}
- Result:
- status:
201
- body:
Long
- body:
- status:
404
- body:
Ticket non existant
- body:
- status:
405
- body:
Media entity not processable
- body:
- status:
-
GET
/API/tickets/{ticketId}/messages
- Request parameters: none
- Request body: none
- Result:
- status:
200
- body:
List<MessageDTO>
- body:
- status:
404
- body:
Ticket non existant
- body:
- status:
-
GET
/API/tickets/{ticketId}/history
- Request parameters: none
- Request body: none
- Result:
- status:
200
- body:
List<TicketHistoryDTO>
- body:
- status:
404
- body:
Ticket non existant
- body:
- status: