swagger.yaml 73 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105
  1. definitions:
  2. acls.ACL:
  3. additionalProperties:
  4. type: integer
  5. type: object
  6. acls.ACLContainer:
  7. additionalProperties:
  8. $ref: '#/definitions/acls.ACL'
  9. type: object
  10. config.ServerConfig:
  11. properties:
  12. IsEE:
  13. type: string
  14. allowedEmailDomains:
  15. type: string
  16. allowedOrigin:
  17. type: string
  18. apiconnString:
  19. type: string
  20. apihost:
  21. type: string
  22. apiport:
  23. type: string
  24. authProvider:
  25. type: string
  26. azureTenant:
  27. type: string
  28. basicAuth:
  29. type: string
  30. broker:
  31. type: string
  32. brokerType:
  33. type: string
  34. cacheEnabled:
  35. type: string
  36. clientID:
  37. type: string
  38. clientSecret:
  39. type: string
  40. coreDNSAddr:
  41. type: string
  42. database:
  43. type: string
  44. deployedByOperator:
  45. type: boolean
  46. disableRemoteIPCheck:
  47. type: string
  48. displayKeys:
  49. type: string
  50. dnskey:
  51. type: string
  52. dnsmode:
  53. type: string
  54. egressesLimit:
  55. type: integer
  56. emqxRestEndpoint:
  57. type: string
  58. endpoint_detection:
  59. type: boolean
  60. environment:
  61. type: string
  62. frontendURL:
  63. type: string
  64. hostNetwork:
  65. type: string
  66. ingressesLimit:
  67. type: integer
  68. jwtValidityDuration:
  69. $ref: '#/definitions/time.Duration'
  70. licenseValue:
  71. type: string
  72. machinesLimit:
  73. type: integer
  74. masterKey:
  75. type: string
  76. messageQueueBackend:
  77. type: string
  78. metricInterval:
  79. type: string
  80. metricsExporter:
  81. type: string
  82. mqpassword:
  83. type: string
  84. mquserName:
  85. type: string
  86. netclientAutoUpdate:
  87. type: string
  88. netclientEndpointDetection:
  89. type: string
  90. netmakerTenantID:
  91. type: string
  92. networksLimit:
  93. type: integer
  94. nodeID:
  95. type: string
  96. oidcissuer:
  97. type: string
  98. platform:
  99. type: string
  100. publicIPService:
  101. type: string
  102. racAutoDisable:
  103. type: boolean
  104. restBackend:
  105. type: string
  106. server:
  107. type: string
  108. serverBrokerEndpoint:
  109. type: string
  110. sqlconn:
  111. type: string
  112. stunList:
  113. type: string
  114. stunPort:
  115. type: integer
  116. telemetry:
  117. type: string
  118. turnApiServer:
  119. type: string
  120. turnPassword:
  121. type: string
  122. turnPort:
  123. type: integer
  124. turnServer:
  125. type: string
  126. turnUserName:
  127. type: string
  128. useTurn:
  129. type: boolean
  130. usersLimit:
  131. type: integer
  132. verbosity:
  133. type: integer
  134. version:
  135. type: string
  136. type: object
  137. models.APIEnrollmentKey:
  138. properties:
  139. expiration:
  140. type: integer
  141. networks:
  142. items:
  143. type: string
  144. type: array
  145. relay:
  146. type: string
  147. tags:
  148. items:
  149. type: string
  150. type: array
  151. type:
  152. $ref: '#/definitions/models.KeyType'
  153. unlimited:
  154. type: boolean
  155. uses_remaining:
  156. type: integer
  157. required:
  158. - tags
  159. type: object
  160. models.ApiHost:
  161. properties:
  162. autoupdate:
  163. type: boolean
  164. debug:
  165. type: boolean
  166. defaultinterface:
  167. type: string
  168. endpointip:
  169. type: string
  170. endpointipv6:
  171. type: string
  172. firewallinuse:
  173. type: string
  174. id:
  175. type: string
  176. interfaces:
  177. items:
  178. $ref: '#/definitions/models.ApiIface'
  179. type: array
  180. isdefault:
  181. type: boolean
  182. isstatic:
  183. type: boolean
  184. isstaticport:
  185. type: boolean
  186. listenport:
  187. type: integer
  188. macaddress:
  189. type: string
  190. mtu:
  191. type: integer
  192. name:
  193. type: string
  194. nat_type:
  195. type: string
  196. nodes:
  197. items:
  198. type: string
  199. type: array
  200. os:
  201. type: string
  202. persistentkeepalive:
  203. type: integer
  204. publickey:
  205. type: string
  206. verbosity:
  207. type: integer
  208. version:
  209. type: string
  210. wg_public_listen_port:
  211. type: integer
  212. type: object
  213. models.ApiIface:
  214. properties:
  215. addressString:
  216. type: string
  217. name:
  218. type: string
  219. type: object
  220. models.ApiNode:
  221. properties:
  222. additional_rag_ips:
  223. items:
  224. type: string
  225. type: array
  226. address:
  227. type: string
  228. address6:
  229. type: string
  230. allowedips:
  231. items:
  232. type: string
  233. type: array
  234. connected:
  235. type: boolean
  236. defaultacl:
  237. description: == PRO ==
  238. type: string
  239. dnson:
  240. type: boolean
  241. egressgatewaynatenabled:
  242. type: boolean
  243. egressgatewayranges:
  244. items:
  245. type: string
  246. type: array
  247. expdatetime:
  248. type: integer
  249. fail_over_peers:
  250. additionalProperties:
  251. type: object
  252. type: object
  253. failed_over_by:
  254. type: string
  255. hostid:
  256. minLength: 5
  257. type: string
  258. id:
  259. minLength: 5
  260. type: string
  261. inet_node_req:
  262. $ref: '#/definitions/models.InetNodeReq'
  263. ingressdns:
  264. type: string
  265. internetgw_node_id:
  266. type: string
  267. is_fail_over:
  268. type: boolean
  269. isegressgateway:
  270. type: boolean
  271. isingressgateway:
  272. type: boolean
  273. isinternetgateway:
  274. type: boolean
  275. isrelay:
  276. type: boolean
  277. isrelayed:
  278. type: boolean
  279. lastcheckin:
  280. type: integer
  281. lastmodified:
  282. type: integer
  283. lastpeerupdate:
  284. type: integer
  285. localaddress:
  286. type: string
  287. metadata:
  288. type: string
  289. network:
  290. type: string
  291. networkrange:
  292. type: string
  293. networkrange6:
  294. type: string
  295. pendingdelete:
  296. type: boolean
  297. relayedby:
  298. type: string
  299. relaynodes:
  300. items:
  301. type: string
  302. type: array
  303. server:
  304. type: string
  305. required:
  306. - hostid
  307. - id
  308. type: object
  309. models.AuthParams:
  310. properties:
  311. id:
  312. type: string
  313. macaddress:
  314. type: string
  315. password:
  316. type: string
  317. type: object
  318. models.DNSEntry:
  319. properties:
  320. address:
  321. type: string
  322. address6:
  323. type: string
  324. name:
  325. maxLength: 192
  326. minLength: 1
  327. type: string
  328. network:
  329. type: string
  330. required:
  331. - name
  332. type: object
  333. models.EgressGatewayRequest:
  334. properties:
  335. natenabled:
  336. type: string
  337. netid:
  338. type: string
  339. nodeid:
  340. type: string
  341. ranges:
  342. items:
  343. type: string
  344. type: array
  345. type: object
  346. models.EgressInfo:
  347. properties:
  348. egress_gateway_cfg:
  349. $ref: '#/definitions/models.EgressGatewayRequest'
  350. egress_gw_addr:
  351. $ref: '#/definitions/net.IPNet'
  352. egress_gw_addr6:
  353. $ref: '#/definitions/net.IPNet'
  354. egress_id:
  355. type: string
  356. network:
  357. $ref: '#/definitions/net.IPNet'
  358. network6:
  359. $ref: '#/definitions/net.IPNet'
  360. type: object
  361. models.EgressNetworkRoutes:
  362. properties:
  363. egress_gw_addr:
  364. $ref: '#/definitions/net.IPNet'
  365. egress_gw_addr6:
  366. $ref: '#/definitions/net.IPNet'
  367. egress_ranges:
  368. items:
  369. type: string
  370. type: array
  371. node_addr:
  372. $ref: '#/definitions/net.IPNet'
  373. node_addr6:
  374. $ref: '#/definitions/net.IPNet'
  375. type: object
  376. models.EnrollmentKey:
  377. properties:
  378. expiration:
  379. type: string
  380. networks:
  381. items:
  382. type: string
  383. type: array
  384. relay:
  385. type: string
  386. tags:
  387. items:
  388. type: string
  389. type: array
  390. token:
  391. description: B64 value of EnrollmentToken
  392. type: string
  393. type:
  394. $ref: '#/definitions/models.KeyType'
  395. unlimited:
  396. type: boolean
  397. uses_remaining:
  398. type: integer
  399. value:
  400. type: string
  401. type: object
  402. models.ErrorResponse:
  403. properties:
  404. code:
  405. type: integer
  406. message:
  407. type: string
  408. type: object
  409. models.ExtClient:
  410. properties:
  411. address:
  412. type: string
  413. address6:
  414. type: string
  415. allowed_ips:
  416. items:
  417. type: string
  418. type: array
  419. clientid:
  420. type: string
  421. deniednodeacls:
  422. additionalProperties:
  423. type: object
  424. type: object
  425. dns:
  426. type: string
  427. enabled:
  428. type: boolean
  429. extraallowedips:
  430. items:
  431. type: string
  432. type: array
  433. ingressgatewayendpoint:
  434. type: string
  435. ingressgatewayid:
  436. type: string
  437. lastmodified:
  438. type: integer
  439. network:
  440. type: string
  441. ownerid:
  442. type: string
  443. postdown:
  444. type: string
  445. postup:
  446. type: string
  447. privatekey:
  448. type: string
  449. publickey:
  450. type: string
  451. remote_access_client_id:
  452. description: unique ID (MAC address) of RAC machine
  453. type: string
  454. type: object
  455. models.FailOverMeReq:
  456. properties:
  457. node_id:
  458. type: string
  459. type: object
  460. models.FwUpdate:
  461. properties:
  462. egress_info:
  463. additionalProperties:
  464. $ref: '#/definitions/models.EgressInfo'
  465. type: object
  466. is_egress_gw:
  467. type: boolean
  468. type: object
  469. models.Host:
  470. properties:
  471. autoupdate:
  472. type: boolean
  473. daemoninstalled:
  474. type: boolean
  475. debug:
  476. type: boolean
  477. defaultinterface:
  478. type: string
  479. endpointip:
  480. items:
  481. type: integer
  482. type: array
  483. endpointipv6:
  484. items:
  485. type: integer
  486. type: array
  487. firewallinuse:
  488. type: string
  489. hostpass:
  490. type: string
  491. id:
  492. type: string
  493. interface:
  494. type: string
  495. interfaces:
  496. items:
  497. $ref: '#/definitions/models.Iface'
  498. type: array
  499. ipforwarding:
  500. type: boolean
  501. isdefault:
  502. type: boolean
  503. isdocker:
  504. type: boolean
  505. isk8s:
  506. type: boolean
  507. isstatic:
  508. type: boolean
  509. isstaticport:
  510. type: boolean
  511. listenport:
  512. type: integer
  513. macaddress:
  514. items:
  515. type: integer
  516. type: array
  517. mtu:
  518. type: integer
  519. name:
  520. type: string
  521. nat_type:
  522. type: string
  523. nodes:
  524. items:
  525. type: string
  526. type: array
  527. os:
  528. type: string
  529. persistentkeepalive:
  530. $ref: '#/definitions/time.Duration'
  531. publickey:
  532. items:
  533. type: integer
  534. type: array
  535. traffickeypublic:
  536. items:
  537. type: integer
  538. type: array
  539. turn_endpoint:
  540. $ref: '#/definitions/netip.AddrPort'
  541. verbosity:
  542. type: integer
  543. version:
  544. type: string
  545. wg_public_listen_port:
  546. type: integer
  547. type: object
  548. models.HostInfoMap:
  549. additionalProperties:
  550. $ref: '#/definitions/models.HostNetworkInfo'
  551. type: object
  552. models.HostMqAction:
  553. enum:
  554. - UPGRADE
  555. - SIGNAL_HOST
  556. - UPDATE_HOST
  557. - DELETE_HOST
  558. - JOIN_HOST_TO_NETWORK
  559. - ACK
  560. - REQ_ACK
  561. - CHECK_IN
  562. - UPDATE_KEYS
  563. - REQ_PULL
  564. - SIGNAL_PULL
  565. - UPDATE_METRICS
  566. type: string
  567. x-enum-varnames:
  568. - Upgrade
  569. - SignalHost
  570. - UpdateHost
  571. - DeleteHost
  572. - JoinHostToNetwork
  573. - Acknowledgement
  574. - RequestAck
  575. - CheckIn
  576. - UpdateKeys
  577. - RequestPull
  578. - SignalPull
  579. - UpdateMetrics
  580. models.HostNetworkInfo:
  581. properties:
  582. interfaces:
  583. items:
  584. $ref: '#/definitions/models.Iface'
  585. type: array
  586. is_static:
  587. type: boolean
  588. is_static_port:
  589. type: boolean
  590. listen_port:
  591. type: integer
  592. type: object
  593. models.HostPull:
  594. properties:
  595. change_default_gw:
  596. type: boolean
  597. default_gw_ip:
  598. items:
  599. type: integer
  600. type: array
  601. egress_network_routes:
  602. items:
  603. $ref: '#/definitions/models.EgressNetworkRoutes'
  604. type: array
  605. endpoint_detection:
  606. type: boolean
  607. fw_update:
  608. $ref: '#/definitions/models.FwUpdate'
  609. host:
  610. $ref: '#/definitions/models.Host'
  611. host_network_info:
  612. $ref: '#/definitions/models.HostInfoMap'
  613. is_inet_gw:
  614. type: boolean
  615. nodes:
  616. items:
  617. $ref: '#/definitions/models.Node'
  618. type: array
  619. peer_ids:
  620. $ref: '#/definitions/models.PeerMap'
  621. peers:
  622. items:
  623. $ref: '#/definitions/wgtypes.PeerConfig'
  624. type: array
  625. server_config:
  626. $ref: '#/definitions/models.ServerConfig'
  627. type: object
  628. models.HostUpdate:
  629. properties:
  630. action:
  631. $ref: '#/definitions/models.HostMqAction'
  632. host:
  633. $ref: '#/definitions/models.Host'
  634. newMetrics:
  635. $ref: '#/definitions/models.Metrics'
  636. node:
  637. $ref: '#/definitions/models.Node'
  638. signal:
  639. $ref: '#/definitions/models.Signal'
  640. type: object
  641. models.IDandAddr:
  642. properties:
  643. address:
  644. type: string
  645. host_id:
  646. type: string
  647. id:
  648. type: string
  649. is_extclient:
  650. type: boolean
  651. isserver:
  652. type: string
  653. listen_port:
  654. type: integer
  655. name:
  656. type: string
  657. network:
  658. type: string
  659. type: object
  660. models.Iface:
  661. properties:
  662. address:
  663. $ref: '#/definitions/net.IPNet'
  664. addressString:
  665. type: string
  666. name:
  667. type: string
  668. type: object
  669. models.InetNodeReq:
  670. properties:
  671. inet_node_client_ids:
  672. items:
  673. type: string
  674. type: array
  675. type: object
  676. models.IngressGwUsers:
  677. properties:
  678. network:
  679. type: string
  680. node_id:
  681. type: string
  682. users:
  683. items:
  684. $ref: '#/definitions/models.ReturnUser'
  685. type: array
  686. type: object
  687. models.KeyType:
  688. enum:
  689. - 0
  690. - 1
  691. - 2
  692. - 3
  693. type: integer
  694. x-enum-varnames:
  695. - Undefined
  696. - TimeExpiration
  697. - Uses
  698. - Unlimited
  699. models.Metric:
  700. properties:
  701. actualuptime:
  702. $ref: '#/definitions/time.Duration'
  703. connected:
  704. type: boolean
  705. latency:
  706. type: integer
  707. node_name:
  708. type: string
  709. percentup:
  710. type: number
  711. totalreceived:
  712. type: integer
  713. totalsent:
  714. type: integer
  715. totaltime:
  716. type: integer
  717. uptime:
  718. type: integer
  719. type: object
  720. models.Metrics:
  721. properties:
  722. connectivity:
  723. additionalProperties:
  724. $ref: '#/definitions/models.Metric'
  725. type: object
  726. network:
  727. type: string
  728. node_id:
  729. type: string
  730. node_name:
  731. type: string
  732. type: object
  733. models.Network:
  734. properties:
  735. addressrange:
  736. type: string
  737. addressrange6:
  738. type: string
  739. allowmanualsignup:
  740. type: string
  741. defaultacl:
  742. type: string
  743. defaultinterface:
  744. maxLength: 35
  745. minLength: 1
  746. type: string
  747. defaultkeepalive:
  748. maximum: 1000
  749. type: integer
  750. defaultlistenport:
  751. maximum: 65535
  752. minimum: 1024
  753. type: integer
  754. defaultmtu:
  755. type: integer
  756. defaultpostdown:
  757. type: string
  758. defaultudpholepunch:
  759. type: string
  760. isipv4:
  761. type: string
  762. isipv6:
  763. type: string
  764. netid:
  765. maxLength: 32
  766. minLength: 1
  767. type: string
  768. networklastmodified:
  769. type: integer
  770. nodelimit:
  771. type: integer
  772. nodeslastmodified:
  773. type: integer
  774. required:
  775. - netid
  776. type: object
  777. models.Node:
  778. properties:
  779. action:
  780. type: string
  781. additional_rag_ips:
  782. items:
  783. type: number
  784. type: array
  785. address:
  786. $ref: '#/definitions/net.IPNet'
  787. address6:
  788. $ref: '#/definitions/net.IPNet'
  789. connected:
  790. type: boolean
  791. defaultacl:
  792. description: == PRO ==
  793. type: string
  794. dnson:
  795. type: boolean
  796. egressgatewaynatenabled:
  797. type: boolean
  798. egressgatewayranges:
  799. items:
  800. type: string
  801. type: array
  802. egressgatewayrequest:
  803. $ref: '#/definitions/models.EgressGatewayRequest'
  804. expdatetime:
  805. type: string
  806. fail_over_peers:
  807. additionalProperties:
  808. type: object
  809. type: object
  810. failed_over_by:
  811. type: string
  812. hostid:
  813. type: string
  814. id:
  815. type: string
  816. inet_node_req:
  817. $ref: '#/definitions/models.InetNodeReq'
  818. ingressdns:
  819. type: string
  820. ingressgatewayrange:
  821. type: string
  822. ingressgatewayrange6:
  823. type: string
  824. internetgw_node_id:
  825. type: string
  826. is_fail_over:
  827. type: boolean
  828. isegressgateway:
  829. type: boolean
  830. isingressgateway:
  831. type: boolean
  832. isinternetgateway:
  833. type: boolean
  834. isrelay:
  835. type: boolean
  836. isrelayed:
  837. type: boolean
  838. lastcheckin:
  839. type: string
  840. lastmodified:
  841. type: string
  842. lastpeerupdate:
  843. type: string
  844. localaddress:
  845. $ref: '#/definitions/net.IPNet'
  846. metadata:
  847. type: string
  848. network:
  849. type: string
  850. networkrange:
  851. type: integer
  852. networkrange6:
  853. type: number
  854. ownerid:
  855. type: string
  856. pendingdelete:
  857. type: boolean
  858. relayedby:
  859. type: string
  860. relaynodes:
  861. items:
  862. type: string
  863. type: array
  864. server:
  865. type: string
  866. type: object
  867. models.NodeGet:
  868. properties:
  869. host:
  870. $ref: '#/definitions/models.Host'
  871. host_peers:
  872. items:
  873. $ref: '#/definitions/wgtypes.PeerConfig'
  874. type: array
  875. node:
  876. $ref: '#/definitions/models.Node'
  877. peerids:
  878. $ref: '#/definitions/models.PeerMap'
  879. peers:
  880. items:
  881. $ref: '#/definitions/wgtypes.PeerConfig'
  882. type: array
  883. serverconfig:
  884. $ref: '#/definitions/models.ServerConfig'
  885. type: object
  886. models.PeerMap:
  887. additionalProperties:
  888. $ref: '#/definitions/models.IDandAddr'
  889. type: object
  890. models.RegisterResponse:
  891. properties:
  892. requested_host:
  893. $ref: '#/definitions/models.Host'
  894. server_config:
  895. $ref: '#/definitions/models.ServerConfig'
  896. type: object
  897. models.RelayRequest:
  898. properties:
  899. netid:
  900. type: string
  901. nodeid:
  902. type: string
  903. relayaddrs:
  904. items:
  905. type: string
  906. type: array
  907. type: object
  908. models.ReturnUser:
  909. properties:
  910. isadmin:
  911. type: boolean
  912. issuperadmin:
  913. type: boolean
  914. last_login_time:
  915. type: string
  916. remote_gw_ids:
  917. additionalProperties:
  918. type: object
  919. type: object
  920. username:
  921. type: string
  922. type: object
  923. models.ServerConfig:
  924. properties:
  925. Is_EE:
  926. type: boolean
  927. api:
  928. type: string
  929. apiport:
  930. type: string
  931. broker:
  932. type: string
  933. brokerType:
  934. type: string
  935. coreDNSAddr:
  936. type: string
  937. dnsmode:
  938. type: string
  939. metricInterval:
  940. type: string
  941. mqpassword:
  942. type: string
  943. mqport:
  944. type: string
  945. mquserName:
  946. type: string
  947. server:
  948. type: string
  949. trafficKey:
  950. items:
  951. type: integer
  952. type: array
  953. version:
  954. type: string
  955. type: object
  956. models.Signal:
  957. properties:
  958. action:
  959. $ref: '#/definitions/models.SignalAction'
  960. from_host_id:
  961. type: string
  962. from_host_pubkey:
  963. type: string
  964. from_node_id:
  965. type: string
  966. is_pro:
  967. type: boolean
  968. reply:
  969. type: boolean
  970. server:
  971. type: string
  972. timestamp:
  973. type: integer
  974. to_host_id:
  975. type: string
  976. to_host_pubkey:
  977. type: string
  978. to_node_id:
  979. type: string
  980. type: object
  981. models.SignalAction:
  982. enum:
  983. - CONNECTION_NEGOTIATION
  984. - RELAY_ME
  985. type: string
  986. x-enum-varnames:
  987. - ConnNegotiation
  988. - RelayME
  989. models.SuccessResponse:
  990. properties:
  991. code:
  992. type: integer
  993. message:
  994. type: string
  995. response: {}
  996. type: object
  997. models.User:
  998. properties:
  999. isadmin:
  1000. type: boolean
  1001. issuperadmin:
  1002. type: boolean
  1003. last_login_time:
  1004. type: string
  1005. password:
  1006. minLength: 5
  1007. type: string
  1008. remote_gw_ids:
  1009. additionalProperties:
  1010. type: object
  1011. type: object
  1012. username:
  1013. maxLength: 40
  1014. minLength: 3
  1015. type: string
  1016. required:
  1017. - password
  1018. type: object
  1019. models.UserAuthParams:
  1020. properties:
  1021. password:
  1022. type: string
  1023. username:
  1024. type: string
  1025. type: object
  1026. models.UserRemoteGws:
  1027. properties:
  1028. allowed_endpoints:
  1029. items:
  1030. type: string
  1031. type: array
  1032. connected:
  1033. type: boolean
  1034. gw_client:
  1035. $ref: '#/definitions/models.ExtClient'
  1036. gw_listen_port:
  1037. type: integer
  1038. gw_name:
  1039. type: string
  1040. gw_peer_public_key:
  1041. type: string
  1042. is_internet_gateway:
  1043. type: boolean
  1044. metadata:
  1045. type: string
  1046. network:
  1047. type: string
  1048. network_addresses:
  1049. items:
  1050. type: string
  1051. type: array
  1052. remote_access_gw_id:
  1053. type: string
  1054. type: object
  1055. net.IPNet:
  1056. properties:
  1057. ip:
  1058. description: network number
  1059. items:
  1060. type: integer
  1061. type: array
  1062. mask:
  1063. description: network mask
  1064. items:
  1065. type: integer
  1066. type: array
  1067. type: object
  1068. net.UDPAddr:
  1069. properties:
  1070. ip:
  1071. items:
  1072. type: integer
  1073. type: array
  1074. port:
  1075. type: integer
  1076. zone:
  1077. description: IPv6 scoped addressing zone
  1078. type: string
  1079. type: object
  1080. netip.AddrPort:
  1081. type: object
  1082. time.Duration:
  1083. enum:
  1084. - -9223372036854775808
  1085. - 9223372036854775807
  1086. - 1
  1087. - 1000
  1088. - 1000000
  1089. - 1000000000
  1090. - 60000000000
  1091. - 3600000000000
  1092. - -9223372036854775808
  1093. - 9223372036854775807
  1094. - 1
  1095. - 1000
  1096. - 1000000
  1097. - 1000000000
  1098. - 60000000000
  1099. - 3600000000000
  1100. type: integer
  1101. x-enum-varnames:
  1102. - minDuration
  1103. - maxDuration
  1104. - Nanosecond
  1105. - Microsecond
  1106. - Millisecond
  1107. - Second
  1108. - Minute
  1109. - Hour
  1110. - minDuration
  1111. - maxDuration
  1112. - Nanosecond
  1113. - Microsecond
  1114. - Millisecond
  1115. - Second
  1116. - Minute
  1117. - Hour
  1118. wgtypes.PeerConfig:
  1119. properties:
  1120. allowedIPs:
  1121. description: |-
  1122. AllowedIPs specifies a list of allowed IP addresses in CIDR notation
  1123. for this peer.
  1124. items:
  1125. $ref: '#/definitions/net.IPNet'
  1126. type: array
  1127. endpoint:
  1128. allOf:
  1129. - $ref: '#/definitions/net.UDPAddr'
  1130. description: Endpoint specifies the endpoint of this peer entry, if not nil.
  1131. persistentKeepaliveInterval:
  1132. allOf:
  1133. - $ref: '#/definitions/time.Duration'
  1134. description: |-
  1135. PersistentKeepaliveInterval specifies the persistent keepalive interval
  1136. for this peer, if not nil.
  1137. A non-nil value of 0 will clear the persistent keepalive interval.
  1138. presharedKey:
  1139. description: |-
  1140. PresharedKey specifies a peer's preshared key configuration, if not nil.
  1141. A non-nil, zero-value Key will clear the preshared key.
  1142. items:
  1143. type: integer
  1144. type: array
  1145. publicKey:
  1146. description: |-
  1147. PublicKey specifies the public key of this peer. PublicKey is a
  1148. mandatory field for all PeerConfigs.
  1149. items:
  1150. type: integer
  1151. type: array
  1152. remove:
  1153. description: |-
  1154. Remove specifies if the peer with this public key should be removed
  1155. from a device's peer list.
  1156. type: boolean
  1157. replaceAllowedIPs:
  1158. description: |-
  1159. ReplaceAllowedIPs specifies if the allowed IPs specified in this peer
  1160. configuration should replace any existing ones, instead of appending them
  1161. to the allowed IPs list.
  1162. type: boolean
  1163. updateOnly:
  1164. description: |-
  1165. UpdateOnly specifies that an operation will only occur on this peer
  1166. if the peer already exists as part of the interface.
  1167. type: boolean
  1168. type: object
  1169. host: api.demo.netmaker.io
  1170. info:
  1171. contact: {}
  1172. description: NetMaker API Docs
  1173. title: NetMaker
  1174. version: 0.24.3
  1175. paths:
  1176. /api/dns:
  1177. get:
  1178. consumes:
  1179. - application/json
  1180. responses:
  1181. "200":
  1182. description: OK
  1183. schema:
  1184. items:
  1185. $ref: '#/definitions/models.DNSEntry'
  1186. type: array
  1187. "500":
  1188. description: Internal Server Error
  1189. schema:
  1190. $ref: '#/definitions/models.ErrorResponse'
  1191. summary: Get all DNS entries
  1192. tags:
  1193. - DNS
  1194. /api/dns/{network}:
  1195. get:
  1196. consumes:
  1197. - application/json
  1198. parameters:
  1199. - description: Network identifier
  1200. in: path
  1201. name: network
  1202. required: true
  1203. type: string
  1204. responses:
  1205. "200":
  1206. description: OK
  1207. schema:
  1208. items:
  1209. $ref: '#/definitions/models.DNSEntry'
  1210. type: array
  1211. "500":
  1212. description: Internal Server Error
  1213. schema:
  1214. $ref: '#/definitions/models.ErrorResponse'
  1215. summary: Gets node DNS entries associated with a network
  1216. tags:
  1217. - DNS
  1218. /api/dns/{network}/{domain}:
  1219. delete:
  1220. consumes:
  1221. - application/json
  1222. parameters:
  1223. - description: Network identifier
  1224. in: path
  1225. name: network
  1226. required: true
  1227. type: string
  1228. - description: Domain Name
  1229. in: path
  1230. name: domain
  1231. required: true
  1232. type: string
  1233. responses:
  1234. "200":
  1235. description: OK
  1236. schema:
  1237. items:
  1238. $ref: '#/definitions/models.DNSEntry'
  1239. type: array
  1240. "500":
  1241. description: Internal Server Error
  1242. schema:
  1243. $ref: '#/definitions/models.ErrorResponse'
  1244. summary: Delete a DNS entry
  1245. tags:
  1246. - DNS
  1247. /api/dns/adm/{network}:
  1248. get:
  1249. consumes:
  1250. - application/json
  1251. parameters:
  1252. - description: Network identifier
  1253. in: path
  1254. name: network
  1255. required: true
  1256. type: string
  1257. responses:
  1258. "200":
  1259. description: OK
  1260. schema:
  1261. items:
  1262. $ref: '#/definitions/models.DNSEntry'
  1263. type: array
  1264. "500":
  1265. description: Internal Server Error
  1266. schema:
  1267. $ref: '#/definitions/models.ErrorResponse'
  1268. summary: Get all DNS entries associated with the network
  1269. tags:
  1270. - DNS
  1271. post:
  1272. consumes:
  1273. - application/json
  1274. parameters:
  1275. - description: Network identifier
  1276. in: path
  1277. name: network
  1278. required: true
  1279. type: string
  1280. - description: DNS entry details
  1281. in: body
  1282. name: body
  1283. required: true
  1284. schema:
  1285. $ref: '#/definitions/models.DNSEntry'
  1286. responses:
  1287. "200":
  1288. description: OK
  1289. schema:
  1290. $ref: '#/definitions/models.DNSEntry'
  1291. "400":
  1292. description: Bad Request
  1293. schema:
  1294. $ref: '#/definitions/models.ErrorResponse'
  1295. "500":
  1296. description: Internal Server Error
  1297. schema:
  1298. $ref: '#/definitions/models.ErrorResponse'
  1299. summary: Create a new DNS entry
  1300. tags:
  1301. - DNS
  1302. /api/dns/adm/{network}/custom:
  1303. get:
  1304. consumes:
  1305. - application/json
  1306. parameters:
  1307. - description: Network identifier
  1308. in: path
  1309. name: network
  1310. required: true
  1311. type: string
  1312. responses:
  1313. "200":
  1314. description: OK
  1315. schema:
  1316. items:
  1317. $ref: '#/definitions/models.DNSEntry'
  1318. type: array
  1319. "500":
  1320. description: Internal Server Error
  1321. schema:
  1322. $ref: '#/definitions/models.ErrorResponse'
  1323. summary: Gets custom DNS entries associated with a network
  1324. tags:
  1325. - DNS
  1326. /api/dns/adm/pushdns:
  1327. post:
  1328. consumes:
  1329. - application/json
  1330. responses:
  1331. "200":
  1332. description: DNS Pushed to CoreDNS
  1333. schema:
  1334. type: string
  1335. "400":
  1336. description: Bad Request
  1337. schema:
  1338. $ref: '#/definitions/models.ErrorResponse'
  1339. "500":
  1340. description: Internal Server Error
  1341. schema:
  1342. $ref: '#/definitions/models.ErrorResponse'
  1343. summary: Push DNS entries to nameserver
  1344. tags:
  1345. - DNS
  1346. /api/emqx/hosts:
  1347. delete:
  1348. responses:
  1349. "200":
  1350. description: deleted hosts data on emqx
  1351. schema:
  1352. type: string
  1353. "500":
  1354. description: Internal Server Error
  1355. schema:
  1356. $ref: '#/definitions/models.ErrorResponse'
  1357. security:
  1358. - oauth: []
  1359. summary: Deletes all EMQX hosts
  1360. tags:
  1361. - Hosts
  1362. /api/extclients:
  1363. get:
  1364. responses:
  1365. "200":
  1366. description: OK
  1367. schema:
  1368. $ref: '#/definitions/models.ExtClient'
  1369. "500":
  1370. description: Internal Server Error
  1371. schema:
  1372. $ref: '#/definitions/models.ErrorResponse'
  1373. security:
  1374. - oauth2: []
  1375. summary: Fetches All Remote Access Clients across all networks
  1376. tags:
  1377. - Remote Access Client
  1378. /api/extclients/{network}:
  1379. get:
  1380. responses:
  1381. "200":
  1382. description: OK
  1383. schema:
  1384. $ref: '#/definitions/models.ExtClient'
  1385. "500":
  1386. description: Internal Server Error
  1387. schema:
  1388. $ref: '#/definitions/models.ErrorResponse'
  1389. security:
  1390. - oauth2: []
  1391. summary: Get all remote access client associated with network
  1392. tags:
  1393. - Remote Access Client
  1394. /api/extclients/{network}/{clientid}:
  1395. delete:
  1396. responses:
  1397. "200":
  1398. description: OK
  1399. "403":
  1400. description: Forbidden
  1401. schema:
  1402. $ref: '#/definitions/models.ErrorResponse'
  1403. "500":
  1404. description: Internal Server Error
  1405. schema:
  1406. $ref: '#/definitions/models.ErrorResponse'
  1407. security:
  1408. - oauth2: []
  1409. summary: Delete an individual remote access client
  1410. tags:
  1411. - Remote Access Client
  1412. get:
  1413. responses:
  1414. "200":
  1415. description: OK
  1416. schema:
  1417. $ref: '#/definitions/models.ExtClient'
  1418. "403":
  1419. description: Forbidden
  1420. schema:
  1421. $ref: '#/definitions/models.ErrorResponse'
  1422. "500":
  1423. description: Internal Server Error
  1424. schema:
  1425. $ref: '#/definitions/models.ErrorResponse'
  1426. security:
  1427. - oauth2: []
  1428. summary: Get an individual remote access client
  1429. tags:
  1430. - Remote Access Client
  1431. put:
  1432. responses:
  1433. "200":
  1434. description: OK
  1435. schema:
  1436. $ref: '#/definitions/models.ExtClient'
  1437. "400":
  1438. description: Bad Request
  1439. schema:
  1440. $ref: '#/definitions/models.ErrorResponse'
  1441. "403":
  1442. description: Forbidden
  1443. schema:
  1444. $ref: '#/definitions/models.ErrorResponse'
  1445. "500":
  1446. description: Internal Server Error
  1447. schema:
  1448. $ref: '#/definitions/models.ErrorResponse'
  1449. security:
  1450. - oauth2: []
  1451. summary: Update an individual remote access client
  1452. tags:
  1453. - Remote Access Client
  1454. /api/extclients/{network}/{clientid}/{type}:
  1455. get:
  1456. responses:
  1457. "200":
  1458. description: OK
  1459. schema:
  1460. $ref: '#/definitions/models.ExtClient'
  1461. "403":
  1462. description: Forbidden
  1463. schema:
  1464. $ref: '#/definitions/models.ErrorResponse'
  1465. "500":
  1466. description: Internal Server Error
  1467. schema:
  1468. $ref: '#/definitions/models.ErrorResponse'
  1469. security:
  1470. - oauth2: []
  1471. summary: Get an individual remote access client
  1472. tags:
  1473. - Remote Access Client
  1474. /api/extclients/{network}/{nodeid}:
  1475. post:
  1476. responses:
  1477. "200":
  1478. description: OK
  1479. schema:
  1480. type: string
  1481. "400":
  1482. description: Bad Request
  1483. schema:
  1484. $ref: '#/definitions/models.ErrorResponse'
  1485. "403":
  1486. description: Forbidden
  1487. schema:
  1488. $ref: '#/definitions/models.ErrorResponse'
  1489. "500":
  1490. description: Internal Server Error
  1491. schema:
  1492. $ref: '#/definitions/models.ErrorResponse'
  1493. security:
  1494. - oauth2: []
  1495. summary: Create an individual remote access client
  1496. tags:
  1497. - Remote Access Client
  1498. /api/getip:
  1499. get:
  1500. responses:
  1501. "200":
  1502. description: The public IP address.
  1503. schema:
  1504. type: string
  1505. "400":
  1506. description: Invalid IP address or no IP found.
  1507. schema:
  1508. type: string
  1509. security:
  1510. - oauth2: []
  1511. summary: Get the current public IP address.
  1512. tags:
  1513. - IP Service
  1514. /api/hosts:
  1515. get:
  1516. responses:
  1517. "200":
  1518. description: OK
  1519. schema:
  1520. items:
  1521. $ref: '#/definitions/models.ApiHost'
  1522. type: array
  1523. "500":
  1524. description: Internal Server Error
  1525. schema:
  1526. $ref: '#/definitions/models.ErrorResponse'
  1527. security:
  1528. - oauth: []
  1529. summary: List all hosts
  1530. tags:
  1531. - Hosts
  1532. /api/hosts/{hostid}:
  1533. delete:
  1534. parameters:
  1535. - description: Host ID
  1536. in: path
  1537. name: hostid
  1538. required: true
  1539. type: string
  1540. - description: Force delete
  1541. in: query
  1542. name: force
  1543. type: boolean
  1544. responses:
  1545. "200":
  1546. description: OK
  1547. schema:
  1548. $ref: '#/definitions/models.ApiHost'
  1549. "500":
  1550. description: Internal Server Error
  1551. schema:
  1552. $ref: '#/definitions/models.ErrorResponse'
  1553. security:
  1554. - oauth: []
  1555. summary: Deletes a Netclient host from Netmaker server
  1556. tags:
  1557. - Hosts
  1558. put:
  1559. parameters:
  1560. - description: Host ID
  1561. in: path
  1562. name: hostid
  1563. required: true
  1564. type: string
  1565. - description: New host data
  1566. in: body
  1567. name: body
  1568. required: true
  1569. schema:
  1570. $ref: '#/definitions/models.ApiHost'
  1571. responses:
  1572. "200":
  1573. description: OK
  1574. schema:
  1575. $ref: '#/definitions/models.ApiHost'
  1576. "500":
  1577. description: Internal Server Error
  1578. schema:
  1579. $ref: '#/definitions/models.ErrorResponse'
  1580. security:
  1581. - oauth: []
  1582. summary: Updates a Netclient host on Netmaker server
  1583. tags:
  1584. - Hosts
  1585. /api/hosts/{hostid}/keys:
  1586. put:
  1587. parameters:
  1588. - description: Host ID
  1589. in: path
  1590. name: hostid
  1591. required: true
  1592. type: string
  1593. responses:
  1594. "200":
  1595. description: OK
  1596. schema:
  1597. type: string
  1598. "400":
  1599. description: Bad Request
  1600. schema:
  1601. $ref: '#/definitions/models.ErrorResponse'
  1602. security:
  1603. - oauth: []
  1604. summary: Update keys for a host
  1605. tags:
  1606. - Hosts
  1607. /api/hosts/{hostid}/networks/{network}:
  1608. delete:
  1609. parameters:
  1610. - description: Host ID
  1611. in: path
  1612. name: hostid
  1613. required: true
  1614. type: string
  1615. - description: Network name
  1616. in: path
  1617. name: network
  1618. required: true
  1619. type: string
  1620. - description: Force delete
  1621. in: query
  1622. name: force
  1623. type: boolean
  1624. responses:
  1625. "200":
  1626. description: OK
  1627. schema:
  1628. type: string
  1629. "500":
  1630. description: Internal Server Error
  1631. schema:
  1632. $ref: '#/definitions/models.ErrorResponse'
  1633. security:
  1634. - oauth: []
  1635. summary: To Remove Host from Network
  1636. tags:
  1637. - Hosts
  1638. post:
  1639. parameters:
  1640. - description: Host ID
  1641. in: path
  1642. name: hostid
  1643. required: true
  1644. type: string
  1645. - description: Network name
  1646. in: path
  1647. name: network
  1648. required: true
  1649. type: string
  1650. responses:
  1651. "200":
  1652. description: OK
  1653. schema:
  1654. type: string
  1655. "500":
  1656. description: Internal Server Error
  1657. schema:
  1658. $ref: '#/definitions/models.ErrorResponse'
  1659. security:
  1660. - oauth: []
  1661. summary: To Add Host To Network
  1662. tags:
  1663. - Hosts
  1664. /api/hosts/{hostid}/sync:
  1665. post:
  1666. parameters:
  1667. - description: Host ID
  1668. in: path
  1669. name: hostid
  1670. required: true
  1671. type: string
  1672. responses:
  1673. "200":
  1674. description: OK
  1675. schema:
  1676. type: string
  1677. "400":
  1678. description: Bad Request
  1679. schema:
  1680. $ref: '#/definitions/models.ErrorResponse'
  1681. security:
  1682. - oauth: []
  1683. summary: Requests a host to pull
  1684. tags:
  1685. - Hosts
  1686. /api/hosts/{hostid}/upgrade:
  1687. put:
  1688. parameters:
  1689. - description: Host ID
  1690. in: path
  1691. name: hostid
  1692. required: true
  1693. type: string
  1694. responses:
  1695. "200":
  1696. description: passed message to upgrade host
  1697. schema:
  1698. type: string
  1699. "500":
  1700. description: Internal Server Error
  1701. schema:
  1702. $ref: '#/definitions/models.ErrorResponse'
  1703. security:
  1704. - oauth: []
  1705. summary: Upgrade a host
  1706. tags:
  1707. - Hosts
  1708. /api/hosts/adm/authenticate:
  1709. post:
  1710. consumes:
  1711. - application/json
  1712. parameters:
  1713. - description: Authentication parameters
  1714. in: body
  1715. name: body
  1716. required: true
  1717. schema:
  1718. $ref: '#/definitions/models.AuthParams'
  1719. responses:
  1720. "200":
  1721. description: OK
  1722. schema:
  1723. $ref: '#/definitions/models.SuccessResponse'
  1724. "400":
  1725. description: Bad Request
  1726. schema:
  1727. $ref: '#/definitions/models.ErrorResponse'
  1728. "401":
  1729. description: Unauthorized
  1730. schema:
  1731. $ref: '#/definitions/models.ErrorResponse'
  1732. "500":
  1733. description: Internal Server Error
  1734. schema:
  1735. $ref: '#/definitions/models.ErrorResponse'
  1736. summary: To Fetch Auth Token for a Host
  1737. tags:
  1738. - Auth
  1739. /api/hosts/keys:
  1740. put:
  1741. responses:
  1742. "200":
  1743. description: OK
  1744. schema:
  1745. type: string
  1746. "400":
  1747. description: Bad Request
  1748. schema:
  1749. $ref: '#/definitions/models.ErrorResponse'
  1750. security:
  1751. - oauth: []
  1752. summary: Update keys for all hosts
  1753. tags:
  1754. - Hosts
  1755. /api/networks:
  1756. get:
  1757. produces:
  1758. - application/json
  1759. responses:
  1760. "200":
  1761. description: OK
  1762. schema:
  1763. $ref: '#/definitions/models.Network'
  1764. "500":
  1765. description: Internal Server Error
  1766. schema:
  1767. $ref: '#/definitions/models.ErrorResponse'
  1768. security:
  1769. - oauth: []
  1770. summary: Lists all networks
  1771. tags:
  1772. - Networks
  1773. post:
  1774. parameters:
  1775. - description: Network details
  1776. in: body
  1777. name: body
  1778. required: true
  1779. schema:
  1780. $ref: '#/definitions/models.Network'
  1781. produces:
  1782. - application/json
  1783. responses:
  1784. "200":
  1785. description: OK
  1786. schema:
  1787. $ref: '#/definitions/models.Network'
  1788. "400":
  1789. description: Bad Request
  1790. schema:
  1791. $ref: '#/definitions/models.ErrorResponse'
  1792. security:
  1793. - oauth: []
  1794. summary: Create a network
  1795. tags:
  1796. - Networks
  1797. /api/networks/{networkname}:
  1798. delete:
  1799. parameters:
  1800. - description: Network name
  1801. in: path
  1802. name: networkname
  1803. required: true
  1804. type: string
  1805. produces:
  1806. - application/json
  1807. responses:
  1808. "200":
  1809. description: OK
  1810. schema:
  1811. $ref: '#/definitions/models.SuccessResponse'
  1812. "400":
  1813. description: Bad Request
  1814. schema:
  1815. $ref: '#/definitions/models.ErrorResponse'
  1816. "403":
  1817. description: Forbidden
  1818. schema:
  1819. $ref: '#/definitions/models.ErrorResponse'
  1820. security:
  1821. - oauth: []
  1822. summary: Delete a network
  1823. tags:
  1824. - Networks
  1825. get:
  1826. parameters:
  1827. - description: Network name
  1828. in: path
  1829. name: networkname
  1830. required: true
  1831. type: string
  1832. produces:
  1833. - application/json
  1834. responses:
  1835. "200":
  1836. description: OK
  1837. schema:
  1838. $ref: '#/definitions/models.Network'
  1839. "500":
  1840. description: Internal Server Error
  1841. schema:
  1842. $ref: '#/definitions/models.ErrorResponse'
  1843. security:
  1844. - oauth: []
  1845. summary: Get a network
  1846. tags:
  1847. - Networks
  1848. put:
  1849. parameters:
  1850. - description: Network name
  1851. in: path
  1852. name: networkname
  1853. required: true
  1854. type: string
  1855. - description: Network details
  1856. in: body
  1857. name: body
  1858. required: true
  1859. schema:
  1860. $ref: '#/definitions/models.Network'
  1861. produces:
  1862. - application/json
  1863. responses:
  1864. "200":
  1865. description: OK
  1866. schema:
  1867. $ref: '#/definitions/models.Network'
  1868. "400":
  1869. description: Bad Request
  1870. schema:
  1871. $ref: '#/definitions/models.ErrorResponse'
  1872. security:
  1873. - oauth: []
  1874. summary: Update network settings
  1875. tags:
  1876. - Networks
  1877. /api/networks/{networkname}/acls:
  1878. get:
  1879. parameters:
  1880. - description: Network name
  1881. in: path
  1882. name: networkname
  1883. required: true
  1884. type: string
  1885. produces:
  1886. - application/json
  1887. responses:
  1888. "200":
  1889. description: OK
  1890. schema:
  1891. $ref: '#/definitions/acls.ACLContainer'
  1892. "500":
  1893. description: Internal Server Error
  1894. schema:
  1895. $ref: '#/definitions/models.ErrorResponse'
  1896. security:
  1897. - oauth: []
  1898. summary: Get a network ACL (Access Control List)
  1899. tags:
  1900. - Networks
  1901. put:
  1902. parameters:
  1903. - description: Network name
  1904. in: path
  1905. name: networkname
  1906. required: true
  1907. type: string
  1908. - description: ACL container
  1909. in: body
  1910. name: body
  1911. required: true
  1912. schema:
  1913. $ref: '#/definitions/acls.ACLContainer'
  1914. produces:
  1915. - application/json
  1916. responses:
  1917. "200":
  1918. description: OK
  1919. schema:
  1920. $ref: '#/definitions/acls.ACLContainer'
  1921. "400":
  1922. description: Bad Request
  1923. schema:
  1924. $ref: '#/definitions/models.ErrorResponse'
  1925. "500":
  1926. description: Internal Server Error
  1927. schema:
  1928. $ref: '#/definitions/models.ErrorResponse'
  1929. security:
  1930. - oauth: []
  1931. summary: Update a network ACL (Access Control List)
  1932. tags:
  1933. - Networks
  1934. /api/networks/{networkname}/acls/v2:
  1935. put:
  1936. parameters:
  1937. - description: Network name
  1938. in: path
  1939. name: networkname
  1940. required: true
  1941. type: string
  1942. - description: ACL container
  1943. in: body
  1944. name: body
  1945. required: true
  1946. schema:
  1947. $ref: '#/definitions/acls.ACLContainer'
  1948. produces:
  1949. - application/json
  1950. responses:
  1951. "200":
  1952. description: OK
  1953. schema:
  1954. $ref: '#/definitions/acls.ACLContainer'
  1955. "400":
  1956. description: Bad Request
  1957. schema:
  1958. $ref: '#/definitions/models.ErrorResponse'
  1959. "500":
  1960. description: Internal Server Error
  1961. schema:
  1962. $ref: '#/definitions/models.ErrorResponse'
  1963. security:
  1964. - oauth: []
  1965. summary: Update a network ACL (Access Control List)
  1966. tags:
  1967. - Networks
  1968. /api/nodes:
  1969. get:
  1970. responses:
  1971. "200":
  1972. description: OK
  1973. schema:
  1974. items:
  1975. $ref: '#/definitions/models.ApiNode'
  1976. type: array
  1977. "500":
  1978. description: Internal Server Error
  1979. schema:
  1980. $ref: '#/definitions/models.ErrorResponse'
  1981. summary: Get all nodes across all networks
  1982. tags:
  1983. - Nodes
  1984. /api/nodes/{network}/{nodeid}:
  1985. delete:
  1986. responses:
  1987. "200":
  1988. description: Node deleted.
  1989. schema:
  1990. type: string
  1991. "500":
  1992. description: Internal Server Error
  1993. schema:
  1994. $ref: '#/definitions/models.ErrorResponse'
  1995. security:
  1996. - oauth2: []
  1997. summary: Delete an individual node
  1998. tags:
  1999. - Nodes
  2000. get:
  2001. responses:
  2002. "200":
  2003. description: OK
  2004. schema:
  2005. $ref: '#/definitions/models.NodeGet'
  2006. "500":
  2007. description: Internal Server Error
  2008. schema:
  2009. $ref: '#/definitions/models.ErrorResponse'
  2010. security:
  2011. - oauth2: []
  2012. summary: Get an individual node
  2013. tags:
  2014. - Nodes
  2015. put:
  2016. responses:
  2017. "200":
  2018. description: OK
  2019. schema:
  2020. $ref: '#/definitions/models.ApiNode'
  2021. "500":
  2022. description: Internal Server Error
  2023. schema:
  2024. $ref: '#/definitions/models.ErrorResponse'
  2025. security:
  2026. - oauth2: []
  2027. summary: Update an individual node
  2028. tags:
  2029. - Nodes
  2030. /api/nodes/{network}/{nodeid}/creategateway:
  2031. post:
  2032. responses:
  2033. "200":
  2034. description: OK
  2035. schema:
  2036. $ref: '#/definitions/models.ApiNode'
  2037. "500":
  2038. description: Internal Server Error
  2039. schema:
  2040. $ref: '#/definitions/models.ErrorResponse'
  2041. security:
  2042. - oauth2: []
  2043. summary: Create an egress gateway
  2044. tags:
  2045. - Nodes
  2046. /api/nodes/{network}/{nodeid}/createingress:
  2047. post:
  2048. responses:
  2049. "200":
  2050. description: OK
  2051. schema:
  2052. $ref: '#/definitions/models.ApiNode'
  2053. "500":
  2054. description: Internal Server Error
  2055. schema:
  2056. $ref: '#/definitions/models.ErrorResponse'
  2057. security:
  2058. - oauth2: []
  2059. summary: Create an remote access gateway
  2060. tags:
  2061. - Nodes
  2062. /api/nodes/{network}/{nodeid}/createrelay:
  2063. post:
  2064. consumes:
  2065. - application/json
  2066. parameters:
  2067. - description: Network ID
  2068. in: path
  2069. name: network
  2070. required: true
  2071. type: string
  2072. - description: Node ID
  2073. in: path
  2074. name: nodeid
  2075. required: true
  2076. type: string
  2077. - description: Relay request parameters
  2078. in: body
  2079. name: body
  2080. required: true
  2081. schema:
  2082. $ref: '#/definitions/models.RelayRequest'
  2083. produces:
  2084. - application/json
  2085. responses:
  2086. "200":
  2087. description: OK
  2088. schema:
  2089. $ref: '#/definitions/models.ApiNode'
  2090. "400":
  2091. description: Bad Request
  2092. schema:
  2093. $ref: '#/definitions/models.ErrorResponse'
  2094. "500":
  2095. description: Internal Server Error
  2096. schema:
  2097. $ref: '#/definitions/models.ErrorResponse'
  2098. summary: Create a relay
  2099. tags:
  2100. - PRO
  2101. /api/nodes/{network}/{nodeid}/deletegateway:
  2102. delete:
  2103. responses:
  2104. "200":
  2105. description: OK
  2106. schema:
  2107. $ref: '#/definitions/models.ApiNode'
  2108. "500":
  2109. description: Internal Server Error
  2110. schema:
  2111. $ref: '#/definitions/models.ErrorResponse'
  2112. security:
  2113. - oauth2: []
  2114. summary: Delete an egress gateway
  2115. tags:
  2116. - Nodes
  2117. /api/nodes/{network}/{nodeid}/deleteingress:
  2118. delete:
  2119. responses:
  2120. "200":
  2121. description: OK
  2122. schema:
  2123. $ref: '#/definitions/models.ApiNode'
  2124. "500":
  2125. description: Internal Server Error
  2126. schema:
  2127. $ref: '#/definitions/models.ErrorResponse'
  2128. security:
  2129. - oauth2: []
  2130. summary: Delete an remote access gateway
  2131. tags:
  2132. - Nodes
  2133. /api/nodes/{network}/{nodeid}/deleterelay:
  2134. delete:
  2135. consumes:
  2136. - application/json
  2137. parameters:
  2138. - description: Network ID
  2139. in: path
  2140. name: network
  2141. required: true
  2142. type: string
  2143. - description: Node ID
  2144. in: path
  2145. name: nodeid
  2146. required: true
  2147. type: string
  2148. produces:
  2149. - application/json
  2150. responses:
  2151. "200":
  2152. description: OK
  2153. schema:
  2154. $ref: '#/definitions/models.ApiNode'
  2155. "400":
  2156. description: Bad Request
  2157. schema:
  2158. $ref: '#/definitions/models.ErrorResponse'
  2159. "500":
  2160. description: Internal Server Error
  2161. schema:
  2162. $ref: '#/definitions/models.ErrorResponse'
  2163. summary: Remove a relay
  2164. tags:
  2165. - PRO
  2166. /api/nodes/{network}/{nodeid}/inet_gw:
  2167. delete:
  2168. parameters:
  2169. - description: Network ID
  2170. in: path
  2171. name: network
  2172. required: true
  2173. type: string
  2174. - description: Node ID
  2175. in: path
  2176. name: nodeid
  2177. required: true
  2178. type: string
  2179. responses:
  2180. "200":
  2181. description: OK
  2182. schema:
  2183. $ref: '#/definitions/models.Node'
  2184. "400":
  2185. description: Bad Request
  2186. schema:
  2187. $ref: '#/definitions/models.ErrorResponse'
  2188. "500":
  2189. description: Internal Server Error
  2190. schema:
  2191. $ref: '#/definitions/models.ErrorResponse'
  2192. summary: Delete an internet gateway
  2193. tags:
  2194. - PRO
  2195. post:
  2196. consumes:
  2197. - application/json
  2198. parameters:
  2199. - description: Network ID
  2200. in: path
  2201. name: network
  2202. required: true
  2203. type: string
  2204. - description: Node ID
  2205. in: path
  2206. name: nodeid
  2207. required: true
  2208. type: string
  2209. - description: Internet gateway request
  2210. in: body
  2211. name: body
  2212. required: true
  2213. schema:
  2214. $ref: '#/definitions/models.InetNodeReq'
  2215. responses:
  2216. "200":
  2217. description: OK
  2218. schema:
  2219. $ref: '#/definitions/models.Node'
  2220. "400":
  2221. description: Bad Request
  2222. schema:
  2223. $ref: '#/definitions/models.ErrorResponse'
  2224. "500":
  2225. description: Internal Server Error
  2226. schema:
  2227. $ref: '#/definitions/models.ErrorResponse'
  2228. summary: Create an internet gateway
  2229. tags:
  2230. - PRO
  2231. put:
  2232. consumes:
  2233. - application/json
  2234. parameters:
  2235. - description: Network ID
  2236. in: path
  2237. name: network
  2238. required: true
  2239. type: string
  2240. - description: Node ID
  2241. in: path
  2242. name: nodeid
  2243. required: true
  2244. type: string
  2245. - description: Internet gateway request
  2246. in: body
  2247. name: body
  2248. required: true
  2249. schema:
  2250. $ref: '#/definitions/models.InetNodeReq'
  2251. responses:
  2252. "200":
  2253. description: OK
  2254. schema:
  2255. $ref: '#/definitions/models.Node'
  2256. "400":
  2257. description: Bad Request
  2258. schema:
  2259. $ref: '#/definitions/models.ErrorResponse'
  2260. "500":
  2261. description: Internal Server Error
  2262. schema:
  2263. $ref: '#/definitions/models.ErrorResponse'
  2264. summary: Update an internet gateway
  2265. tags:
  2266. - PRO
  2267. /api/nodes/{network}/{nodeid}/ingress/users:
  2268. get:
  2269. consumes:
  2270. - application/json
  2271. parameters:
  2272. - description: Ingress Gateway ID
  2273. in: path
  2274. name: ingress_id
  2275. required: true
  2276. type: string
  2277. produces:
  2278. - application/json
  2279. responses:
  2280. "200":
  2281. description: OK
  2282. schema:
  2283. items:
  2284. $ref: '#/definitions/models.IngressGwUsers'
  2285. type: array
  2286. "400":
  2287. description: Bad Request
  2288. schema:
  2289. $ref: '#/definitions/models.ErrorResponse'
  2290. "500":
  2291. description: Internal Server Error
  2292. schema:
  2293. $ref: '#/definitions/models.ErrorResponse'
  2294. summary: List users attached to an ingress gateway
  2295. tags:
  2296. - PRO
  2297. /api/nodes/adm/{network}:
  2298. get:
  2299. responses:
  2300. "200":
  2301. description: OK
  2302. schema:
  2303. items:
  2304. $ref: '#/definitions/models.Node'
  2305. type: array
  2306. "500":
  2307. description: Internal Server Error
  2308. schema:
  2309. $ref: '#/definitions/models.ErrorResponse'
  2310. summary: Gets all nodes associated with network including pending nodes
  2311. tags:
  2312. - Nodes
  2313. /api/server/getconfig:
  2314. get:
  2315. responses:
  2316. "200":
  2317. description: OK
  2318. schema:
  2319. $ref: '#/definitions/config.ServerConfig'
  2320. security:
  2321. - oauth2: []
  2322. summary: Get the server configuration
  2323. tags:
  2324. - Server
  2325. /api/server/getserverinfo:
  2326. get:
  2327. responses:
  2328. "200":
  2329. description: OK
  2330. schema:
  2331. $ref: '#/definitions/models.ServerConfig'
  2332. security:
  2333. - oauth2: []
  2334. summary: Get the server information
  2335. tags:
  2336. - Server
  2337. /api/server/status:
  2338. get:
  2339. responses: {}
  2340. security:
  2341. - oauth2: []
  2342. summary: Get the server status
  2343. tags:
  2344. - Server
  2345. /api/users:
  2346. get:
  2347. responses:
  2348. "200":
  2349. description: OK
  2350. schema:
  2351. items:
  2352. $ref: '#/definitions/models.User'
  2353. type: array
  2354. "500":
  2355. description: Internal Server Error
  2356. schema:
  2357. $ref: '#/definitions/models.ErrorResponse'
  2358. summary: Get all users
  2359. tags:
  2360. - Users
  2361. /api/users/{username}:
  2362. delete:
  2363. parameters:
  2364. - description: Username of the user to delete
  2365. in: path
  2366. name: username
  2367. required: true
  2368. type: string
  2369. responses:
  2370. "200":
  2371. description: OK
  2372. schema:
  2373. type: string
  2374. "500":
  2375. description: Internal Server Error
  2376. schema:
  2377. $ref: '#/definitions/models.ErrorResponse'
  2378. summary: Delete a user
  2379. tags:
  2380. - Users
  2381. get:
  2382. parameters:
  2383. - description: Username of the user to fetch
  2384. in: path
  2385. name: username
  2386. required: true
  2387. type: string
  2388. responses:
  2389. "200":
  2390. description: OK
  2391. schema:
  2392. $ref: '#/definitions/models.User'
  2393. "500":
  2394. description: Internal Server Error
  2395. schema:
  2396. $ref: '#/definitions/models.ErrorResponse'
  2397. summary: Get an individual user
  2398. tags:
  2399. - Users
  2400. post:
  2401. parameters:
  2402. - description: Username of the user to create
  2403. in: path
  2404. name: username
  2405. required: true
  2406. type: string
  2407. - description: User details
  2408. in: body
  2409. name: body
  2410. required: true
  2411. schema:
  2412. $ref: '#/definitions/models.User'
  2413. responses:
  2414. "200":
  2415. description: OK
  2416. schema:
  2417. $ref: '#/definitions/models.User'
  2418. "400":
  2419. description: Bad Request
  2420. schema:
  2421. $ref: '#/definitions/models.ErrorResponse'
  2422. "403":
  2423. description: Forbidden
  2424. schema:
  2425. $ref: '#/definitions/models.ErrorResponse'
  2426. "500":
  2427. description: Internal Server Error
  2428. schema:
  2429. $ref: '#/definitions/models.ErrorResponse'
  2430. summary: Create a user
  2431. tags:
  2432. - Users
  2433. put:
  2434. parameters:
  2435. - description: Username of the user to update
  2436. in: path
  2437. name: username
  2438. required: true
  2439. type: string
  2440. - description: User details
  2441. in: body
  2442. name: body
  2443. required: true
  2444. schema:
  2445. $ref: '#/definitions/models.User'
  2446. responses:
  2447. "200":
  2448. description: OK
  2449. schema:
  2450. $ref: '#/definitions/models.User'
  2451. "400":
  2452. description: Bad Request
  2453. schema:
  2454. $ref: '#/definitions/models.ErrorResponse'
  2455. "403":
  2456. description: Forbidden
  2457. schema:
  2458. $ref: '#/definitions/models.ErrorResponse'
  2459. "500":
  2460. description: Internal Server Error
  2461. schema:
  2462. $ref: '#/definitions/models.ErrorResponse'
  2463. summary: Update a user
  2464. tags:
  2465. - Users
  2466. /api/users/{username}/remote_access_gw:
  2467. get:
  2468. consumes:
  2469. - application/json
  2470. parameters:
  2471. - description: Username
  2472. in: path
  2473. name: username
  2474. required: true
  2475. type: string
  2476. - description: Remote Access Client ID
  2477. in: query
  2478. name: remote_access_clientid
  2479. type: string
  2480. - description: Request from mobile
  2481. in: query
  2482. name: from_mobile
  2483. type: boolean
  2484. produces:
  2485. - application/json
  2486. responses:
  2487. "200":
  2488. description: OK
  2489. schema:
  2490. items:
  2491. $ref: '#/definitions/models.UserRemoteGws'
  2492. type: array
  2493. "400":
  2494. description: Bad Request
  2495. schema:
  2496. $ref: '#/definitions/models.ErrorResponse'
  2497. "500":
  2498. description: Internal Server Error
  2499. schema:
  2500. $ref: '#/definitions/models.ErrorResponse'
  2501. summary: Get user's remote access gateways
  2502. tags:
  2503. - PRO
  2504. /api/users/{username}/remote_access_gw/{remote_access_gateway_id}:
  2505. delete:
  2506. consumes:
  2507. - application/json
  2508. parameters:
  2509. - description: Username
  2510. in: path
  2511. name: username
  2512. required: true
  2513. type: string
  2514. - description: Remote Access Gateway ID
  2515. in: path
  2516. name: remote_access_gateway_id
  2517. required: true
  2518. type: string
  2519. produces:
  2520. - application/json
  2521. responses:
  2522. "200":
  2523. description: OK
  2524. schema:
  2525. $ref: '#/definitions/models.ReturnUser'
  2526. "400":
  2527. description: Bad Request
  2528. schema:
  2529. $ref: '#/definitions/models.ErrorResponse'
  2530. "500":
  2531. description: Internal Server Error
  2532. schema:
  2533. $ref: '#/definitions/models.ErrorResponse'
  2534. summary: Remove user from a remote access gateway
  2535. tags:
  2536. - PRO
  2537. post:
  2538. consumes:
  2539. - application/json
  2540. parameters:
  2541. - description: Username
  2542. in: path
  2543. name: username
  2544. required: true
  2545. type: string
  2546. - description: Remote Access Gateway ID
  2547. in: path
  2548. name: remote_access_gateway_id
  2549. required: true
  2550. type: string
  2551. produces:
  2552. - application/json
  2553. responses:
  2554. "200":
  2555. description: OK
  2556. schema:
  2557. $ref: '#/definitions/models.ReturnUser'
  2558. "400":
  2559. description: Bad Request
  2560. schema:
  2561. $ref: '#/definitions/models.ErrorResponse'
  2562. "500":
  2563. description: Internal Server Error
  2564. schema:
  2565. $ref: '#/definitions/models.ErrorResponse'
  2566. summary: Attach user to a remote access gateway
  2567. tags:
  2568. - PRO
  2569. /api/users/adm/authenticate:
  2570. post:
  2571. consumes:
  2572. - application/json
  2573. parameters:
  2574. - description: Authentication parameters
  2575. in: body
  2576. name: body
  2577. required: true
  2578. schema:
  2579. $ref: '#/definitions/models.UserAuthParams'
  2580. responses:
  2581. "200":
  2582. description: OK
  2583. schema:
  2584. $ref: '#/definitions/models.SuccessResponse'
  2585. "400":
  2586. description: Bad Request
  2587. schema:
  2588. $ref: '#/definitions/models.ErrorResponse'
  2589. "401":
  2590. description: Unauthorized
  2591. schema:
  2592. $ref: '#/definitions/models.ErrorResponse'
  2593. "500":
  2594. description: Internal Server Error
  2595. schema:
  2596. $ref: '#/definitions/models.ErrorResponse'
  2597. summary: Authenticate a user to retrieve an authorization token
  2598. tags:
  2599. - Auth
  2600. /api/users/adm/createsuperadmin:
  2601. post:
  2602. parameters:
  2603. - description: User details
  2604. in: body
  2605. name: body
  2606. required: true
  2607. schema:
  2608. $ref: '#/definitions/models.User'
  2609. responses:
  2610. "200":
  2611. description: OK
  2612. schema:
  2613. $ref: '#/definitions/models.User'
  2614. "400":
  2615. description: Bad Request
  2616. schema:
  2617. $ref: '#/definitions/models.ErrorResponse'
  2618. "500":
  2619. description: Internal Server Error
  2620. schema:
  2621. $ref: '#/definitions/models.ErrorResponse'
  2622. summary: Create a super admin
  2623. tags:
  2624. - Users
  2625. /api/users/adm/hassuperadmin:
  2626. get:
  2627. responses:
  2628. "200":
  2629. description: OK
  2630. schema:
  2631. type: boolean
  2632. "500":
  2633. description: Internal Server Error
  2634. schema:
  2635. $ref: '#/definitions/models.ErrorResponse'
  2636. summary: Check if the server has a super admin
  2637. tags:
  2638. - Users
  2639. /api/users/adm/transfersuperadmin/{username}:
  2640. post:
  2641. parameters:
  2642. - description: Username of the user to transfer super admin role
  2643. in: path
  2644. name: username
  2645. required: true
  2646. type: string
  2647. responses:
  2648. "200":
  2649. description: OK
  2650. schema:
  2651. $ref: '#/definitions/models.User'
  2652. "403":
  2653. description: Forbidden
  2654. schema:
  2655. $ref: '#/definitions/models.ErrorResponse'
  2656. "500":
  2657. description: Internal Server Error
  2658. schema:
  2659. $ref: '#/definitions/models.ErrorResponse'
  2660. summary: Transfer super admin role to another admin user
  2661. tags:
  2662. - Users
  2663. /api/users_pending:
  2664. delete:
  2665. responses:
  2666. "200":
  2667. description: OK
  2668. schema:
  2669. type: string
  2670. "500":
  2671. description: Internal Server Error
  2672. schema:
  2673. $ref: '#/definitions/models.ErrorResponse'
  2674. summary: Delete all pending users
  2675. tags:
  2676. - Users
  2677. get:
  2678. responses:
  2679. "200":
  2680. description: OK
  2681. schema:
  2682. items:
  2683. $ref: '#/definitions/models.User'
  2684. type: array
  2685. "500":
  2686. description: Internal Server Error
  2687. schema:
  2688. $ref: '#/definitions/models.ErrorResponse'
  2689. summary: Get all pending users
  2690. tags:
  2691. - Users
  2692. /api/users_pending/user/{username}:
  2693. delete:
  2694. parameters:
  2695. - description: Username of the pending user to delete
  2696. in: path
  2697. name: username
  2698. required: true
  2699. type: string
  2700. responses:
  2701. "200":
  2702. description: OK
  2703. schema:
  2704. type: string
  2705. "500":
  2706. description: Internal Server Error
  2707. schema:
  2708. $ref: '#/definitions/models.ErrorResponse'
  2709. summary: Delete a pending user
  2710. tags:
  2711. - Users
  2712. post:
  2713. parameters:
  2714. - description: Username of the pending user to approve
  2715. in: path
  2716. name: username
  2717. required: true
  2718. type: string
  2719. responses:
  2720. "200":
  2721. description: OK
  2722. schema:
  2723. type: string
  2724. "500":
  2725. description: Internal Server Error
  2726. schema:
  2727. $ref: '#/definitions/models.ErrorResponse'
  2728. summary: Approve a pending user
  2729. tags:
  2730. - Users
  2731. /api/v1/enrollment-keys:
  2732. get:
  2733. responses:
  2734. "200":
  2735. description: OK
  2736. schema:
  2737. items:
  2738. $ref: '#/definitions/models.EnrollmentKey'
  2739. type: array
  2740. "500":
  2741. description: Internal Server Error
  2742. schema:
  2743. $ref: '#/definitions/models.ErrorResponse'
  2744. security:
  2745. - oauth: []
  2746. summary: Lists all EnrollmentKeys for admins
  2747. tags:
  2748. - EnrollmentKeys
  2749. post:
  2750. parameters:
  2751. - description: Enrollment Key parameters
  2752. in: body
  2753. name: body
  2754. required: true
  2755. schema:
  2756. $ref: '#/definitions/models.APIEnrollmentKey'
  2757. responses:
  2758. "200":
  2759. description: OK
  2760. schema:
  2761. $ref: '#/definitions/models.EnrollmentKey'
  2762. "400":
  2763. description: Bad Request
  2764. schema:
  2765. $ref: '#/definitions/models.ErrorResponse'
  2766. "500":
  2767. description: Internal Server Error
  2768. schema:
  2769. $ref: '#/definitions/models.ErrorResponse'
  2770. security:
  2771. - oauth: []
  2772. summary: Creates an EnrollmentKey for hosts to register with server and join
  2773. networks
  2774. tags:
  2775. - EnrollmentKeys
  2776. /api/v1/enrollment-keys/{keyid}:
  2777. delete:
  2778. parameters:
  2779. - description: Enrollment Key ID
  2780. in: path
  2781. name: keyid
  2782. required: true
  2783. type: string
  2784. responses:
  2785. "200":
  2786. description: OK
  2787. "500":
  2788. description: Internal Server Error
  2789. schema:
  2790. $ref: '#/definitions/models.ErrorResponse'
  2791. security:
  2792. - oauth: []
  2793. summary: Deletes an EnrollmentKey from Netmaker server
  2794. tags:
  2795. - EnrollmentKeys
  2796. put:
  2797. parameters:
  2798. - description: Enrollment Key ID
  2799. in: path
  2800. name: keyid
  2801. required: true
  2802. type: string
  2803. - description: Enrollment Key parameters
  2804. in: body
  2805. name: body
  2806. required: true
  2807. schema:
  2808. $ref: '#/definitions/models.APIEnrollmentKey'
  2809. responses:
  2810. "200":
  2811. description: OK
  2812. schema:
  2813. $ref: '#/definitions/models.EnrollmentKey'
  2814. "400":
  2815. description: Bad Request
  2816. schema:
  2817. $ref: '#/definitions/models.ErrorResponse'
  2818. "500":
  2819. description: Internal Server Error
  2820. schema:
  2821. $ref: '#/definitions/models.ErrorResponse'
  2822. security:
  2823. - oauth: []
  2824. summary: Updates an EnrollmentKey. Updates are only limited to the relay to
  2825. use
  2826. tags:
  2827. - EnrollmentKeys
  2828. /api/v1/fallback/host/{hostid}:
  2829. put:
  2830. parameters:
  2831. - description: Host ID
  2832. in: path
  2833. name: hostid
  2834. required: true
  2835. type: string
  2836. - description: Host update data
  2837. in: body
  2838. name: body
  2839. required: true
  2840. schema:
  2841. $ref: '#/definitions/models.HostUpdate'
  2842. responses:
  2843. "200":
  2844. description: updated host data
  2845. schema:
  2846. type: string
  2847. "500":
  2848. description: Internal Server Error
  2849. schema:
  2850. $ref: '#/definitions/models.ErrorResponse'
  2851. security:
  2852. - oauth: []
  2853. summary: Updates a Netclient host on Netmaker server
  2854. tags:
  2855. - Hosts
  2856. /api/v1/host:
  2857. get:
  2858. responses:
  2859. "200":
  2860. description: OK
  2861. schema:
  2862. $ref: '#/definitions/models.HostPull'
  2863. "500":
  2864. description: Internal Server Error
  2865. schema:
  2866. $ref: '#/definitions/models.ErrorResponse'
  2867. security:
  2868. - oauth: []
  2869. summary: Used by clients for "pull" command
  2870. tags:
  2871. - Hosts
  2872. /api/v1/host/{hostid}/signalpeer:
  2873. post:
  2874. parameters:
  2875. - description: Host ID
  2876. in: path
  2877. name: hostid
  2878. required: true
  2879. type: string
  2880. - description: Signal data
  2881. in: body
  2882. name: body
  2883. required: true
  2884. schema:
  2885. $ref: '#/definitions/models.Signal'
  2886. responses:
  2887. "200":
  2888. description: OK
  2889. schema:
  2890. $ref: '#/definitions/models.Signal'
  2891. "400":
  2892. description: Bad Request
  2893. schema:
  2894. $ref: '#/definitions/models.ErrorResponse'
  2895. security:
  2896. - oauth: []
  2897. summary: Send signal to peer
  2898. tags:
  2899. - Hosts
  2900. /api/v1/host/register/{token}:
  2901. post:
  2902. parameters:
  2903. - description: Enrollment Key Token
  2904. in: path
  2905. name: token
  2906. required: true
  2907. type: string
  2908. - description: Host registration parameters
  2909. in: body
  2910. name: body
  2911. required: true
  2912. schema:
  2913. $ref: '#/definitions/models.Host'
  2914. responses:
  2915. "200":
  2916. description: OK
  2917. schema:
  2918. $ref: '#/definitions/models.RegisterResponse'
  2919. "400":
  2920. description: Bad Request
  2921. schema:
  2922. $ref: '#/definitions/models.ErrorResponse'
  2923. "500":
  2924. description: Internal Server Error
  2925. schema:
  2926. $ref: '#/definitions/models.ErrorResponse'
  2927. security:
  2928. - oauth: []
  2929. summary: Handles a Netclient registration with server and add nodes accordingly
  2930. tags:
  2931. - EnrollmentKeys
  2932. /api/v1/legacy/nodes:
  2933. delete:
  2934. responses:
  2935. "200":
  2936. description: Wiped all legacy nodes.
  2937. schema:
  2938. type: string
  2939. "400":
  2940. description: Bad Request
  2941. schema:
  2942. $ref: '#/definitions/models.ErrorResponse'
  2943. security:
  2944. - oauth2: []
  2945. summary: Delete all legacy nodes from DB.
  2946. tags:
  2947. - Nodes
  2948. /api/v1/node/{network}/failover/reset:
  2949. post:
  2950. parameters:
  2951. - description: Network ID
  2952. in: path
  2953. name: network
  2954. required: true
  2955. type: string
  2956. responses:
  2957. "200":
  2958. description: OK
  2959. schema:
  2960. $ref: '#/definitions/models.SuccessResponse'
  2961. "500":
  2962. description: Internal Server Error
  2963. schema:
  2964. $ref: '#/definitions/models.ErrorResponse'
  2965. summary: Reset failover for a network
  2966. tags:
  2967. - PRO
  2968. /api/v1/node/{nodeid}/failover:
  2969. delete:
  2970. parameters:
  2971. - description: Node ID
  2972. in: path
  2973. name: nodeid
  2974. required: true
  2975. type: string
  2976. responses:
  2977. "200":
  2978. description: OK
  2979. schema:
  2980. $ref: '#/definitions/models.Node'
  2981. "400":
  2982. description: Bad Request
  2983. schema:
  2984. $ref: '#/definitions/models.ErrorResponse'
  2985. "500":
  2986. description: Internal Server Error
  2987. schema:
  2988. $ref: '#/definitions/models.ErrorResponse'
  2989. summary: Delete failover node
  2990. tags:
  2991. - PRO
  2992. get:
  2993. parameters:
  2994. - description: Node ID
  2995. in: path
  2996. name: nodeid
  2997. required: true
  2998. type: string
  2999. responses:
  3000. "200":
  3001. description: OK
  3002. schema:
  3003. $ref: '#/definitions/models.Node'
  3004. "400":
  3005. description: Bad Request
  3006. schema:
  3007. $ref: '#/definitions/models.ErrorResponse'
  3008. "404":
  3009. description: Not Found
  3010. schema:
  3011. $ref: '#/definitions/models.ErrorResponse'
  3012. summary: Get failover node
  3013. tags:
  3014. - PRO
  3015. post:
  3016. parameters:
  3017. - description: Node ID
  3018. in: path
  3019. name: nodeid
  3020. required: true
  3021. type: string
  3022. responses:
  3023. "200":
  3024. description: OK
  3025. schema:
  3026. $ref: '#/definitions/models.Node'
  3027. "400":
  3028. description: Bad Request
  3029. schema:
  3030. $ref: '#/definitions/models.ErrorResponse'
  3031. "500":
  3032. description: Internal Server Error
  3033. schema:
  3034. $ref: '#/definitions/models.ErrorResponse'
  3035. summary: Create failover node
  3036. tags:
  3037. - PRO
  3038. /api/v1/node/{nodeid}/failover_me:
  3039. post:
  3040. consumes:
  3041. - application/json
  3042. parameters:
  3043. - description: Node ID
  3044. in: path
  3045. name: nodeid
  3046. required: true
  3047. type: string
  3048. - description: Failover request
  3049. in: body
  3050. name: body
  3051. required: true
  3052. schema:
  3053. $ref: '#/definitions/models.FailOverMeReq'
  3054. responses:
  3055. "200":
  3056. description: OK
  3057. schema:
  3058. $ref: '#/definitions/models.SuccessResponse'
  3059. "400":
  3060. description: Bad Request
  3061. schema:
  3062. $ref: '#/definitions/models.ErrorResponse'
  3063. "500":
  3064. description: Internal Server Error
  3065. schema:
  3066. $ref: '#/definitions/models.ErrorResponse'
  3067. summary: Failover me
  3068. tags:
  3069. - PRO
  3070. /meshclient/files/{filename}:
  3071. get:
  3072. responses:
  3073. "200":
  3074. description: file
  3075. schema:
  3076. type: body
  3077. "404":
  3078. description: 404 not found
  3079. schema:
  3080. type: string
  3081. summary: Retrieve a file from the file server
  3082. tags:
  3083. - Meshclient
  3084. swagger: "2.0"
  3085. tags:
  3086. - description: |
  3087. 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.
  3088. name: APIUsage
  3089. - description: |
  3090. API calls are primarily authenticated using a user authentication token. This token should be included in the header as follows:
  3091. -H "Authorization: Bearer <YOUR_AUTH_TOKEN>"
  3092. To obtain YOUR_AUTH_TOKEN:
  3093. Call the api/users/adm/authenticate endpoint (see documentation below for details).
  3094. Note: While a MasterKey exists (configurable via env var or config file), it should be considered a backup option, used only when server access is lost. By default, this key is "secret key," but it's crucial to change this and keep it secure in your instance.
  3095. For more information on configuration and security best practices, refer to the [Netmaker documentation](https://docs.netmaker.org/index.html).
  3096. name: Authentication
  3097. - description: |
  3098. Check out our [Pricing](https://www.netmaker.io/pricing). And Feel Free to [Contact Us](https://www.netmaker.io/contact) if you have any questions or need some clarifications.
  3099. name: Pricing