-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspecification.yaml
1640 lines (1439 loc) · 45.6 KB
/
specification.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: "Oceanics.io"
version: "3.0.0"
description: |
Oceanics.io is a graph-native store and registry for public and proprietary Ocean data. We ingest heterogenous sensor and simulation data and parse them into discoverable databases, accessible to both humans and machines.
You probably have to share data anyway. This software can enhance your data science and management experience by providing granular access control and provenance tracking based on open standards.
By assessing data and service availability over shared domain, projects can allocate resources to fill coverage gaps, share assets, and eliminate redundant operational and capital expenses.
contact:
name: Oceanicsdotio LLC
url: http://www.oceanics.io
email: [email protected]
license:
name: MIT
url: https://opensource.org/licenses/MIT
x-logo:
url: https://www.oceanics.io/logo.png
tags:
- name: Catalog
description: Access metadata about collections.
- name: Collection
description: Access groups of entities sharing a type.
- name: Entity
description: Manage a single entity or pair of entities.
- name: Topology
description: Create and access entity relationship metadata.
servers:
- url: https://www.oceanics.io/{basePath}
description: Production API server
variables:
basePath:
default: api
- url: https://localhost:8888/{basePath}
description: Local development server
variables:
basePath:
default: api
paths:
/:
get:
tags: [ Catalog ]
summary: Catalog Metadata
security:
- BearerAuth: []
description: |
Get all entity types in database as collections following the SpatioTemporal Asset Catalog specification
parameters:
- name: asset
in: query
schema:
type: string
default: index
- name: extension
description: |
Any entity can be linked topologically to any other entity, but generally
these are grouped in functional sets by application area:
* `sensing` implements Open Geospatial Consortium SensorThings specification (part 1),
and has models relevant to operating and getting data from sensor networks.
* `tasking` builds off of the SensorThings specification part 2.
* `mesh` implements structures for spatial simulations.
in: query
schema:
type: string
enum: [sensing, mesh, tasking, admin, catalog]
responses:
'200':
description: Catalog
post:
tags: [Catalog]
summary: Create Unique Constraint
security:
- BearerAuth: []
description: |
Add a unique constraint and node type. Even if no instances exist in the database,
this will force the get index query to return labels.
responses:
'204':
description: No content
'400':
$ref: '#/components/responses/BadRequest'
delete:
tags: [Catalog]
summary: Delete Catalog
security:
- BearerAuth: []
description: |
Delete all data connected to account.
responses:
'204':
description: No content
'400':
$ref: '#/components/responses/BadRequest'
/{entity}:
post:
tags: [Entity, Collection]
summary: Create Entity
security:
- BearerAuth: []
description: |
Create a new entity.
parameters:
- $ref: "#/components/parameters/entityClass"
requestBody:
$ref: '#/components/requestBodies/Entity'
responses:
'200':
$ref: '#/components/responses/Entity'
'400':
$ref: '#/components/responses/BadRequest'
get:
tags: [Collection]
summary: Collection Metadata
security:
- BearerAuth: []
description: |
Get all entities of one type. This can also take query string parameters for
`offset` and `limit`, which enables paging with look-ahead, or infinite scroll
if desired.
parameters:
- $ref: "#/components/parameters/entityClass"
- $ref: "#/components/parameters/offset"
- $ref: "#/components/parameters/limit"
responses:
'200':
$ref: '#/components/responses/EntityCollection'
'404':
$ref: '#/components/responses/NotFound'
/{entity}({uuid}):
get:
tags: [ Entity ]
summary: Entity Metadata
security:
- BearerAuth: []
description: Get entity
parameters:
- $ref: "#/components/parameters/entityClass"
- $ref: "#/components/parameters/entityId"
responses:
'200':
$ref: '#/components/responses/Entity'
'404':
$ref: '#/components/responses/NotFound'
put:
tags: [ Entity ]
summary: Update Entity
security:
- BearerAuth: []
description: Update entity
requestBody:
$ref: '#/components/requestBodies/Entity'
parameters:
- $ref: "#/components/parameters/entityClass"
- $ref: "#/components/parameters/entityId"
responses:
'200':
$ref: '#/components/responses/Entity'
'404':
$ref: '#/components/responses/NotFound'
delete:
tags: [ Entity ]
summary: Delete Entity
security:
- BearerAuth: []
description: Delete entity and orphans recursively.
parameters:
- $ref: "#/components/parameters/entityClass"
- $ref: "#/components/parameters/entityId"
responses:
'204':
description: No content
'404':
$ref: '#/components/responses/NotFound'
/{root}({rootId})/{entity}:
get:
tags: [ Topology, Entity, Collection ]
summary: Connected Entities
security:
- BearerAuth: []
description: |
Get related entities. The underlying implementation is almost identical to
that for getting base collections, except that this uses any data node as
the root, instead of the authenticated user. Like other query handlers,
this route supports `offset` and `limit` query parameters for client side
paging or continuous scroll.
parameters:
- $ref: "#/components/parameters/root"
- $ref: "#/components/parameters/rootId"
- $ref: "#/components/parameters/entityClass"
- $ref: "#/components/parameters/label"
- $ref: "#/components/parameters/offset"
- $ref: "#/components/parameters/limit"
responses:
'200':
$ref: '#/components/responses/EntityCollection'
'400':
$ref: '#/components/responses/BadRequest'
/{root}({rootId})/{entity}({uuid}):
post:
tags: [ Topology, Entity ]
summary: Join Entity Pair
security:
- BearerAuth: []
description: Create a labeled relationship between entities.
parameters:
- $ref: "#/components/parameters/root"
- $ref: "#/components/parameters/rootId"
- $ref: "#/components/parameters/entityClass"
- $ref: "#/components/parameters/entityId"
- $ref: "#/components/parameters/label"
responses:
'204':
description: No Content
'400':
$ref: '#/components/responses/BadRequest'
delete:
tags: [ Topology, Entity ]
summary: Drop Relationship
security:
- BearerAuth: []
description: |
Remove a labeled relationship between entities. If no `label` is specified, remove all
relationships between the entities.
parameters:
- $ref: "#/components/parameters/root"
- $ref: "#/components/parameters/rootId"
- $ref: "#/components/parameters/entityClass"
- $ref: "#/components/parameters/entityId"
- $ref: "#/components/parameters/label"
responses:
'204':
description: No Content
'400':
$ref: '#/components/responses/BadRequest'
components:
securitySchemes:
BearerAuth:
type: http
in: header
scheme: bearer
parameters:
root:
in: path
required: true
name: root
description: |
The class name of the root or parent entity that the request object is associated with. During a `GET` request
this will be used to collect child entities based on graph relationship. For `PUT` and `POST` requests this
and the child entities will be linked with a labeled relationship.
schema:
type: string
rootId:
in: path
required: true
name: rootId
description: |
Unique identifier of the parent entity.
schema:
type: string
entityClass:
in: path
required: true
name: entity
description: |
Name of the entity model to create or fetch.
schema:
type: string
enum:
- DataStreams
- Observations
- HistoricalLocations
- Locations
- Sensors
- Things
- ObservedProperties
- Tasks
- Actuators
- TaskingCapabilities
- FeaturesOfInterest
- Collections
entityId:
in: path
required: true
name: uuid
description: |
Unique identifier of the resource to be retrieved.
schema:
type: string
limit:
in: query
name: limit
description: |
The maximum number of nodes in the graph query response. This requires that the
result be sorted in some way for consistent results. We sort by uuid v7, which
means that records are return in approximately the order they were created. This
is used with `offset` to enable continuous scroll and paging.
schema:
type: number
format: integer
default: 10
minimum: 1
maximum: 100
offset:
in: query
name: offset
description: |
The number of node that will skipped when return the graph query result. This means
that the first record returned will be the next index. This is used in combination with
`limit` to enable paging or continuous scroll.
schema:
type: number
format: integer
default: 0
minimum: 0
label:
in: query
name: label
description: |
Should be in format `LABEL`, although this is not strictly necessary. Labeled relationships
are used to crawl over the graph.
schema:
type: string
ObjectKey:
in: path
name: objectKey
required: true
description: UUID of experiment data
schema:
type: string
ThingId:
in: path
name: thingId
required: true
description: Unique identifier of the object to copy.
schema:
type: integer
minimum: 0
configId:
in: query
name: configId
description: |
A reference to a model configuration can be used instead of supplying values for `runs`, `workers`, `dt`, and
`days`.
schema:
type: integer
requestBodies:
Asset:
description: |
Tell the server where to find the data
content:
application/json:
schema:
$ref: '#/components/schemas/Asset'
Collection:
content:
application/json:
schema:
$ref: '#/components/schemas/Collection'
CollectionUpdate:
description: |
Relabel or index an entity collection
content:
application/json:
schema:
$ref: '#/components/schemas/CollectionOptions'
Memos:
description: Create and retrieve content data
content:
application/json:
schema:
$ref: '#/components/schemas/Memos'
Entity:
description: |
Entity
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/Things'
- $ref: '#/components/schemas/Locations'
- $ref: '#/components/schemas/HistoricalLocations'
- $ref: '#/components/schemas/DataStreams'
- $ref: '#/components/schemas/Observations'
- $ref: '#/components/schemas/ObservedProperties'
- $ref: '#/components/schemas/Sensors'
- $ref: '#/components/schemas/FeaturesOfInterest'
- $ref: '#/components/schemas/Collection'
responses:
Asset:
description: |
Description of the file
content:
application/json:
schema:
$ref: '#/components/schemas/Asset'
BadRequest:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Collection:
description: Collection
content:
application/json:
schema:
$ref: '#/components/schemas/Collection'
Memos:
description: Memos
content:
application/json:
schema:
$ref: '#/components/schemas/Memos'
Entity:
description: |
Single entity
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/Things'
- $ref: '#/components/schemas/Locations'
- $ref: '#/components/schemas/HistoricalLocations'
- $ref: '#/components/schemas/DataStreams'
- $ref: '#/components/schemas/Observations'
- $ref: '#/components/schemas/ObservedProperties'
- $ref: '#/components/schemas/Sensors'
- $ref: '#/components/schemas/FeaturesOfInterest'
- $ref: '#/components/schemas/Memos'
EntityCollection:
description: |
Collection of entities
content:
application/json:
schema:
$ref: '#/components/schemas/EntityCollection'
Message:
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Message'
NotFound:
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
TokenResponse:
description: Auth token
content:
application/json:
schema:
type: object
properties:
token:
description: JWT Bearer token containing user ID
type: string
minLength: 127
duration:
type: integer
description: JWT expiration interval in seconds
default: 600
minimum: 30
maximum: 3600
ServerError:
description: Server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: Not authorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Agents:
examples:
- name: Arthur Machen
- name: Octavia Butler
type: object
additionalProperties: false
required: [uuid, name]
properties:
uuid:
type: string
format: uuid
description: |
Unique identifier for entity.
name:
type:
- "string"
- "null"
description: Human readable entity name for displaying data.
description:
type:
- "string"
- "null"
description: Short but useful explanation of what the entity is.
Asset:
type: object
CollectionOptions:
allOf:
- $ref: '#/components/schemas/Collection'
- type: object
properties:
label:
$ref: '#/components/schemas/EntityLabel'
indexBy:
type: string
default: id
enum:
- id
- location
- ts
description: |
Node attribute to create an index on.
Memos:
type: object
properties:
uuid:
type: string
publication:
type: string
published:
type: date-time
labels:
type: array
items:
type: object
properties:
value:
type: string
authors:
type: array
items:
type: string
title:
type: string
description:
type: string
volume:
type: string
pages:
type: array
items:
type: array
items:
type: number
format: integer
EntityLabel:
type: string
enum:
- Proxy
- Buoy
- Server
- Metadata
- File
- Raw
description: |
Additional node labels that can be applied to entities, which have internal meaning.
Message:
type: object
properties:
message:
type: string
description: Status message
Index:
type: string
description: Class name of entities to index.
SecretKey:
description: |
Your secret key is used to encrypt traffic and private data, such as your login credentials. If you do not
provide your own key, a default secret will be used. If you do provide a secret key, make sure to save it.
It is not possible for us to recover data encrypted with a user secret.
type: string
EntityCollection:
allOf:
- $ref: '#/components/schemas/Collection'
- type: object
properties:
"@iot.count":
type: integer
minimum: 1
maximum: 100
description: Total number of records in the response
value:
type: array
description: Array of response data
items:
oneOf:
- $ref: '#/components/schemas/Things'
- $ref: '#/components/schemas/Locations'
- $ref: '#/components/schemas/HistoricalLocations'
- $ref: '#/components/schemas/DataStreams'
- $ref: '#/components/schemas/Observations'
- $ref: '#/components/schemas/ObservedProperties'
- $ref: '#/components/schemas/Sensors'
- $ref: '#/components/schemas/FeaturesOfInterest'
- $ref: '#/components/schemas/Memos'
EntityClass:
type: string
enum:
- DataStreams
- FeaturesOfInterest
- Locations
- Observations
- ObservedProperties
- Sensors
- Things
- Collections
- Actuators
- TaskingCapabilities
- Tasks
- Memos
FeaturesOfInterest:
examples:
- name: Damariscotta River Estuary shellfish production
description: Dynamics of a traditional growing area for oysters in Maine.
type: object
title: FeaturesOfInterest
description: |
`FeaturesOfInterest` are similar to `Locations`, in that they are spatial phenomena. However,
they may be poorly defined in space and time, and therefore are represented through linked
`Observations`.
additionalProperties: false
required: [uuid, name]
properties:
uuid:
type: string
format: uuid
description: Globally unique identifier for `FeaturesOfInterest`.
name:
type:
- "string"
- "null"
description: Human readable name for displaying data. This may change over time.
description:
type:
- "string"
- "null"
description: Short but useful explanation of what the entity is.
encodingType:
type: string
description: Identifier for parsing feature data
feature:
type: object
description: Feature data
readOnly: true
oneOf:
- type: array
title: references
items:
type: string
- type: array
title: objects
items:
type: object
Things:
title: "Things"
examples:
- name: Sealab
description: A research institution located offshore.
- name: R/V Lloigor
description: A regional class research vessel operating in the Gulf of Maine.
type: object
description: |
`Things` are objects of the physical or information world that can be identified
and integrated into communication networks. These are related to `DataStreams`, `Locations`,
and `HistoricalLocations`. `Things` should only have a one location at a time, while past and future coordinates are related through `HistoricalLocations`. To get information about `ObservedProperties` or connected `Sensors`, you need to perform topological queries. In the
web interface this is done behind the scenes.
required: [uuid, name]
additionalProperties: false
properties:
uuid:
type: string
format: uuid
description: |
Unique identifier. This is usually auto-generated,
but different than the default node IDs within the Neo4j database,
since those are not guaranteed to persist.
name:
type:
- "string"
- "null"
description: |
Human readable entity name for displaying data.
description:
type:
- "string"
- "null"
description: |
Short but useful explanation of what the entity is.
properties:
type:
- object
- "null"
description: Key-value properties
readOnly: true
oneOf:
- type: "null"
- type: array
title: references
items:
type: string
format: url
- type: array
title: objects
items:
type: object
readOnly: true
oneOf:
- type: "null"
- type: array
title: references
items:
type: string
format: url
- type: array
title: objects
items:
type: object
readOnly: true
oneOf:
- type: "null"
- type: array
title: references
items:
type: string
format: url
- type: array
title: objects
items:
type: object
Locations:
examples:
- name: Lower Damariscotta
encodingType: application/vnd.geo+json
location:
type: Point
coordinates: [ -69.58344, 43.93354 ]
- name: Upper Damariscotta Estuary
encodingType: application/vnd.geo+json
description: Buoy deployment
location:
type: Point
coordinates: [ -69.5425, 43.9981 ]
- name: Wood Island Harbor
encodingType: application/vnd.geo+json
location:
type: Point
coordinates: [ -70.3444, 43.4565 ]
- name: Ram Island Saco Bay
encodingType: application/vnd.geo+json
location:
type: Point
coordinates: [ -70.3596, 43.4659 ]
- name: Bombazine Island
encodingType: application/vnd.geo+json
location:
type: Point
coordinates: [ -69.8984, 43.8636 ]
- name: Sand Cove
encodingType: application/vnd.geo+json
location:
type: Point
coordinates: [ -69.8919, 43.7764 ]
- name: Bagaduce River
encodingType: application/vnd.geo+json
location:
type: Point
coordinates: [ -68.7738, 44.4015 ]
- name: Machias Bay
encodingType: application/vnd.geo+json
location:
type: Point
coordinates: [ -67.3180, 44.6185 ]
- name: Cobscook Bay
encodingType: application/vnd.geo+json
location:
type: Point
coordinates: [ -67.0651, 44.8968 ]
- name: Western Passage
encodingType: application/vnd.geo+json
location:
type: Point
coordinates: [ -66.9958, 44.9201 ]
type: object
title: Locations
description: |
`Locations` usually store information about the last known position of `Things`.
Though these may no longer be current, they are distinct from `HistoricalLocations`,
which are known to no longer be an accurate estimate. We also use `Locations` to
represent prospective, planned and predicted positions, which departs from the
SensorThings standard.
These are commonly linked with `Things` and `HistoricalLocations`. `Things`
do not have a location property, so when they need to be visualized in a spatial context
it is necessary to use a topological query to retrieve connected `Locations`.
additionalProperties: false
required: [uuid, location, encodingType]
properties:
uuid:
type: string
format: uuid
description: |
Unique identifier in UUID format. The API expects an external identifier, and does
not pass back any information other than the success or failure status of the
operation. The web interface implements UUID generation with the v7 algorithm, so
that they can be used as sortable database keys.
name:
type:
- "string"
- "null"
description: |
Human readable name for search and display of `Locations` data. While you
may opt to encode information in the name, we recommend encoding these instead
in location properties and topology.
description:
type:
- "string"
- "null"
description: |
Brief explanation of what the `Locations` is. This could
include the source for manually input locations, annotations
about hazards or operational constraints, or any other information
you or other may find helpful.
encodingType:
type: string
enum:
- "application/vnd.geo+json"
default: "application/vnd.geo+json"
description: |
The encoding rendered in the location response. We support
GeoJSON in the user facing web interface and API. The underlying
implementation for storage, transmission, and processing varies
across services.
location:
type: object
additionalProperties: false
properties:
type:
type: string
description: |
The type of geometry, limited to values we know how to process.
This includes `Point` and `MultiPolygon` geometries. The web interface
only allows `Point` coordinates in form inputs, but arbitrarily complex
geometries can be created through the API.
enum: ["Point", "MultiPolygon", "MultiPoint"]
default: "Point"
coordinates:
oneOf:
- type: array
description: |
Spatial coordinates. Need the type and encoding to be sure how to interpret.
minLength: 2
maxLength: 3
items:
type: number
format: float
- type: array
description: |
Spatial coordinates. Need the type and encoding to be sure how to interpret.
minLength: 0
items:
type: array
items:
type: array
readOnly: true
oneOf:
- type: array
title: references
items:
type: string
- type: array
title: objects
items:
type: object