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

156 lines
4.2 KiB
YAML
Raw Normal View History

2020-04-21 10:53:07 +02:00
/measurement/{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-13 09:56:44 +02:00
summary: measurement values by id
description: 'Auth: all, levels: read, write, dev, admin, spectral data can only be accessed by dev and admin'
x-doc: deleted samples are available only for dev/admin
2020-04-21 10:53:07 +02:00
tags:
- /measurement
responses:
200:
description: measurement details
content:
application/json:
schema:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Measurement'
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-12 17:37:01 +02:00
summary: change measurement
description: 'Auth: basic, levels: write, dev, admin'
2020-05-28 13:16:15 +02:00
x-doc: status is reset to 0 on any changes, deleted measurements cannot be edited
2020-04-21 10:53:07 +02:00
tags:
- /measurement
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-12 17:15:36 +02:00
properties:
values:
type: object
2020-04-21 10:53:07 +02:00
responses:
200:
description: measurement details
content:
application/json:
schema:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Measurement'
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-12 17:37:01 +02:00
summary: delete measurement
description: 'Auth: basic, levels: write, 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:
- /measurement
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-05-28 15:03:49 +02:00
403:
$ref: 'api.yaml#/components/responses/403'
404:
$ref: 'api.yaml#/components/responses/404'
500:
$ref: 'api.yaml#/components/responses/500'
/measurement/restore/{id}:
parameters:
- $ref: 'api.yaml#/components/parameters/Id'
put:
summary: restore measurement
description: 'Auth: basic, levels: dev, admin'
2020-05-28 15:03:49 +02:00
x-doc: status is set to 0
tags:
- /measurement
security:
- BasicAuth: []
responses:
200:
$ref: 'api.yaml#/components/responses/Ok'
401:
$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-11 13:05:54 +02:00
500:
$ref: 'api.yaml#/components/responses/500'
2020-05-29 11:28:35 +02:00
/measurement/validate/{id}:
parameters:
- $ref: 'api.yaml#/components/parameters/Id'
put:
summary: set measurement status to validated
description: 'Auth: basic, levels: dev, admin'
2020-05-29 11:28:35 +02:00
x-doc: status is set to 10
tags:
- /measurement
security:
- BasicAuth: []
responses:
200:
$ref: 'api.yaml#/components/responses/Ok'
401:
$ref: 'api.yaml#/components/responses/401'
403:
$ref: 'api.yaml#/components/responses/403'
404:
$ref: 'api.yaml#/components/responses/404'
500:
$ref: 'api.yaml#/components/responses/500'
2020-05-11 13:05:54 +02:00
/measurement/new:
post:
2020-05-12 17:37:01 +02:00
summary: add measurement
description: 'Auth: basic, levels: write, dev, admin'
2020-05-12 14:05:47 +02:00
x-doc: 'Adds status: 0 automatically'
2020-05-11 13:05:54 +02:00
tags:
- /measurement
security:
- BasicAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Measurement'
responses:
200:
description: measurement details
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Measurement'
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-05-29 11:28:35 +02:00
$ref: 'api.yaml#/components/responses/500'