banana
/
definma-api
Archived
2
Fork 0
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

105 lines
2.8 KiB
YAML

/:
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, maintain, dev, admin'
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
401:
$ref: 'api.yaml#/components/responses/401'
500:
$ref: 'api.yaml#/components/responses/500'
/changelog/{timestamp}/{page}/{pagesize}:
parameters:
- name: timestamp
in: path
required: true
schema:
type: string
example: 1970-01-01T00:00:00.000Z
- 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
description: 'Auth: basic, levels: maintain, admin<br>Displays all logs older than timestamp, 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'
tags:
- /
responses:
200:
description: Changelog
content:
application/json:
schema:
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:
type: part
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'