57 lines
2.0 KiB
YAML
Raw Normal View History

2022-09-21 09:44:09 +02:00
get:
summary: Returns a list of (optionally filtered) persons.
description: Returns the list of (optionally filtered) persons which are visible to the current subject or any of it's assumed roles.
2022-09-21 09:44:09 +02:00
tags:
- hs-office-persons
operationId: listPersons
parameters:
- $ref: 'auth.yaml#/components/parameters/currentSubject'
- $ref: 'auth.yaml#/components/parameters/assumedRoles'
2022-09-21 09:44:09 +02:00
- name: name
in: query
required: false
schema:
type: string
description: Prefix of caption to filter the results.
2022-09-21 09:44:09 +02:00
responses:
"200":
description: OK
content:
'application/json':
schema:
type: array
items:
$ref: 'hs-office-person-schemas.yaml#/components/schemas/HsOfficePerson'
2022-09-21 09:44:09 +02:00
"401":
$ref: 'error-responses.yaml#/components/responses/Unauthorized'
2022-09-21 09:44:09 +02:00
"403":
$ref: 'error-responses.yaml#/components/responses/Forbidden'
2022-09-21 09:44:09 +02:00
post:
summary: Adds a new person.
tags:
- hs-office-persons
operationId: addPerson
parameters:
- $ref: 'auth.yaml#/components/parameters/currentSubject'
- $ref: 'auth.yaml#/components/parameters/assumedRoles'
2022-09-21 09:44:09 +02:00
requestBody:
content:
'application/json':
schema:
$ref: 'hs-office-person-schemas.yaml#/components/schemas/HsOfficePersonInsert'
2022-09-21 09:44:09 +02:00
required: true
responses:
"201":
description: Created
content:
'application/json':
schema:
$ref: 'hs-office-person-schemas.yaml#/components/schemas/HsOfficePerson'
2022-09-21 09:44:09 +02:00
"401":
$ref: 'error-responses.yaml#/components/responses/Unauthorized'
2022-09-21 09:44:09 +02:00
"403":
$ref: 'error-responses.yaml#/components/responses/Forbidden'
2022-09-21 09:44:09 +02:00
"409":
$ref: 'error-responses.yaml#/components/responses/Conflict'