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

106 lines
2.9 KiB
YAML
Raw Normal View History

2020-06-05 08:50:06 +02:00
/:
get:
summary: Root method
description: 'Auth: none'
tags:
- /
security: []
responses:
200:
description: Server is working
content:
application/json:
schema:
properties:
status:
type: string
example: 'API server up and running!'
500:
$ref: 'api.yaml#/components/responses/500'
/authorized:
get:
summary: Checks authorization
description: 'Auth: all, levels: read, write, dev, admin'
2020-06-05 08:50:06 +02:00
tags:
- /
responses:
200:
description: Authorized
content:
application/json:
schema:
properties:
status:
type: string
example: 'Authorization successful'
method:
type: string
example: 'basic'
level:
type: string
example: read
2020-08-04 13:54:14 +02:00
user_id:
$ref: 'api.yaml#/components/schemas/Id'
2020-06-05 08:50:06 +02:00
401:
$ref: 'api.yaml#/components/responses/401'
500:
$ref: 'api.yaml#/components/responses/500'
2020-08-28 16:50:33 +02:00
/changelog/{id}/{page}/{pagesize}:
2020-06-05 08:50:06 +02:00
parameters:
2020-08-28 16:50:33 +02:00
- $ref: 'api.yaml#/components/parameters/Id'
2020-06-05 08:50:06 +02:00
- name: page
in: path
required: true
schema:
type: number
example: 3
- name: pagesize
in: path
required: true
schema:
type: number
example: 30
get:
summary: get changelog
2020-08-28 16:50:33 +02:00
description: 'Auth: basic, levels: dev, admin<br>Displays all logs older than timestamp of the given id, sorted by
date descending, page defaults to 0, pagesize defaults to 25
<br>Avoid using high page numbers for older logs, better use an older timestamp'
2020-06-05 08:50:06 +02:00
tags:
- /
responses:
200:
description: Changelog
content:
application/json:
schema:
2020-08-28 16:50:33 +02:00
allOf:
- $ref: 'api.yaml#/components/schemas/_Id'
2020-06-05 08:50:06 +02:00
properties:
date:
type: string
example: 1970-01-01T00:00:00.000Z
action:
type: string
example: PUT /sample/400000000000000000000001
collection:
type: string
example: samples
conditions:
type: object
example:
_id: '400000000000000000000001'
data:
type: object
example:
2020-08-12 11:20:26 +02:00
type: processed
2020-06-05 08:50:06 +02:00
status: 0
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'