swagger.yaml 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917
  1. basePath: /
  2. consumes:
  3. - application/json
  4. definitions:
  5. ACL:
  6. additionalProperties:
  7. format: uint8
  8. type: integer
  9. description: ACL - the ACL of other nodes in a NetworkACL for a single unique node
  10. type: object
  11. x-go-package: github.com/gravitl/netmaker/logic/acls
  12. ACLContainer:
  13. additionalProperties:
  14. $ref: '#/definitions/ACL'
  15. description: ACLContainer - the total list of all node's ACL in a given network
  16. type: object
  17. x-go-package: github.com/gravitl/netmaker/logic/acls
  18. AccessKey:
  19. description: AccessKey - access key struct
  20. properties:
  21. accessstring:
  22. type: string
  23. x-go-name: AccessString
  24. name:
  25. type: string
  26. x-go-name: Name
  27. uses:
  28. format: int64
  29. type: integer
  30. x-go-name: Uses
  31. value:
  32. type: string
  33. x-go-name: Value
  34. type: object
  35. x-go-package: github.com/gravitl/netmaker/models
  36. AttributeTypeAndValue:
  37. description: |-
  38. AttributeTypeAndValue mirrors the ASN.1 structure of the same name in
  39. RFC 5280, Section 4.1.2.4.
  40. properties:
  41. Type:
  42. $ref: '#/definitions/ObjectIdentifier'
  43. Value: {}
  44. type: object
  45. x-go-package: crypto/x509/pkix
  46. AuthParams:
  47. description: AuthParams - struct for auth params
  48. properties:
  49. id:
  50. type: string
  51. x-go-name: ID
  52. macaddress:
  53. type: string
  54. x-go-name: MacAddress
  55. password:
  56. type: string
  57. x-go-name: Password
  58. type: object
  59. x-go-package: github.com/gravitl/netmaker/models
  60. CustomExtClient:
  61. description: CustomExtClient - struct for CustomExtClient params
  62. properties:
  63. clientid:
  64. type: string
  65. x-go-name: ClientID
  66. type: object
  67. x-go-package: github.com/gravitl/netmaker/models
  68. DNSEntry:
  69. description: DNSEntry - a DNS entry represented as struct
  70. properties:
  71. address:
  72. type: string
  73. x-go-name: Address
  74. address6:
  75. type: string
  76. x-go-name: Address6
  77. name:
  78. type: string
  79. x-go-name: Name
  80. network:
  81. type: string
  82. x-go-name: Network
  83. type: object
  84. x-go-package: github.com/gravitl/netmaker/models
  85. Duration:
  86. description: |-
  87. A Duration represents the elapsed time between two instants
  88. as an int64 nanosecond count. The representation limits the
  89. largest representable duration to approximately 290 years.
  90. format: int64
  91. type: integer
  92. x-go-package: time
  93. EgressGatewayRequest:
  94. description: EgressGatewayRequest - egress gateway request
  95. properties:
  96. interface:
  97. type: string
  98. x-go-name: Interface
  99. natenabled:
  100. type: string
  101. x-go-name: NatEnabled
  102. netid:
  103. type: string
  104. x-go-name: NetID
  105. nodeid:
  106. type: string
  107. x-go-name: NodeID
  108. postdown:
  109. type: string
  110. x-go-name: PostDown
  111. postup:
  112. type: string
  113. x-go-name: PostUp
  114. ranges:
  115. items:
  116. type: string
  117. type: array
  118. x-go-name: Ranges
  119. type: object
  120. x-go-package: github.com/gravitl/netmaker/models
  121. ExtClient:
  122. description: ExtClient - struct for external clients
  123. properties:
  124. address:
  125. type: string
  126. x-go-name: Address
  127. address6:
  128. type: string
  129. x-go-name: Address6
  130. clientid:
  131. type: string
  132. x-go-name: ClientID
  133. description:
  134. type: string
  135. x-go-name: Description
  136. enabled:
  137. type: boolean
  138. x-go-name: Enabled
  139. ingressgatewayendpoint:
  140. type: string
  141. x-go-name: IngressGatewayEndpoint
  142. ingressgatewayid:
  143. type: string
  144. x-go-name: IngressGatewayID
  145. lastmodified:
  146. format: int64
  147. type: integer
  148. x-go-name: LastModified
  149. network:
  150. type: string
  151. x-go-name: Network
  152. privatekey:
  153. type: string
  154. x-go-name: PrivateKey
  155. publickey:
  156. type: string
  157. x-go-name: PublicKey
  158. type: object
  159. x-go-package: github.com/gravitl/netmaker/models
  160. IPMask:
  161. description: See type IPNet and func ParseCIDR for details.
  162. items:
  163. format: uint8
  164. type: integer
  165. title: |-
  166. An IPMask is a bitmask that can be used to manipulate
  167. IP addresses for IP addressing and routing.
  168. type: array
  169. x-go-package: net
  170. IPNet:
  171. properties:
  172. IP:
  173. type: string
  174. Mask:
  175. $ref: '#/definitions/IPMask'
  176. title: An IPNet represents an IP network.
  177. type: object
  178. x-go-package: net
  179. Key:
  180. description: |-
  181. A Key is a public, private, or pre-shared secret key. The Key constructor
  182. functions in this package can be used to create Keys suitable for each of
  183. these applications.
  184. items:
  185. format: uint8
  186. type: integer
  187. type: array
  188. x-go-package: golang.zx2c4.com/wireguard/wgctrl/wgtypes
  189. Name:
  190. description: |-
  191. Name represents an X.509 distinguished name. This only includes the common
  192. elements of a DN. Note that Name is only an approximation of the X.509
  193. structure. If an accurate representation is needed, asn1.Unmarshal the raw
  194. subject or issuer as an RDNSequence.
  195. properties:
  196. Country:
  197. items:
  198. type: string
  199. type: array
  200. x-go-name: OrganizationalUnit
  201. ExtraNames:
  202. description: |-
  203. ExtraNames contains attributes to be copied, raw, into any marshaled
  204. distinguished names. Values override any attributes with the same OID.
  205. The ExtraNames field is not populated when parsing, see Names.
  206. items:
  207. $ref: '#/definitions/AttributeTypeAndValue'
  208. type: array
  209. Locality:
  210. items:
  211. type: string
  212. type: array
  213. x-go-name: Province
  214. Names:
  215. description: |-
  216. Names contains all parsed attributes. When parsing distinguished names,
  217. this can be used to extract non-standard attributes that are not parsed
  218. by this package. When marshaling to RDNSequences, the Names field is
  219. ignored, see ExtraNames.
  220. items:
  221. $ref: '#/definitions/AttributeTypeAndValue'
  222. type: array
  223. SerialNumber:
  224. type: string
  225. x-go-name: CommonName
  226. StreetAddress:
  227. items:
  228. type: string
  229. type: array
  230. x-go-name: PostalCode
  231. type: object
  232. x-go-package: crypto/x509/pkix
  233. Network:
  234. description: |-
  235. Network Struct - contains info for a given unique network
  236. At some point, need to replace all instances of Name with something else like Identifier
  237. properties:
  238. accesskeys:
  239. items:
  240. $ref: '#/definitions/AccessKey'
  241. type: array
  242. x-go-name: AccessKeys
  243. addressrange:
  244. type: string
  245. x-go-name: AddressRange
  246. addressrange6:
  247. type: string
  248. x-go-name: AddressRange6
  249. allowmanualsignup:
  250. type: string
  251. x-go-name: AllowManualSignUp
  252. defaultacl:
  253. type: string
  254. x-go-name: DefaultACL
  255. defaultextclientdns:
  256. type: string
  257. x-go-name: DefaultExtClientDNS
  258. defaultinterface:
  259. type: string
  260. x-go-name: DefaultInterface
  261. defaultkeepalive:
  262. format: int32
  263. type: integer
  264. x-go-name: DefaultKeepalive
  265. defaultlistenport:
  266. format: int32
  267. type: integer
  268. x-go-name: DefaultListenPort
  269. defaultmtu:
  270. format: int32
  271. type: integer
  272. x-go-name: DefaultMTU
  273. defaultpostdown:
  274. type: string
  275. x-go-name: DefaultPostDown
  276. defaultpostup:
  277. type: string
  278. x-go-name: DefaultPostUp
  279. defaultudpholepunch:
  280. type: string
  281. x-go-name: DefaultUDPHolePunch
  282. isipv4:
  283. type: string
  284. x-go-name: IsIPv4
  285. isipv6:
  286. type: string
  287. x-go-name: IsIPv6
  288. islocal:
  289. type: string
  290. x-go-name: IsLocal
  291. ispointtosite:
  292. type: string
  293. x-go-name: IsPointToSite
  294. localrange:
  295. type: string
  296. x-go-name: LocalRange
  297. netid:
  298. type: string
  299. x-go-name: NetID
  300. networklastmodified:
  301. format: int64
  302. type: integer
  303. x-go-name: NetworkLastModified
  304. nodelimit:
  305. format: int32
  306. type: integer
  307. x-go-name: NodeLimit
  308. nodeslastmodified:
  309. format: int64
  310. type: integer
  311. x-go-name: NodesLastModified
  312. type: object
  313. x-go-package: github.com/gravitl/netmaker/models
  314. Node:
  315. description: Node - struct for node model
  316. properties:
  317. accesskey:
  318. type: string
  319. x-go-name: AccessKey
  320. action:
  321. type: string
  322. x-go-name: Action
  323. address:
  324. type: string
  325. x-go-name: Address
  326. address6:
  327. type: string
  328. x-go-name: Address6
  329. allowedips:
  330. items:
  331. type: string
  332. type: array
  333. x-go-name: AllowedIPs
  334. connected:
  335. type: string
  336. x-go-name: Connected
  337. dnson:
  338. type: string
  339. x-go-name: DNSOn
  340. egressgatewaynatenabled:
  341. type: string
  342. x-go-name: EgressGatewayNatEnabled
  343. egressgatewayranges:
  344. items:
  345. type: string
  346. type: array
  347. x-go-name: EgressGatewayRanges
  348. egressgatewayrequest:
  349. $ref: '#/definitions/EgressGatewayRequest'
  350. endpoint:
  351. type: string
  352. x-go-name: Endpoint
  353. expdatetime:
  354. format: int64
  355. type: integer
  356. x-go-name: ExpirationDateTime
  357. firewallinuse:
  358. type: string
  359. x-go-name: FirewallInUse
  360. id:
  361. type: string
  362. x-go-name: ID
  363. ingressgatewayrange:
  364. type: string
  365. x-go-name: IngressGatewayRange
  366. ingressgatewayrange6:
  367. type: string
  368. x-go-name: IngressGatewayRange6
  369. interface:
  370. type: string
  371. x-go-name: Interface
  372. internetgateway:
  373. type: string
  374. x-go-name: InternetGateway
  375. ipforwarding:
  376. type: string
  377. x-go-name: IPForwarding
  378. isdocker:
  379. type: string
  380. x-go-name: IsDocker
  381. isegressgateway:
  382. type: string
  383. x-go-name: IsEgressGateway
  384. ishub:
  385. type: string
  386. x-go-name: IsHub
  387. isingressgateway:
  388. type: string
  389. x-go-name: IsIngressGateway
  390. isk8s:
  391. type: string
  392. x-go-name: IsK8S
  393. islocal:
  394. type: string
  395. x-go-name: IsLocal
  396. ispending:
  397. type: string
  398. x-go-name: IsPending
  399. isrelay:
  400. type: string
  401. x-go-name: IsRelay
  402. isrelayed:
  403. type: string
  404. x-go-name: IsRelayed
  405. isserver:
  406. type: string
  407. x-go-name: IsServer
  408. isstatic:
  409. description: IsStatic - refers to if the Endpoint is set manually or dynamically
  410. type: string
  411. x-go-name: IsStatic
  412. lastcheckin:
  413. format: int64
  414. type: integer
  415. x-go-name: LastCheckIn
  416. lastmodified:
  417. format: int64
  418. type: integer
  419. x-go-name: LastModified
  420. lastpeerupdate:
  421. format: int64
  422. type: integer
  423. x-go-name: LastPeerUpdate
  424. listenport:
  425. format: int32
  426. type: integer
  427. x-go-name: ListenPort
  428. localaddress:
  429. type: string
  430. x-go-name: LocalAddress
  431. locallistenport:
  432. format: int32
  433. type: integer
  434. x-go-name: LocalListenPort
  435. localrange:
  436. type: string
  437. x-go-name: LocalRange
  438. macaddress:
  439. type: string
  440. x-go-name: MacAddress
  441. mtu:
  442. format: int32
  443. type: integer
  444. x-go-name: MTU
  445. name:
  446. type: string
  447. x-go-name: Name
  448. network:
  449. type: string
  450. x-go-name: Network
  451. networksettings:
  452. $ref: '#/definitions/Network'
  453. os:
  454. type: string
  455. x-go-name: OS
  456. password:
  457. type: string
  458. x-go-name: Password
  459. persistentkeepalive:
  460. format: int32
  461. type: integer
  462. x-go-name: PersistentKeepalive
  463. postdown:
  464. type: string
  465. x-go-name: PostDown
  466. postup:
  467. type: string
  468. x-go-name: PostUp
  469. publickey:
  470. type: string
  471. x-go-name: PublicKey
  472. relayaddrs:
  473. items:
  474. type: string
  475. type: array
  476. x-go-name: RelayAddrs
  477. server:
  478. type: string
  479. x-go-name: Server
  480. traffickeys:
  481. $ref: '#/definitions/TrafficKeys'
  482. udpholepunch:
  483. type: string
  484. x-go-name: UDPHolePunch
  485. version:
  486. type: string
  487. x-go-name: Version
  488. type: object
  489. x-go-package: github.com/gravitl/netmaker/models
  490. NodeGet:
  491. description: NodeGet - struct for a single node get response
  492. properties:
  493. node:
  494. $ref: '#/definitions/Node'
  495. peers:
  496. items:
  497. $ref: '#/definitions/PeerConfig'
  498. type: array
  499. x-go-name: Peers
  500. serverconfig:
  501. $ref: '#/definitions/ServerConfig'
  502. type: object
  503. x-go-package: github.com/gravitl/netmaker/models
  504. ObjectIdentifier:
  505. items:
  506. format: int64
  507. type: integer
  508. title: An ObjectIdentifier represents an ASN.1 OBJECT IDENTIFIER.
  509. type: array
  510. x-go-package: encoding/asn1
  511. PeerConfig:
  512. description: |-
  513. Because the zero value of some Go types may be significant to WireGuard for
  514. PeerConfig fields, pointer types are used for some of these fields. Only
  515. pointer fields which are not nil will be applied when configuring a peer.
  516. properties:
  517. AllowedIPs:
  518. description: |-
  519. AllowedIPs specifies a list of allowed IP addresses in CIDR notation
  520. for this peer.
  521. items:
  522. $ref: '#/definitions/IPNet'
  523. type: array
  524. Endpoint:
  525. $ref: '#/definitions/UDPAddr'
  526. PersistentKeepaliveInterval:
  527. $ref: '#/definitions/Duration'
  528. PresharedKey:
  529. $ref: '#/definitions/Key'
  530. PublicKey:
  531. $ref: '#/definitions/Key'
  532. Remove:
  533. description: |-
  534. Remove specifies if the peer with this public key should be removed
  535. from a device's peer list.
  536. type: boolean
  537. ReplaceAllowedIPs:
  538. description: |-
  539. ReplaceAllowedIPs specifies if the allowed IPs specified in this peer
  540. configuration should replace any existing ones, instead of appending them
  541. to the allowed IPs list.
  542. type: boolean
  543. UpdateOnly:
  544. description: |-
  545. UpdateOnly specifies that an operation will only occur on this peer
  546. if the peer already exists as part of the interface.
  547. type: boolean
  548. title: A PeerConfig is a WireGuard device peer configuration.
  549. type: object
  550. x-go-package: golang.zx2c4.com/wireguard/wgctrl/wgtypes
  551. PrivateKey:
  552. items:
  553. format: uint8
  554. type: integer
  555. title: PrivateKey is the type of Ed25519 private keys. It implements crypto.Signer.
  556. type: array
  557. x-go-package: crypto/ed25519
  558. RegisterRequest:
  559. description: RegisterRequest - struct for registation with netmaker server
  560. properties:
  561. CommonName:
  562. $ref: '#/definitions/Name'
  563. Key:
  564. $ref: '#/definitions/PrivateKey'
  565. type: object
  566. x-go-package: github.com/gravitl/netmaker/netclient/config
  567. RelayRequest:
  568. description: RelayRequest - relay request struct
  569. properties:
  570. netid:
  571. type: string
  572. x-go-name: NetID
  573. nodeid:
  574. type: string
  575. x-go-name: NodeID
  576. relayaddrs:
  577. items:
  578. type: string
  579. type: array
  580. x-go-name: RelayAddrs
  581. type: object
  582. x-go-package: github.com/gravitl/netmaker/models
  583. ServerConfig:
  584. description: ServerConfig - server conf struct
  585. properties:
  586. APIConnString:
  587. type: string
  588. APIHost:
  589. type: string
  590. APIPort:
  591. type: string
  592. AgentBackend:
  593. type: string
  594. AllowedOrigin:
  595. type: string
  596. AuthProvider:
  597. type: string
  598. AzureTenant:
  599. type: string
  600. ClientID:
  601. type: string
  602. ClientMode:
  603. type: string
  604. ClientSecret:
  605. type: string
  606. CoreDNSAddr:
  607. type: string
  608. DNSKey:
  609. type: string
  610. DNSMode:
  611. type: string
  612. Database:
  613. type: string
  614. DefaultNodeLimit:
  615. format: int32
  616. type: integer
  617. DisableRemoteIPCheck:
  618. type: string
  619. DisplayKeys:
  620. type: string
  621. FrontendURL:
  622. type: string
  623. HostNetwork:
  624. type: string
  625. MQHOST:
  626. type: string
  627. MQPort:
  628. type: string
  629. MQServerPort:
  630. type: string
  631. ManageIPTables:
  632. type: string
  633. MasterKey:
  634. type: string
  635. MessageQueueBackend:
  636. type: string
  637. NodeID:
  638. type: string
  639. OIDCIssuer:
  640. type: string
  641. Platform:
  642. type: string
  643. PortForwardServices:
  644. type: string
  645. PublicIPService:
  646. type: string
  647. RCE:
  648. type: string
  649. RestBackend:
  650. type: string
  651. SQLConn:
  652. type: string
  653. Server:
  654. type: string
  655. ServerCheckinInterval:
  656. format: int64
  657. type: integer
  658. Telemetry:
  659. type: string
  660. Verbosity:
  661. format: int32
  662. type: integer
  663. Version:
  664. type: string
  665. type: object
  666. x-go-package: github.com/gravitl/netmaker/config
  667. SuccessResponse:
  668. properties:
  669. Code:
  670. format: int64
  671. type: integer
  672. Message:
  673. type: string
  674. Response: {}
  675. title: SuccessResponse is struct for sending error message with code.
  676. type: object
  677. x-go-package: github.com/gravitl/netmaker/models
  678. TrafficKeys:
  679. description: TrafficKeys - struct to hold public keys
  680. properties:
  681. mine:
  682. items:
  683. format: uint8
  684. type: integer
  685. type: array
  686. x-go-name: Mine
  687. server:
  688. items:
  689. format: uint8
  690. type: integer
  691. type: array
  692. x-go-name: Server
  693. type: object
  694. x-go-package: github.com/gravitl/netmaker/models
  695. UDPAddr:
  696. properties:
  697. IP:
  698. type: string
  699. Port:
  700. format: int64
  701. type: integer
  702. Zone:
  703. type: string
  704. title: UDPAddr represents the address of a UDP end point.
  705. type: object
  706. x-go-package: net
  707. User:
  708. description: User struct - struct for Users
  709. properties:
  710. isadmin:
  711. type: boolean
  712. x-go-name: IsAdmin
  713. networks:
  714. items:
  715. type: string
  716. type: array
  717. x-go-name: Networks
  718. password:
  719. type: string
  720. x-go-name: Password
  721. username:
  722. type: string
  723. x-go-name: UserName
  724. type: object
  725. x-go-package: github.com/gravitl/netmaker/models
  726. UserAuthParams:
  727. description: UserAuthParams - user auth params struct
  728. properties:
  729. password:
  730. type: string
  731. x-go-name: Password
  732. username:
  733. type: string
  734. x-go-name: UserName
  735. type: object
  736. x-go-package: github.com/gravitl/netmaker/models
  737. host: netmaker.io
  738. info:
  739. description: |-
  740. API Usage
  741. Most actions that can be performed via API can be performed via UI. We recommend managing your networks using the official netmaker-ui project. However, Netmaker can also be run without the UI, and all functions can be achieved via API calls. If your use case requires using Netmaker without the UI or you need to do some troubleshooting/advanced configuration, using the API directly may help.
  742. Authentication
  743. API calls must be authenticated via a header of the format -H “Authorization: Bearer <YOUR_SECRET_KEY>” There are two methods to obtain YOUR_SECRET_KEY: 1. Using the masterkey. By default, this value is “secret key,” but you should change this on your instance and keep it secure. This value can be set via env var at startup or in a config file (config/environments/< env >.yaml). See the [Netmaker](https://docs.netmaker.org/index.html) documentation for more details. 2. Using a JWT received for a node. This can be retrieved by calling the /api/nodes/<network>/authenticate endpoint, as documented below.
  744. title: Netmaker
  745. version: 0.15.2
  746. paths:
  747. /api/dns:
  748. get:
  749. operationId: getAllDNS
  750. responses:
  751. "200":
  752. $ref: '#/responses/dnsResponse'
  753. schemes:
  754. - https
  755. summary: Gets all DNS entries.
  756. tags:
  757. - dns
  758. /api/dns/{network}:
  759. post:
  760. operationId: createDNS
  761. parameters:
  762. - description: Network
  763. in: path
  764. name: network
  765. required: true
  766. type: string
  767. x-go-name: Network
  768. - description: DNS Entry
  769. in: body
  770. name: body
  771. schema:
  772. items:
  773. $ref: '#/definitions/DNSEntry'
  774. type: array
  775. x-go-name: Body
  776. responses:
  777. "200":
  778. $ref: '#/responses/dnsResponse'
  779. schemes:
  780. - https
  781. summary: Create a DNS entry.
  782. tags:
  783. - dns
  784. /api/dns/{network}/{domain}:
  785. delete:
  786. operationId: deleteDNS
  787. parameters:
  788. - description: Network
  789. in: path
  790. name: network
  791. required: true
  792. type: string
  793. x-go-name: Network
  794. - description: Domain
  795. in: path
  796. name: domain
  797. required: true
  798. type: string
  799. x-go-name: Domain
  800. responses:
  801. "200":
  802. $ref: '#/responses/stringJSONResponse'
  803. schemes:
  804. - https
  805. summary: Delete a DNS entry.
  806. tags:
  807. - dns
  808. /api/dns/adm/{network}:
  809. get:
  810. operationId: getDNS
  811. parameters:
  812. - description: Network
  813. in: path
  814. name: network
  815. required: true
  816. type: string
  817. x-go-name: Network
  818. responses:
  819. "200":
  820. $ref: '#/responses/dnsResponse'
  821. schemes:
  822. - https
  823. summary: Gets all DNS entries associated with the network.
  824. tags:
  825. - dns
  826. /api/dns/adm/{network}/custom:
  827. get:
  828. operationId: getCustomDNS
  829. parameters:
  830. - description: Network
  831. in: path
  832. name: network
  833. required: true
  834. type: string
  835. x-go-name: Network
  836. responses:
  837. "200":
  838. $ref: '#/responses/dnsResponse'
  839. schemes:
  840. - https
  841. summary: Gets custom DNS entries associated with a network.
  842. tags:
  843. - dns
  844. /api/dns/adm/{network}/nodes:
  845. get:
  846. operationId: getNodeDNS
  847. parameters:
  848. - description: Network
  849. in: path
  850. name: network
  851. required: true
  852. type: string
  853. x-go-name: Network
  854. schemes:
  855. - https
  856. summary: Gets node DNS entries associated with a network.
  857. tags:
  858. - dns
  859. /api/dns/adm/pushdns:
  860. post:
  861. operationId: pushDNS
  862. responses:
  863. "200":
  864. $ref: '#/responses/dnsStringJSONResponse'
  865. schemes:
  866. - https
  867. summary: Push DNS entries to nameserver.
  868. tags:
  869. - dns
  870. /api/extclients:
  871. get:
  872. operationId: getAllExtClients
  873. parameters:
  874. - description: Networks
  875. in: body
  876. name: networks
  877. schema:
  878. items:
  879. type: string
  880. type: array
  881. x-go-name: Networks
  882. responses:
  883. "200":
  884. $ref: '#/responses/extClientSliceResponse'
  885. schemes:
  886. - https
  887. summary: A separate function to get all extclients, not just extclients for a particular network.
  888. tags:
  889. - ext_client
  890. /api/extclients/{network}:
  891. get:
  892. description: Gets all extclients associated with network, including pending extclients.
  893. operationId: getNetworkExtClients
  894. parameters:
  895. - description: Network
  896. in: path
  897. name: network
  898. required: true
  899. type: string
  900. x-go-name: Network
  901. responses:
  902. "200":
  903. $ref: '#/responses/extClientSliceResponse'
  904. schemes:
  905. - https
  906. summary: Get all extclients associated with network.
  907. tags:
  908. - ext_client
  909. /api/extclients/{network}/{clientid}:
  910. delete:
  911. operationId: deleteExtClient
  912. parameters:
  913. - description: Client ID
  914. in: path
  915. name: clientid
  916. required: true
  917. type: string
  918. x-go-name: ClientID
  919. - description: Network
  920. in: path
  921. name: network
  922. required: true
  923. type: string
  924. x-go-name: Network
  925. responses:
  926. "200":
  927. $ref: '#/responses/successResponse'
  928. schemes:
  929. - https
  930. summary: Delete an individual extclient.
  931. tags:
  932. - ext_client
  933. get:
  934. operationId: getExtClient
  935. parameters:
  936. - description: Client ID
  937. in: path
  938. name: clientid
  939. required: true
  940. type: string
  941. x-go-name: ClientID
  942. - description: Network
  943. in: path
  944. name: network
  945. required: true
  946. type: string
  947. x-go-name: Network
  948. responses:
  949. "200":
  950. $ref: '#/responses/extClientResponse'
  951. schemes:
  952. - https
  953. summary: Get an individual extclient.
  954. tags:
  955. - ext_client
  956. put:
  957. operationId: updateExtClient
  958. parameters:
  959. - description: Client ID
  960. in: path
  961. name: clientid
  962. required: true
  963. type: string
  964. x-go-name: ClientID
  965. - description: Network
  966. in: path
  967. name: network
  968. required: true
  969. type: string
  970. x-go-name: Network
  971. - description: ExtClient
  972. in: body
  973. name: ext_client
  974. schema:
  975. $ref: '#/definitions/ExtClient'
  976. x-go-name: ExtClient
  977. responses:
  978. "200":
  979. $ref: '#/responses/extClientResponse'
  980. schemes:
  981. - https
  982. summary: Update an individual extclient.
  983. tags:
  984. - ext_client
  985. /api/extclients/{network}/{clientid}/{type}:
  986. get:
  987. operationId: getExtClientConf
  988. parameters:
  989. - description: Client ID
  990. in: path
  991. name: clientid
  992. required: true
  993. type: string
  994. x-go-name: ClientID
  995. - description: Network
  996. in: path
  997. name: network
  998. required: true
  999. type: string
  1000. x-go-name: Network
  1001. responses:
  1002. "200":
  1003. $ref: '#/responses/extClientResponse'
  1004. schemes:
  1005. - https
  1006. summary: Get an individual extclient.
  1007. tags:
  1008. - ext_client
  1009. /api/extclients/{network}/{nodeid}:
  1010. post:
  1011. operationId: createExtClient
  1012. parameters:
  1013. - description: Network
  1014. in: path
  1015. name: network
  1016. required: true
  1017. type: string
  1018. x-go-name: Network
  1019. - description: Node ID
  1020. in: path
  1021. name: node
  1022. required: true
  1023. type: string
  1024. x-go-name: NodeID
  1025. - description: Custom ExtClient
  1026. in: body
  1027. name: custom_ext_client
  1028. schema:
  1029. $ref: '#/definitions/CustomExtClient'
  1030. x-go-name: CustomExtClient
  1031. schemes:
  1032. - https
  1033. summary: Create an individual extclient. Must have valid key and be unique.
  1034. tags:
  1035. - ext_client
  1036. /api/getip:
  1037. get:
  1038. operationId: getPublicIP
  1039. responses:
  1040. "200":
  1041. $ref: '#/responses/byteArrayResponse'
  1042. schemes:
  1043. - https
  1044. summary: Get the current public IP address.
  1045. tags:
  1046. - ipservice
  1047. /api/networks:
  1048. get:
  1049. operationId: getNetworks
  1050. parameters:
  1051. - description: 'name: networks'
  1052. in: header
  1053. items:
  1054. type: string
  1055. name: networks
  1056. type: array
  1057. x-go-name: Networks
  1058. responses:
  1059. "200":
  1060. $ref: '#/responses/getNetworksSliceResponse'
  1061. schemes:
  1062. - https
  1063. summary: Lists all networks.
  1064. tags:
  1065. - networks
  1066. post:
  1067. operationId: createNetwork
  1068. parameters:
  1069. - description: Network
  1070. in: body
  1071. name: network
  1072. schema:
  1073. $ref: '#/definitions/Network'
  1074. x-go-name: Network
  1075. responses:
  1076. "200":
  1077. $ref: '#/responses/networkBodyResponse'
  1078. schemes:
  1079. - https
  1080. summary: Create a network.
  1081. tags:
  1082. - networks
  1083. /api/networks/{networkname}:
  1084. delete:
  1085. operationId: deleteNetwork
  1086. responses:
  1087. "200":
  1088. $ref: '#/responses/stringJSONResponse'
  1089. schemes:
  1090. - https
  1091. summary: Delete a network. Will not delete if there are any nodes that belong to the network.
  1092. tags:
  1093. - networks
  1094. get:
  1095. operationId: getNetwork
  1096. responses:
  1097. "200":
  1098. $ref: '#/responses/networkBodyResponse'
  1099. schemes:
  1100. - https
  1101. summary: Get a network.
  1102. tags:
  1103. - networks
  1104. put:
  1105. operationId: updateNetwork
  1106. parameters:
  1107. - description: Network
  1108. in: body
  1109. name: network
  1110. schema:
  1111. $ref: '#/definitions/Network'
  1112. x-go-name: Network
  1113. responses:
  1114. "200":
  1115. $ref: '#/responses/networkBodyResponse'
  1116. schemes:
  1117. - https
  1118. summary: Update a network.
  1119. tags:
  1120. - networks
  1121. /api/networks/{networkname}/acls:
  1122. get:
  1123. operationId: getNetworkACL
  1124. parameters:
  1125. - description: ACL Container
  1126. in: body
  1127. name: acl_container
  1128. schema:
  1129. $ref: '#/definitions/ACLContainer'
  1130. x-go-name: ACLContainer
  1131. responses:
  1132. "200":
  1133. $ref: '#/responses/aclContainerResponse'
  1134. schemes:
  1135. - https
  1136. summary: Get a network ACL (Access Control List).
  1137. tags:
  1138. - networks
  1139. put:
  1140. operationId: updateNetworkACL
  1141. parameters:
  1142. - description: ACL Container
  1143. in: body
  1144. name: acl_container
  1145. schema:
  1146. $ref: '#/definitions/ACLContainer'
  1147. x-go-name: ACLContainer
  1148. responses:
  1149. "200":
  1150. $ref: '#/responses/aclContainerResponse'
  1151. schemes:
  1152. - https
  1153. summary: Update a network ACL (Access Control List).
  1154. tags:
  1155. - networks
  1156. /api/networks/{networkname}/keys:
  1157. get:
  1158. operationId: getAccessKeys
  1159. responses:
  1160. "200":
  1161. $ref: '#/responses/accessKeySliceBodyResponse'
  1162. schemes:
  1163. - https
  1164. summary: Get network access keys for a network.
  1165. tags:
  1166. - networks
  1167. post:
  1168. operationId: createAccessKey
  1169. parameters:
  1170. - description: Access Key
  1171. in: body
  1172. name: access_key
  1173. schema:
  1174. $ref: '#/definitions/AccessKey'
  1175. x-go-name: AccessKey
  1176. responses:
  1177. "200":
  1178. $ref: '#/responses/accessKeyBodyResponse'
  1179. schemes:
  1180. - https
  1181. summary: Create a network access key.
  1182. tags:
  1183. - networks
  1184. /api/networks/{networkname}/keys/{name}:
  1185. delete:
  1186. operationId: deleteAccessKey
  1187. parameters:
  1188. - description: Access Key Name
  1189. in: path
  1190. name: access_key_name
  1191. required: true
  1192. type: string
  1193. x-go-name: AccessKeyName
  1194. responses:
  1195. "200":
  1196. description: ""
  1197. schemes:
  1198. - https
  1199. summary: Delete a network access key.
  1200. tags:
  1201. - networks
  1202. /api/networks/{networkname}/keyupdate:
  1203. post:
  1204. operationId: keyUpdate
  1205. responses:
  1206. "200":
  1207. $ref: '#/responses/networkBodyResponse'
  1208. schemes:
  1209. - https
  1210. summary: Update keys for a network.
  1211. tags:
  1212. - networks
  1213. /api/networks/{networkname}/nodelimit:
  1214. put:
  1215. operationId: updateNetworkNodeLimit
  1216. responses:
  1217. "200":
  1218. $ref: '#/responses/networkBodyResponse'
  1219. schemes:
  1220. - https
  1221. summary: Update a network's node limit.
  1222. tags:
  1223. - networks
  1224. /api/nodes:
  1225. get:
  1226. operationId: getAllNodes
  1227. responses:
  1228. "200":
  1229. $ref: '#/responses/nodeSliceResponse'
  1230. schemes:
  1231. - https
  1232. summary: Get all nodes across all networks.
  1233. tags:
  1234. - nodes
  1235. /api/nodes/{network}:
  1236. get:
  1237. operationId: getNetworkNodes
  1238. parameters:
  1239. - description: Network
  1240. in: path
  1241. name: network
  1242. required: true
  1243. type: string
  1244. x-go-name: Network
  1245. responses:
  1246. "200":
  1247. $ref: '#/responses/nodeSliceResponse'
  1248. schemes:
  1249. - https
  1250. summary: Gets all nodes associated with network including pending nodes.
  1251. tags:
  1252. - nodes
  1253. post:
  1254. operationId: createNode
  1255. parameters:
  1256. - description: Network
  1257. in: path
  1258. name: network
  1259. required: true
  1260. type: string
  1261. x-go-name: Network
  1262. responses:
  1263. "200":
  1264. $ref: '#/responses/nodeGetResponse'
  1265. schemes:
  1266. - https
  1267. summary: Create a node on a network.
  1268. tags:
  1269. - nodes
  1270. /api/nodes/{network}/{nodeid}:
  1271. delete:
  1272. operationId: deleteNode
  1273. parameters:
  1274. - description: Network
  1275. in: path
  1276. name: network
  1277. required: true
  1278. type: string
  1279. x-go-name: Network
  1280. - description: Node ID
  1281. in: path
  1282. name: nodeid
  1283. required: true
  1284. type: string
  1285. x-go-name: NodeID
  1286. - description: Node
  1287. in: body
  1288. name: node
  1289. schema:
  1290. $ref: '#/definitions/Node'
  1291. x-go-name: Node
  1292. responses:
  1293. "200":
  1294. $ref: '#/responses/nodeResponse'
  1295. schemes:
  1296. - https
  1297. summary: Delete an individual node.
  1298. tags:
  1299. - nodes
  1300. get:
  1301. operationId: getNode
  1302. parameters:
  1303. - description: Network
  1304. in: path
  1305. name: network
  1306. required: true
  1307. type: string
  1308. x-go-name: Network
  1309. - description: Node ID
  1310. in: path
  1311. name: nodeid
  1312. required: true
  1313. type: string
  1314. x-go-name: NodeID
  1315. responses:
  1316. "200":
  1317. $ref: '#/responses/nodeResponse'
  1318. schemes:
  1319. - https
  1320. summary: Get an individual node.
  1321. tags:
  1322. - nodes
  1323. put:
  1324. operationId: updateNode
  1325. parameters:
  1326. - description: Network
  1327. in: path
  1328. name: network
  1329. required: true
  1330. type: string
  1331. x-go-name: Network
  1332. - description: Node ID
  1333. in: path
  1334. name: nodeid
  1335. required: true
  1336. type: string
  1337. x-go-name: NodeID
  1338. - description: Node
  1339. in: body
  1340. name: node
  1341. schema:
  1342. $ref: '#/definitions/Node'
  1343. x-go-name: Node
  1344. responses:
  1345. "200":
  1346. $ref: '#/responses/nodeResponse'
  1347. schemes:
  1348. - https
  1349. summary: Update an individual node.
  1350. tags:
  1351. - nodes
  1352. /api/nodes/{network}/{nodeid}/approve:
  1353. post:
  1354. operationId: uncordonNode
  1355. parameters:
  1356. - description: Network
  1357. in: path
  1358. name: network
  1359. required: true
  1360. type: string
  1361. x-go-name: Network
  1362. - description: Node ID
  1363. in: path
  1364. name: nodeid
  1365. required: true
  1366. type: string
  1367. x-go-name: NodeID
  1368. responses:
  1369. "200":
  1370. $ref: '#/responses/nodeResponse'
  1371. schemes:
  1372. - https
  1373. summary: Takes a node out of pending state.
  1374. tags:
  1375. - nodes
  1376. /api/nodes/{network}/{nodeid}/creategateway:
  1377. post:
  1378. operationId: createEgressGateway
  1379. parameters:
  1380. - description: Network
  1381. in: path
  1382. name: network
  1383. required: true
  1384. type: string
  1385. x-go-name: Network
  1386. - description: Node ID
  1387. in: path
  1388. name: nodeid
  1389. required: true
  1390. type: string
  1391. x-go-name: NodeID
  1392. - description: Egress Gateway Request
  1393. in: body
  1394. name: egress_gateway_request
  1395. schema:
  1396. $ref: '#/definitions/EgressGatewayRequest'
  1397. x-go-name: EgressGatewayRequest
  1398. responses:
  1399. "200":
  1400. $ref: '#/responses/nodeResponse'
  1401. schemes:
  1402. - https
  1403. summary: Create an egress gateway.
  1404. tags:
  1405. - nodes
  1406. /api/nodes/{network}/{nodeid}/createingress:
  1407. post:
  1408. operationId: createIngressGateway
  1409. parameters:
  1410. - description: Network
  1411. in: path
  1412. name: network
  1413. required: true
  1414. type: string
  1415. x-go-name: Network
  1416. - description: Node ID
  1417. in: path
  1418. name: nodeid
  1419. required: true
  1420. type: string
  1421. x-go-name: NodeID
  1422. responses:
  1423. "200":
  1424. $ref: '#/responses/nodeResponse'
  1425. schemes:
  1426. - https
  1427. summary: Create an ingress gateway.
  1428. tags:
  1429. - nodes
  1430. /api/nodes/{network}/{nodeid}/createrelay:
  1431. post:
  1432. operationId: createRelay
  1433. parameters:
  1434. - description: Network
  1435. in: path
  1436. name: network
  1437. required: true
  1438. type: string
  1439. x-go-name: Network
  1440. - description: Node ID
  1441. in: path
  1442. name: nodeid
  1443. required: true
  1444. type: string
  1445. x-go-name: NodeID
  1446. - description: Relay Request
  1447. in: body
  1448. name: relay_request
  1449. schema:
  1450. $ref: '#/definitions/RelayRequest'
  1451. x-go-name: RelayRequest
  1452. responses:
  1453. "200":
  1454. $ref: '#/responses/nodeResponse'
  1455. schemes:
  1456. - https
  1457. summary: Create a relay.
  1458. tags:
  1459. - nodes
  1460. /api/nodes/{network}/{nodeid}/deletegateway:
  1461. delete:
  1462. operationId: deleteEgressGateway
  1463. parameters:
  1464. - description: Network
  1465. in: path
  1466. name: network
  1467. required: true
  1468. type: string
  1469. x-go-name: Network
  1470. - description: Node ID
  1471. in: path
  1472. name: nodeid
  1473. required: true
  1474. type: string
  1475. x-go-name: NodeID
  1476. responses:
  1477. "200":
  1478. $ref: '#/responses/nodeResponse'
  1479. schemes:
  1480. - https
  1481. summary: Delete an egress gateway.
  1482. tags:
  1483. - nodes
  1484. /api/nodes/{network}/{nodeid}/deleteingress:
  1485. delete:
  1486. operationId: deleteIngressGateway
  1487. parameters:
  1488. - description: Network
  1489. in: path
  1490. name: network
  1491. required: true
  1492. type: string
  1493. x-go-name: Network
  1494. - description: Node ID
  1495. in: path
  1496. name: nodeid
  1497. required: true
  1498. type: string
  1499. x-go-name: NodeID
  1500. responses:
  1501. "200":
  1502. $ref: '#/responses/nodeResponse'
  1503. schemes:
  1504. - https
  1505. summary: Delete an ingress gateway.
  1506. tags:
  1507. - nodes
  1508. /api/nodes/{network}/{nodeid}/deleterelay:
  1509. delete:
  1510. operationId: deleteRelay
  1511. parameters:
  1512. - description: Network
  1513. in: path
  1514. name: network
  1515. required: true
  1516. type: string
  1517. x-go-name: Network
  1518. - description: Node ID
  1519. in: path
  1520. name: nodeid
  1521. required: true
  1522. type: string
  1523. x-go-name: NodeID
  1524. responses:
  1525. "200":
  1526. $ref: '#/responses/nodeResponse'
  1527. schemes:
  1528. - https
  1529. summary: Remove a relay.
  1530. tags:
  1531. - nodes
  1532. /api/nodes/adm/{network}/authenticate:
  1533. post:
  1534. operationId: authenticate
  1535. parameters:
  1536. - description: Network
  1537. in: path
  1538. name: network
  1539. required: true
  1540. type: string
  1541. x-go-name: Network
  1542. - description: AuthParams
  1543. in: body
  1544. name: auth_params
  1545. schema:
  1546. $ref: '#/definitions/AuthParams'
  1547. x-go-name: AuthParams
  1548. responses:
  1549. "200":
  1550. $ref: '#/responses/successResponse'
  1551. schemes:
  1552. - https
  1553. summary: Authenticate to make further API calls related to a network.
  1554. tags:
  1555. - nodes
  1556. /api/nodes/adm/{network}/lastmodified:
  1557. get:
  1558. operationId: getLastModified
  1559. parameters:
  1560. - description: Network
  1561. in: path
  1562. name: network
  1563. required: true
  1564. type: string
  1565. x-go-name: Network
  1566. responses:
  1567. "200":
  1568. $ref: '#/responses/nodeLastModifiedResponse'
  1569. schemes:
  1570. - https
  1571. summary: Get the time that a network of nodes was last modified.
  1572. tags:
  1573. - nodes
  1574. /api/oauth/login:
  1575. get:
  1576. operationId: HandleAuthLogin
  1577. schemes:
  1578. - https
  1579. summary: Handles OAuth login.
  1580. tags:
  1581. - nodes
  1582. /api/server/getconfig:
  1583. get:
  1584. operationId: getConfig
  1585. responses:
  1586. "200":
  1587. $ref: '#/responses/serverConfigResponse'
  1588. schemes:
  1589. - https
  1590. summary: Get the server configuration.
  1591. tags:
  1592. - nodes
  1593. /api/server/getserverinfo:
  1594. get:
  1595. operationId: getServerInfo
  1596. responses:
  1597. "200":
  1598. $ref: '#/responses/serverConfigResponse'
  1599. schemes:
  1600. - https
  1601. summary: Get the server configuration.
  1602. tags:
  1603. - nodes
  1604. /api/server/register:
  1605. post:
  1606. operationId: register
  1607. parameters:
  1608. - description: Register Request
  1609. in: body
  1610. name: register_request
  1611. schema:
  1612. $ref: '#/definitions/RegisterRequest'
  1613. x-go-name: RegisterRequest
  1614. responses:
  1615. "200":
  1616. $ref: '#/responses/registerResponse'
  1617. schemes:
  1618. - https
  1619. summary: Registers a client with the server and return the Certificate Authority and certificate.
  1620. tags:
  1621. - nodes
  1622. /api/server/removenetwork/{network}:
  1623. delete:
  1624. operationId: removeNetwork
  1625. parameters:
  1626. - description: Network
  1627. in: path
  1628. name: network
  1629. required: true
  1630. type: string
  1631. x-go-name: Network
  1632. responses:
  1633. "200":
  1634. $ref: '#/responses/stringJSONResponse'
  1635. schemes:
  1636. - https
  1637. summary: Remove a network from the server.
  1638. tags:
  1639. - nodes
  1640. /api/users:
  1641. get:
  1642. operationId: getUsers
  1643. responses:
  1644. "200":
  1645. $ref: '#/responses/userBodyResponse'
  1646. schemes:
  1647. - https
  1648. summary: Get all users.
  1649. tags:
  1650. - nodes
  1651. /api/users/{username}:
  1652. delete:
  1653. operationId: deleteUser
  1654. parameters:
  1655. - description: Username
  1656. in: path
  1657. name: username
  1658. required: true
  1659. type: string
  1660. x-go-name: Username
  1661. responses:
  1662. "200":
  1663. $ref: '#/responses/userBodyResponse'
  1664. schemes:
  1665. - https
  1666. summary: Delete a user.
  1667. tags:
  1668. - nodes
  1669. get:
  1670. operationId: getUser
  1671. parameters:
  1672. - description: Username
  1673. in: path
  1674. name: username
  1675. required: true
  1676. type: string
  1677. x-go-name: Username
  1678. responses:
  1679. "200":
  1680. $ref: '#/responses/userBodyResponse'
  1681. schemes:
  1682. - https
  1683. summary: Get an individual user.
  1684. tags:
  1685. - nodes
  1686. post:
  1687. operationId: createUser
  1688. parameters:
  1689. - description: User
  1690. in: body
  1691. name: user
  1692. schema:
  1693. $ref: '#/definitions/User'
  1694. x-go-name: User
  1695. - description: Username
  1696. in: path
  1697. name: username
  1698. required: true
  1699. type: string
  1700. x-go-name: Username
  1701. responses:
  1702. "200":
  1703. $ref: '#/responses/userBodyResponse'
  1704. schemes:
  1705. - https
  1706. summary: Create a user.
  1707. tags:
  1708. - nodes
  1709. put:
  1710. operationId: updateUser
  1711. parameters:
  1712. - description: User
  1713. in: body
  1714. name: user
  1715. schema:
  1716. $ref: '#/definitions/User'
  1717. x-go-name: User
  1718. - description: Username
  1719. in: path
  1720. name: username
  1721. required: true
  1722. type: string
  1723. x-go-name: Username
  1724. responses:
  1725. "200":
  1726. $ref: '#/responses/userBodyResponse'
  1727. schemes:
  1728. - https
  1729. summary: Update a user.
  1730. tags:
  1731. - nodes
  1732. /api/users/{username}/adm:
  1733. put:
  1734. operationId: updateUserAdm
  1735. parameters:
  1736. - description: Username
  1737. in: path
  1738. name: username
  1739. required: true
  1740. type: string
  1741. x-go-name: Username
  1742. responses:
  1743. "200":
  1744. $ref: '#/responses/userBodyResponse'
  1745. schemes:
  1746. - https
  1747. summary: Updates the given admin user's info (as long as the user is an admin).
  1748. tags:
  1749. - nodes
  1750. /api/users/adm/authenticate:
  1751. post:
  1752. operationId: authenticateUser
  1753. parameters:
  1754. - description: User Auth Params
  1755. in: body
  1756. name: user_auth_params
  1757. schema:
  1758. $ref: '#/definitions/UserAuthParams'
  1759. x-go-name: UserAuthParams
  1760. responses:
  1761. "200":
  1762. $ref: '#/responses/successResponse'
  1763. schemes:
  1764. - https
  1765. summary: Node authenticates using its password and retrieves a JWT for authorization.
  1766. tags:
  1767. - nodes
  1768. /api/users/adm/createadmin:
  1769. post:
  1770. operationId: createAdmin
  1771. parameters:
  1772. - description: User
  1773. in: body
  1774. name: user
  1775. schema:
  1776. $ref: '#/definitions/User'
  1777. x-go-name: User
  1778. responses:
  1779. "200":
  1780. $ref: '#/responses/userBodyResponse'
  1781. schemes:
  1782. - https
  1783. summary: Make a user an admin.
  1784. tags:
  1785. - nodes
  1786. /api/users/adm/hasadmin:
  1787. get:
  1788. operationId: hasAdmin
  1789. responses:
  1790. "200":
  1791. $ref: '#/responses/successResponse'
  1792. schemes:
  1793. - https
  1794. summary: Checks whether the server has an admin.
  1795. tags:
  1796. - nodes
  1797. /api/users/networks/{username}:
  1798. put:
  1799. operationId: updateUserNetworks
  1800. parameters:
  1801. - description: User
  1802. in: body
  1803. name: user
  1804. schema:
  1805. $ref: '#/definitions/User'
  1806. x-go-name: User
  1807. - description: Username
  1808. in: path
  1809. name: username
  1810. required: true
  1811. type: string
  1812. x-go-name: Username
  1813. responses:
  1814. "200":
  1815. $ref: '#/responses/userBodyResponse'
  1816. schemes:
  1817. - https
  1818. summary: Updates the networks of the given user.
  1819. tags:
  1820. - nodes
  1821. /meshclient/files/{filename}:
  1822. get:
  1823. operationId: fileServer
  1824. schemes:
  1825. - https
  1826. summary: Retrieve a file from the file server.
  1827. tags:
  1828. - meshclient
  1829. produces:
  1830. - application/json
  1831. responses:
  1832. accessKeyBodyResponse:
  1833. description: ""
  1834. schema:
  1835. $ref: '#/definitions/AccessKey'
  1836. accessKeySliceBodyResponse:
  1837. description: ""
  1838. schema:
  1839. items:
  1840. $ref: '#/definitions/AccessKey'
  1841. type: array
  1842. aclContainerResponse:
  1843. description: ""
  1844. schema:
  1845. $ref: '#/definitions/ACLContainer'
  1846. boolResponse:
  1847. description: ""
  1848. byteArrayResponse:
  1849. description: ""
  1850. schema:
  1851. items:
  1852. format: uint8
  1853. type: integer
  1854. type: array
  1855. dnsResponse:
  1856. description: Success
  1857. schema:
  1858. items:
  1859. $ref: '#/definitions/DNSEntry'
  1860. type: array
  1861. extClientResponse:
  1862. description: ""
  1863. schema:
  1864. $ref: '#/definitions/ExtClient'
  1865. extClientSliceResponse:
  1866. description: ""
  1867. schema:
  1868. items:
  1869. $ref: '#/definitions/ExtClient'
  1870. type: array
  1871. getNetworksSliceResponse:
  1872. description: ""
  1873. schema:
  1874. items:
  1875. $ref: '#/definitions/Network'
  1876. type: array
  1877. networkBodyResponse:
  1878. description: ""
  1879. schema:
  1880. $ref: '#/definitions/Network'
  1881. nodeGetResponse:
  1882. description: ""
  1883. schema:
  1884. $ref: '#/definitions/NodeGet'
  1885. nodeLastModifiedResponse:
  1886. description: ""
  1887. nodeResponse:
  1888. description: ""
  1889. schema:
  1890. $ref: '#/definitions/Node'
  1891. nodeSliceResponse:
  1892. description: ""
  1893. schema:
  1894. items:
  1895. $ref: '#/definitions/Node'
  1896. type: array
  1897. serverConfigResponse:
  1898. description: ""
  1899. schema:
  1900. $ref: '#/definitions/ServerConfig'
  1901. stringJSONResponse:
  1902. description: ""
  1903. successResponse:
  1904. description: ""
  1905. schema:
  1906. $ref: '#/definitions/SuccessResponse'
  1907. userBodyResponse:
  1908. description: ""
  1909. schema:
  1910. $ref: '#/definitions/User'
  1911. schemes:
  1912. - https
  1913. swagger: "2.0"