forked from typedb/typedb-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.yaml
997 lines (996 loc) · 24.9 KB
/
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
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
swagger: '2.0'
info:
title: Grakn
description: 'API for clients to interact with Grakn'
version: "0.1"
schemes: [http]
host: localhost:4567
paths:
/:
get:
summary: Root
tags: [Root]
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/Root'
/kb:
get:
summary: Get Knowledge Graphs
tags: [Keyspaces]
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/KnowledgeBases'
/kb/{keyspace}:
parameters:
- $ref: '#/parameters/keyspace'
get:
summary: Get Knowledge Graph
tags: [Keyspaces]
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/KnowledgeBase'
404:
description: ''
put:
summary: Put Knowledge Graph
description: >-
If the keyspace exists, nothing happens. The configuration is returned. This response is the same as the
response from `/kb/configuration`.
tags: [Keyspaces]
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/Configuration'
delete:
summary: Delete Knowledge Graph
description: >-
If the keyspace doesn't exist, nothing happens.
tags: [Keyspaces]
responses:
204:
description: ''
/kb/{keyspace}/graql:
post:
summary: Execute Graql Query
tags: [Keyspaces]
parameters:
- $ref: '#/parameters/keyspace'
- name: infer
in: query
description: Enable inference
type: boolean
- name: defineAllVars
in: query
description: Define all anonymous variables in the query
type: boolean
- name: multi
in: query
description: Support multiple queries
type: boolean
- name: explain
in: query
description: Provide an explanation of how results were inferred
type: boolean
- name: txType
in: query
description: Mode to operate Graql in (one of read, write or batch). Defaults to write.
type: string
- name: body
in: body
schema:
$ref: '#/definitions/GraqlQuery'
required: true
produces: [text/plain, application/json]
responses:
200:
description: 'Returns a Graql query response. This can be different depending on the type of query.'
schema:
$ref: '#/definitions/GraqlResponse'
400:
description: ''
/kb/{keyspace}/concept/{id}:
get:
summary: Get Concept
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
- name: id
in: path
required: true
type: string
x-example: V123
# For OpenAPI 3.0
# schema:
# $ref: '#/definitions/ConceptID'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/AnyConcept'
404:
description: ''
/kb/{keyspace}/concept/{id}/relationships:
get:
summary: Get Relationships
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
- name: id
in: path
required: true
type: string
x-example: V123
# For OpenAPI 3.0
# schema:
# $ref: '#/definitions/ConceptID'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/Relationships'
/kb/{keyspace}/concept/{id}/attributes:
get:
summary: Get Attributes
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
- name: id
in: path
required: true
type: string
x-example: V123
# For OpenAPI 3.0
# schema:
# $ref: '#/definitions/ConceptID'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/Attributes'
/kb/{keyspace}/concept/{id}/keys:
get:
summary: Get Keys
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
- name: id
in: path
required: true
type: string
x-example: V123
# For OpenAPI 3.0
# schema:
# $ref: '#/definitions/ConceptID'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/Keys'
/kb/{keyspace}/type:
get:
summary: Get Types
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/Types'
/kb/{keyspace}/type/{label}:
get:
summary: Get Type
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
- $ref: '#/parameters/label'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/Type'
404:
description: ''
/kb/{keyspace}/type/{label}/instances:
get:
summary: Get Instances
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
- $ref: '#/parameters/label'
- $ref: '#/parameters/limit'
- $ref: '#/parameters/offset'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/Instances'
404:
description: ''
/kb/{keyspace}/type/{label}/subs:
get:
summary: Get Sub-Types
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
- $ref: '#/parameters/label'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/SubTypes'
404:
description: ''
/kb/{keyspace}/type/{label}/plays:
get:
summary: Get Roles Played
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
- $ref: '#/parameters/label'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/Plays'
404:
description: ''
/kb/{keyspace}/type/{label}/attributes:
get:
summary: Get Attributes
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
- $ref: '#/parameters/label'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/AttributeTypes'
404:
description: ''
/kb/{keyspace}/type/{label}/keys:
get:
summary: Get Keys
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
- $ref: '#/parameters/label'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/KeyTypes'
404:
description: ''
/kb/{keyspace}/role:
get:
summary: Get Roles
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/Roles'
/kb/{keyspace}/role/{label}:
get:
summary: Get Role
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
- $ref: '#/parameters/label'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/Role'
404:
description: ''
/kb/{keyspace}/role/{label}/subs:
get:
summary: Get Sub-Roles
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
- $ref: '#/parameters/label'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/SubRoles'
404:
description: ''
/kb/{keyspace}/rule:
get:
summary: Get Rules
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/Rules'
/kb/{keyspace}/rule/{label}:
get:
summary: Get Rule
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
- $ref: '#/parameters/label'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/Rule'
404:
description: ''
/kb/{keyspace}/rule/{label}/subs:
get:
summary: Get Sub-Rules
tags: [Concepts]
parameters:
- $ref: '#/parameters/keyspace'
- $ref: '#/parameters/label'
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/SubRules'
404:
description: ''
/status:
get:
summary: Get Status
tags: [Internal]
produces: [application/json]
responses:
200:
description: ''
schema:
$ref: '#/definitions/StatusResponse'
/metrics:
get:
summary: Get Metrics
tags: [Internal]
produces: [text/plain]
responses:
200:
description: ''
schema:
type: object
/kb/{keyspace}/commit_log:
post:
summary: Post Commit Log
tags: [Internal]
parameters:
- $ref: '#/parameters/keyspace'
- name: body
in: body
schema:
$ref: '#/definitions/CommitLogRequest'
required: true
responses:
200:
description: ''
parameters:
keyspace:
name: keyspace
in: path
required: true
type: string
x-example: genealogy
# For OpenAPI 3.0
# schema:
# $ref: '#/definitions/Keyspace'
label:
name: label
in: path
required: true
type: string
x-example: person
# For OpenAPI 3.0
# schema:
# $ref: '#/definitions/Label'
limit:
name: limit
in: query
type: number
offset:
name: offset
in: query
type: number
definitions:
Root:
type: object
required: ['@id', keyspaces]
properties:
'@id':
type: string
format: uri
example: /
keyspaces:
$ref: '#/definitions/KnowledgeBasesLink'
KnowledgeBasesLink:
type: string
format: uri
example: /kb
KnowledgeBases:
type: object
required: ['@id', keyspaces, keyspace]
properties:
'@id':
$ref: '#/definitions/KnowledgeBasesLink'
keyspaces:
type: array
items:
$ref: '#/definitions/KnowledgeBase'
keyspace:
type: string
format: uri
example: /kb/{keyspace}
Keyspace:
type: string
example: genealogy
KnowledgeBase:
required: ['@id', name, types, roles, rules, graql]
type: object
properties:
'@id':
type: string
example: /kb/genealogy
name:
$ref: '#/definitions/Keyspace'
types:
$ref: '#/definitions/TypesLink'
roles:
$ref: '#/definitions/RolesLink'
rules:
$ref: '#/definitions/RulesLink'
graql:
type: string
format: uri
example: /kb/genealogy/graql
Label:
type: string
example: person
ConceptLink:
type: string
format: uri
example: /kb/genealogy/concept/V123
Concept:
required: [id, 'base-type']
type: object
properties:
id:
$ref: '#/definitions/ConceptID'
'base-type':
type: string
AnyConcept:
$ref: '#/definitions/Thing'
# For OpenAPI 3.0
# oneOf:
# - $ref: '#/definitions/Thing'
# - $ref: '#/definitions/Type'
# - $ref: '#/definitions/Role'
# - $ref: '#/definitions/Rule'
# example:
# '@id': /kb/genealogy/concept/V123
# type:
# '@id': /kb/genealogy/type/person
# label: person
# relationships:
# - role: /kb/genealogy/role/husband
# relationship: /kb/genealogy/concept/V456
# attributes:
# - '@id': /kb/genealogy/concept/V321
# type:
# '@id': /kb/genealogy/type/name
# label: name
# value: 'Bob'
# keys:
# - '@id': /kb/genealogy/concept/V654
# type:
# '@id': /kb/genealogy/type/person-id
# label: person-id
# value: 808
Thing:
allOf:
- $ref: '#/definitions/Concept'
- type: object
- required: ['@id', type, relationships, attributes, keys, inferred]
properties:
'@id':
$ref: '#/definitions/ConceptLink'
type:
$ref: '#/definitions/TypeSummary'
relationships:
$ref: '#/definitions/RelationshipsLink'
attributes:
$ref: '#/definitions/AttributesLink'
keys:
$ref: '#/definitions/KeysLink'
roleplayers:
type: array
items:
$ref: '#/definitions/RolePlayers'
value:
$ref: '#/definitions/Value'
inferred:
type: boolean
'base-type':
enum: ['ENTITY', 'RELATIONSHIP', 'ATTRIBUTE']
RolePlayers:
required: [role, thing]
type: object
properties:
role:
$ref: '#/definitions/RoleLink'
thing:
$ref: '#/definitions/ConceptLink'
AttributeSummary:
type: object
required: ['@id', type, value]
properties:
'@id':
$ref: '#/definitions/ConceptLink'
type:
$ref: '#/definitions/TypeSummary'
value:
$ref: '#/definitions/Value'
Value:
{}
# For OpenAPI 3.0
# anyOf:
# - type: string
# - type: number
# - type: boolean
RelationshipsLink:
type: string
format: uri
example: /kb/genealogy/concept/V123/relationships
Relationships:
required: ['@id', relationships]
type: object
properties:
'@id':
allOf: [$ref: '#/definitions/RelationshipsLink']
example: /kb/genealogy/concept/V123/relationships?limit=100&offset=100
relationships:
type: array
items:
$ref: '#/definitions/RolePlayers'
next:
allOf: [$ref: '#/definitions/RelationshipsLink']
example: /kb/genealogy/concept/V123/relationships?limit=100&offset=200
previous:
allOf: [$ref: '#/definitions/RelationshipsLink']
example: /kb/genealogy/concept/V123/relationships?limit=100&offset=0
KeysLink:
type: string
format: uri
example: /kb/genealogy/concept/V123/keys
Keys:
required: ['@id', keys]
type: object
properties:
'@id':
allOf: [$ref: '#/definitions/KeysLink']
example: /kb/genealogy/concept/V123/keys?limit=100&offset=100
keys:
type: array
items:
$ref: '#/definitions/AttributeSummary'
next:
allOf: [$ref: '#/definitions/KeysLink']
example: /kb/genealogy/concept/V123/keys?limit=100&offset=200
previous:
allOf: [$ref: '#/definitions/KeysLink']
example: /kb/genealogy/concept/V123/keys?limit=100&offset=0
AttributesLink:
type: string
format: uri
example: /kb/genealogy/concept/V123/attributes
Attributes:
required: ['@id', attributes]
type: object
properties:
'@id':
allOf: [$ref: '#/definitions/AttributesLink']
example: /kb/genealogy/concept/V123/attributes?limit=100&offset=100
attributes:
type: array
items:
$ref: '#/definitions/AttributeSummary'
next:
allOf: [$ref: '#/definitions/AttributesLink']
example: /kb/genealogy/concept/V123/attributes?limit=100&offset=200
previous:
allOf: [$ref: '#/definitions/AttributesLink']
example: /kb/genealogy/concept/V123/attributes?limit=100&offset=0
TypesLink:
type: string
format: uri
example: /kb/genealogy/type
Types:
type: object
required: ['@id', types]
properties:
'@id':
$ref: '#/definitions/TypesLink'
types:
type: array
items:
$ref: '#/definitions/Type'
TypeLink:
type: string
format: uri
example: /kb/genealogy/type/person
TypeSummary:
required: ['@id', label]
type: object
properties:
'@id':
$ref: '#/definitions/TypeLink'
label:
$ref: '#/definitions/Label'
Type:
allOf:
- $ref: '#/definitions/TypeSummary'
- $ref: '#/definitions/SchemaConcept'
- required: [abstract, plays, attributes, keys, subs]
type: object
properties:
abstract:
type: boolean
plays:
$ref: '#/definitions/PlaysLink'
attributes:
$ref: '#/definitions/AttributeTypesLink'
keys:
$ref: '#/definitions/KeyTypesLink'
subs:
$ref: '#/definitions/SubTypesLink'
relates:
type: array
items:
$ref: '#/definitions/RoleLink'
super:
allOf: [$ref: '#/definitions/TypeSummary']
example:
'@id': /kb/genealogy/type/entity
label: entity
instances:
$ref: '#/definitions/InstancesLink'
'base-type':
enum: ['TYPE', 'ENTITY_TYPE', 'RELATIONSHIP_TYPE', 'ATTRIBUTE_TYPE']
InstancesLink:
type: string
format: uri
example: /kb/genealogy/type/person/instances
Instances:
required: ['@id', instances]
type: object
properties:
'@id':
allOf: [$ref: '#/definitions/InstancesLink']
example: /kb/genealogy/type/person/instances?limit=100&offset=100
instances:
type: array
items:
$ref: '#/definitions/Concept'
next:
allOf: [$ref: '#/definitions/InstancesLink']
example: /kb/genealogy/type/person/instances?limit=100&offset=200
previous:
allOf: [$ref: '#/definitions/InstancesLink']
example: /kb/genealogy/type/person/instances?limit=100&offset=0
SubTypesLink:
type: string
format: uri
example: /kb/genealogy/type/person/subs
SubTypes:
type: object
required: ['@id', subs]
properties:
'@id':
$ref: '#/definitions/SubTypesLink'
subs:
type: array
items:
$ref: '#/definitions/Type'
PlaysLink:
type: string
format: uri
example: /kb/genealogy/type/person/plays
Plays:
type: object
required: ['@id', plays]
properties:
'@id':
$ref: '#/definitions/PlaysLink'
plays:
type: array
items:
$ref: '#/definitions/Role'
AttributeTypesLink:
type: string
format: uri
example: /kb/genealogy/type/person/attributes
AttributeTypes:
type: object
required: ['@id', attributes]
properties:
'@id':
$ref: '#/definitions/AttributeTypesLink'
attributes:
type: array
items:
$ref: '#/definitions/AttributeType'
KeyTypesLink:
type: string
format: uri
example: /kb/genealogy/type/person/keys
KeyTypes:
type: object
required: ['@id', keys]
properties:
'@id':
$ref: '#/definitions/KeyTypesLink'
keys:
type: array
items:
$ref: '#/definitions/AttributeType'
AttributeType:
allOf:
- $ref: '#/definitions/Type'
- properties:
'@id':
example: /kb/genealogy/type/name
label:
example: name
'base-type':
enum: ['ATTRIBUTE_TYPE']
RoleLink:
type: string
format: uri
example: /kb/genealogy/role/husband
RolesLink:
type: string
format: uri
example: /kb/genealogy/role
RoleSummary:
required: ['@id', label]
type: object
properties:
'@id':
$ref: '#/definitions/RoleLink'
label:
$ref: '#/definitions/Label'
Roles:
type: object
required: ['@id', roles]
properties:
'@id':
$ref: '#/definitions/RolesLink'
roles:
type: array
items:
$ref: '#/definitions/Role'
Role:
allOf:
- $ref: '#/definitions/TypeSummary'
- $ref: '#/definitions/SchemaConcept'
- type: object
required: [relationships, roleplayers, subs]
properties:
'@id':
example: /kb/genealogy/role/husband
label:
example: husband
relationships:
type: array
items:
$ref: '#/definitions/TypeLink'
roleplayers:
type: array
items:
allOf: [$ref: '#/definitions/TypeLink']
example: /kb/genealogy/type/marriage
subs:
$ref: '#/definitions/SubRolesLink'
super:
allOf: [$ref: '#/definitions/RoleSummary']
example:
'@id': /kb/genealogy/role/spouse
label: spouse
'base-type':
enum: ['ROLE']
SubRolesLink:
type: string
format: uri
example: /kb/genealogy/role/husband/subs
SubRoles:
type: object
required: ['@id', subs]
properties:
'@id':
$ref: '#/definitions/SubRolesLink'
subs:
type: array
items:
$ref: '#/definitions/Role'
RuleLink:
type: string
format: uri
example: /kb/genealogy/rule/grandparent-rule
RulesLink:
type: string
format: uri
example: /kb/genealogy/rule
RuleSummary:
required: ['@id', label]
type: object
properties:
'@id':
$ref: '#/definitions/RuleLink'
label:
$ref: '#/definitions/Label'
Rules:
type: object
required: ['@id', rules]
properties:
'@id':
$ref: '#/definitions/RulesLink'
rules:
type: array
items:
$ref: '#/definitions/Rule'
Rule:
allOf:
- $ref: '#/definitions/RuleSummary'
- $ref: '#/definitions/SchemaConcept'
- type: object
required: [id, label, when, then]
properties:
subs:
$ref: '#/definitions/SubRulesLink'
super:
allOf: [$ref: '#/definitions/RuleSummary']
example:
'@id': /kb/genealogy/rule/rule
label: rule
label:
allOf: [$ref: '#/definitions/Label']
example: grandparent-rule
when:
type: string
example: '(parent: $x, child: $y); (parent: $y, child: $z);'
then:
type: string
example: '(grandparent: $x, grandchild: $y) isa grandparentship;'
'base-type':
enum: ['RULE']
SubRulesLink:
type: string
format: uri
example: /kb/genealogy/rule/grandparent-rule/subs
SubRules:
type: object
required: ['@id', subs]
properties:
'@id':
$ref: '#/definitions/SubRulesLink'
subs:
type: array
items:
$ref: '#/definitions/Rule'
SchemaConcept:
allOf:
- $ref: '#/definitions/Concept'
- type: object
required: [implicit]
properties:
implicit:
type: boolean
Answer:
type: object
additionalProperties:
$ref: '#/definitions/Concept'
Configuration:
type: object
# For OpenAPI 3.0
# additionalProperties:
# oneOf:
# - type: string
# - type: number
# - type: boolean
example:
knowledge-base.mode: production
knowledge-base.analytics: distributed
knowledge-base.default-keyspace: grakn
knowledge-base.sharding-threshold: 10000
knowledge-base.schema-cache-timeout-ms: 600000
server.host: 0.0.0.0
server.port: 4567
server.static-file-dir: ../services/assets/
loader.repeat-commits: 5
tasks.postprocessing.delay: 60000
loader.threads: 4
webserver.threads: 64
log.dirs: ../logs/
log.level: INFO
storage.backend: grakn-production
storage.hostname: 127.0.0.1
cache.db-cache: true
cache.db-cache-clean-wait: 20
cache.db-cache-time: 180000
cache.db-cache-size: 0.25
queue.host: localhost:6379
queue.consumers: 32
redis.pool-size: 32
StatusResponse:
type: object
properties:
status:
type: string
enum:
- READY
- INITIALIZING
CommitLogRequest:
type: object
required: [instance-count, new-attributes]
properties:
instance-count:
additionalProperties:
type: number
example:
V123: 100
V456: 3
new-attributes:
additionalProperties:
type: array
items:
$ref: '#/definitions/ConceptID'
example:
AttributeIndex-name-Bob: [V789, V987]
ConceptID:
type: string
example: V123
GraqlQuery:
type: string
example: 'match $x isa person; get;'
GraqlResponse:
type: array
items:
$ref: '#/definitions/Answer'