-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathrest-api.yaml
270 lines (269 loc) · 5.95 KB
/
rest-api.yaml
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
swagger: '2.0'
info:
version: 2.0.0
title: iofog-agent
consumes:
- application/json
produces:
- application/json
paths:
'/status':
get:
tags:
- Agent
description: Returns service status
parameters:
- in: header
name: Authorization
description: Agent Token
required: true
type: string
responses:
'200':
description: Service status
schema:
$ref: '#/definitions/ServiceStatusResponse'
'401':
description: Not Authorized
'405':
description: Method Not Allowed
'/info':
get:
tags:
- Agent
description: Returns service info
parameters:
- in: header
name: Authorization
description: Agent Token
required: true
type: string
responses:
'200':
description: Service info
schema:
$ref: '#/definitions/ServiceInfoResponse'
'401':
description: Not Authorized
'405':
description: Method Not Allowed
'/version':
get:
tags:
- Agent
description: Returns service info
parameters:
- in: header
name: Authorization
description: Agent Token
required: true
type: string
responses:
'200':
description: Service info
schema:
$ref: '#/definitions/ServiceVersionResponse'
'401':
description: Not Authorized
'405':
description: Method Not Allowed
'/provision':
post:
tags:
- Agent
description: Provision Agent
parameters:
- in: header
name: Authorization
description: User token
required: true
type: string
- in: body
name: ProvisioningKey
required: false
schema:
$ref: '#/definitions/ProvisioningRequest'
responses:
'200':
description: Provisionined
'400':
description: Bad Request
'401':
description: Not Authorized
'500':
description: Internal Server Error
'/deprovision':
delete:
tags:
- Agent
description: Deprovision Agent
parameters:
- in: header
name: Authorization
description: User token
required: true
type: string
responses:
'200':
description: Deprovisioned
'400':
description: Bad Request
'401':
description: Not Authorized
'500':
description: Internal Server Error
'/config':
post:
tags:
- Agent
description: Provision Agent
parameters:
- in: header
name: Authorization
description: User token
required: true
type: string
- in: body
name: ConfigRequest
required: false
schema:
$ref: '#/definitions/ConfigRequest'
responses:
'200':
description: Provisionined
'400':
description: Bad Request
'401':
description: Not Authorized
'500':
description: Internal Server Error
definitions:
ServiceStatusResponse:
type: object
properties:
running-microservices:
type: string
system-total-cpu:
type: string
memory-usage:
type: string
system-available-memory:
type: string
system-time:
type: string
disk-usage:
type: string
connection-to-controller:
type: string
cpu-usage:
type: string
messages-processed:
type: string
system-available-disk:
type: string
iofog-daemon:
type: string
ServiceInfoResponse:
type: object
properties:
log-file-directory:
type: string
iofog-controller:
type: string
cpu-usage-limit:
type: string
developer-mode:
type: string
post-diagnostics-frequency:
type: string
docker-url:
type: string
status-update-frequency:
type: string
memory-ram-limit:
type: string
log-disk-limit:
type: string
isolated-docker-containers-mode:
type: string
iofog-certificate:
type: string
ip-address:
type: string
network-interface:
type: string
fog-type:
type: string
disk-usage-limit:
type: string
iofog-uuid:
type: string
gps-mode:
type: string
message-storage-directory:
type: string
get-changes-frequency:
type: string
gps-coordinates:
type: string
log-rolling-file-count:
type: string
scan-devices-frequency:
type: string
ServiceVersionResponse:
type: object
properties:
version:
type: string
ProvisioningRequest:
type: object
properties:
provisioning-key:
type: string
ConfigRequest:
type: object
properties:
disk-limit:
type: string
disk-directory:
type: string
memory-limit:
type: string
cpu-limit:
type: string
controller-url:
type: string
cert-directory:
type: string
docker-url:
type: string
network-adapter:
type: string
logs-limit:
type: string
logs-directory:
type: string
logs-count:
type: string
logs-level:
type: string
status-frequency:
type: string
changes-frequency:
type: string
diagnostics-frequency:
type: string
device-scan-frequency:
type: string
isolated:
type: string
gps:
type: string
fog-type:
type: string
developer-mode:
type: string
schemes:
- http
host: 'localhost:54321'
basePath: /v2