swagger.yaml 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902
  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. netid:
  295. type: string
  296. x-go-name: NetID
  297. networklastmodified:
  298. format: int64
  299. type: integer
  300. x-go-name: NetworkLastModified
  301. nodelimit:
  302. format: int32
  303. type: integer
  304. x-go-name: NodeLimit
  305. nodeslastmodified:
  306. format: int64
  307. type: integer
  308. x-go-name: NodesLastModified
  309. type: object
  310. x-go-package: github.com/gravitl/netmaker/models
  311. Node:
  312. description: Node - struct for node model
  313. properties:
  314. accesskey:
  315. type: string
  316. x-go-name: AccessKey
  317. action:
  318. type: string
  319. x-go-name: Action
  320. address:
  321. type: string
  322. x-go-name: Address
  323. address6:
  324. type: string
  325. x-go-name: Address6
  326. allowedips:
  327. items:
  328. type: string
  329. type: array
  330. x-go-name: AllowedIPs
  331. connected:
  332. type: string
  333. x-go-name: Connected
  334. dnson:
  335. type: string
  336. x-go-name: DNSOn
  337. egressgatewaynatenabled:
  338. type: string
  339. x-go-name: EgressGatewayNatEnabled
  340. egressgatewayranges:
  341. items:
  342. type: string
  343. type: array
  344. x-go-name: EgressGatewayRanges
  345. egressgatewayrequest:
  346. $ref: '#/definitions/EgressGatewayRequest'
  347. endpoint:
  348. type: string
  349. x-go-name: Endpoint
  350. expdatetime:
  351. format: int64
  352. type: integer
  353. x-go-name: ExpirationDateTime
  354. firewallinuse:
  355. type: string
  356. x-go-name: FirewallInUse
  357. id:
  358. type: string
  359. x-go-name: ID
  360. ingressgatewayrange:
  361. type: string
  362. x-go-name: IngressGatewayRange
  363. ingressgatewayrange6:
  364. type: string
  365. x-go-name: IngressGatewayRange6
  366. interface:
  367. type: string
  368. x-go-name: Interface
  369. internetgateway:
  370. type: string
  371. x-go-name: InternetGateway
  372. ipforwarding:
  373. type: string
  374. x-go-name: IPForwarding
  375. isdocker:
  376. type: string
  377. x-go-name: IsDocker
  378. isegressgateway:
  379. type: string
  380. x-go-name: IsEgressGateway
  381. ishub:
  382. type: string
  383. x-go-name: IsHub
  384. isingressgateway:
  385. type: string
  386. x-go-name: IsIngressGateway
  387. isk8s:
  388. type: string
  389. x-go-name: IsK8S
  390. islocal:
  391. type: string
  392. x-go-name: IsLocal
  393. ispending:
  394. type: string
  395. x-go-name: IsPending
  396. isrelay:
  397. type: string
  398. x-go-name: IsRelay
  399. isrelayed:
  400. type: string
  401. x-go-name: IsRelayed
  402. isserver:
  403. type: string
  404. x-go-name: IsServer
  405. isstatic:
  406. description: IsStatic - refers to if the Endpoint is set manually or dynamically
  407. type: string
  408. x-go-name: IsStatic
  409. lastcheckin:
  410. format: int64
  411. type: integer
  412. x-go-name: LastCheckIn
  413. lastmodified:
  414. format: int64
  415. type: integer
  416. x-go-name: LastModified
  417. lastpeerupdate:
  418. format: int64
  419. type: integer
  420. x-go-name: LastPeerUpdate
  421. listenport:
  422. format: int32
  423. type: integer
  424. x-go-name: ListenPort
  425. localaddress:
  426. type: string
  427. x-go-name: LocalAddress
  428. locallistenport:
  429. format: int32
  430. type: integer
  431. x-go-name: LocalListenPort
  432. macaddress:
  433. type: string
  434. x-go-name: MacAddress
  435. mtu:
  436. format: int32
  437. type: integer
  438. x-go-name: MTU
  439. name:
  440. type: string
  441. x-go-name: Name
  442. network:
  443. type: string
  444. x-go-name: Network
  445. networksettings:
  446. $ref: '#/definitions/Network'
  447. os:
  448. type: string
  449. x-go-name: OS
  450. password:
  451. type: string
  452. x-go-name: Password
  453. persistentkeepalive:
  454. format: int32
  455. type: integer
  456. x-go-name: PersistentKeepalive
  457. postdown:
  458. type: string
  459. x-go-name: PostDown
  460. postup:
  461. type: string
  462. x-go-name: PostUp
  463. publickey:
  464. type: string
  465. x-go-name: PublicKey
  466. relayaddrs:
  467. items:
  468. type: string
  469. type: array
  470. x-go-name: RelayAddrs
  471. server:
  472. type: string
  473. x-go-name: Server
  474. traffickeys:
  475. $ref: '#/definitions/TrafficKeys'
  476. udpholepunch:
  477. type: string
  478. x-go-name: UDPHolePunch
  479. version:
  480. type: string
  481. x-go-name: Version
  482. type: object
  483. x-go-package: github.com/gravitl/netmaker/models
  484. NodeGet:
  485. description: NodeGet - struct for a single node get response
  486. properties:
  487. node:
  488. $ref: '#/definitions/Node'
  489. peers:
  490. items:
  491. $ref: '#/definitions/PeerConfig'
  492. type: array
  493. x-go-name: Peers
  494. serverconfig:
  495. $ref: '#/definitions/ServerConfig'
  496. type: object
  497. x-go-package: github.com/gravitl/netmaker/models
  498. ObjectIdentifier:
  499. items:
  500. format: int64
  501. type: integer
  502. title: An ObjectIdentifier represents an ASN.1 OBJECT IDENTIFIER.
  503. type: array
  504. x-go-package: encoding/asn1
  505. PeerConfig:
  506. description: |-
  507. Because the zero value of some Go types may be significant to WireGuard for
  508. PeerConfig fields, pointer types are used for some of these fields. Only
  509. pointer fields which are not nil will be applied when configuring a peer.
  510. properties:
  511. AllowedIPs:
  512. description: |-
  513. AllowedIPs specifies a list of allowed IP addresses in CIDR notation
  514. for this peer.
  515. items:
  516. $ref: '#/definitions/IPNet'
  517. type: array
  518. Endpoint:
  519. $ref: '#/definitions/UDPAddr'
  520. PersistentKeepaliveInterval:
  521. $ref: '#/definitions/Duration'
  522. PresharedKey:
  523. $ref: '#/definitions/Key'
  524. PublicKey:
  525. $ref: '#/definitions/Key'
  526. Remove:
  527. description: |-
  528. Remove specifies if the peer with this public key should be removed
  529. from a device's peer list.
  530. type: boolean
  531. ReplaceAllowedIPs:
  532. description: |-
  533. ReplaceAllowedIPs specifies if the allowed IPs specified in this peer
  534. configuration should replace any existing ones, instead of appending them
  535. to the allowed IPs list.
  536. type: boolean
  537. UpdateOnly:
  538. description: |-
  539. UpdateOnly specifies that an operation will only occur on this peer
  540. if the peer already exists as part of the interface.
  541. type: boolean
  542. title: A PeerConfig is a WireGuard device peer configuration.
  543. type: object
  544. x-go-package: golang.zx2c4.com/wireguard/wgctrl/wgtypes
  545. PrivateKey:
  546. items:
  547. format: uint8
  548. type: integer
  549. title: PrivateKey is the type of Ed25519 private keys. It implements crypto.Signer.
  550. type: array
  551. x-go-package: crypto/ed25519
  552. RegisterRequest:
  553. description: RegisterRequest - struct for registation with netmaker server
  554. properties:
  555. CommonName:
  556. $ref: '#/definitions/Name'
  557. Key:
  558. $ref: '#/definitions/PrivateKey'
  559. type: object
  560. x-go-package: github.com/gravitl/netmaker/netclient/config
  561. RelayRequest:
  562. description: RelayRequest - relay request struct
  563. properties:
  564. netid:
  565. type: string
  566. x-go-name: NetID
  567. nodeid:
  568. type: string
  569. x-go-name: NodeID
  570. relayaddrs:
  571. items:
  572. type: string
  573. type: array
  574. x-go-name: RelayAddrs
  575. type: object
  576. x-go-package: github.com/gravitl/netmaker/models
  577. ServerConfig:
  578. description: ServerConfig - server conf struct
  579. properties:
  580. APIConnString:
  581. type: string
  582. APIHost:
  583. type: string
  584. APIPort:
  585. type: string
  586. AgentBackend:
  587. type: string
  588. AllowedOrigin:
  589. type: string
  590. AuthProvider:
  591. type: string
  592. AzureTenant:
  593. type: string
  594. ClientID:
  595. type: string
  596. ClientMode:
  597. type: string
  598. ClientSecret:
  599. type: string
  600. CoreDNSAddr:
  601. type: string
  602. DNSKey:
  603. type: string
  604. DNSMode:
  605. type: string
  606. Database:
  607. type: string
  608. DefaultNodeLimit:
  609. format: int32
  610. type: integer
  611. DisableRemoteIPCheck:
  612. type: string
  613. DisplayKeys:
  614. type: string
  615. FrontendURL:
  616. type: string
  617. HostNetwork:
  618. type: string
  619. MQHOST:
  620. type: string
  621. MQPort:
  622. type: string
  623. MQServerPort:
  624. type: string
  625. ManageIPTables:
  626. type: string
  627. MasterKey:
  628. type: string
  629. MessageQueueBackend:
  630. type: string
  631. NodeID:
  632. type: string
  633. OIDCIssuer:
  634. type: string
  635. Platform:
  636. type: string
  637. PortForwardServices:
  638. type: string
  639. PublicIPService:
  640. type: string
  641. RCE:
  642. type: string
  643. RestBackend:
  644. type: string
  645. SQLConn:
  646. type: string
  647. Server:
  648. type: string
  649. ServerCheckinInterval:
  650. format: int64
  651. type: integer
  652. Telemetry:
  653. type: string
  654. Verbosity:
  655. format: int32
  656. type: integer
  657. Version:
  658. type: string
  659. type: object
  660. x-go-package: github.com/gravitl/netmaker/config
  661. SuccessResponse:
  662. properties:
  663. Code:
  664. format: int64
  665. type: integer
  666. Message:
  667. type: string
  668. Response: {}
  669. title: SuccessResponse is struct for sending error message with code.
  670. type: object
  671. x-go-package: github.com/gravitl/netmaker/models
  672. TrafficKeys:
  673. description: TrafficKeys - struct to hold public keys
  674. properties:
  675. mine:
  676. items:
  677. format: uint8
  678. type: integer
  679. type: array
  680. x-go-name: Mine
  681. server:
  682. items:
  683. format: uint8
  684. type: integer
  685. type: array
  686. x-go-name: Server
  687. type: object
  688. x-go-package: github.com/gravitl/netmaker/models
  689. UDPAddr:
  690. properties:
  691. IP:
  692. type: string
  693. Port:
  694. format: int64
  695. type: integer
  696. Zone:
  697. type: string
  698. title: UDPAddr represents the address of a UDP end point.
  699. type: object
  700. x-go-package: net
  701. User:
  702. description: User struct - struct for Users
  703. properties:
  704. isadmin:
  705. type: boolean
  706. x-go-name: IsAdmin
  707. networks:
  708. items:
  709. type: string
  710. type: array
  711. x-go-name: Networks
  712. password:
  713. type: string
  714. x-go-name: Password
  715. username:
  716. type: string
  717. x-go-name: UserName
  718. type: object
  719. x-go-package: github.com/gravitl/netmaker/models
  720. UserAuthParams:
  721. description: UserAuthParams - user auth params struct
  722. properties:
  723. password:
  724. type: string
  725. x-go-name: Password
  726. username:
  727. type: string
  728. x-go-name: UserName
  729. type: object
  730. x-go-package: github.com/gravitl/netmaker/models
  731. host: netmaker.io
  732. info:
  733. description: |-
  734. API Usage
  735. 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.
  736. Authentication
  737. 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.
  738. title: Netmaker
  739. version: 0.17.1
  740. paths:
  741. /api/dns:
  742. get:
  743. operationId: getAllDNS
  744. responses:
  745. "200":
  746. $ref: '#/responses/dnsResponse'
  747. schemes:
  748. - https
  749. summary: Gets all DNS entries.
  750. tags:
  751. - dns
  752. /api/dns/{network}:
  753. post:
  754. operationId: createDNS
  755. parameters:
  756. - description: Network
  757. in: path
  758. name: network
  759. required: true
  760. type: string
  761. x-go-name: Network
  762. - description: DNS Entry
  763. in: body
  764. name: body
  765. schema:
  766. items:
  767. $ref: '#/definitions/DNSEntry'
  768. type: array
  769. x-go-name: Body
  770. responses:
  771. "200":
  772. $ref: '#/responses/dnsResponse'
  773. schemes:
  774. - https
  775. summary: Create a DNS entry.
  776. tags:
  777. - dns
  778. /api/dns/{network}/{domain}:
  779. delete:
  780. operationId: deleteDNS
  781. parameters:
  782. - description: Network
  783. in: path
  784. name: network
  785. required: true
  786. type: string
  787. x-go-name: Network
  788. - description: Domain
  789. in: path
  790. name: domain
  791. required: true
  792. type: string
  793. x-go-name: Domain
  794. responses:
  795. "200":
  796. $ref: '#/responses/stringJSONResponse'
  797. schemes:
  798. - https
  799. summary: Delete a DNS entry.
  800. tags:
  801. - dns
  802. /api/dns/adm/{network}:
  803. get:
  804. operationId: getDNS
  805. parameters:
  806. - description: Network
  807. in: path
  808. name: network
  809. required: true
  810. type: string
  811. x-go-name: Network
  812. responses:
  813. "200":
  814. $ref: '#/responses/dnsResponse'
  815. schemes:
  816. - https
  817. summary: Gets all DNS entries associated with the network.
  818. tags:
  819. - dns
  820. /api/dns/adm/{network}/custom:
  821. get:
  822. operationId: getCustomDNS
  823. parameters:
  824. - description: Network
  825. in: path
  826. name: network
  827. required: true
  828. type: string
  829. x-go-name: Network
  830. responses:
  831. "200":
  832. $ref: '#/responses/dnsResponse'
  833. schemes:
  834. - https
  835. summary: Gets custom DNS entries associated with a network.
  836. tags:
  837. - dns
  838. /api/dns/adm/{network}/nodes:
  839. get:
  840. operationId: getNodeDNS
  841. parameters:
  842. - description: Network
  843. in: path
  844. name: network
  845. required: true
  846. type: string
  847. x-go-name: Network
  848. schemes:
  849. - https
  850. summary: Gets node DNS entries associated with a network.
  851. tags:
  852. - dns
  853. /api/dns/adm/pushdns:
  854. post:
  855. operationId: pushDNS
  856. responses:
  857. "200":
  858. $ref: '#/responses/dnsStringJSONResponse'
  859. schemes:
  860. - https
  861. summary: Push DNS entries to nameserver.
  862. tags:
  863. - dns
  864. /api/extclients:
  865. get:
  866. operationId: getAllExtClients
  867. parameters:
  868. - description: Networks
  869. in: body
  870. name: networks
  871. schema:
  872. items:
  873. type: string
  874. type: array
  875. x-go-name: Networks
  876. responses:
  877. "200":
  878. $ref: '#/responses/extClientSliceResponse'
  879. schemes:
  880. - https
  881. summary: A separate function to get all extclients, not just extclients for a particular network.
  882. tags:
  883. - ext_client
  884. /api/extclients/{network}:
  885. get:
  886. description: Gets all extclients associated with network, including pending extclients.
  887. operationId: getNetworkExtClients
  888. parameters:
  889. - description: Network
  890. in: path
  891. name: network
  892. required: true
  893. type: string
  894. x-go-name: Network
  895. responses:
  896. "200":
  897. $ref: '#/responses/extClientSliceResponse'
  898. schemes:
  899. - https
  900. summary: Get all extclients associated with network.
  901. tags:
  902. - ext_client
  903. /api/extclients/{network}/{clientid}:
  904. delete:
  905. operationId: deleteExtClient
  906. parameters:
  907. - description: Client ID
  908. in: path
  909. name: clientid
  910. required: true
  911. type: string
  912. x-go-name: ClientID
  913. - description: Network
  914. in: path
  915. name: network
  916. required: true
  917. type: string
  918. x-go-name: Network
  919. responses:
  920. "200":
  921. $ref: '#/responses/successResponse'
  922. schemes:
  923. - https
  924. summary: Delete an individual extclient.
  925. tags:
  926. - ext_client
  927. get:
  928. operationId: getExtClient
  929. parameters:
  930. - description: Client ID
  931. in: path
  932. name: clientid
  933. required: true
  934. type: string
  935. x-go-name: ClientID
  936. - description: Network
  937. in: path
  938. name: network
  939. required: true
  940. type: string
  941. x-go-name: Network
  942. responses:
  943. "200":
  944. $ref: '#/responses/extClientResponse'
  945. schemes:
  946. - https
  947. summary: Get an individual extclient.
  948. tags:
  949. - ext_client
  950. put:
  951. operationId: updateExtClient
  952. parameters:
  953. - description: Client ID
  954. in: path
  955. name: clientid
  956. required: true
  957. type: string
  958. x-go-name: ClientID
  959. - description: Network
  960. in: path
  961. name: network
  962. required: true
  963. type: string
  964. x-go-name: Network
  965. - description: ExtClient
  966. in: body
  967. name: ext_client
  968. schema:
  969. $ref: '#/definitions/ExtClient'
  970. x-go-name: ExtClient
  971. responses:
  972. "200":
  973. $ref: '#/responses/extClientResponse'
  974. schemes:
  975. - https
  976. summary: Update an individual extclient.
  977. tags:
  978. - ext_client
  979. /api/extclients/{network}/{clientid}/{type}:
  980. get:
  981. operationId: getExtClientConf
  982. parameters:
  983. - description: Client ID
  984. in: path
  985. name: clientid
  986. required: true
  987. type: string
  988. x-go-name: ClientID
  989. - description: Network
  990. in: path
  991. name: network
  992. required: true
  993. type: string
  994. x-go-name: Network
  995. responses:
  996. "200":
  997. $ref: '#/responses/extClientResponse'
  998. schemes:
  999. - https
  1000. summary: Get an individual extclient.
  1001. tags:
  1002. - ext_client
  1003. /api/extclients/{network}/{nodeid}:
  1004. post:
  1005. operationId: createExtClient
  1006. parameters:
  1007. - description: Network
  1008. in: path
  1009. name: network
  1010. required: true
  1011. type: string
  1012. x-go-name: Network
  1013. - description: Node ID
  1014. in: path
  1015. name: node
  1016. required: true
  1017. type: string
  1018. x-go-name: NodeID
  1019. - description: Custom ExtClient
  1020. in: body
  1021. name: custom_ext_client
  1022. schema:
  1023. $ref: '#/definitions/CustomExtClient'
  1024. x-go-name: CustomExtClient
  1025. schemes:
  1026. - https
  1027. summary: Create an individual extclient. Must have valid key and be unique.
  1028. tags:
  1029. - ext_client
  1030. /api/getip:
  1031. get:
  1032. operationId: getPublicIP
  1033. responses:
  1034. "200":
  1035. $ref: '#/responses/byteArrayResponse'
  1036. schemes:
  1037. - https
  1038. summary: Get the current public IP address.
  1039. tags:
  1040. - ipservice
  1041. /api/networks:
  1042. get:
  1043. operationId: getNetworks
  1044. parameters:
  1045. - description: 'name: networks'
  1046. in: header
  1047. items:
  1048. type: string
  1049. name: networks
  1050. type: array
  1051. x-go-name: Networks
  1052. responses:
  1053. "200":
  1054. $ref: '#/responses/getNetworksSliceResponse'
  1055. schemes:
  1056. - https
  1057. summary: Lists all networks.
  1058. tags:
  1059. - networks
  1060. post:
  1061. operationId: createNetwork
  1062. parameters:
  1063. - description: Network
  1064. in: body
  1065. name: network
  1066. schema:
  1067. $ref: '#/definitions/Network'
  1068. x-go-name: Network
  1069. responses:
  1070. "200":
  1071. $ref: '#/responses/networkBodyResponse'
  1072. schemes:
  1073. - https
  1074. summary: Create a network.
  1075. tags:
  1076. - networks
  1077. /api/networks/{networkname}:
  1078. delete:
  1079. operationId: deleteNetwork
  1080. parameters:
  1081. - description: Network Name
  1082. in: path
  1083. name: networkname
  1084. required: true
  1085. type: string
  1086. x-go-name: NetworkName
  1087. responses:
  1088. "200":
  1089. $ref: '#/responses/stringJSONResponse'
  1090. schemes:
  1091. - https
  1092. summary: Delete a network. Will not delete if there are any nodes that belong to the network.
  1093. tags:
  1094. - networks
  1095. get:
  1096. operationId: getNetwork
  1097. parameters:
  1098. - description: Network Name
  1099. in: path
  1100. name: networkname
  1101. required: true
  1102. type: string
  1103. x-go-name: NetworkName
  1104. responses:
  1105. "200":
  1106. $ref: '#/responses/networkBodyResponse'
  1107. schemes:
  1108. - https
  1109. summary: Get a network.
  1110. tags:
  1111. - networks
  1112. put:
  1113. operationId: updateNetwork
  1114. parameters:
  1115. - description: Network
  1116. in: body
  1117. name: network
  1118. schema:
  1119. $ref: '#/definitions/Network'
  1120. x-go-name: Network
  1121. - description: Network Name
  1122. in: path
  1123. name: networkname
  1124. required: true
  1125. type: string
  1126. x-go-name: NetworkName
  1127. responses:
  1128. "200":
  1129. $ref: '#/responses/networkBodyResponse'
  1130. schemes:
  1131. - https
  1132. summary: Update a network.
  1133. tags:
  1134. - networks
  1135. /api/networks/{networkname}/acls:
  1136. get:
  1137. operationId: getNetworkACL
  1138. parameters:
  1139. - description: Network Name
  1140. in: path
  1141. name: networkname
  1142. required: true
  1143. type: string
  1144. x-go-name: NetworkName
  1145. - description: ACL Container
  1146. in: body
  1147. name: acl_container
  1148. schema:
  1149. $ref: '#/definitions/ACLContainer'
  1150. x-go-name: ACLContainer
  1151. responses:
  1152. "200":
  1153. $ref: '#/responses/aclContainerResponse'
  1154. schemes:
  1155. - https
  1156. summary: Get a network ACL (Access Control List).
  1157. tags:
  1158. - networks
  1159. put:
  1160. operationId: updateNetworkACL
  1161. parameters:
  1162. - description: Network Name
  1163. in: path
  1164. name: networkname
  1165. required: true
  1166. type: string
  1167. x-go-name: NetworkName
  1168. - description: ACL Container
  1169. in: body
  1170. name: acl_container
  1171. schema:
  1172. $ref: '#/definitions/ACLContainer'
  1173. x-go-name: ACLContainer
  1174. responses:
  1175. "200":
  1176. $ref: '#/responses/aclContainerResponse'
  1177. schemes:
  1178. - https
  1179. summary: Update a network ACL (Access Control List).
  1180. tags:
  1181. - networks
  1182. /api/networks/{networkname}/keys:
  1183. get:
  1184. operationId: getAccessKeys
  1185. parameters:
  1186. - description: Network Name
  1187. in: path
  1188. name: networkname
  1189. required: true
  1190. type: string
  1191. x-go-name: NetworkName
  1192. responses:
  1193. "200":
  1194. $ref: '#/responses/accessKeySliceBodyResponse'
  1195. schemes:
  1196. - https
  1197. summary: Get network access keys for a network.
  1198. tags:
  1199. - networks
  1200. post:
  1201. operationId: createAccessKey
  1202. parameters:
  1203. - description: Network Name
  1204. in: path
  1205. name: networkname
  1206. required: true
  1207. type: string
  1208. x-go-name: NetworkName
  1209. - description: Access Key
  1210. in: body
  1211. name: access_key
  1212. schema:
  1213. $ref: '#/definitions/AccessKey'
  1214. x-go-name: AccessKey
  1215. responses:
  1216. "200":
  1217. $ref: '#/responses/accessKeyBodyResponse'
  1218. schemes:
  1219. - https
  1220. summary: Create a network access key.
  1221. tags:
  1222. - networks
  1223. /api/networks/{networkname}/keys/{name}:
  1224. delete:
  1225. operationId: deleteAccessKey
  1226. parameters:
  1227. - description: Network Name
  1228. in: path
  1229. name: networkname
  1230. required: true
  1231. type: string
  1232. x-go-name: NetworkName
  1233. - description: Access Key Name
  1234. in: path
  1235. name: access_key_name
  1236. required: true
  1237. type: string
  1238. x-go-name: AccessKeyName
  1239. responses:
  1240. "200":
  1241. description: ""
  1242. schemes:
  1243. - https
  1244. summary: Delete a network access key.
  1245. tags:
  1246. - networks
  1247. /api/networks/{networkname}/keyupdate:
  1248. post:
  1249. operationId: keyUpdate
  1250. parameters:
  1251. - description: Network Name
  1252. in: path
  1253. name: networkname
  1254. required: true
  1255. type: string
  1256. x-go-name: NetworkName
  1257. responses:
  1258. "200":
  1259. $ref: '#/responses/networkBodyResponse'
  1260. schemes:
  1261. - https
  1262. summary: Update keys for a network.
  1263. tags:
  1264. - networks
  1265. /api/nodes:
  1266. get:
  1267. operationId: getAllNodes
  1268. responses:
  1269. "200":
  1270. $ref: '#/responses/nodeSliceResponse'
  1271. schemes:
  1272. - https
  1273. summary: Get all nodes across all networks.
  1274. tags:
  1275. - nodes
  1276. /api/nodes/{network}:
  1277. get:
  1278. operationId: getNetworkNodes
  1279. responses:
  1280. "200":
  1281. $ref: '#/responses/nodeSliceResponse'
  1282. schemes:
  1283. - https
  1284. summary: Gets all nodes associated with network including pending nodes.
  1285. tags:
  1286. - nodes
  1287. post:
  1288. operationId: createNode
  1289. responses:
  1290. "200":
  1291. $ref: '#/responses/nodeGetResponse'
  1292. schemes:
  1293. - https
  1294. summary: Create a node on a network.
  1295. tags:
  1296. - nodes
  1297. /api/nodes/{network}/{nodeid}:
  1298. delete:
  1299. operationId: deleteNode
  1300. parameters:
  1301. - description: Network
  1302. in: path
  1303. name: network
  1304. required: true
  1305. type: string
  1306. x-go-name: Network
  1307. - description: Node ID
  1308. in: path
  1309. name: nodeid
  1310. required: true
  1311. type: string
  1312. x-go-name: NodeID
  1313. - description: Node
  1314. in: body
  1315. name: node
  1316. schema:
  1317. $ref: '#/definitions/Node'
  1318. x-go-name: Node
  1319. responses:
  1320. "200":
  1321. $ref: '#/responses/nodeResponse'
  1322. schemes:
  1323. - https
  1324. summary: Delete an individual node.
  1325. tags:
  1326. - nodes
  1327. get:
  1328. operationId: getNode
  1329. parameters:
  1330. - description: Network
  1331. in: path
  1332. name: network
  1333. required: true
  1334. type: string
  1335. x-go-name: Network
  1336. - description: Node ID
  1337. in: path
  1338. name: nodeid
  1339. required: true
  1340. type: string
  1341. x-go-name: NodeID
  1342. responses:
  1343. "200":
  1344. $ref: '#/responses/nodeResponse'
  1345. schemes:
  1346. - https
  1347. summary: Get an individual node.
  1348. tags:
  1349. - nodes
  1350. put:
  1351. operationId: updateNode
  1352. parameters:
  1353. - description: Network
  1354. in: path
  1355. name: network
  1356. required: true
  1357. type: string
  1358. x-go-name: Network
  1359. - description: Node ID
  1360. in: path
  1361. name: nodeid
  1362. required: true
  1363. type: string
  1364. x-go-name: NodeID
  1365. - description: Node
  1366. in: body
  1367. name: node
  1368. schema:
  1369. $ref: '#/definitions/Node'
  1370. x-go-name: Node
  1371. responses:
  1372. "200":
  1373. $ref: '#/responses/nodeResponse'
  1374. schemes:
  1375. - https
  1376. summary: Update an individual node.
  1377. tags:
  1378. - nodes
  1379. /api/nodes/{network}/{nodeid}/approve:
  1380. post:
  1381. operationId: uncordonNode
  1382. parameters:
  1383. - description: Network
  1384. in: path
  1385. name: network
  1386. required: true
  1387. type: string
  1388. x-go-name: Network
  1389. - description: Node ID
  1390. in: path
  1391. name: nodeid
  1392. required: true
  1393. type: string
  1394. x-go-name: NodeID
  1395. responses:
  1396. "200":
  1397. $ref: '#/responses/nodeResponse'
  1398. schemes:
  1399. - https
  1400. summary: Takes a node out of pending state.
  1401. tags:
  1402. - nodes
  1403. /api/nodes/{network}/{nodeid}/creategateway:
  1404. post:
  1405. operationId: createEgressGateway
  1406. parameters:
  1407. - description: Network
  1408. in: path
  1409. name: network
  1410. required: true
  1411. type: string
  1412. x-go-name: Network
  1413. - description: Node ID
  1414. in: path
  1415. name: nodeid
  1416. required: true
  1417. type: string
  1418. x-go-name: NodeID
  1419. - description: Egress Gateway Request
  1420. in: body
  1421. name: egress_gateway_request
  1422. schema:
  1423. $ref: '#/definitions/EgressGatewayRequest'
  1424. x-go-name: EgressGatewayRequest
  1425. responses:
  1426. "200":
  1427. $ref: '#/responses/nodeResponse'
  1428. schemes:
  1429. - https
  1430. summary: Create an egress gateway.
  1431. tags:
  1432. - nodes
  1433. /api/nodes/{network}/{nodeid}/createingress:
  1434. post:
  1435. operationId: createIngressGateway
  1436. parameters:
  1437. - description: Network
  1438. in: path
  1439. name: network
  1440. required: true
  1441. type: string
  1442. x-go-name: Network
  1443. - description: Node ID
  1444. in: path
  1445. name: nodeid
  1446. required: true
  1447. type: string
  1448. x-go-name: NodeID
  1449. responses:
  1450. "200":
  1451. $ref: '#/responses/nodeResponse'
  1452. schemes:
  1453. - https
  1454. summary: Create an ingress gateway.
  1455. tags:
  1456. - nodes
  1457. /api/nodes/{network}/{nodeid}/createrelay:
  1458. post:
  1459. operationId: createRelay
  1460. parameters:
  1461. - description: Network
  1462. in: path
  1463. name: network
  1464. required: true
  1465. type: string
  1466. x-go-name: Network
  1467. - description: Node ID
  1468. in: path
  1469. name: nodeid
  1470. required: true
  1471. type: string
  1472. x-go-name: NodeID
  1473. - description: Relay Request
  1474. in: body
  1475. name: relay_request
  1476. schema:
  1477. $ref: '#/definitions/RelayRequest'
  1478. x-go-name: RelayRequest
  1479. responses:
  1480. "200":
  1481. $ref: '#/responses/nodeResponse'
  1482. schemes:
  1483. - https
  1484. summary: Create a relay.
  1485. tags:
  1486. - nodes
  1487. /api/nodes/{network}/{nodeid}/deletegateway:
  1488. delete:
  1489. operationId: deleteEgressGateway
  1490. parameters:
  1491. - description: Network
  1492. in: path
  1493. name: network
  1494. required: true
  1495. type: string
  1496. x-go-name: Network
  1497. - description: Node ID
  1498. in: path
  1499. name: nodeid
  1500. required: true
  1501. type: string
  1502. x-go-name: NodeID
  1503. responses:
  1504. "200":
  1505. $ref: '#/responses/nodeResponse'
  1506. schemes:
  1507. - https
  1508. summary: Delete an egress gateway.
  1509. tags:
  1510. - nodes
  1511. /api/nodes/{network}/{nodeid}/deleteingress:
  1512. delete:
  1513. operationId: deleteIngressGateway
  1514. parameters:
  1515. - description: Network
  1516. in: path
  1517. name: network
  1518. required: true
  1519. type: string
  1520. x-go-name: Network
  1521. - description: Node ID
  1522. in: path
  1523. name: nodeid
  1524. required: true
  1525. type: string
  1526. x-go-name: NodeID
  1527. responses:
  1528. "200":
  1529. $ref: '#/responses/nodeResponse'
  1530. schemes:
  1531. - https
  1532. summary: Delete an ingress gateway.
  1533. tags:
  1534. - nodes
  1535. /api/nodes/{network}/{nodeid}/deleterelay:
  1536. delete:
  1537. operationId: deleteRelay
  1538. parameters:
  1539. - description: Network
  1540. in: path
  1541. name: network
  1542. required: true
  1543. type: string
  1544. x-go-name: Network
  1545. - description: Node ID
  1546. in: path
  1547. name: nodeid
  1548. required: true
  1549. type: string
  1550. x-go-name: NodeID
  1551. responses:
  1552. "200":
  1553. $ref: '#/responses/nodeResponse'
  1554. schemes:
  1555. - https
  1556. summary: Remove a relay.
  1557. tags:
  1558. - nodes
  1559. /api/nodes/adm/{network}/authenticate:
  1560. post:
  1561. operationId: authenticate
  1562. parameters:
  1563. - description: AuthParams
  1564. in: body
  1565. name: auth_params
  1566. schema:
  1567. $ref: '#/definitions/AuthParams'
  1568. x-go-name: AuthParams
  1569. responses:
  1570. "200":
  1571. $ref: '#/responses/successResponse'
  1572. schemes:
  1573. - https
  1574. summary: Authenticate to make further API calls related to a network.
  1575. tags:
  1576. - nodes
  1577. /api/oauth/login:
  1578. get:
  1579. operationId: HandleAuthLogin
  1580. schemes:
  1581. - https
  1582. summary: Handles OAuth login.
  1583. tags:
  1584. - nodes
  1585. /api/server/getconfig:
  1586. get:
  1587. operationId: getConfig
  1588. responses:
  1589. "200":
  1590. $ref: '#/responses/serverConfigResponse'
  1591. schemes:
  1592. - https
  1593. summary: Get the server configuration.
  1594. tags:
  1595. - server
  1596. /api/server/getserverinfo:
  1597. get:
  1598. operationId: getServerInfo
  1599. responses:
  1600. "200":
  1601. $ref: '#/responses/serverConfigResponse'
  1602. schemes:
  1603. - https
  1604. summary: Get the server configuration.
  1605. tags:
  1606. - server
  1607. /api/server/register:
  1608. post:
  1609. operationId: register
  1610. parameters:
  1611. - description: Register Request
  1612. in: body
  1613. name: register_request
  1614. schema:
  1615. $ref: '#/definitions/RegisterRequest'
  1616. x-go-name: RegisterRequest
  1617. responses:
  1618. "200":
  1619. $ref: '#/responses/registerResponse'
  1620. schemes:
  1621. - https
  1622. summary: Registers a client with the server and return the Certificate Authority and certificate.
  1623. tags:
  1624. - server
  1625. /api/users:
  1626. get:
  1627. operationId: getUsers
  1628. responses:
  1629. "200":
  1630. $ref: '#/responses/userBodyResponse'
  1631. schemes:
  1632. - https
  1633. summary: Get all users.
  1634. tags:
  1635. - user
  1636. /api/users/{username}:
  1637. delete:
  1638. operationId: deleteUser
  1639. parameters:
  1640. - description: Username
  1641. in: path
  1642. name: username
  1643. required: true
  1644. type: string
  1645. x-go-name: Username
  1646. responses:
  1647. "200":
  1648. $ref: '#/responses/userBodyResponse'
  1649. schemes:
  1650. - https
  1651. summary: Delete a user.
  1652. tags:
  1653. - user
  1654. get:
  1655. operationId: getUser
  1656. parameters:
  1657. - description: Username
  1658. in: path
  1659. name: username
  1660. required: true
  1661. type: string
  1662. x-go-name: Username
  1663. responses:
  1664. "200":
  1665. $ref: '#/responses/userBodyResponse'
  1666. schemes:
  1667. - https
  1668. summary: Get an individual user.
  1669. tags:
  1670. - user
  1671. post:
  1672. operationId: createUser
  1673. parameters:
  1674. - description: User
  1675. in: body
  1676. name: user
  1677. schema:
  1678. $ref: '#/definitions/User'
  1679. x-go-name: User
  1680. - description: Username
  1681. in: path
  1682. name: username
  1683. required: true
  1684. type: string
  1685. x-go-name: Username
  1686. responses:
  1687. "200":
  1688. $ref: '#/responses/userBodyResponse'
  1689. schemes:
  1690. - https
  1691. summary: Create a user.
  1692. tags:
  1693. - user
  1694. put:
  1695. operationId: updateUser
  1696. parameters:
  1697. - description: User
  1698. in: body
  1699. name: user
  1700. schema:
  1701. $ref: '#/definitions/User'
  1702. x-go-name: User
  1703. - description: Username
  1704. in: path
  1705. name: username
  1706. required: true
  1707. type: string
  1708. x-go-name: Username
  1709. responses:
  1710. "200":
  1711. $ref: '#/responses/userBodyResponse'
  1712. schemes:
  1713. - https
  1714. summary: Update a user.
  1715. tags:
  1716. - user
  1717. /api/users/{username}/adm:
  1718. put:
  1719. operationId: updateUserAdm
  1720. parameters:
  1721. - description: Username
  1722. in: path
  1723. name: username
  1724. required: true
  1725. type: string
  1726. x-go-name: Username
  1727. responses:
  1728. "200":
  1729. $ref: '#/responses/userBodyResponse'
  1730. schemes:
  1731. - https
  1732. summary: Updates the given admin user's info (as long as the user is an admin).
  1733. tags:
  1734. - user
  1735. /api/users/adm/authenticate:
  1736. post:
  1737. operationId: authenticateUser
  1738. parameters:
  1739. - description: User Auth Params
  1740. in: body
  1741. name: user_auth_params
  1742. schema:
  1743. $ref: '#/definitions/UserAuthParams'
  1744. x-go-name: UserAuthParams
  1745. responses:
  1746. "200":
  1747. $ref: '#/responses/successResponse'
  1748. schemes:
  1749. - https
  1750. summary: Node authenticates using its password and retrieves a JWT for authorization.
  1751. tags:
  1752. - user
  1753. /api/users/adm/createadmin:
  1754. post:
  1755. operationId: createAdmin
  1756. parameters:
  1757. - description: User
  1758. in: body
  1759. name: user
  1760. schema:
  1761. $ref: '#/definitions/User'
  1762. x-go-name: User
  1763. responses:
  1764. "200":
  1765. $ref: '#/responses/userBodyResponse'
  1766. schemes:
  1767. - https
  1768. summary: Make a user an admin.
  1769. tags:
  1770. - user
  1771. /api/users/adm/hasadmin:
  1772. get:
  1773. operationId: hasAdmin
  1774. responses:
  1775. "200":
  1776. $ref: '#/responses/successResponse'
  1777. schemes:
  1778. - https
  1779. summary: Checks whether the server has an admin.
  1780. tags:
  1781. - user
  1782. /api/users/networks/{username}:
  1783. put:
  1784. operationId: updateUserNetworks
  1785. parameters:
  1786. - description: User
  1787. in: body
  1788. name: user
  1789. schema:
  1790. $ref: '#/definitions/User'
  1791. x-go-name: User
  1792. - description: Username
  1793. in: path
  1794. name: username
  1795. required: true
  1796. type: string
  1797. x-go-name: Username
  1798. responses:
  1799. "200":
  1800. $ref: '#/responses/userBodyResponse'
  1801. schemes:
  1802. - https
  1803. summary: Updates the networks of the given user.
  1804. tags:
  1805. - user
  1806. /meshclient/files/{filename}:
  1807. get:
  1808. operationId: fileServer
  1809. schemes:
  1810. - https
  1811. summary: Retrieve a file from the file server.
  1812. tags:
  1813. - meshclient
  1814. produces:
  1815. - application/json
  1816. responses:
  1817. accessKeyBodyResponse:
  1818. description: ""
  1819. schema:
  1820. $ref: '#/definitions/AccessKey'
  1821. accessKeySliceBodyResponse:
  1822. description: ""
  1823. schema:
  1824. items:
  1825. $ref: '#/definitions/AccessKey'
  1826. type: array
  1827. aclContainerResponse:
  1828. description: ""
  1829. schema:
  1830. $ref: '#/definitions/ACLContainer'
  1831. boolResponse:
  1832. description: ""
  1833. byteArrayResponse:
  1834. description: ""
  1835. schema:
  1836. items:
  1837. format: uint8
  1838. type: integer
  1839. type: array
  1840. dnsResponse:
  1841. description: Success
  1842. schema:
  1843. items:
  1844. $ref: '#/definitions/DNSEntry'
  1845. type: array
  1846. extClientResponse:
  1847. description: ""
  1848. schema:
  1849. $ref: '#/definitions/ExtClient'
  1850. extClientSliceResponse:
  1851. description: ""
  1852. schema:
  1853. items:
  1854. $ref: '#/definitions/ExtClient'
  1855. type: array
  1856. getNetworksSliceResponse:
  1857. description: ""
  1858. schema:
  1859. items:
  1860. $ref: '#/definitions/Network'
  1861. type: array
  1862. networkBodyResponse:
  1863. description: ""
  1864. schema:
  1865. $ref: '#/definitions/Network'
  1866. nodeGetResponse:
  1867. description: ""
  1868. schema:
  1869. $ref: '#/definitions/NodeGet'
  1870. nodeLastModifiedResponse:
  1871. description: ""
  1872. nodeResponse:
  1873. description: ""
  1874. schema:
  1875. $ref: '#/definitions/Node'
  1876. nodeSliceResponse:
  1877. description: ""
  1878. schema:
  1879. items:
  1880. $ref: '#/definitions/Node'
  1881. type: array
  1882. serverConfigResponse:
  1883. description: ""
  1884. schema:
  1885. $ref: '#/definitions/ServerConfig'
  1886. stringJSONResponse:
  1887. description: ""
  1888. successResponse:
  1889. description: ""
  1890. schema:
  1891. $ref: '#/definitions/SuccessResponse'
  1892. userBodyResponse:
  1893. description: ""
  1894. schema:
  1895. $ref: '#/definitions/User'
  1896. schemes:
  1897. - https
  1898. swagger: "2.0"