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/template.yaml

250 lines
6.8 KiB
YAML
Raw Normal View History

2020-04-21 10:53:07 +02:00
/template/treatments:
get:
summary: TODO all available treatment methods
2020-04-23 13:59:45 +02:00
description: 'Auth: basic, levels: read, write, maintain, dev, admin'
2020-04-21 10:53:07 +02:00
tags:
- /templates
security:
- BasicAuth: []
responses:
200:
description: list of treatments
content:
application/json:
schema:
type: array
items:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Template'
2020-04-21 10:53:07 +02:00
example:
name: heat aging
parameters:
- name: method
range:
- copper
401:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/401'
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
/templates/treatment/{name}:
parameters:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/parameters/Name'
2020-04-21 10:53:07 +02:00
get:
summary: TODO treatment method details
2020-04-23 13:59:45 +02:00
description: 'Auth: basic, levels: read, write, maintain, admin'
2020-04-21 10:53:07 +02:00
tags:
- /templates
security:
- BasicAuth: []
responses:
200:
description: treatment details
content:
application/json:
schema:
allOf:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/schemas/Template'
2020-04-21 10:53:07 +02:00
example:
name: heat aging
parameters:
- name: method
range:
- copper
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:
summary: TODO add/change treatment method
2020-04-23 13:59:45 +02:00
description: 'Auth: basic, levels: maintain, admin'
2020-04-21 10:53:07 +02:00
tags:
- /templates
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:
allOf:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/schemas/Template'
2020-04-21 10:53:07 +02:00
example:
name: heat aging
parameters:
- name: method
range:
- copper
responses:
200:
description: treatment details
content:
application/json:
schema:
allOf:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/schemas/Template'
2020-04-21 10:53:07 +02:00
example:
name: heat aging
parameters:
- name: method
range:
- copper
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:
summary: TODO delete treatment method
2020-04-23 13:59:45 +02:00
description: 'Auth: basic, levels: maintain, admin'
2020-04-21 10:53:07 +02:00
tags:
- /templates
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-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
/template/measurements:
get:
summary: TODO all available measurement methods
2020-04-23 13:59:45 +02:00
description: 'Auth: basic, levels: read, write, maintain, dev, admin'
2020-04-21 10:53:07 +02:00
tags:
- /templates
security:
- BasicAuth: []
responses:
200:
description: list of measurement methods
content:
application/json:
schema:
type: array
items:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Template'
2020-04-21 10:53:07 +02:00
example:
name: humidity
parameters:
- name: kf
range:
min: 0
max: 2
401:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/401'
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
/templates/measurement/{name}:
parameters:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/parameters/Name'
2020-04-21 10:53:07 +02:00
get:
summary: TODO measurement method details
2020-04-23 13:59:45 +02:00
description: 'Auth: basic, levels: read, write, maintain, admin'
2020-04-21 10:53:07 +02:00
tags:
- /templates
security:
- BasicAuth: []
responses:
200:
description: measurement details
content:
application/json:
schema:
allOf:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/schemas/Template'
2020-04-21 10:53:07 +02:00
example:
name: humidity
parameters:
- name: kf
range:
min: 0
max: 2
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:
summary: TODO add/change measurement method
2020-04-23 13:59:45 +02:00
description: 'Auth: basic, levels: maintain, admin'
2020-04-21 10:53:07 +02:00
tags:
- /templates
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:
allOf:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/schemas/Template'
2020-04-21 10:53:07 +02:00
example:
name: humidity
parameters:
- name: kf
range:
min: 0
max: 2
responses:
200:
description: measurement details
content:
application/json:
schema:
allOf:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/schemas/Template'
2020-04-21 10:53:07 +02:00
example:
name: humidity
parameters:
- name: kf
range:
min: 0
max: 2
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:
summary: TODO delete measurement method
2020-04-23 13:59:45 +02:00
description: 'Auth: basic, levels: maintain, admin'
2020-04-21 10:53:07 +02:00
tags:
- /templates
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-04-21 10:53:07 +02:00
500:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/500'