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

213 lines
5.7 KiB
YAML

/template/conditions:
get:
summary: all available condition methods
description: 'Auth: basic, levels: read, write, maintain, dev, admin'
tags:
- /template
security:
- BasicAuth: []
responses:
200:
description: list of conditions
content:
application/json:
schema:
type: array
items:
$ref: 'api.yaml#/components/schemas/Template'
401:
$ref: 'api.yaml#/components/responses/401'
500:
$ref: 'api.yaml#/components/responses/500'
/template/condition/{id}:
parameters:
- $ref: 'api.yaml#/components/parameters/Id'
get:
summary: condition method details
description: 'Auth: basic, levels: read, write, maintain, admin'
tags:
- /template
security:
- BasicAuth: []
responses:
200:
description: condition details
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
401:
$ref: 'api.yaml#/components/responses/401'
404:
$ref: 'api.yaml#/components/responses/404'
500:
$ref: 'api.yaml#/components/responses/500'
put:
summary: change condition method
description: 'Auth: basic, levels: maintain, admin'
x-doc: With a change a new version is set, resulting in a new template with a new id
tags:
- /template
security:
- BasicAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
responses:
200:
description: condition details
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
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/condition/new:
post:
summary: add condition method
description: 'Auth: basic, levels: maintain, admin'
tags:
- /template
security:
- BasicAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
responses:
200:
description: condition details
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
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'
/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'
401:
$ref: 'api.yaml#/components/responses/401'
500:
$ref: 'api.yaml#/components/responses/500'
/template/measurement/{id}:
parameters:
- $ref: 'api.yaml#/components/parameters/Id'
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:
$ref: 'api.yaml#/components/schemas/Template'
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: change measurement method
description: 'Auth: basic, levels: maintain, admin'
tags:
- /template
security:
- BasicAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
responses:
200:
description: measurement details
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
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/measurement/new:
post:
summary: add measurement method
description: 'Auth: basic, levels: maintain, admin'
tags:
- /template
security:
- BasicAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
responses:
200:
description: measurement details
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
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'