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

66 lines
1.8 KiB
YAML
Raw Normal View History

2020-04-21 10:53:07 +02:00
/model/{name}:
parameters:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/parameters/Name'
2020-04-21 10:53:07 +02:00
get:
2020-08-13 12:07:40 +02:00
summary: get model data by name
2020-04-23 13:59:45 +02:00
description: 'Auth: all, levels: dev, admin'
2020-04-21 10:53:07 +02:00
tags:
- /model
responses:
200:
description: binary model data
content:
application/octet-stream:
schema:
type: string
format: binary
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-08-13 12:07:40 +02:00
post:
summary: add/replace model data by name
2020-04-23 13:59:45 +02:00
description: 'Auth: all, levels: dev, admin'
2020-04-21 10:53:07 +02:00
tags:
- /model
requestBody:
required: true
2020-08-13 12:07:40 +02:00
description: binary model data, Content-Type header must be set to application/octet-stream
2020-04-21 10:53:07 +02:00
content:
application/json:
schema:
type: string
format: binary
responses:
200:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/Ok'
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-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/responses/500'
2020-04-21 10:53:07 +02:00
delete:
2020-08-13 12:07:40 +02:00
summary: delete model data
2020-04-23 13:59:45 +02:00
description: 'Auth: basic, levels: dev, admin'
2020-04-21 10:53:07 +02:00
tags:
- /model
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-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'