-
Notifications
You must be signed in to change notification settings - Fork 556
/
swagger.yml
2501 lines (2498 loc) · 77.1 KB
/
swagger.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
basePath: /
consumes:
- application/json
definitions:
ACL:
additionalProperties:
format: uint8
type: integer
description: ACL - the ACL of other nodes in a NetworkACL for a single unique node
type: object
x-go-package: github.com/gravitl/netmaker/logic/acls
ACLContainer:
additionalProperties:
$ref: '#/definitions/ACL'
description: ACLContainer - the total list of all node's ACL in a given network
type: object
x-go-package: github.com/gravitl/netmaker/logic/acls
ApiHost:
description: ApiHost - the host struct for API usage
properties:
debug:
type: boolean
x-go-name: Debug
defaultinterface:
type: string
x-go-name: DefaultInterface
endpointip:
type: string
x-go-name: EndpointIP
firewallinuse:
type: string
x-go-name: FirewallInUse
id:
type: string
x-go-name: ID
interfaces:
items:
$ref: '#/definitions/Iface'
type: array
x-go-name: Interfaces
isdefault:
type: boolean
x-go-name: IsDefault
isrelay:
type: boolean
x-go-name: IsRelay
isrelayed:
type: boolean
x-go-name: IsRelayed
isstatic:
type: boolean
x-go-name: IsStatic
listenport:
format: int64
type: integer
x-go-name: ListenPort
macaddress:
type: string
x-go-name: MacAddress
mtu:
format: int64
type: integer
x-go-name: MTU
name:
type: string
x-go-name: Name
nat_type:
type: string
x-go-name: NatType
nodes:
items:
type: string
type: array
x-go-name: Nodes
os:
type: string
x-go-name: OS
publickey:
type: string
x-go-name: PublicKey
relay_hosts:
items:
type: string
type: array
x-go-name: RelayedHosts
relayed_by:
type: string
x-go-name: RelayedBy
verbosity:
format: int64
type: integer
x-go-name: Verbosity
version:
type: string
x-go-name: Version
wg_public_listen_port:
format: int64
type: integer
x-go-name: WgPublicListenPort
type: object
x-go-package: github.com/gravitl/netmaker/models
AuthParams:
description: AuthParams - struct for auth params
properties:
id:
type: string
x-go-name: ID
macaddress:
type: string
x-go-name: MacAddress
password:
type: string
x-go-name: Password
type: object
x-go-package: github.com/gravitl/netmaker/models
CustomExtClient:
description: CustomExtClient - struct for CustomExtClient params
properties:
clientid:
type: string
x-go-name: ClientID
deniednodeacls:
additionalProperties:
type: object
type: object
x-go-name: DeniedACLs
dns:
type: string
x-go-name: DNS
enabled:
type: boolean
x-go-name: Enabled
extraallowedips:
items:
type: string
type: array
x-go-name: ExtraAllowedIPs
publickey:
type: string
x-go-name: PublicKey
remote_access_client_id:
type: string
x-go-name: RemoteAccessClientID
type: object
x-go-package: github.com/gravitl/netmaker/models
DNSEntry:
description: DNSEntry - a DNS entry represented as struct
properties:
address:
type: string
x-go-name: Address
address6:
type: string
x-go-name: Address6
name:
type: string
x-go-name: Name
network:
type: string
x-go-name: Network
type: object
x-go-package: github.com/gravitl/netmaker/models
Duration:
description: |-
A Duration represents the elapsed time between two instants
as an int64 nanosecond count. The representation limits the
largest representable duration to approximately 290 years.
format: int64
type: integer
x-go-package: time
EgressGatewayRequest:
description: EgressGatewayRequest - egress gateway request
properties:
natenabled:
type: string
x-go-name: NatEnabled
netid:
type: string
x-go-name: NetID
nodeid:
type: string
x-go-name: NodeID
ranges:
items:
type: string
type: array
x-go-name: Ranges
type: object
x-go-package: github.com/gravitl/netmaker/models
EnrollmentKey:
description: EnrollmentKey - the key used to register hosts and join them to specific networks
properties:
expiration:
format: date-time
type: string
x-go-name: Expiration
networks:
items:
type: string
type: array
x-go-name: Networks
tags:
items:
type: string
type: array
x-go-name: Tags
token:
type: string
x-go-name: Token
type:
$ref: '#/definitions/KeyType'
unlimited:
type: boolean
x-go-name: Unlimited
uses_remaining:
format: int64
type: integer
x-go-name: UsesRemaining
value:
type: string
x-go-name: Value
type: object
x-go-package: github.com/gravitl/netmaker/models
ExtClient:
description: ExtClient - struct for external clients
properties:
address:
type: string
x-go-name: Address
address6:
type: string
x-go-name: Address6
clientid:
type: string
x-go-name: ClientID
deniednodeacls:
additionalProperties:
type: object
type: object
x-go-name: DeniedACLs
dns:
type: string
x-go-name: DNS
enabled:
type: boolean
x-go-name: Enabled
extraallowedips:
items:
type: string
type: array
x-go-name: ExtraAllowedIPs
ingressgatewayendpoint:
type: string
x-go-name: IngressGatewayEndpoint
ingressgatewayid:
type: string
x-go-name: IngressGatewayID
lastmodified:
format: int64
type: integer
x-go-name: LastModified
network:
type: string
x-go-name: Network
ownerid:
type: string
x-go-name: OwnerID
privatekey:
type: string
x-go-name: PrivateKey
publickey:
type: string
x-go-name: PublicKey
remote_access_client_id:
type: string
x-go-name: RemoteAccessClientID
type: object
x-go-package: github.com/gravitl/netmaker/models
File:
title: File represents an open file descriptor.
type: object
x-go-package: os
HardwareAddr:
items:
format: uint8
type: integer
title: A HardwareAddr represents a physical hardware address.
type: array
x-go-package: net
Host:
description: Host - represents a host on the network
properties:
autoupdate:
type: boolean
x-go-name: AutoUpdate
daemoninstalled:
type: boolean
x-go-name: DaemonInstalled
debug:
type: boolean
x-go-name: Debug
defaultinterface:
type: string
x-go-name: DefaultInterface
endpointip:
type: string
x-go-name: EndpointIP
firewallinuse:
type: string
x-go-name: FirewallInUse
hostpass:
type: string
x-go-name: HostPass
id:
format: uuid
type: string
x-go-name: ID
interface:
type: string
x-go-name: Interface
interfaces:
items:
$ref: '#/definitions/Iface'
type: array
x-go-name: Interfaces
ipforwarding:
type: boolean
x-go-name: IPForwarding
isdefault:
type: boolean
x-go-name: IsDefault
isdocker:
type: boolean
x-go-name: IsDocker
isk8s:
type: boolean
x-go-name: IsK8S
isstatic:
type: boolean
x-go-name: IsStatic
listenport:
format: int64
type: integer
x-go-name: ListenPort
macaddress:
$ref: '#/definitions/HardwareAddr'
mtu:
format: int64
type: integer
x-go-name: MTU
name:
type: string
x-go-name: Name
nat_type:
type: string
x-go-name: NatType
nodes:
items:
type: string
type: array
x-go-name: Nodes
os:
type: string
x-go-name: OS
publickey:
$ref: '#/definitions/Key'
traffickeypublic:
items:
format: uint8
type: integer
type: array
x-go-name: TrafficKeyPublic
turn_endpoint:
type: string
x-go-name: TurnEndpoint
verbosity:
format: int64
type: integer
x-go-name: Verbosity
version:
type: string
x-go-name: Version
wg_public_listen_port:
format: int64
type: integer
x-go-name: WgPublicListenPort
type: object
x-go-package: github.com/gravitl/netmaker/models
HostPull:
description: HostPull - response of a host's pull
properties:
host:
$ref: '#/definitions/Host'
nodes:
items:
$ref: '#/definitions/Node'
type: array
x-go-name: Nodes
peer_ids:
$ref: '#/definitions/PeerMap'
peers:
items:
$ref: '#/definitions/PeerConfig'
type: array
x-go-name: Peers
server_config:
$ref: '#/definitions/ServerConfig'
type: object
x-go-package: github.com/gravitl/netmaker/models
IDandAddr:
description: IDandAddr - struct to hold ID and primary Address
properties:
address:
type: string
x-go-name: Address
id:
type: string
x-go-name: ID
is_extclient:
type: boolean
x-go-name: IsExtClient
isserver:
type: string
x-go-name: IsServer
listen_port:
format: int64
type: integer
x-go-name: ListenPort
name:
type: string
x-go-name: Name
network:
type: string
x-go-name: Network
type: object
x-go-package: github.com/gravitl/netmaker/models
IPMask:
description: See type IPNet and func ParseCIDR for details.
items:
format: uint8
type: integer
title: |-
An IPMask is a bitmask that can be used to manipulate
IP addresses for IP addressing and routing.
type: array
x-go-package: net
IPNet:
properties:
IP:
type: string
Mask:
$ref: '#/definitions/IPMask'
title: An IPNet represents an IP network.
type: object
x-go-package: net
Iface:
description: Iface struct for local interfaces of a node
properties:
address:
$ref: '#/definitions/IPNet'
addressString:
type: string
x-go-name: AddressString
name:
type: string
x-go-name: Name
type: object
x-go-package: github.com/gravitl/netmaker/models
Key:
description: |-
A Key is a public, private, or pre-shared secret key. The Key constructor
functions in this package can be used to create Keys suitable for each of
these applications.
items:
format: uint8
type: integer
type: array
x-go-package: golang.zx2c4.com/wireguard/wgctrl/wgtypes
KeyType:
description: KeyType - the type of enrollment key
format: int64
type: integer
x-go-package: github.com/gravitl/netmaker/models
LegacyNode:
description: LegacyNode - legacy struct for node model
properties:
accesskey:
type: string
x-go-name: AccessKey
action:
type: string
x-go-name: Action
address:
type: string
x-go-name: Address
address6:
type: string
x-go-name: Address6
allowedips:
items:
type: string
type: array
x-go-name: AllowedIPs
connected:
type: string
x-go-name: Connected
defaultacl:
description: == PRO ==
type: string
x-go-name: DefaultACL
dnson:
type: string
x-go-name: DNSOn
egressgatewaynatenabled:
type: string
x-go-name: EgressGatewayNatEnabled
egressgatewayranges:
items:
type: string
type: array
x-go-name: EgressGatewayRanges
egressgatewayrequest:
$ref: '#/definitions/EgressGatewayRequest'
endpoint:
type: string
x-go-name: Endpoint
expdatetime:
format: int64
type: integer
x-go-name: ExpirationDateTime
failover:
type: string
x-go-name: Failover
failovernode:
type: string
x-go-name: FailoverNode
firewallinuse:
type: string
x-go-name: FirewallInUse
id:
type: string
x-go-name: ID
ingressgatewayrange:
type: string
x-go-name: IngressGatewayRange
ingressgatewayrange6:
type: string
x-go-name: IngressGatewayRange6
interface:
type: string
x-go-name: Interface
interfaces:
items:
$ref: '#/definitions/Iface'
type: array
x-go-name: Interfaces
internetgateway:
type: string
x-go-name: InternetGateway
ipforwarding:
type: string
x-go-name: IPForwarding
isdocker:
type: string
x-go-name: IsDocker
isegressgateway:
type: string
x-go-name: IsEgressGateway
ishub:
type: string
x-go-name: IsHub
isingressgateway:
type: string
x-go-name: IsIngressGateway
isk8s:
type: string
x-go-name: IsK8S
ispending:
type: string
x-go-name: IsPending
isrelay:
type: string
x-go-name: IsRelay
isrelayed:
type: string
x-go-name: IsRelayed
isserver:
type: string
x-go-name: IsServer
isstatic:
description: IsStatic - refers to if the Endpoint is set manually or dynamically
type: string
x-go-name: IsStatic
lastcheckin:
format: int64
type: integer
x-go-name: LastCheckIn
lastmodified:
format: int64
type: integer
x-go-name: LastModified
lastpeerupdate:
format: int64
type: integer
x-go-name: LastPeerUpdate
listenport:
format: int32
type: integer
x-go-name: ListenPort
localaddress:
type: string
x-go-name: LocalAddress
locallistenport:
format: int32
type: integer
x-go-name: LocalListenPort
macaddress:
type: string
x-go-name: MacAddress
mtu:
format: int32
type: integer
x-go-name: MTU
name:
type: string
x-go-name: Name
network:
type: string
x-go-name: Network
networksettings:
$ref: '#/definitions/Network'
os:
type: string
x-go-name: OS
ownerid:
type: string
x-go-name: OwnerID
password:
type: string
x-go-name: Password
persistentkeepalive:
format: int32
type: integer
x-go-name: PersistentKeepalive
publickey:
type: string
x-go-name: PublicKey
relayaddrs:
items:
type: string
type: array
x-go-name: RelayAddrs
server:
type: string
x-go-name: Server
traffickeys:
$ref: '#/definitions/TrafficKeys'
udpholepunch:
type: string
x-go-name: UDPHolePunch
version:
type: string
x-go-name: Version
type: object
x-go-package: github.com/gravitl/netmaker/models
Network:
description: |-
Network Struct - contains info for a given unique network
At some point, need to replace all instances of Name with something else like Identifier
properties:
addressrange:
type: string
x-go-name: AddressRange
addressrange6:
type: string
x-go-name: AddressRange6
allowmanualsignup:
type: string
x-go-name: AllowManualSignUp
defaultacl:
type: string
x-go-name: DefaultACL
defaultinterface:
type: string
x-go-name: DefaultInterface
defaultkeepalive:
format: int32
type: integer
x-go-name: DefaultKeepalive
defaultlistenport:
format: int32
type: integer
x-go-name: DefaultListenPort
defaultmtu:
format: int32
type: integer
x-go-name: DefaultMTU
defaultpostdown:
type: string
x-go-name: DefaultPostDown
defaultudpholepunch:
type: string
x-go-name: DefaultUDPHolePunch
isipv4:
type: string
x-go-name: IsIPv4
isipv6:
type: string
x-go-name: IsIPv6
netid:
type: string
x-go-name: NetID
networklastmodified:
format: int64
type: integer
x-go-name: NetworkLastModified
nodelimit:
format: int32
type: integer
x-go-name: NodeLimit
nodeslastmodified:
format: int64
type: integer
x-go-name: NodesLastModified
type: object
x-go-package: github.com/gravitl/netmaker/models
Node:
description: Node - a model of a network node
properties:
action:
type: string
x-go-name: Action
address:
$ref: '#/definitions/IPNet'
address6:
$ref: '#/definitions/IPNet'
connected:
type: boolean
x-go-name: Connected
defaultacl:
description: == PRO ==
type: string
x-go-name: DefaultACL
dnson:
type: boolean
x-go-name: DNSOn
egressgatewaynatenabled:
type: boolean
x-go-name: EgressGatewayNatEnabled
egressgatewayranges:
items:
type: string
type: array
x-go-name: EgressGatewayRanges
egressgatewayrequest:
$ref: '#/definitions/EgressGatewayRequest'
expdatetime:
format: date-time
type: string
x-go-name: ExpirationDateTime
failover:
type: boolean
x-go-name: Failover
failovernode:
format: uuid
type: string
x-go-name: FailoverNode
hostid:
format: uuid
type: string
x-go-name: HostID
id:
format: uuid
type: string
x-go-name: ID
ingressdns:
type: string
x-go-name: IngressDNS
ingressgatewayrange:
type: string
x-go-name: IngressGatewayRange
ingressgatewayrange6:
type: string
x-go-name: IngressGatewayRange6
internetgateway:
$ref: '#/definitions/UDPAddr'
isegressgateway:
type: boolean
x-go-name: IsEgressGateway
isingressgateway:
type: boolean
x-go-name: IsIngressGateway
isrelay:
type: boolean
x-go-name: IsRelay
isrelayed:
type: boolean
x-go-name: IsRelayed
lastcheckin:
format: date-time
type: string
x-go-name: LastCheckIn
lastmodified:
format: date-time
type: string
x-go-name: LastModified
lastpeerupdate:
format: date-time
type: string
x-go-name: LastPeerUpdate
localaddress:
$ref: '#/definitions/IPNet'
network:
type: string
x-go-name: Network
networkrange:
$ref: '#/definitions/IPNet'
networkrange6:
$ref: '#/definitions/IPNet'
ownerid:
type: string
x-go-name: OwnerID
pendingdelete:
type: boolean
x-go-name: PendingDelete
persistentkeepalive:
$ref: '#/definitions/Duration'
relayedby:
type: string
x-go-name: RelayedBy
relaynodes:
items:
type: string
type: array
x-go-name: RelayedNodes
server:
type: string
x-go-name: Server
type: object
x-go-package: github.com/gravitl/netmaker/models
PeerConfig:
description: |-
Because the zero value of some Go types may be significant to WireGuard for
PeerConfig fields, pointer types are used for some of these fields. Only
pointer fields which are not nil will be applied when configuring a peer.
properties:
AllowedIPs:
description: |-
AllowedIPs specifies a list of allowed IP addresses in CIDR notation
for this peer.
items:
$ref: '#/definitions/IPNet'
type: array
Endpoint:
$ref: '#/definitions/UDPAddr'
PersistentKeepaliveInterval:
$ref: '#/definitions/Duration'
PresharedKey:
$ref: '#/definitions/Key'
PublicKey:
$ref: '#/definitions/Key'
Remove:
description: |-
Remove specifies if the peer with this public key should be removed
from a device's peer list.
type: boolean
ReplaceAllowedIPs:
description: |-
ReplaceAllowedIPs specifies if the allowed IPs specified in this peer
configuration should replace any existing ones, instead of appending them
to the allowed IPs list.
type: boolean
UpdateOnly:
description: |-
UpdateOnly specifies that an operation will only occur on this peer
if the peer already exists as part of the interface.
type: boolean
title: A PeerConfig is a WireGuard device peer configuration.
type: object
x-go-package: golang.zx2c4.com/wireguard/wgctrl/wgtypes
PeerMap:
additionalProperties:
$ref: '#/definitions/IDandAddr'
description: PeerMap - peer map for ids and addresses in metrics
type: object
x-go-package: github.com/gravitl/netmaker/models
RegisterResponse:
description: RegisterResponse - the response to a successful enrollment register
properties:
requested_host:
$ref: '#/definitions/Host'
server_config:
$ref: '#/definitions/ServerConfig'
type: object
x-go-package: github.com/gravitl/netmaker/models
RelayRequest:
description: RelayRequest - relay request struct
properties:
netid:
type: string
x-go-name: NetID
nodeid:
type: string
x-go-name: NodeID
relayaddrs:
items:
type: string
type: array
x-go-name: RelayedNodes
type: object
x-go-package: github.com/gravitl/netmaker/models
ServerConfig:
description: ServerConfig - server conf struct
properties:
APIConnString:
type: string
APIHost:
type: string
APIPort:
type: string
AllowedOrigin:
type: string
AuthProvider:
type: string
AzureTenant:
type: string
BasicAuth:
type: string
Broker:
type: string
BrokerType:
type: string
ClientID:
type: string
ClientSecret:
type: string
CoreDNSAddr:
type: string
DNSKey:
type: string
DNSMode:
type: string
Database:
type: string
DeployedByOperator:
type: boolean
DisableRemoteIPCheck:
type: string
DisplayKeys:
type: string
EgressesLimit:
format: int64
type: integer
EmqxRestEndpoint:
type: string
Environment:
type: string
FrontendURL:
type: string
HostNetwork:
type: string
IngressesLimit:
format: int64
type: integer
IsEE:
type: string
x-go-name: IsPro
LicenseValue:
type: string
MQPassword:
type: string
MQUserName:
type: string
MachinesLimit:
format: int64
type: integer
MasterKey:
type: string
MessageQueueBackend:
type: string
MetricsExporter:
type: string
NetclientAutoUpdate:
type: string
NetclientEndpointDetection:
type: string
NetmakerTenantID:
type: string
NetworksLimit:
format: int64
type: integer
NodeID:
type: string
OIDCIssuer:
type: string
Platform:
type: string
PublicIPService:
type: string
RestBackend: