2020-04-29 12:10:27 +02:00
|
|
|
/materials:
|
|
|
|
get:
|
|
|
|
summary: lists all materials
|
|
|
|
description: 'Auth: all, levels: read, write, maintain, dev, admin'
|
2020-05-18 10:43:26 +02:00
|
|
|
x-doc: returns only materials with status 10
|
|
|
|
tags:
|
|
|
|
- /material
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: all material details
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: 'api.yaml#/components/schemas/Material'
|
|
|
|
401:
|
|
|
|
$ref: 'api.yaml#/components/responses/401'
|
|
|
|
500:
|
|
|
|
$ref: 'api.yaml#/components/responses/500'
|
|
|
|
|
|
|
|
/materials/{group}:
|
|
|
|
parameters:
|
|
|
|
- $ref: 'api.yaml#/components/parameters/Group'
|
|
|
|
get:
|
|
|
|
summary: lists all new/deleted materials
|
|
|
|
description: 'Auth: basic, levels: maintain, admin'
|
|
|
|
x-doc: returns materials with status 0/-1
|
2020-04-29 12:10:27 +02:00
|
|
|
tags:
|
|
|
|
- /material
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: all material details
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: 'api.yaml#/components/schemas/Material'
|
|
|
|
401:
|
|
|
|
$ref: 'api.yaml#/components/responses/401'
|
|
|
|
500:
|
|
|
|
$ref: 'api.yaml#/components/responses/500'
|
|
|
|
|
|
|
|
/material/{id}:
|
|
|
|
parameters:
|
|
|
|
- $ref: 'api.yaml#/components/parameters/Id'
|
|
|
|
get:
|
|
|
|
summary: get material details
|
|
|
|
description: 'Auth: all, levels: read, write, maintain, dev, admin'
|
2020-05-28 14:11:19 +02:00
|
|
|
x-doc: deleted samples are available only for maintain/admin
|
2020-04-29 12:10:27 +02:00
|
|
|
tags:
|
|
|
|
- /material
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: material details
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: 'api.yaml#/components/schemas/Material'
|
|
|
|
401:
|
|
|
|
$ref: 'api.yaml#/components/responses/401'
|
|
|
|
404:
|
|
|
|
$ref: 'api.yaml#/components/responses/404'
|
|
|
|
500:
|
|
|
|
$ref: 'api.yaml#/components/responses/500'
|
|
|
|
put:
|
2020-04-29 16:09:31 +02:00
|
|
|
summary: change material
|
2020-04-29 12:10:27 +02:00
|
|
|
description: 'Auth: basic, levels: write, maintain, dev, admin'
|
2020-05-28 14:11:19 +02:00
|
|
|
x-doc: status is reset to 0 on any changes, deleted samples cannot be changed
|
2020-04-29 12:10:27 +02:00
|
|
|
tags:
|
|
|
|
- /material
|
|
|
|
security:
|
|
|
|
- BasicAuth: []
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: 'api.yaml#/components/schemas/Material'
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: material details
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: 'api.yaml#/components/schemas/Material'
|
|
|
|
400:
|
|
|
|
$ref: 'api.yaml#/components/responses/400'
|
|
|
|
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'
|
|
|
|
delete:
|
2020-05-04 15:48:07 +02:00
|
|
|
summary: delete material
|
2020-04-29 12:10:27 +02:00
|
|
|
description: 'Auth: basic, levels: write, maintain, dev, admin'
|
2020-05-13 14:18:15 +02:00
|
|
|
x-doc: sets status to -1
|
2020-04-29 12:10:27 +02:00
|
|
|
tags:
|
|
|
|
- /material
|
|
|
|
security:
|
|
|
|
- BasicAuth: []
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
$ref: 'api.yaml#/components/responses/Ok'
|
2020-05-08 09:58:12 +02:00
|
|
|
400:
|
|
|
|
$ref: 'api.yaml#/components/responses/400'
|
2020-04-29 12:10:27 +02:00
|
|
|
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'
|
|
|
|
|
|
|
|
/material/new:
|
|
|
|
post:
|
2020-05-04 15:48:07 +02:00
|
|
|
summary: add material
|
2020-04-29 12:10:27 +02:00
|
|
|
description: 'Auth: basic, levels: write, maintain, dev, admin'
|
2020-05-13 14:18:15 +02:00
|
|
|
x-doc: 'Adds status: 0 automatically'
|
2020-04-29 12:10:27 +02:00
|
|
|
tags:
|
|
|
|
- /material
|
|
|
|
security:
|
|
|
|
- BasicAuth: []
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: 'api.yaml#/components/schemas/Material'
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: material details
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: 'api.yaml#/components/schemas/Material'
|
|
|
|
400:
|
|
|
|
$ref: 'api.yaml#/components/responses/400'
|
|
|
|
401:
|
|
|
|
$ref: 'api.yaml#/components/responses/401'
|
|
|
|
403:
|
|
|
|
$ref: 'api.yaml#/components/responses/403'
|
|
|
|
500:
|
|
|
|
$ref: 'api.yaml#/components/responses/500'
|