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

112 lines
3.0 KiB
YAML
Raw Permalink Normal View History

2020-07-15 13:11:33 +02:00
/template/{collection}s:
parameters:
- $ref: 'api.yaml#/components/parameters/Collection'
2020-04-21 10:53:07 +02:00
get:
2020-07-15 13:11:33 +02:00
summary: all available templates
description: 'Auth: basic, levels: read, write, dev, admin'
2020-04-21 10:53:07 +02:00
tags:
2020-05-04 15:48:07 +02:00
- /template
2020-04-21 10:53:07 +02:00
security:
- BasicAuth: []
responses:
200:
2020-07-15 13:11:33 +02:00
description: list of templates
2020-04-21 10:53:07 +02:00
content:
application/json:
schema:
type: array
items:
$ref: 'api.yaml#/components/schemas/Template'
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
500:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/500'
2020-05-13 17:28:18 +02:00
2020-07-15 13:11:33 +02:00
/template/{collection}/{id}:
2020-04-21 10:53:07 +02:00
parameters:
2020-07-15 13:11:33 +02:00
- $ref: 'api.yaml#/components/parameters/Collection'
2020-05-13 17:28:18 +02:00
- $ref: 'api.yaml#/components/parameters/Id'
2020-04-21 10:53:07 +02:00
get:
2020-07-15 13:11:33 +02:00
summary: template details
description: 'Auth: basic, levels: read, write, dev, admin'
2020-04-21 10:53:07 +02:00
tags:
2020-05-04 15:48:07 +02:00
- /template
2020-04-21 10:53:07 +02:00
security:
- BasicAuth: []
responses:
200:
2020-07-15 13:11:33 +02:00
description: template details
2020-04-21 10:53:07 +02:00
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
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-07-15 13:11:33 +02:00
summary: change template
description: 'Auth: basic, levels: dev, admin'
2020-05-13 17:28:18 +02:00
x-doc: With a change a new version is set, resulting in a new template with a new id
2020-04-21 10:53:07 +02:00
tags:
2020-05-04 15:48:07 +02:00
- /template
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:
$ref: 'api.yaml#/components/schemas/Template'
2020-04-21 10:53:07 +02:00
responses:
200:
2020-07-15 13:11:33 +02:00
description: template details
2020-04-21 10:53:07 +02:00
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
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-05-13 17:28:18 +02:00
2020-07-15 13:11:33 +02:00
/template/{collection}/new:
2020-04-21 10:53:07 +02:00
parameters:
2020-07-15 13:11:33 +02:00
- $ref: 'api.yaml#/components/parameters/Collection'
2020-05-13 17:28:18 +02:00
post:
2020-07-15 13:11:33 +02:00
summary: add template
description: 'Auth: basic, levels: dev, admin'
2020-04-21 10:53:07 +02:00
tags:
2020-05-04 15:48:07 +02:00
- /template
2020-04-23 13:59:45 +02:00
security:
- BasicAuth: []
2020-05-13 17:28:18 +02:00
requestBody:
required: true
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
2020-04-21 10:53:07 +02:00
responses:
200:
2020-07-15 13:11:33 +02:00
description: template details
2020-05-13 17:28:18 +02:00
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
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
500:
2020-07-15 13:11:33 +02:00
$ref: 'api.yaml#/components/responses/500'