263 lines
		
	
	
		
			7.3 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			263 lines
		
	
	
		
			7.3 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| /template/treatments:
 | |
|   get:
 | |
|     summary: all available treatment methods
 | |
|     description: 'Auth: basic, levels: read, write, maintain, dev, admin'
 | |
|     tags:
 | |
|       - /template
 | |
|     security:
 | |
|       - BasicAuth: []
 | |
|     responses:
 | |
|       200:
 | |
|         description: list of treatments
 | |
|         content:
 | |
|           application/json:
 | |
|             schema:
 | |
|               type: array
 | |
|               items:
 | |
|                 $ref: 'api.yaml#/components/schemas/Template'
 | |
|               example:
 | |
|                 _id: 5ea0450ed851c30a90e70894
 | |
|                 name: heat aging
 | |
|                 parameters:
 | |
|                   - name: method
 | |
|                     range:
 | |
|                       values:
 | |
|                         - copper
 | |
|                         - hot air
 | |
|       401:
 | |
|         $ref: 'api.yaml#/components/responses/401'
 | |
|       500:
 | |
|         $ref: 'api.yaml#/components/responses/500'
 | |
| /template/treatment/{name}:
 | |
|   parameters:
 | |
|     - $ref: 'api.yaml#/components/parameters/Name'
 | |
|   get:
 | |
|     summary: treatment method details
 | |
|     description: 'Auth: basic, levels: read, write, maintain, admin'
 | |
|     tags:
 | |
|       - /template
 | |
|     security:
 | |
|       - BasicAuth: []
 | |
|     responses:
 | |
|       200:
 | |
|         description: treatment details
 | |
|         content:
 | |
|           application/json:
 | |
|             schema:
 | |
|               allOf:
 | |
|                 - $ref: 'api.yaml#/components/schemas/Template'
 | |
|               example:
 | |
|                 _id: 5ea0450ed851c30a90e70894
 | |
|                 name: heat aging
 | |
|                 parameters:
 | |
|                   - name: method
 | |
|                     range:
 | |
|                       values:
 | |
|                         - copper
 | |
|                         - hot air
 | |
|       401:
 | |
|         $ref: 'api.yaml#/components/responses/401'
 | |
|       404:
 | |
|         $ref: 'api.yaml#/components/responses/404'
 | |
|       500:
 | |
|         $ref: 'api.yaml#/components/responses/500'
 | |
|   put:
 | |
|     summary: add/change treatment method
 | |
|     description: 'Auth: basic, levels: maintain, admin'
 | |
|     tags:
 | |
|       - /template
 | |
|     security:
 | |
|         - BasicAuth: []
 | |
|     requestBody:
 | |
|       required: true
 | |
|       content:
 | |
|         application/json:
 | |
|           schema:
 | |
|             allOf:
 | |
|               - $ref: 'api.yaml#/components/schemas/Template'
 | |
|             example:
 | |
|               name: heat aging
 | |
|               parameters:
 | |
|                 - name: method
 | |
|                   range:
 | |
|                     values:
 | |
|                       - copper
 | |
|                       - hot air
 | |
|     responses:
 | |
|       200:
 | |
|         description: treatment details
 | |
|         content:
 | |
|           application/json:
 | |
|             schema:
 | |
|               allOf:
 | |
|                 - $ref: 'api.yaml#/components/schemas/Template'
 | |
|               example:
 | |
|                 _id: 5ea0450ed851c30a90e70894
 | |
|                 name: heat aging
 | |
|                 parameters:
 | |
|                   - name: method
 | |
|                     range:
 | |
|                       values:
 | |
|                         - copper
 | |
|                         - hot air
 | |
|       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:
 | |
|     summary: delete treatment method
 | |
|     description: 'Auth: basic, levels: maintain, admin'
 | |
|     tags:
 | |
|       - /template
 | |
|     security:
 | |
|       - BasicAuth: []
 | |
|     responses:
 | |
|       200:
 | |
|         $ref: 'api.yaml#/components/responses/Ok'
 | |
