57 lines
2.0 KiB
YAML
Raw Normal View History

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