-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfixcore-edge.yml
4083 lines (4055 loc) · 137 KB
/
fixcore-edge.yml
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.0.0
servers:
- url: https://{host}:{port}
variables:
host:
default: localhost
port:
default: '8900'
info:
title: Fix Inventory Core REST API
version: V1
tags:
- name: graph_search
description: Endpoints to search all sections of the graph.
- name: graph_management
description: Create, update wipe or delete a complete graph.
- name: node_management
description: Create, update, delete and get a node in the graph.
- name: model
description: Endpoints to maintain the schema and model of the entities inside a graph.
- name: config
description: Endpoints to maintain configuration data.
- name: config_validation
description: Endpoints to define how configs should be validated.
- name: cli
description: Endpoints to evaluate and execute cli commands.
- name: subscriptions
description: Endpoints to manipulate event subscriptions.
- name: work_queue
description: Endpoints to attach to the work queue.
- name: certificate
description: Endpoints to access the certificate authority as well as signing functionality.
- name: report
description: Endpoints to perform and maintain security, compliance and cost reports.
- name: system
description: Endpoints to get information about the system.
- name: debug
description: Endpoints to debug the system.
- name: timeseries
description: Endpoints to access time series data.
- name: tsdb
description: Endpoints to access the time series database.
- name: authorization
description: Endpoints to authorize access.
paths:
# region model
/graph/{graph_id}/model:
get:
summary: 'Get the currently defined model.'
tags:
- model
parameters:
- $ref: '#/components/parameters/graph_id'
- name: flat
description: 'If true, the hierarchy of complex kinds is flattened, holding all properties and all merged metadata.'
in: query
schema:
type: boolean
default: false
- name: format
description: 'The format of the returned json'
in: query
schema:
type: string
enum:
- schema
- simple
required: false
- name: kind
description: 'Only return information about the defined kinds. Comma separated list.'
in: query
explode: false
schema:
type: string
default: null
- name: filter
description: 'Only return information about kinds that include given string. Comma separated list.'
in: query
explode: false
schema:
type: string
default: null
- name: aggregate_roots_only
description: 'Only return aggregate roots.'
in: query
schema:
type: boolean
default: false
- name: with_bases
description: 'Include base classes and render the base section'
in: query
schema:
type: boolean
default: false
- name: with_property_kinds
description: 'Render types of property values. Only together with kind or filter'
in: query
schema:
type: boolean
default: false
- name: with_properties
description: 'Render the properties of complex kinds'
in: query
schema:
type: boolean
default: true
- name: with_relatives
description: 'Include information about relationships to other kinds.'
in: query
schema:
type: boolean
default: true
- name: with_metadata
description: 'Include metadata information.'
in: query
schema:
oneOf:
- type: boolean
description: 'If true, all metadata is included.'
- type: array
description: 'List of metadata keys to include.'
items:
type: string
default: true
responses:
'200':
description: 'The list of all kinds.'
content:
application/json:
schema:
$ref: '#/components/schemas/Kind'
patch:
summary: 'Add or update the current defined model.'
tags:
- model
parameters:
- $ref: '#/components/parameters/graph_id'
requestBody:
description: 'Complete model or part of the model.'
content:
application/json:
schema:
$ref: '#/components/schemas/Kind'
responses:
'200':
description: 'OK if the model is updated successfully'
content:
application/json:
schema:
$ref: '#/components/schemas/Kind'
'400':
description: 'Message that explains the error'
content:
text/plain:
schema:
type: string
/graph/{graph_id}/model/uml:
get:
summary: 'Get the currently defined model as svg uml image.'
tags:
- model
parameters:
- $ref: '#/components/parameters/graph_id'
- name: output
description: The output format.
in: query
schema:
type: string
enum:
- svg
- png
- puml
default: svg
required: false
- name: show
description: comma separated list of resources to show. Entries can be regexps.
in: query
schema:
type: string
required: false
explode: false
example: aws_ec2_instance,gcp.*
- name: hide
description: |
comma separated list of resources to hide. Entries can be regexps.
hide takes precedence over show.
in: query
schema:
type: string
required: false
explode: false
example: aws_ec2_instance,gcp.*
- name: with_inheritance
description: Include inheritance relations in the model.
in: query
schema:
type: boolean
default: true
- name: with_base_classes
description: Include all base classes of visible entries
in: query
schema:
type: boolean
default: true
- name: with_subclasses
description: Include all descendant classes of visible entries
in: query
schema:
type: boolean
default: false
- name: dependency
description: |
comma separated list of dependency relationships.
in: query
schema:
type: string
required: false
explode: false
example: default
- name: with_predecessors
description: Include all predecessors of selected entries
in: query
schema:
type: boolean
default: false
- name: with_successors
description: Include all successors of selected entries
in: query
schema:
type: boolean
default: false
- name: with_properties
description: Show properties of selected entries
in: query
schema:
oneOf:
- type: boolean
- type: string
default: true
- name: link_classes
description: Add anchor links to classes.
in: query
schema:
type: boolean
default: false
- name: aggregate_roots
description: Show aggregate roots.
in: query
schema:
type: boolean
default: true
- name: sort_props
description: Sort properties by name.
in: query
schema:
type: boolean
default: true
responses:
'200':
description: 'Returns the model as uml diagram in svg format'
# endregion
# region graph management
/graph:
get:
summary: 'List all graphs'
tags:
- graph_management
responses:
'200':
description: 'The names of all graphs'
content:
application/json:
schema:
type: array
items:
type: string
example: ['main', 'test']
/graph/{graph_id}:
get:
summary: 'Get root of a specific graph'
tags:
- graph_management
parameters:
- $ref: '#/components/parameters/graph_id'
responses:
'200':
description: 'The graph with the root node'
content:
application/json:
schema:
$ref: '#/components/schemas/Node'
'404':
description: 'The graph does not exist'
post:
summary: 'Create a new graph'
tags:
- graph_management
parameters:
- $ref: '#/components/parameters/graph_id'
responses:
'200':
description: 'The created graph with the root node'
content:
application/json:
schema:
$ref: '#/components/schemas/Node'
delete:
summary: 'Delete an existing graph'
tags:
- graph_management
parameters:
- $ref: '#/components/parameters/graph_id'
- name: truncate
in: query
schema:
type: boolean
description: 'If this parameter is set, leave the graph definition, but wipe the data.'
responses:
'200':
description: 'Ok when the delete operation was successful'
content:
text/plain:
example: 'Graph deleted.'
/graph/{graph_id}/merge:
post:
summary: 'Merge a given graph with the existing graph under marked merge nodes.'
tags:
- graph_management
parameters:
- $ref: '#/components/parameters/graph_id'
- name: wait_for_result
in: query
description: >
If this parameter is set, the request will block until the batch update is finished. The response will contain the batch identifier and the result of the batch update.
schema:
default: true
type: boolean
requestBody:
description: 'The graph is sent as newline delimited json, where each line holds a document, which is either a node or an edge.'
required: true
content:
application/x-ndjson:
schema:
oneOf:
- $ref: '#/components/schemas/NodeInGraph'
- $ref: '#/components/schemas/Edge'
example: [
# TODO: is there a way to show ndjson instead of json?
{
'id': 'a',
'data':
{
'kind': 'loadbalancer',
'ip': '1.2.3.4',
'mathod': 'roundrobin',
},
},
{
'id': 'b',
'data':
{
'kind': 'compute_instance',
'machine_type': 'gt-5',
'cores': 24,
},
},
{ 'from': 'a', 'to': 'b', 'edge_type': 'default' },
{
'id': 'c',
'data':
{
'kind': 'compute_instance',
'machine_type': 'gt-5',
'cores': 24,
},
},
{ 'from': 'a', 'to': 'c', 'edge_type': 'default' },
]
responses:
'200':
description: 'Return a summary of actions that has been applied.'
content:
application/json:
schema:
$ref: '#/components/schemas/GraphUpdate'
/graph/{graph_id}/merge/deferred_edges:
post:
summary: 'Merge deferred edges by a given task id'
description: |
All existing deferred edges will be replaced by the definition of all deferred edges of the given task ids.
We might be able to track deferred edges more specifically in the future.
tags:
- graph_management
parameters:
- $ref: '#/components/parameters/graph_id'
requestBody:
description: 'The task ids to merge.'
required: true
content:
application/json:
schema:
type: array
items:
type: string
responses:
'200':
description: 'Return a summary of actions that has been applied.'
content:
application/json:
schema:
type: object
properties:
processed:
type: integer
description: Number of processed edges
updated:
type: integer
description: Number of updated edges
deleted:
type: integer
description: Number of deleted edges
/graph/{graph_id}/batch/merge:
post:
summary: 'Merge a given graph with the existing graph under marked merge nodes as batch update.'
description: |
Merge a given graph with the existing graph under marked merge nodes as batch update.
tags:
- graph_management
parameters:
- $ref: '#/components/parameters/graph_id'
- name: batch_id
in: query
description: >
A batch identifier is a string that uniquely identifies the batch update. If this parameter is omitted, a new batch identifier is created automatically. The resulting batch identifier can be retrieved via the response message.
required: false
schema:
default: null
type: string
- name: wait_for_result
in: query
description: >
If this parameter is set, the request will block until the batch update is finished. The response will contain the batch identifier and the result of the batch update.
schema:
default: true
type: boolean
requestBody:
description: 'The graph is sent as newline delimited json, where each line holds a document, which is either a node or an edge.'
required: true
content:
application/x-ndjson:
schema:
oneOf:
- $ref: '#/components/schemas/NodeInGraph'
- $ref: '#/components/schemas/Edge'
example: [
# TODO: is there a way to show ndjson instead of json?
{
'id': 'a',
'data':
{
'kind': 'loadbalancer',
'ip': '1.2.3.4',
'mathod': 'roundrobin',
},
},
{
'id': 'b',
'data':
{
'kind': 'compute_instance',
'machine_type': 'gt-5',
'cores': 24,
},
},
{ 'from': 'a', 'to': 'b', 'edge_type': 'default' },
{
'id': 'c',
'data':
{
'kind': 'compute_instance',
'machine_type': 'gt-5',
'cores': 24,
},
},
{ 'from': 'a', 'to': 'c', 'edge_type': 'default' },
]
responses:
'200':
description: 'Return a summary of actions that has been applied.'
content:
application/json:
schema:
$ref: '#/components/schemas/GraphUpdate'
/graph/{graph_id}/batch:
get:
summary: 'Get a list of all running batch updates'
description: |
Get a list of all running batch updates.
tags:
- graph_management
parameters:
- $ref: '#/components/parameters/graph_id'
responses:
'200':
description: 'Ok message'
content:
application/json:
schema:
$ref: '#/components/schemas/BatchUpdate'
/graph/{graph_id}/batch/{batch_id}:
post:
summary: 'Commit a batch update'
description: |
Commit a batch update.
tags:
- graph_management
parameters:
- $ref: '#/components/parameters/graph_id'
- name: batch_id
in: path
description: 'A batch identifier is a string that uniquely identifies the batch update.'
required: true
schema:
type: string
responses:
'200':
description: 'Ok message'
content:
application/json:
schema:
type: string
example: 'Batch committed.'
delete:
summary: 'Abort a batch update'
description: |
Abort a batch update.
tags:
- graph_management
parameters:
- $ref: '#/components/parameters/graph_id'
- name: batch_id
in: path
description: 'A batch identifier is a string that uniquely identifies the batch update.'
required: true
schema:
type: string
responses:
'200':
description: 'Ok message'
content:
application/json:
schema:
type: string
example: 'Batch aborted.'
# endregion
# region node management
/graph/{graph_id}/nodes:
patch:
summary: 'Patch a list of nodes.'
description: |
Apply a patch on existing nodes. Non existing nodes are not updated!
Consider to stream the request body as new line delimited json (application/x-ndjson).
tags:
- node_management
parameters:
- $ref: '#/components/parameters/graph_id'
requestBody:
description: 'The partial object data to patch.'
content:
application/x-ndjson:
schema:
type: object
properties:
id:
type: string
description: The identifier of the node.
reported:
type: object
additionalProperties: true
desired:
type: object
additionalProperties: true
metadata:
type: object
additionalProperties: true
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: string
description: The identifier of the node.
reported:
type: object
additionalProperties: true
desired:
type: object
additionalProperties: true
metadata:
type: object
additionalProperties: true
responses:
'200':
description: 'Return the patched node'
content:
application/json:
schema:
$ref: '#/components/schemas/Node'
/graph/{graph_id}/node/{node_id}/under/{parent_node_id}:
post:
summary: 'Create a new node under the given parent node'
description: |
Create a new node under the given parent node.
tags:
- node_management
parameters:
- $ref: '#/components/parameters/graph_id'
- name: node_id
in: path
description: 'The identifier of the node'
required: true
schema:
type: string
- name: parent_node_id
in: path
description: 'The identifier of the parent node'
required: true
schema:
type: string
requestBody:
description: 'The node document to create.'
content:
application/json:
schema:
$ref: '#/components/schemas/Node'
responses:
'200':
description: 'Return the created node'
content:
application/json:
schema:
$ref: '#/components/schemas/Node'
/graph/{graph_id}/node/{node_id}:
get:
summary: 'Get a node with the given node id'
description: |
Get a node with the given node id
tags:
- node_management
parameters:
- $ref: '#/components/parameters/graph_id'
- name: node_id
in: path
description: 'The identifier of the node'
required: true
schema:
type: string
responses:
'200':
description: 'Return the defined node'
content:
application/json:
schema:
$ref: '#/components/schemas/Node'
patch:
summary: 'Update a node with the given node id'
description: |
Update a node with the given node id
tags:
- node_management
parameters:
- $ref: '#/components/parameters/graph_id'
- name: node_id
in: path
description: 'The identifier of the node'
required: true
schema:
type: string
requestBody:
description: 'The partial object data to patch.'
content:
application/json:
schema:
type: object
additionalProperties: true
responses:
'200':
description: 'Return the patched node'
content:
application/json:
schema:
$ref: '#/components/schemas/Node'
delete:
summary: 'Delete a node with the given node id.'
description: |
Delete a node with the given node id.
tags:
- node_management
parameters:
- $ref: '#/components/parameters/graph_id'
- name: node_id
in: path
description: 'The identifier of the node'
required: true
schema:
type: string
responses:
'204':
description: 'Node is deleted'
/graph/{graph_id}/node/{node_id}/section/{section}:
patch:
summary: 'Patch a node with the given node id in given section'
description: |
Patch a node with the given node id in given section
tags:
- node_management
parameters:
- $ref: '#/components/parameters/graph_id'
- $ref: '#/components/parameters/section-path'
- name: node_id
in: path
description: 'The identifier of the node'
required: true
schema:
type: string
requestBody:
description: 'The partial object data to patch.'
content:
application/json:
schema:
type: object
additionalProperties: true
responses:
'200':
description: 'Return the patched node'
content:
application/json:
schema:
$ref: '#/components/schemas/Node'
# endregion
# region search graph
/graph/{graph_id}/search/raw:
post:
summary: 'Transform the search into the raw database search'
description: |
Show the underlying raw search.
tags:
- debug
parameters:
- $ref: '#/components/parameters/graph_id'
- $ref: '#/components/parameters/section'
- name: at
in: query
description: 'The timestamp to use for the search. If not defined the latest version of the graph is used.'
required: false
schema:
type: string
format: date-time
requestBody:
description: 'The search to perform'
content:
text/plain:
schema:
type: string
example: is(graph_root) and reported.name=="root" -->
responses:
'200':
description: 'Returns the search as performed by the database.'
content:
application/json:
schema:
$ref: '#/components/schemas/RawQuery'
/graph/{graph_id}/search/list:
post:
summary: 'Search the graph and return all nodes as list (this will not contain any edges)'
description: |
Search the graph and return the matching nodes as list.
A section can be defined (defaults to `/` == root) to interpret relative property paths.
Example: is(volume) and (reported.age>23d or desired.clean==true or metadata.version==2)
tags:
- graph_search
parameters:
- $ref: '#/components/parameters/graph_id'
- $ref: '#/components/parameters/section'
- $ref: '#/components/parameters/with-kind'
- name: count
in: query
description: 'Optional parameter to get a Ck-Element-Count header which returns the number of returned json elements'
required: false
schema:
type: boolean
default: true
- name: at
in: query
description: 'The timestamp to use for the search. If not defined the latest version of the graph is used.'
required: false
schema:
type: string
format: date-time
requestBody:
description: 'The search to perform'
content:
text/plain:
schema:
type: string
example: is(graph_root) and reported.name=="root" -->
responses:
'200':
description: 'The result of this search in the defined format'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Node'
application/x-ndjson:
schema:
$ref: '#/components/schemas/Node'
example: |
{"type": "node", "id": "root", "revision": "123", "reported": {"kind": "graph_root", "id": "root", "tags": {}, "name": "root"}}
{"type": "node", "id": "cloud_id", "revision": "12", "reported": {"kind": "cloud", "id": "onelogin", "tags": {}, "name": "onelogin", "ctime": "2021-12-14T08:49:52Z", "age": "6d7h"}}
{"type": "edge", "from": "root", "to": "cloud_id", "edge_type": "default"}
text/plain:
example: |
reported:
kind: graph_root
id: root
tags: {}
name: root
metadata:
cleaned: false
protected: false
application/yaml:
example: |
id: root
type: node
revision: _daGy-Bu---
reported:
kind: graph_root
id: root
tags: { }
name: root
metadata:
python_type: fixlib.baseresources.GraphRoot
cleaned: false
protected: false
kinds:
- graph_root
---
id: 2RZlTX9yzeBwTNT_H1KZVA
type: node
revision: _daGy-Bi---
reported:
kind: cloud
id: onelogin
tags: { }
name: onelogin
ctime: '2021-12-14T08:49:52Z'
age: 6d7h
metadata:
python_type: fixlib.baseresources.Cloud
cleaned: false
protected: false
descendant_summary:
onelogin_account: 1
onelogin_region: 1
onelogin_user: 1034
descendant_count: 1036
ancestors:
cloud:
reported:
name: onelogin
id: onelogin
kinds:
- cloud
- base_cloud
- resource
---
type: edge
from: root
to: 2RZlTX9yzeBwTNT_H1KZVA
edge_type: default
application/vnd.graphml+xml:
example: |
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<key id="d4" for="node" attr.name="age" attr.type="string"/>
<key id="d3" for="node" attr.name="ctime" attr.type="string"/>
<key id="d2" for="node" attr.name="name" attr.type="string"/>
<key id="d1" for="node" attr.name="id" attr.type="string"/>
<key id="d0" for="node" attr.name="kind" attr.type="string"/>
<graph edgedefault="directed">
<node id="root">
<data key="d0">graph_root</data>
<data key="d1">root</data>
<data key="d2">root</data>
</node>
<node id="cloud_id">
<data key="d0">cloud</data>
<data key="d1">onelogin</data>
<data key="d2">onelogin</data>
<data key="d3">2021-12-14T08:49:52Z</data>
<data key="d4">6d7h</data>
</node>
<edge source="root" target="cloud_id"/>
</graph>
</graphml>
application/vnd.cytoscape+json:
example: |
{
"data": [ ],
"directed": true,
"elements": {
"edges": [
{
"data": {
"source": "root",
"target": "cloud_id"
}
}
],
"nodes": [
{
"data": {
"id": "root",
"kind": "graph_root",
"name": "root",
"tags": { },
"value": "root"
}
},
{
"data": {
"age": "6d7h",
"ctime": "2021-12-14T08:49:52Z",
"id": "onelogin",
"kind": "cloud",
"name": "onelogin",
"tags": { },
"value": "cloud_id"
}
}
]
},
"multigraph": false
}
text/vnd.graphviz:
example: |
digraph {
rankdir=LR
overlap=false
splines=true
node [shape=Mrecord colorscheme=paired12]
edge [arrowsize=0.5]
"root" [label="root|graph_root", style=filled fillcolor=1];
"2RZlTX9yzeBwTNT_H1KZVA" [label="onelogin|cloud", style=filled fillcolor=2];
"root" -> "2RZlTX9yzeBwTNT_H1KZVA"
subgraph "graph_root" {
"root"
"2RZlTX9yzeBwTNT_H1KZVA"
}
}
/graph/{graph_id}/search/graph:
post:
summary: 'Search the graph and return the resulting graph.'
description: |
Search the graph and return the matching nodes including the traversed edges.
The resulting data can be interpreted as a graph.
A section can be defined (defaults to `/` == root) to interpret relative property paths.
Example: is(volume) and (reported.age>23d or desired.clean==true or metadata.version==2)
tags:
- graph_search
parameters:
- $ref: '#/components/parameters/graph_id'
- $ref: '#/components/parameters/section'
- $ref: '#/components/parameters/with-kind'
- name: count
in: query
description: 'Optional parameter to get a Ck-Element-Count header which returns the number of returned json elements'
required: false
schema:
type: boolean
default: true
- name: search_timeout
in: query
description: 'Optional duration the search is allowed to run.'
required: false
schema:
type: string
example: '30s'
- name: at
in: query
description: 'The timestamp to use for the search. If not defined the latest version of the graph is used.'