2
0

swagger.yaml 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908
  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.17.1
  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. parameters:
  1087. - description: Network Name
  1088. in: path
  1089. name: networkname
  1090. required: true
  1091. type: string
  1092. x-go-name: NetworkName
  1093. responses:
  1094. "200":
  1095. $ref: '#/responses/stringJSONResponse'
  1096. schemes:
  1097. - https
  1098. summary: Delete a network. Will not delete if there are any nodes that belong to the network.
  1099. tags:
  1100. - networks
  1101. get:
  1102. operationId: getNetwork
  1103. parameters:
  1104. - description: Network Name
  1105. in: path
  1106. name: networkname
  1107. required: true
  1108. type: string
  1109. x-go-name: NetworkName
  1110. responses:
  1111. "200":
  1112. $ref: '#/responses/networkBodyResponse'
  1113. schemes:
  1114. - https
  1115. summary: Get a network.
  1116. tags:
  1117. - networks
  1118. put:
  1119. operationId: updateNetwork
  1120. parameters:
  1121. - description: Network
  1122. in: body
  1123. name: network
  1124. schema:
  1125. $ref: '#/definitions/Network'
  1126. x-go-name: Network
  1127. - description: Network Name
  1128. in: path
  1129. name: networkname
  1130. required: true
  1131. type: string
  1132. x-go-name: NetworkName
  1133. responses:
  1134. "200":
  1135. $ref: '#/responses/networkBodyResponse'
  1136. schemes:
  1137. - https
  1138. summary: Update a network.
  1139. tags:
  1140. - networks
  1141. /api/networks/{networkname}/acls:
  1142. get:
  1143. operationId: getNetworkACL
  1144. parameters:
  1145. - description: Network Name
  1146. in: path
  1147. name: networkname
  1148. required: true
  1149. type: string
  1150. x-go-name: NetworkName
  1151. - description: ACL Container
  1152. in: body
  1153. name: acl_container
  1154. schema:
  1155. $ref: '#/definitions/ACLContainer'
  1156. x-go-name: ACLContainer
  1157. responses:
  1158. "200":
  1159. $ref: '#/responses/aclContainerResponse'
  1160. schemes:
  1161. - https
  1162. summary: Get a network ACL (Access Control List).
  1163. tags:
  1164. - networks
  1165. put:
  1166. operationId: updateNetworkACL
  1167. parameters:
  1168. - description: Network Name
  1169. in: path
  1170. name: networkname
  1171. required: true
  1172. type: string
  1173. x-go-name: NetworkName
  1174. - description: ACL Container
  1175. in: body
  1176. name: acl_container
  1177. schema:
  1178. $ref: '#/definitions/ACLContainer'
  1179. x-go-name: ACLContainer
  1180. responses:
  1181. "200":
  1182. $ref: '#/responses/aclContainerResponse'
  1183. schemes:
  1184. - https
  1185. summary: Update a network ACL (Access Control List).
  1186. tags:
  1187. - networks
  1188. /api/networks/{networkname}/keys:
  1189. get:
  1190. operationId: getAccessKeys
  1191. parameters:
  1192. - description: Network Name
  1193. in: path
  1194. name: networkname
  1195. required: true
  1196. type: string
  1197. x-go-name: NetworkName
  1198. responses:
  1199. "200":
  1200. $ref: '#/responses/accessKeySliceBodyResponse'
  1201. schemes:
  1202. - https
  1203. summary: Get network access keys for a network.
  1204. tags:
  1205. - networks
  1206. post:
  1207. operationId: createAccessKey
  1208. parameters:
  1209. - description: Network Name
  1210. in: path
  1211. name: networkname
  1212. required: true
  1213. type: string
  1214. x-go-name: NetworkName
  1215. - description: Access Key
  1216. in: body
  1217. name: access_key
  1218. schema:
  1219. $ref: '#/definitions/AccessKey'
  1220. x-go-name: AccessKey
  1221. responses:
  1222. "200":
  1223. $ref: '#/responses/accessKeyBodyResponse'
  1224. schemes:
  1225. - https
  1226. summary: Create a network access key.
  1227. tags:
  1228. - networks
  1229. /api/networks/{networkname}/keys/{name}:
  1230. delete:
  1231. operationId: deleteAccessKey
  1232. parameters:
  1233. - description: Network Name
  1234. in: path
  1235. name: networkname
  1236. required: true
  1237. type: string
  1238. x-go-name: NetworkName
  1239. - description: Access Key Name
  1240. in: path
  1241. name: access_key_name
  1242. required: true
  1243. type: string
  1244. x-go-name: AccessKeyName
  1245. responses:
  1246. "200":
  1247. description: ""
  1248. schemes:
  1249. - https
  1250. summary: Delete a network access key.
  1251. tags:
  1252. - networks
  1253. /api/networks/{networkname}/keyupdate:
  1254. post:
  1255. operationId: keyUpdate
  1256. parameters:
  1257. - description: Network Name
  1258. in: path
  1259. name: networkname
  1260. required: true
  1261. type: string
  1262. x-go-name: NetworkName
  1263. responses:
  1264. "200":
  1265. $ref: '#/responses/networkBodyResponse'
  1266. schemes:
  1267. - https
  1268. summary: Update keys for a network.
  1269. tags:
  1270. - networks
  1271. /api/nodes:
  1272. get:
  1273. operationId: getAllNodes
  1274. responses:
  1275. "200":
  1276. $ref: '#/responses/nodeSliceResponse'
  1277. schemes:
  1278. - https
  1279. summary: Get all nodes across all networks.
  1280. tags:
  1281. - nodes
  1282. /api/nodes/{network}:
  1283. get:
  1284. operationId: getNetworkNodes
  1285. responses:
  1286. "200":
  1287. $ref: '#/responses/nodeSliceResponse'
  1288. schemes:
  1289. - https
  1290. summary: Gets all nodes associated with network including pending nodes.
  1291. tags:
  1292. - nodes
  1293. post:
  1294. operationId: createNode
  1295. responses:
  1296. "200":
  1297. $ref: '#/responses/nodeGetResponse'
  1298. schemes:
  1299. - https
  1300. summary: Create a node on a network.
  1301. tags:
  1302. - nodes
  1303. /api/nodes/{network}/{nodeid}:
  1304. delete:
  1305. operationId: deleteNode
  1306. parameters:
  1307. - description: Network
  1308. in: path
  1309. name: network
  1310. required: true
  1311. type: string
  1312. x-go-name: Network
  1313. - description: Node ID
  1314. in: path
  1315. name: nodeid
  1316. required: true
  1317. type: string
  1318. x-go-name: NodeID
  1319. - description: Node
  1320. in: body
  1321. name: node
  1322. schema:
  1323. $ref: '#/definitions/Node'
  1324. x-go-name: Node
  1325. responses:
  1326. "200":
  1327. $ref: '#/responses/nodeResponse'
  1328. schemes:
  1329. - https
  1330. summary: Delete an individual node.
  1331. tags:
  1332. - nodes
  1333. get:
  1334. operationId: getNode
  1335. parameters:
  1336. - description: Network
  1337. in: path
  1338. name: network
  1339. required: true
  1340. type: string
  1341. x-go-name: Network
  1342. - description: Node ID
  1343. in: path
  1344. name: nodeid
  1345. required: true
  1346. type: string
  1347. x-go-name: NodeID
  1348. responses:
  1349. "200":
  1350. $ref: '#/responses/nodeResponse'
  1351. schemes:
  1352. - https
  1353. summary: Get an individual node.
  1354. tags:
  1355. - nodes
  1356. put:
  1357. operationId: updateNode
  1358. parameters:
  1359. - description: Network
  1360. in: path
  1361. name: network
  1362. required: true
  1363. type: string
  1364. x-go-name: Network
  1365. - description: Node ID
  1366. in: path
  1367. name: nodeid
  1368. required: true
  1369. type: string
  1370. x-go-name: NodeID
  1371. - description: Node
  1372. in: body
  1373. name: node
  1374. schema:
  1375. $ref: '#/definitions/Node'
  1376. x-go-name: Node
  1377. responses:
  1378. "200":
  1379. $ref: '#/responses/nodeResponse'
  1380. schemes:
  1381. - https
  1382. summary: Update an individual node.
  1383. tags:
  1384. - nodes
  1385. /api/nodes/{network}/{nodeid}/approve:
  1386. post:
  1387. operationId: uncordonNode
  1388. parameters:
  1389. - description: Network
  1390. in: path
  1391. name: network
  1392. required: true
  1393. type: string
  1394. x-go-name: Network
  1395. - description: Node ID
  1396. in: path
  1397. name: nodeid
  1398. required: true
  1399. type: string
  1400. x-go-name: NodeID
  1401. responses:
  1402. "200":
  1403. $ref: '#/responses/nodeResponse'
  1404. schemes:
  1405. - https
  1406. summary: Takes a node out of pending state.
  1407. tags:
  1408. - nodes
  1409. /api/nodes/{network}/{nodeid}/creategateway:
  1410. post:
  1411. operationId: createEgressGateway
  1412. parameters:
  1413. - description: Network
  1414. in: path
  1415. name: network
  1416. required: true
  1417. type: string
  1418. x-go-name: Network
  1419. - description: Node ID
  1420. in: path
  1421. name: nodeid
  1422. required: true
  1423. type: string
  1424. x-go-name: NodeID
  1425. - description: Egress Gateway Request
  1426. in: body
  1427. name: egress_gateway_request
  1428. schema:
  1429. $ref: '#/definitions/EgressGatewayRequest'
  1430. x-go-name: EgressGatewayRequest
  1431. responses:
  1432. "200":
  1433. $ref: '#/responses/nodeResponse'
  1434. schemes:
  1435. - https
  1436. summary: Create an egress gateway.
  1437. tags:
  1438. - nodes
  1439. /api/nodes/{network}/{nodeid}/createingress:
  1440. post:
  1441. operationId: createIngressGateway
  1442. parameters:
  1443. - description: Network
  1444. in: path
  1445. name: network
  1446. required: true
  1447. type: string
  1448. x-go-name: Network
  1449. - description: Node ID
  1450. in: path
  1451. name: nodeid
  1452. required: true
  1453. type: string
  1454. x-go-name: NodeID
  1455. responses:
  1456. "200":
  1457. $ref: '#/responses/nodeResponse'
  1458. schemes:
  1459. - https
  1460. summary: Create an ingress gateway.
  1461. tags:
  1462. - nodes
  1463. /api/nodes/{network}/{nodeid}/createrelay:
  1464. post:
  1465. operationId: createRelay
  1466. parameters:
  1467. - description: Network
  1468. in: path
  1469. name: network
  1470. required: true
  1471. type: string
  1472. x-go-name: Network
  1473. - description: Node ID
  1474. in: path
  1475. name: nodeid
  1476. required: true
  1477. type: string
  1478. x-go-name: NodeID
  1479. - description: Relay Request
  1480. in: body
  1481. name: relay_request
  1482. schema:
  1483. $ref: '#/definitions/RelayRequest'
  1484. x-go-name: RelayRequest
  1485. responses:
  1486. "200":
  1487. $ref: '#/responses/nodeResponse'
  1488. schemes:
  1489. - https
  1490. summary: Create a relay.
  1491. tags:
  1492. - nodes
  1493. /api/nodes/{network}/{nodeid}/deletegateway:
  1494. delete:
  1495. operationId: deleteEgressGateway
  1496. parameters:
  1497. - description: Network
  1498. in: path
  1499. name: network
  1500. required: true
  1501. type: string
  1502. x-go-name: Network
  1503. - description: Node ID
  1504. in: path
  1505. name: nodeid
  1506. required: true
  1507. type: string
  1508. x-go-name: NodeID
  1509. responses:
  1510. "200":
  1511. $ref: '#/responses/nodeResponse'
  1512. schemes:
  1513. - https
  1514. summary: Delete an egress gateway.
  1515. tags:
  1516. - nodes
  1517. /api/nodes/{network}/{nodeid}/deleteingress:
  1518. delete:
  1519. operationId: deleteIngressGateway
  1520. parameters:
  1521. - description: Network
  1522. in: path
  1523. name: network
  1524. required: true
  1525. type: string
  1526. x-go-name: Network
  1527. - description: Node ID
  1528. in: path
  1529. name: nodeid
  1530. required: true
  1531. type: string
  1532. x-go-name: NodeID
  1533. responses:
  1534. "200":
  1535. $ref: '#/responses/nodeResponse'
  1536. schemes:
  1537. - https
  1538. summary: Delete an ingress gateway.
  1539. tags:
  1540. - nodes
  1541. /api/nodes/{network}/{nodeid}/deleterelay:
  1542. delete:
  1543. operationId: deleteRelay
  1544. parameters:
  1545. - description: Network
  1546. in: path
  1547. name: network
  1548. required: true
  1549. type: string
  1550. x-go-name: Network
  1551. - description: Node ID
  1552. in: path
  1553. name: nodeid
  1554. required: true
  1555. type: string
  1556. x-go-name: NodeID
  1557. responses:
  1558. "200":
  1559. $ref: '#/responses/nodeResponse'
  1560. schemes:
  1561. - https
  1562. summary: Remove a relay.
  1563. tags:
  1564. - nodes
  1565. /api/nodes/adm/{network}/authenticate:
  1566. post:
  1567. operationId: authenticate
  1568. parameters:
  1569. - description: AuthParams
  1570. in: body
  1571. name: auth_params
  1572. schema:
  1573. $ref: '#/definitions/AuthParams'
  1574. x-go-name: AuthParams
  1575. responses:
  1576. "200":
  1577. $ref: '#/responses/successResponse'
  1578. schemes:
  1579. - https
  1580. summary: Authenticate to make further API calls related to a network.
  1581. tags:
  1582. - nodes
  1583. /api/oauth/login:
  1584. get:
  1585. operationId: HandleAuthLogin
  1586. schemes:
  1587. - https
  1588. summary: Handles OAuth login.
  1589. tags:
  1590. - nodes
  1591. /api/server/getconfig:
  1592. get:
  1593. operationId: getConfig
  1594. responses:
  1595. "200":
  1596. $ref: '#/responses/serverConfigResponse'
  1597. schemes:
  1598. - https
  1599. summary: Get the server configuration.
  1600. tags:
  1601. - server
  1602. /api/server/getserverinfo:
  1603. get:
  1604. operationId: getServerInfo
  1605. responses:
  1606. "200":
  1607. $ref: '#/responses/serverConfigResponse'
  1608. schemes:
  1609. - https
  1610. summary: Get the server configuration.
  1611. tags:
  1612. - server
  1613. /api/server/register:
  1614. post:
  1615. operationId: register
  1616. parameters:
  1617. - description: Register Request
  1618. in: body
  1619. name: register_request
  1620. schema:
  1621. $ref: '#/definitions/RegisterRequest'
  1622. x-go-name: RegisterRequest
  1623. responses:
  1624. "200":
  1625. $ref: '#/responses/registerResponse'
  1626. schemes:
  1627. - https
  1628. summary: Registers a client with the server and return the Certificate Authority and certificate.
  1629. tags:
  1630. - server
  1631. /api/users:
  1632. get:
  1633. operationId: getUsers
  1634. responses:
  1635. "200":
  1636. $ref: '#/responses/userBodyResponse'
  1637. schemes:
  1638. - https
  1639. summary: Get all users.
  1640. tags:
  1641. - user
  1642. /api/users/{username}:
  1643. delete:
  1644. operationId: deleteUser
  1645. parameters:
  1646. - description: Username
  1647. in: path
  1648. name: username
  1649. required: true
  1650. type: string
  1651. x-go-name: Username
  1652. responses:
  1653. "200":
  1654. $ref: '#/responses/userBodyResponse'
  1655. schemes:
  1656. - https
  1657. summary: Delete a user.
  1658. tags:
  1659. - user
  1660. get:
  1661. operationId: getUser
  1662. parameters:
  1663. - description: Username
  1664. in: path
  1665. name: username
  1666. required: true
  1667. type: string
  1668. x-go-name: Username
  1669. responses:
  1670. "200":
  1671. $ref: '#/responses/userBodyResponse'
  1672. schemes:
  1673. - https
  1674. summary: Get an individual user.
  1675. tags:
  1676. - user
  1677. post:
  1678. operationId: createUser
  1679. parameters:
  1680. - description: User
  1681. in: body
  1682. name: user
  1683. schema:
  1684. $ref: '#/definitions/User'
  1685. x-go-name: User
  1686. - description: Username
  1687. in: path
  1688. name: username
  1689. required: true
  1690. type: string
  1691. x-go-name: Username
  1692. responses:
  1693. "200":
  1694. $ref: '#/responses/userBodyResponse'
  1695. schemes:
  1696. - https
  1697. summary: Create a user.
  1698. tags:
  1699. - user
  1700. put:
  1701. operationId: updateUser
  1702. parameters:
  1703. - description: User
  1704. in: body
  1705. name: user
  1706. schema:
  1707. $ref: '#/definitions/User'
  1708. x-go-name: User
  1709. - description: Username
  1710. in: path
  1711. name: username
  1712. required: true
  1713. type: string
  1714. x-go-name: Username
  1715. responses:
  1716. "200":
  1717. $ref: '#/responses/userBodyResponse'
  1718. schemes:
  1719. - https
  1720. summary: Update a user.
  1721. tags:
  1722. - user
  1723. /api/users/{username}/adm:
  1724. put:
  1725. operationId: updateUserAdm
  1726. parameters:
  1727. - description: Username
  1728. in: path
  1729. name: username
  1730. required: true
  1731. type: string
  1732. x-go-name: Username
  1733. responses:
  1734. "200":
  1735. $ref: '#/responses/userBodyResponse'
  1736. schemes:
  1737. - https
  1738. summary: Updates the given admin user's info (as long as the user is an admin).
  1739. tags:
  1740. - user
  1741. /api/users/adm/authenticate:
  1742. post:
  1743. operationId: authenticateUser
  1744. parameters:
  1745. - description: User Auth Params
  1746. in: body
  1747. name: user_auth_params
  1748. schema:
  1749. $ref: '#/definitions/UserAuthParams'
  1750. x-go-name: UserAuthParams
  1751. responses:
  1752. "200":
  1753. $ref: '#/responses/successResponse'
  1754. schemes:
  1755. - https
  1756. summary: Node authenticates using its password and retrieves a JWT for authorization.
  1757. tags:
  1758. - user
  1759. /api/users/adm/createadmin:
  1760. post:
  1761. operationId: createAdmin
  1762. parameters:
  1763. - description: User
  1764. in: body
  1765. name: user
  1766. schema:
  1767. $ref: '#/definitions/User'
  1768. x-go-name: User
  1769. responses:
  1770. "200":
  1771. $ref: '#/responses/userBodyResponse'
  1772. schemes:
  1773. - https
  1774. summary: Make a user an admin.
  1775. tags:
  1776. - user
  1777. /api/users/adm/hasadmin:
  1778. get:
  1779. operationId: hasAdmin
  1780. responses:
  1781. "200":
  1782. $ref: '#/responses/successResponse'
  1783. schemes:
  1784. - https
  1785. summary: Checks whether the server has an admin.
  1786. tags:
  1787. - user
  1788. /api/users/networks/{username}:
  1789. put:
  1790. operationId: updateUserNetworks
  1791. parameters:
  1792. - description: User
  1793. in: body
  1794. name: user
  1795. schema:
  1796. $ref: '#/definitions/User'
  1797. x-go-name: User
  1798. - description: Username
  1799. in: path
  1800. name: username
  1801. required: true
  1802. type: string
  1803. x-go-name: Username
  1804. responses:
  1805. "200":
  1806. $ref: '#/responses/userBodyResponse'
  1807. schemes:
  1808. - https
  1809. summary: Updates the networks of the given user.
  1810. tags:
  1811. - user
  1812. /meshclient/files/{filename}:
  1813. get:
  1814. operationId: fileServer
  1815. schemes:
  1816. - https
  1817. summary: Retrieve a file from the file server.
  1818. tags:
  1819. - meshclient
  1820. produces:
  1821. - application/json
  1822. responses:
  1823. accessKeyBodyResponse:
  1824. description: ""
  1825. schema:
  1826. $ref: '#/definitions/AccessKey'
  1827. accessKeySliceBodyResponse:
  1828. description: ""
  1829. schema:
  1830. items:
  1831. $ref: '#/definitions/AccessKey'
  1832. type: array
  1833. aclContainerResponse:
  1834. description: ""
  1835. schema:
  1836. $ref: '#/definitions/ACLContainer'
  1837. boolResponse:
  1838. description: ""
  1839. byteArrayResponse:
  1840. description: ""
  1841. schema:
  1842. items:
  1843. format: uint8
  1844. type: integer
  1845. type: array
  1846. dnsResponse:
  1847. description: Success
  1848. schema:
  1849. items:
  1850. $ref: '#/definitions/DNSEntry'
  1851. type: array
  1852. extClientResponse:
  1853. description: ""
  1854. schema:
  1855. $ref: '#/definitions/ExtClient'
  1856. extClientSliceResponse:
  1857. description: ""
  1858. schema:
  1859. items:
  1860. $ref: '#/definitions/ExtClient'
  1861. type: array
  1862. getNetworksSliceResponse:
  1863. description: ""
  1864. schema:
  1865. items:
  1866. $ref: '#/definitions/Network'
  1867. type: array
  1868. networkBodyResponse:
  1869. description: ""
  1870. schema:
  1871. $ref: '#/definitions/Network'
  1872. nodeGetResponse:
  1873. description: ""
  1874. schema:
  1875. $ref: '#/definitions/NodeGet'
  1876. nodeLastModifiedResponse:
  1877. description: ""
  1878. nodeResponse:
  1879. description: ""
  1880. schema:
  1881. $ref: '#/definitions/Node'
  1882. nodeSliceResponse:
  1883. description: ""
  1884. schema:
  1885. items:
  1886. $ref: '#/definitions/Node'
  1887. type: array
  1888. serverConfigResponse:
  1889. description: ""
  1890. schema:
  1891. $ref: '#/definitions/ServerConfig'
  1892. stringJSONResponse:
  1893. description: ""
  1894. successResponse:
  1895. description: ""
  1896. schema:
  1897. $ref: '#/definitions/SuccessResponse'
  1898. userBodyResponse:
  1899. description: ""
  1900. schema:
  1901. $ref: '#/definitions/User'
  1902. schemes:
  1903. - https
  1904. swagger: "2.0"