Add api endpoint to open and close ticket

This commit is contained in:
2025-06-20 15:42:43 +00:00
parent 95975fae55
commit c72432efae
21 changed files with 685 additions and 84 deletions

View File

@@ -27,6 +27,23 @@ components:
- type
paths:
/1.0/ticket/ticket/{id}:
get:
tags:
- ticket
summary: Details of a ticket
parameters:
- name: id
in: path
required: true
description: The ticket id
schema:
type: integer
format: integer
minimum: 1
responses:
200:
description: "OK"
/1.0/ticket/motive.json:
get:
tags:
@@ -94,6 +111,34 @@ paths:
422:
description: "UNPROCESSABLE ENTITY"
/1.0/ticket/{id}/persons/set:
post:
tags:
- ticket
summary: Associate a person with the ticket
parameters:
- name: id
in: path
required: true
description: The ticket id
schema:
type: integer
format: integer
minimum: 1
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
persons:
type: array
items:
$ref: '#/components/schemas/PersonById'
responses:
200:
description: "OK"
/1.0/ticket/{id}/addressees/set:
post:
tags:
@@ -161,3 +206,52 @@ paths:
description: "ACCEPTED"
422:
description: "UNPROCESSABLE ENTITY"
/1.0/ticket/ticket/{id}/close:
post:
tags:
- ticket
summary: Close a ticket
description: |
Close an existing ticket.
If the ticket is already close, no action will be performed on this ticket: his state will remains unchanged, and the
ticket will be returned.
parameters:
- name: id
in: path
required: true
description: The ticket id
schema:
type: integer
format: integer
minimum: 1
responses:
200:
description: "OK"
401:
description: "UNAUTHORIZED"
/1.0/ticket/ticket/{id}/open:
post:
tags:
- ticket
summary: Open a ticket
description: |
Re-open an existing ticket.
If the ticket is already opened, no action will be performed on this ticket: his state will remains unchanged, and the
ticket will be returned.
parameters:
- name: id
in: path
required: true
description: The ticket id
schema:
type: integer
format: integer
minimum: 1
responses:
200:
description: "OK"
401:
description: "UNAUTHORIZED"