/
device.yaml
334 lines (331 loc) · 11.6 KB
/
device.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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
openapi: 3.0.2
info:
title: Eclipse Kapua REST API - Devices
version: '1.0'
contact:
name: Eclipse Kapua Dev Team
url: https://eclipse.org/kapua
email: kapua-dev@eclipse.org
license:
name: Eclipse Public License 2.0
url: https://www.eclipse.org/legal/epl-2.0
paths: { }
components:
parameters:
deviceId:
name: deviceId
in: path
description: The ID of the Device on which to perform the operation
schema:
$ref: '../openapi.yaml#/components/schemas/kapuaId'
required: true
timeout:
name: timeout
in: query
description: The timeout for the request in milliseconds
schema:
type: integer
default: 10000
fetchAttributes:
name: fetchAttributes
in: query
schema:
type: array
items:
$ref: '#/components/schemas/fetchAttribute'
clientId:
name: clientId
in: query
description: The client id to filter results
schema:
type: string
schemas:
device:
properties:
groupId:
allOf:
- $ref: '../openapi.yaml#/components/schemas/kapuaId'
- description: The ID of the Access Group to which this Device is assigned to
clientId:
type: string
readOnly: true
description: The Kura Client ID of this device
connectionId:
allOf:
- $ref: '../openapi.yaml#/components/schemas/kapuaId'
- description: The ID of the Connection of this Device
readOnly: true
connection:
$ref: '../deviceConnection/deviceConnection.yaml#/components/schemas/connection'
status:
$ref: '#/components/schemas/status'
displayName:
description: The Kura Display Name of this Device
type: string
lastEventId:
allOf:
- $ref: '../openapi.yaml#/components/schemas/kapuaId'
- description: The ID of the last recorded Event from this Device
readOnly: true
lastEvent:
$ref: '#/components/schemas/event'
serialNumber:
description: The Serial Number of this Device
type: string
modelId:
description: The Model ID (not an Kapua ID) of this Device
type: string
modelName:
description: The Model Name of this Device
type: string
imei:
description: The IMEI Code of this Device
type: string
imsi:
description: The IMSI Code of this Device
type: string
iccid:
description: The ICCID Code of this Device
type: string
biosVersion:
description: The BIOS Version running on this Device
type: string
firmwareVersion:
description: The Firmware Version of this Device
type: string
osVersion:
description: The OS Version running on this Device
type: string
jvmVersion:
description: The JVM Version running on this Device
type: string
osgiFrameworkVersion:
description: The OSGi Framework Version running on this Device
type: string
applicationFrameworkVersion:
description: The Application Framework Version running on this Device
type: string
connectionInterface:
description: The Primary Connection Interface Name of this Device
type: string
connectionIp:
description: The IP Address of the Primary Connection Interface on this Device
type: string
applicationIdentifiers:
description: A string listing all the Kura Applications running on this Device
type: string
acceptEncoding:
description: The MIME Encoding accepted by this Device
type: string
customAttribute1:
description: A Custom Attirbute of this Device - 1
type: string
customAttribute2:
description: A Custom Attirbute of this Device - 2
type: string
customAttribute3:
description: A Custom Attirbute of this Device - 3
type: string
customAttribute4:
description: A Custom Attirbute of this Device - 4
type: string
customAttribute5:
description: A Custom Attirbute of this Device - 5
type: string
extendedProperties:
type: array
items:
allOf:
- $ref: '#/components/schemas/deviceExtendedProperty'
tagIds:
type: array
items:
allOf:
- $ref: '../openapi.yaml#/components/schemas/kapuaId'
example:
type: device
id: dIVxI5QpFUI
scopeId: AQ
createdOn: '2019-09-12T12:08:12.179Z'
createdBy: AQ
modifiedOn: '2019-09-12T12:08:12.179Z'
modifiedBy: AQ
optlock: 1
clientId: testDevice
status: ENABLED
displayName: Test Device
serialNumber: 1234567890
modelId: Test Model
biosVersion: N/A
firmwareVersion: N/A
osVersion: 3.13.0-93-generic
jvmVersion: 24.111-b01 mixed mode
osgiFrameworkVersion: 1.7.0
acceptEncoding: gzip
extendedProperties:
- type: deviceExtendedProperty
groupName: Hardware Info
name: CPU Family
value: ARM
- type: deviceExtendedProperty
groupName: Hardware Info
name: CPU Cores
value: 4
tagIds: [ ]
deviceCreator:
allOf:
- $ref: '../openapi.yaml#/components/schemas/kapuaUpdatableEntityCreator'
- type: object
properties:
groupId:
$ref: '#/components/schemas/device/properties/groupId'
clientId:
$ref: '#/components/schemas/device/properties/clientId'
status:
$ref: '#/components/schemas/status'
lastEventId:
$ref: '#/components/schemas/device/properties/lastEventId'
displayName:
$ref: '#/components/schemas/device/properties/displayName'
serialNumber:
$ref: '#/components/schemas/device/properties/serialNumber'
modelId:
$ref: '#/components/schemas/device/properties/modelId'
modelName:
$ref: '#/components/schemas/device/properties/modelName'
imei:
$ref: '#/components/schemas/device/properties/imei'
imsi:
$ref: '#/components/schemas/device/properties/imsi'
iccid:
$ref: '#/components/schemas/device/properties/iccid'
biosVersion:
$ref: '#/components/schemas/device/properties/biosVersion'
firmwareVersion:
$ref: '#/components/schemas/device/properties/firmwareVersion'
osVersion:
$ref: '#/components/schemas/device/properties/osVersion'
jvmVersion:
$ref: '#/components/schemas/device/properties/jvmVersion'
osgiFrameworkVersion:
$ref: '#/components/schemas/device/properties/osgiFrameworkVersion'
applicationFrameworkVersion:
$ref: '#/components/schemas/device/properties/applicationFrameworkVersion'
connectionInterface:
$ref: '#/components/schemas/device/properties/connectionInterface'
connectionIp:
$ref: '#/components/schemas/device/properties/connectionIp'
applicationIdentifiers:
$ref: '#/components/schemas/device/properties/applicationIdentifiers'
acceptEncoding:
$ref: '#/components/schemas/device/properties/acceptEncoding'
customAttribute1:
$ref: '#/components/schemas/device/properties/customAttribute1'
customAttribute2:
$ref: '#/components/schemas/device/properties/customAttribute2'
customAttribute3:
$ref: '#/components/schemas/device/properties/customAttribute3'
customAttribute4:
$ref: '#/components/schemas/device/properties/customAttribute4'
customAttribute5:
$ref: '#/components/schemas/device/properties/customAttribute5'
required:
- clientId
example:
clientId: testDevice
status: ENABLED
displayName: Test Device
serialNumber: 1234567890
modelId: Test Model
biosVersion: N/A
firmwareVersion: N/A
osVersion: 3.13.0-93-generic ##140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016
jvmVersion: 24.111-b01 mixed mode
osgiFrameworkVersion: 1.7.0
acceptEncoding: gzip
deviceCredentialsMode: LOOSE
deviceListResult:
allOf:
- $ref: '../openapi.yaml#/components/schemas/kapuaListResult'
- type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/device'
status:
type: string
enum:
- ENABLED
- DISABLED
action:
type: string
enum:
- READ
- CREATE
- WRITE
- DELETE
- OPTIONS
- EXECUTE
- SUBMIT
deviceExtendedProperty:
allOf:
- type: object
properties:
groupName:
type: string
name:
type: string
value:
type: string
example:
type: deviceExtendedProperty
groupName: Hardware Info
name: CPU Family
value: ARM
event:
allOf:
- $ref: '../openapi.yaml#/components/schemas/kapuaEntity'
- type: object
properties:
sentOn:
type: string
format: 'date-time'
receivedOn:
type: string
format: 'date-time'
position:
$ref: '../dataMessage/dataMessage.yaml#/components/schemas/position'
resource:
type: string
action:
$ref: '#/components/schemas/action'
responseCode:
type: string
enum:
- ACCEPTED
- BAD_REQUEST
- NOT_FOUND
- INTERNAL_ERROR
eventMessage:
type: string
example:
id: YYHQ2i1S-P0
scopeId: AQ
createdOn: '2019-09-12T09:04:37.392Z'
createdBy: Ag
deviceId: WyczTs_GuDM
receivedOn: '2019-09-12T09:04:32.646Z'
position:
altitude: 0
latitude: 0
longitude: 0
resource: BIRTH
action: CREATE
responseCode: ACCEPTED
eventMessage: 'acceptEncoding=gzip~~applicationFramework=Kura~~applicationFrameworkVersion=ESF_6.0.0~~applicationIdentifiers=heaterPROV-V2DEPLOY-V2VPNCLIENT-V2CONF-V1CERT-V1ASSET-V1CMD-V1~~availableProcessors=4~~bios=N/A~~biosVersion=N/A~~connectionInterface=lo (00:00:00:00:00:00)~~connectionIp=127.0.0.1~~containerFramework=Eclipse~~containerFrameworkVersion=1.8.0~~displayName=~~firmware=N/A~~firmwareVersion=N/A~~jvm=Java HotSpot(TM) 64-Bit Server VM~~jvmProfile=Java(TM) SE Runtime Environment 1.8.0_161-b12~~jvmVersion=25.161-b12 mixed mode~~modelId=ESF-Docker-RHEL~~modelName=ESF-Docker-RHEL~~os=Linux~~osArch=amd64~~osVersion=4.9.184-linuxkit #1 SMP Tue Jul 2 22:58:16 UTC 2019~~partNumber=ESF-Docker-RHEL~~serialNumber=ESF-Docker-RHEL~~totalMemory=1023488~~uptime=187894320'
fetchAttribute:
type: string
enum:
- connection
- lastEvent