Archived
2
This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
definma-api/api/condition.yaml

114 lines
3.3 KiB
YAML
Raw Normal View History

2020-04-21 10:53:07 +02:00
/condition/{id}:
parameters:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/parameters/Id'
2020-04-21 10:53:07 +02:00
get:
2020-05-08 15:12:36 +02:00
summary: condition by id
2020-04-23 13:59:45 +02:00
description: 'Auth: all, levels: read, write, maintain, dev, admin'
2020-05-13 12:06:28 +02:00
x-doc: status handling (accessible (only for maintain/admin))? # TODO
2020-04-21 10:53:07 +02:00
tags:
- /condition
responses:
200:
description: condition details
content:
application/json:
schema:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Condition'
2020-04-21 10:53:07 +02:00
400:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/400'
2020-04-21 10:53:07 +02:00
401:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/401'
2020-04-21 10:53:07 +02:00
404:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/404'
2020-04-21 10:53:07 +02:00
500:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/500'
2020-04-21 10:53:07 +02:00
put:
2020-05-11 13:05:54 +02:00
summary: change condition
2020-05-08 14:41:31 +02:00
description: 'Auth: basic, levels: write, maintain, dev, admin <br>Only maintain and admin are allowed to reference samples created by another user'
2020-05-13 12:06:28 +02:00
x-doc: status is reset to 0 on any changes
2020-04-21 10:53:07 +02:00
tags:
- /condition
2020-04-23 13:59:45 +02:00
security:
- BasicAuth: []
2020-04-21 10:53:07 +02:00
requestBody:
required: true
content:
application/json:
schema:
2020-05-11 13:05:54 +02:00
allOf:
- $ref: 'api.yaml#/components/schemas/_Id'
properties:
number:
type: string
example: B1
parameters:
type: object
2020-04-21 10:53:07 +02:00
responses:
200:
description: condition details
content:
application/json:
schema:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Condition'
2020-04-21 10:53:07 +02:00
400:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/400'
2020-04-21 10:53:07 +02:00
401:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/401'
2020-04-21 10:53:07 +02:00
403:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/403'
2020-04-21 10:53:07 +02:00
404:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/404'
2020-04-21 10:53:07 +02:00
500:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/500'
2020-04-21 10:53:07 +02:00
delete:
2020-05-11 13:05:54 +02:00
summary: delete condition
2020-04-23 13:59:45 +02:00
description: 'Auth: basic, levels: write, maintain, dev, admin'
2020-05-13 12:06:28 +02:00
x-doc: sets status to -1
2020-04-21 10:53:07 +02:00
tags:
- /condition
2020-04-23 13:59:45 +02:00
security:
- BasicAuth: []
2020-04-21 10:53:07 +02:00
responses:
200:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/Ok'
2020-04-21 10:53:07 +02:00
400:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/400'
2020-04-21 10:53:07 +02:00
401:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/401'
2020-04-21 10:53:07 +02:00
403:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/403'
2020-04-21 10:53:07 +02:00
404:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/404'
2020-05-08 14:41:31 +02:00
500:
$ref: 'api.yaml#/components/responses/500'
/condition/new:
post:
2020-05-08 15:12:36 +02:00
summary: add condition
2020-05-08 14:41:31 +02:00
description: 'Auth: basic, levels: write, maintain, dev, admin <br>Only maintain and admin are allowed to reference samples created by another user'
2020-05-13 12:06:28 +02:00
x-doc: 'Adds status: 0 automatically'
2020-05-08 14:41:31 +02:00
tags:
- /condition
security:
- BasicAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Condition'
responses:
200:
description: condition details
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Condition'
400:
$ref: 'api.yaml#/components/responses/400'
401:
$ref: 'api.yaml#/components/responses/401'
403:
$ref: 'api.yaml#/components/responses/403'
2020-04-21 10:53:07 +02:00
500:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/500'