|       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'
 | |
| /template/measurements:
 | |
|   get:
 | |
|     summary: all available measurement methods
 | |
|     description: 'Auth: basic, levels: read, write, maintain, dev, admin'
 | |
|     tags:
 | |
|       - /template
 | |
|     security:
 | |
|       - BasicAuth: []
 | |
|     responses:
 | |
|       200:
 | |
|         description: list of measurement methods
 | |
|         content:
 | |
|           application/json:
 | |
|             schema:
 | |
|               type: array
 | |
|               items:
 | |
|                 $ref: 'api.yaml#/components/schemas/Template'
 | |
|               example:
 | |
|                 _id: 5ea0450ed851c30a90e70894
 | |
|                 name: humidity
 | |
|                 parameters:
 | |
|                   - name: kf
 | |
|                     range:
 | |
|                       min: 0
 | |
|                       max: 2
 | |
|       401:
 | |
|         $ref: 'api.yaml#/components/responses/401'
 | |
|       500:
 | |
|         $ref: 'api.yaml#/components/responses/500'
 | |
| /template/measurement/{name}:
 | |
|   parameters:
 | |
|     - $ref: 'api.yaml#/components/parameters/Name'
 | |
|   get:
 | |
|     summary: measurement method details
 | |
|     description: 'Auth: basic, levels: read, write, maintain, admin'
 | |
|     tags:
 | |
|       - /template
 | |
|     security:
 | |
|       - BasicAuth: []
 | |
|     responses:
 | |
|       200:
 | |
|         description: measurement details
 | |
|         content:
 | |
|           application/json:
 | |
|             schema:
 | |
|               allOf:
 | |
|                 - $ref: 'api.yaml#/components/schemas/Template'
 | |
|               example:
 | |
|                 _id: 5ea0450ed851c30a90e70894
 | |
|                 name: humidity
 | |
|                 parameters:
 | |
|                   - name: kf
 | |
|                     range:
 | |
|                       min: 0
 | |
|                       max: 2
 | |
|       400:
 | |
|         $ref: 'api.yaml#/components/responses/400'
 | |
|       401:
 | |
|         $ref: 'api.yaml#/components/responses/401'
 | |
|       404:
 | |
|         $ref: 'api.yaml#/components/responses/404'
 | |
|       500:
 | |
|         $ref: 'api.yaml#/components/responses/500'
 | |
|   put:
 | |
|     summary: add/change measurement method
 | |
|     description: 'Auth: basic, levels: maintain, admin'
 | |
|     tags:
 | |
|       - /template
 | |
|     security:
 | |
|       - BasicAuth: []
 | |
|     requestBody:
 | |
|       required: true
 | |
|       content:
 | |
|         application/json:
 | |
|           schema:
 | |
|             allOf:
 | |
|               - $ref: 'api.yaml#/components/schemas/Template'
 | |
|             example:
 | |
|               _id: 5ea0450ed851c30a90e70894
 | |
|               name: humidity
 | |
|               parameters:
 | |
|                 - name: kf
 | |
|                   range:
 | |
|                     min: 0
 | |
|                     max: 2
 | |
|     responses:
 | |
|       200:
 | |
|         description: measurement details
 | |
|         content:
 | |
|           application/json:
 | |
|             schema:
 | |
|               allOf:
 | |
|                 - $ref: 'api.yaml#/components/schemas/Template'
 | |
|               example:
 | |
|                 _id: 5ea0450ed851c30a90e70894
 | |
|                 name: humidity
 | |
|                 parameters:
 | |
|                   - name: kf
 | |
|                     range:
 | |
|                       min: 0
 | |
|                       max: 2
 | |
|       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:
 | |
|     summary: delete measurement method
 | |
|     description: 'Auth: basic, levels: maintain, admin'
 | |
|     tags:
 | |
|       - /template
 | |
|     security:
 | |
|       - BasicAuth: []
 | |
|     responses:
 | |
|       200:
 | |
|         $ref: 'api.yaml#/components/responses/Ok'
 | |
|       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' | 
