forked from astrizhachuk/epf-transmitter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-receiver.yaml
More file actions
136 lines (136 loc) · 4.05 KB
/
api-receiver.yaml
File metadata and controls
136 lines (136 loc) · 4.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
openapi: 3.0.1
info:
title: Внешние отчеты и обработки (receiver)
description: 'Управление внешними отчетами и обработками через HTTP сервис (REST). Receiver.'
contact:
email: a.strizhachuk@yandex.ru
version: 1.0.0
servers:
- url: http://localhost/receiver/hs/gitlab
description: Develop
paths:
/version:
get:
summary: Версия конфигурации
operationId: version
responses:
200:
description: Версия конфигурации
content:
application/json:
schema:
$ref: '#/components/schemas/response'
examples:
foo:
summary: Версия конфигурации
value: {
"type": "info",
"message": "10.3.6.98"
}
/switch:
post:
summary: Включить/отключить функционал загрузки внешнего отчета или обработки
operationId: switch
parameters:
- name: Value
in: header
description: true - включить, false - отключить
required: true
schema:
type: boolean
requestBody:
content: {}
required: false
responses:
200:
description: Текущее состояние
content:
application/json:
schema:
$ref: '#/components/schemas/response'
examples:
enabled:
summary: Включено
value: {
"type": "info",
"message": "Включено"
}
disabled:
summary: Отключено
value: {
"type": "info",
"message": "Отключено"
}
400:
description: Ошибочный запрос
401:
description: Не авторизован
403:
description: Доступ закрыт
security:
- api_key: []
/update:
post:
summary: Обновить внешний отчет или обработку
operationId: update
parameters:
- name: Name
in: header
description: Полное имя файла (с расширением)
required: true
schema:
type: string
requestBody:
description: Внешний отчет или обработка в двоичном формате
content:
application/octet-stream:
schema:
format: binary
required: true
responses:
200:
description: Результат обновления
content:
application/json:
schema:
$ref: '#/components/schemas/response'
examples:
true:
summary: Обновление успешно
value: {
"type": "info",
"message": "Любое сообщение..."
}
false:
summary: Обновление не произошло
value: {
"type": "error",
"message": "Ошибка такая-то..."
}
400:
description: Ошибочный запрос
401:
description: Не авторизован
403:
description: Доступ закрыт
423:
description: Функционал отключен
security:
- api_key: []
components:
schemas:
response:
type: object
properties:
type:
type: string
enum:
- info
- error
message:
type: string
securitySchemes:
api_key:
type: apiKey
name: Token
in: header