-
Notifications
You must be signed in to change notification settings - Fork 492
/
Copy pathcore-data.yaml
1993 lines (1991 loc) · 69.3 KB
/
core-data.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
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.1.0
info:
title: Edgex Foundry - Core Data API
description: This is the definition of the API for the Core Data service in the EdgeX Foundry IOT microservice platform. Core Data is responsible for storing event and reading data ingested from edge devices in the environment.
version: 4.0.0
servers:
- url: http://localhost:59880/api/v3
description: URL for local development and testing
components:
schemas:
AddEventRequest:
allOf:
- $ref: '#/components/schemas/BaseRequest'
description: "A request for ingesting a new event/reading data"
type: object
properties:
event:
$ref: '#/components/schemas/Event'
required:
- event
BaseReading:
description: "A base reading type containing common properties from which more specific reading types inherit. This definition should not be implemented but is used elsewhere to indicate support for a mixed list of simple/binary readings in a single event."
type: object
properties:
origin:
description: "A Unix timestamp (nanoseconds) indicating when the reading was originated at the source device"
type: integer
deviceName:
description: "The name of the device from which the reading originated"
type: string
resourceName:
description: "The device resource name for the reading"
type: string
profileName:
description: "The device profile name for the reading"
type: string
valueType:
description: "Indicates the datatype of the value property"
type: string
enum:
- Bool
- String
- Uint8
- Uint16
- Uint32
- Uint64
- Int8
- Int16
- Int32
- Int64
- Float32
- Float64
- Binary
- BoolArray
- StringArray
- Uint8Array
- Uint16Array
- Uint32Array
- Uint64Array
- Int8Array
- Int16Array
- Int32Array
- Int64Array
- Float32Array
- Float64Array
- Object
required:
- deviceName
- resourceName
- profileName
- origin
- valueType
BaseRequest:
description: "Defines basic properties which all use-case specific request DTO instances should support."
type: object
properties:
requestId:
description: "Uniquely identifies this request. For implementation, recommend this value be generated by the type's constructor."
type: string
format: uuid
example: "e6e8a2f4-eb14-4649-9e2b-175247911369"
apiVersion:
description: "A version number shows the API version in DTOs."
type: string
example: v3
required:
- apiVersion
BaseResponse:
description: "Defines basic properties which all use-case specific response DTO instances should support"
type: object
properties:
apiVersion:
description: "A version number shows the API version in DTOs."
type: string
requestId:
description: "Uniquely identifies the request that resulted in this response."
type: string
format: uuid
example: "e6e8a2f4-eb14-4649-9e2b-175247911369"
statusCode:
description: "A numeric code signifying the operational status of the response."
type: integer
BaseWithIdResponse:
allOf:
- $ref: '#/components/schemas/BaseResponse'
description: "Defines basic properties which all use-case specific response DTO instances should support"
type: object
properties:
id:
description: "The unique identifier for the instance."
type: string
format: uuid
BaseWithTotalCountResponse:
allOf:
- $ref: '#/components/schemas/BaseResponse'
description: "Defines basic properties which all use-case specific response DTO instances should support"
type: object
properties:
totalCount:
description: "The total count of all multi instances."
type: integer
SimpleReading:
description: "An event reading for a simple data type"
allOf:
- $ref: '#/components/schemas/BaseReading'
- type: object
properties:
value:
description: "A string representation of the reading's value"
type: string
required:
- value
BinaryReading:
description: "An event reading for a binary data type"
allOf:
- $ref: '#/components/schemas/BaseReading'
- type: object
properties:
binaryValue:
description: "If the value of the reading is binary, it will be found in this property as a byte array"
type: string
format: byte
mediaType:
description: "E.g. MIME Type, indicates what the content type of the binaryValue property is if it's populated."
type: string
required:
- binaryValue
- mediaType
ObjectReading:
description: "An event reading for a object data type"
allOf:
- $ref: '#/components/schemas/BaseReading'
- type: object
properties:
objectValue:
description: "If the value type of the reading is Object, it will be found in this property as a object value"
type: string
format: byte
required:
- objectValue
CountResponse:
allOf:
- $ref: '#/components/schemas/BaseResponse'
description: "Returns an aggregate count of specified objects, e.g. events or readings, in uint32 integer type."
type: object
properties:
count:
type: integer
Event:
description: "A discrete event containing one or more readings"
properties:
apiVersion:
description: "A version number shows the API version in DTOs."
type: string
id:
description: "The unique identifier for the event"
type: string
format: uuid
deviceName:
description: "The name of the device from which the event originated"
type: string
profileName:
description: "The name of the device profile from which the event originated"
type: string
sourceName:
description: "SourceName indicates the name of the resource or device command in the device profile which describes the event to generate"
type: string
origin:
description: "A Unix timestamp (nanoseconds) indicating when the event was originated at the source device"
type: integer
readings:
description: "One or more readings captured at the time of the event"
type: array
items:
oneOf:
- $ref: '#/components/schemas/SimpleReading'
- $ref: '#/components/schemas/BinaryReading'
- $ref: '#/components/schemas/ObjectReading'
example: [
{
"deviceName": "Random-Boolean-Device",
"profileName": "Random-Boolean-Device",
"resourceName": "Bool",
"origin": 1692721935934211905,
"valueType": "Bool",
"value": "false"
}
]
tags:
description: "List of zero or more Tags attached to the Event which give more context to the Event"
title: tags
type: object
example: {
"Gateway-id": "HoustonStore-000123",
"latitude": {
"degrees": 25.0,
"minute": 1.0,
"second": 26.6268000000062
},
"longitude": {
"degree": 121.0,
"minute": 31.0,
"second": 19.600799999980154
}
}
required:
- id
- deviceName
- profileName
- sourceName
- origin
- readings
ErrorResponse:
allOf:
- $ref: '#/components/schemas/BaseResponse'
description: "A response type for returning a generic error to the caller."
type: object
properties:
message:
description: "A field that can contain a free-form message, such as an error message."
type: string
EventResponse:
allOf:
- $ref: '#/components/schemas/BaseResponse'
description: "A response type for returning an Event to the caller."
type: object
properties:
event:
$ref: '#/components/schemas/Event'
ConfigResponse:
description: "Provides a response containing the configuration for the targeted service."
type: object
properties:
apiVersion:
description: "A version number shows the API version in DTOs."
type: string
serviceName:
description: "Outputs the name of the service the response is from"
type: string
config:
description: "An object containing the service's configuration. Please refer the configuration documentation of each service for more details at [EdgeX Foundry Documentation](https://docs.edgexfoundry.org)."
type: object
MultiEventsResponse:
allOf:
- $ref: '#/components/schemas/BaseWithTotalCountResponse'
description: "A response type for returning Events to the caller."
type: object
properties:
events:
type: array
items:
$ref: '#/components/schemas/Event'
MultiReadingsResponse:
allOf:
- $ref: '#/components/schemas/BaseWithTotalCountResponse'
description: "A response type for returning Readings to the caller."
type: object
properties:
readings:
type: array
items:
$ref: '#/components/schemas/BaseReading'
PingResponse:
type: object
properties:
apiVersion:
description: "A version number shows the API version in DTOs."
type: string
timestamp:
description: "Outputs the current server timestamp in RFC1123 format"
example: "Mon, 02 Jan 2006 15:04:05 MST"
type: string
serviceName:
description: "Outputs the name of the service the response is from"
type: string
VersionResponse:
description: "A response returned from the /version endpoint whose purpose is to report out the latest version supported by the service."
type: object
properties:
apiVersion:
description: "A version number shows the API version in DTOs."
type: string
version:
description: "The latest version supported by the service."
type: string
serviceName:
description: "Outputs the name of the service the response is from"
type: string
SecretRequest:
allOf:
- $ref: '#/components/schemas/BaseRequest'
description: Defines the secret data to be stored
type: object
properties:
secretName:
description: Specifies the name of the secret
type: string
example: "credentials"
secretData:
description: A list of the key/value pairs of secret data to store
type: array
items:
$ref: '#/components/schemas/SecretDataKeyValue'
required:
- secretName
- secretData
SecretDataKeyValue:
description: Defines a key/value pair of secret data
type: object
properties:
key:
description: The key to identify the secret data
type: string
example: "secret-key"
value:
description: The value of the secret data
type: string
example: "secret-value"
required:
- key
- value
parameters:
offsetParam:
in: query
name: offset
required: false
schema:
type: integer
minimum: -1
default: 0
description: "The number of items to skip before starting to collect the result set. Setting this value to -1 will skip counting the total number of events or readings, which can improve performance when working with large datasets."
limitParam:
in: query
name: limit
required: false
schema:
type: integer
minimum: -1
default: 20
description: "The numbers of items to return. Specify -1 will return all remaining items after offset. The maximum will be the MaxResultCount as defined in the configuration of service."
correlatedRequestHeader:
in: header
name: X-Correlation-ID
description: "A unique identifier correlating a request to its associated response, facilitating tracing through being included on requests originating from the initiating request."
schema:
type: string
format: uuid
example: "14a42ea6-c394-41c3-8bcd-a29b9f5e6835"
headers:
correlatedResponseHeader:
description: "A response header that returns the unique correlation ID used to initiate the request."
schema:
type: string
format: uuid
example: "14a42ea6-c394-41c3-8bcd-a29b9f5e6835"
examples:
200Example:
value:
apiVersion: "v3"
statusCode: 200
202Example:
value:
apiVersion: "v3"
statusCode: 202
400Example:
value:
apiVersion: "v3"
statusCode: 400
message: "Bad Request"
404Example:
value:
apiVersion: "v3"
statusCode: 404
message: "Not Found"
409Example:
value:
apiVersion: "v3"
statusCode: 409
message: "Data Duplicate"
416Example:
value:
apiVersion: "v3"
statusCode: 416
message: "Range Not Satisfiable"
500Example:
value:
apiVersion: "v3"
statusCode: 500
message: "Interval Server Error"
EventExample:
value:
apiVersion: "v3"
statusCode: 200
event:
apiVersion: "v3"
id: "040bd523-ec33-440d-9d72-e5813a465f37"
deviceName: "device-001"
profileName: "profile-001"
sourceName: "source-1"
origin: 1602168089665565300
tags:
Gateway: "HoustonStore-000123"
Latitude:
degrees: 25.0
minute: 1.0
second: 26.6268000000062
Longitude:
degree: 121.0
minute: 31.0
second: 19.600799999980154
readings:
- deviceName: "device-001"
resourceName: "resource-001"
profileName: "profile-001"
modified: 1594975851631
origin: 1602168089665565300
valueType: "Float32"
value: "39.5"
- create: 1594876281221
deviceName: "device-001"
resourceName: "resource-001"
profileName: "profile-001"
origin: 1602168089665565300
valueType: "Int8"
value: "75"
AllEventsExample:
value:
apiVersion: "v3"
statusCode: 200
totalCount: 3
events:
- apiVersion: "v3"
id: "040bd523-ec33-440d-9d72-e5813a465f37"
deviceName: "device-001"
profileName: "profile-001"
sourceName: "source-1"
origin: 1602168089665565300
tags:
Gateway: "HoustonStore-000123"
Latitude:
degrees: 25.0
minute: 1.0
second: 26.6268000000062
Longitude:
degree: 121.0
minute: 31.0
second: 19.600799999980154
readings:
- deviceName: "device-001"
resourceName: "resource-001"
profileName: "profile-001"
modified: 1594975851631
origin: 1602168089665565300
valueType: "Float32"
value: "39.5"
- create: 1594876281221
deviceName: "device-001"
resourceName: "resource-001"
profileName: "profile-001"
origin: 1602168089665565300
valueType: "Int8"
value: "75"
- apiVersion: "v3"
deviceName: "device-002"
profileName: "profile-002"
sourceName: "source-2"
id: "73fc4f9c-2d64-4920-addb-b1f33a8f8514"
origin: 1602168089665565300
readings:
- deviceName: "device-002"
resourceName: "resource-002"
profileName: "profile-002"
origin: 1602168089665565300
valueType: "Binary"
binaryValue: [12,34]
mediaType: "image"
- deviceName: "device-002"
resourceName: "resource-003"
profileName: "profile-002"
origin: 1602168089665565300
valueType: "Object"
objectValue:
Attr1: "yyz"
Attr2: -45
Attr3: [ 255, 1, 0 ]
- apiVersion: "v3"
deviceName: "device-002"
profileName: "profile-002"
sourceName: "source-3"
id: "d5471d59-2810-419a-8744-18eb8fa03465"
origin: 1602168089665565300
readings:
- deviceName: "device-002"
resourceName: "resource-002"
profileName: "profile-002"
origin: 1602168089665565300
valueType: "Float32"
value: "12.2"
AllReadingsExample:
value:
apiVersion: "v3"
statusCode: 200
totalCount: 5
readings:
- deviceName: "Random-Boolean-Device"
resourceName: "Bool"
profileName: "Random-Boolean-Device"
origin: 1602168089665565300
valueType: "Bool"
value: "false"
- deviceName: "Random-Integer-Device"
resourceName: "Int8"
profileName: "Random-Integer-Device"
origin: 1602168089665565300
valueType: "Int8"
value: "75"
- deviceName: "Random-Binary-Device"
resourceName: "resource-002"
profileName: "Random-Binary-Device"
origin: 1602168089665565300
valueType: "Binary"
binaryValue: [12,34]
mediaType: "image"
- deviceName: "Random-Float-Device"
resourceName: "Float32"
profileName: "Random-Float-Device"
origin: 1602168089665565300
valueType: "Float32"
value: "12.2"
- deviceName: "Random-UnsignedInteger-Device"
resourceName: "Uint8"
profileName: "Random-UnsignedInteger-Device"
origin: 1602168089665565300
valueType: "Uint8"
value: "77"
ReadingsByResourceNameAndTimeRangeExample:
value:
apiVersion: "v3"
statusCode: 200
totalCount: 6
readings:
- deviceName: "device-001"
resourceName: "resource-001"
profileName: "profile-001"
origin: 1602168089665565300
valueType: "Float32"
value: "39.5"
- deviceName: "device-001"
resourceName: "resource-001"
profileName: "profile-001"
origin: 1602168089665565300
valueType: "Float32"
value: "38.6"
CountExample:
value:
apiVersion: "v3"
statusCode: 200
count: 3
paths:
/event/{serviceName}/{profileName}/{deviceName}/{sourceName}:
parameters:
- $ref: '#/components/parameters/correlatedRequestHeader'
- name: serviceName
in: path
required: true
schema:
type: string
description: "Identifies the device service generating the new event"
- name: profileName
in: path
required: true
schema:
type: string
description: "Uniquely identifies a given device profile"
- name: deviceName
in: path
required: true
schema:
type: string
description: "Uniquely identifies a given device"
- name: sourceName
in: path
required: true
schema:
type: string
description: "The sourceName is the name of the source that created the Event (ResourceName or CommandName)"
post:
summary: "Allows for the ingestion of event/reading data, and the deviceName and profileName of Event must match to the given deviceName and profileName as specified in the path"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AddEventRequest'
example:
apiVersion: v3
event:
apiVersion: v3
deviceName: Random-Boolean-Device
profileName: Random-Boolean-Device
sourceName: Bool
id: 563513b3-f020-46fa-ae44-0fdd1d129185
origin: 1692721935934211905
tags:
Gateway: "HoustonStore-000123"
Latitude:
degrees: 25.0
minute: 1.0
second: 26.6268000000062
Longitude:
degree: 121.0
minute: 31.0
second: 19.600799999980154
readings:
- deviceName: Random-Boolean-Device
resourceName: Bool
profileName: Random-Boolean-Device
origin: 1692721935934211905
valueType: Bool
value: 'false'
responses:
'201':
description: "Indicates the event has been successfully added."
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/BaseWithIdResponse'
example:
apiVersion: "v3"
statusCode: 201
id: "d5471d59-2810-419a-8744-18eb8fa03465"
'400':
description: "Request is in an invalid state"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
400Example:
$ref: '#/components/examples/400Example'
'409':
description: "Conflict detected. Event Id must be universally unique."
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
409Example:
$ref: '#/components/examples/409Example'
'500':
description: An unexpected error occurred on the server
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
500Example:
$ref: '#/components/examples/500Example'
/event/all:
parameters:
- $ref: '#/components/parameters/correlatedRequestHeader'
- $ref: '#/components/parameters/offsetParam'
- $ref: '#/components/parameters/limitParam'
get:
summary: "Given the entire range of events sorted by origin descending, returns a portion of that range according to the offset and limit parameters."
responses:
'200':
description: "OK"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/MultiEventsResponse'
examples:
MultiEventsExample:
$ref: '#/components/examples/AllEventsExample'
'400':
description: "Request is in an invalid state"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
400Example:
$ref: '#/components/examples/400Example'
'416':
description: "Request range is not satisfiable"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
416Example:
$ref: '#/components/examples/416Example'
'500':
description: "An unexpected error occurred on the server"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
500Example:
$ref: '#/components/examples/500Example'
/event/id/{id}:
parameters:
- $ref: '#/components/parameters/correlatedRequestHeader'
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: "An ID of datatype string, by default a GUID."
get:
summary: "Returns an event by ID"
responses:
'200':
description: "OK"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/EventResponse'
examples:
EventExample:
$ref: '#/components/examples/EventExample'
'404':
description: "The requested resource does not exist"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
404Example:
$ref: '#/components/examples/404Example'
'500':
description: "An unexpected error occurred on the server"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
500Example:
$ref: '#/components/examples/500Example'
delete:
summary: "Deletes an event by ID"
responses:
'200':
description: "Delete successful"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/BaseResponse'
examples:
200Example:
$ref: '#/components/examples/200Example'
'404':
description: "The requested resource does not exist"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
404Example:
$ref: '#/components/examples/404Example'
'500':
description: "An unexpected error occurred on the server"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
500Example:
$ref: '#/components/examples/500Example'
/event/count:
parameters:
- $ref: '#/components/parameters/correlatedRequestHeader'
get:
summary: "Return a count of all of events currently stored in the database."
responses:
'200':
description: "OK"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/CountResponse'
examples:
CountExample:
$ref: '#/components/examples/CountExample'
'500':
description: "An unexpected error occurred on the server"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
500Example:
$ref: '#/components/examples/500Example'
/event/count/device/name/{name}:
parameters:
- $ref: '#/components/parameters/correlatedRequestHeader'
- name: name
in: path
required: true
schema:
type: string
description: "Uniquely identifies a given device"
get:
summary: "Return a count of all of events currently stored in the database, sourced from the specified device."
responses:
'200':
description: "OK"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/CountResponse'
examples:
CountExample:
$ref: '#/components/examples/CountExample'
'404':
description: "The requested resource does not exist"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
404Example:
$ref: '#/components/examples/404Example'
'500':
description: "An unexpected error occurred on the server"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
500Example:
$ref: '#/components/examples/500Example'
/event/device/name/{name}:
get:
summary: "Given the entire range of events sorted by origin descending, returns a portion of that range according to the device name, offset and limit parameters."
parameters:
- $ref: '#/components/parameters/correlatedRequestHeader'
- name: name
in: path
required: true
schema:
type: string
description: "Uniquely identifies a given device"
- $ref: '#/components/parameters/offsetParam'
- $ref: '#/components/parameters/limitParam'
responses:
'200':
description: "OK"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/MultiEventsResponse'
examples:
MultiEventsExample:
$ref: '#/components/examples/AllEventsExample'
'404':
description: "The requested resource does not exist"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ErrorResponse'
examples:
404Example:
$ref: '#/components/examples/404Example'
'416':
description: "Request range is not satisfiable"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
416Example:
$ref: '#/components/examples/416Example'
'500':
description: "An unexpected error occurred on the server"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ErrorResponse'
examples:
500Example:
$ref: '#/components/examples/500Example'
delete:
summary: "Deletes all events for the specified device"
parameters:
- $ref: '#/components/parameters/correlatedRequestHeader'
- name: name
in: path
required: true
schema:
type: string
description: "Uniquely identifies a given device"
responses:
'202':
description: "Delete request accepted"
headers:
X-Correlation-ID:
$ref: '#/components/headers/correlatedResponseHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/BaseResponse'