swagger.yaml 89 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786
  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. defaultDomain:
  45. type: string
  46. deployedByOperator:
  47. type: boolean
  48. disableRemoteIPCheck:
  49. type: string
  50. displayKeys:
  51. type: string
  52. dnskey:
  53. type: string
  54. dnsmode:
  55. type: string
  56. egressesLimit:
  57. type: integer
  58. emailSenderAddr:
  59. type: string
  60. emailSenderPassword:
  61. type: string
  62. emailSenderUser:
  63. type: string
  64. emqxRestEndpoint:
  65. type: string
  66. endpointDetection:
  67. type: boolean
  68. environment:
  69. type: string
  70. frontendURL:
  71. type: string
  72. hostNetwork:
  73. type: string
  74. ingressesLimit:
  75. type: integer
  76. jwtValidityDuration:
  77. format: int64
  78. type: integer
  79. licenseValue:
  80. type: string
  81. machinesLimit:
  82. type: integer
  83. manageDNS:
  84. type: boolean
  85. masterKey:
  86. type: string
  87. messageQueueBackend:
  88. type: string
  89. metricInterval:
  90. type: string
  91. metricsExporter:
  92. type: string
  93. metricsPort:
  94. type: integer
  95. mqpassword:
  96. type: string
  97. mquserName:
  98. type: string
  99. netclientAutoUpdate:
  100. type: string
  101. netclientEndpointDetection:
  102. type: string
  103. netmakerTenantID:
  104. type: string
  105. networksLimit:
  106. type: integer
  107. nodeID:
  108. type: string
  109. oidcissuer:
  110. type: string
  111. platform:
  112. type: string
  113. publicIPService:
  114. type: string
  115. publicIp:
  116. type: string
  117. racAutoDisable:
  118. type: boolean
  119. racRestrictToSingleNetwork:
  120. type: boolean
  121. restBackend:
  122. type: string
  123. server:
  124. type: string
  125. serverBrokerEndpoint:
  126. type: string
  127. smtpHost:
  128. type: string
  129. smtpPort:
  130. type: integer
  131. sqlconn:
  132. type: string
  133. stun:
  134. type: boolean
  135. stunList:
  136. type: string
  137. stunPort:
  138. type: integer
  139. stunServers:
  140. type: string
  141. telemetry:
  142. type: string
  143. turnApiServer:
  144. type: string
  145. turnPassword:
  146. type: string
  147. turnPort:
  148. type: integer
  149. turnServer:
  150. type: string
  151. turnUserName:
  152. type: string
  153. useTurn:
  154. type: boolean
  155. usersLimit:
  156. type: integer
  157. verbosity:
  158. type: integer
  159. version:
  160. type: string
  161. type: object
  162. models.APIEnrollmentKey:
  163. properties:
  164. expiration:
  165. format: int64
  166. type: integer
  167. groups:
  168. items:
  169. type: string
  170. type: array
  171. networks:
  172. items:
  173. type: string
  174. type: array
  175. relay:
  176. type: string
  177. tags:
  178. items:
  179. type: string
  180. type: array
  181. type:
  182. $ref: '#/definitions/models.KeyType'
  183. unlimited:
  184. type: boolean
  185. uses_remaining:
  186. type: integer
  187. required:
  188. - tags
  189. type: object
  190. models.AclRule:
  191. properties:
  192. allowed:
  193. type: boolean
  194. allowed_ports:
  195. items:
  196. type: string
  197. type: array
  198. allowed_protocols:
  199. allOf:
  200. - $ref: '#/definitions/models.Protocol'
  201. description: tcp, udp, etc.
  202. direction:
  203. allOf:
  204. - $ref: '#/definitions/models.AllowedTrafficDirection'
  205. description: single or two-way
  206. dst:
  207. items:
  208. $ref: '#/definitions/net.IPNet'
  209. type: array
  210. dst6:
  211. items:
  212. $ref: '#/definitions/net.IPNet'
  213. type: array
  214. id:
  215. type: string
  216. ip_list:
  217. items:
  218. $ref: '#/definitions/net.IPNet'
  219. type: array
  220. ip6_list:
  221. items:
  222. $ref: '#/definitions/net.IPNet'
  223. type: array
  224. type: object
  225. models.AllowedTrafficDirection:
  226. enum:
  227. - 0
  228. - 1
  229. type: integer
  230. x-enum-varnames:
  231. - TrafficDirectionUni
  232. - TrafficDirectionBi
  233. models.ApiHost:
  234. properties:
  235. autoupdate:
  236. type: boolean
  237. debug:
  238. type: boolean
  239. defaultinterface:
  240. type: string
  241. endpointip:
  242. type: string
  243. endpointipv6:
  244. type: string
  245. firewallinuse:
  246. type: string
  247. id:
  248. type: string
  249. interfaces:
  250. items:
  251. $ref: '#/definitions/models.ApiIface'
  252. type: array
  253. isdefault:
  254. type: boolean
  255. isstatic:
  256. type: boolean
  257. isstaticport:
  258. type: boolean
  259. listenport:
  260. type: integer
  261. macaddress:
  262. type: string
  263. mtu:
  264. type: integer
  265. name:
  266. type: string
  267. nat_type:
  268. type: string
  269. nodes:
  270. items:
  271. type: string
  272. type: array
  273. os:
  274. type: string
  275. persistentkeepalive:
  276. type: integer
  277. publickey:
  278. type: string
  279. verbosity:
  280. type: integer
  281. version:
  282. type: string
  283. wg_public_listen_port:
  284. type: integer
  285. type: object
  286. models.ApiIface:
  287. properties:
  288. addressString:
  289. type: string
  290. name:
  291. type: string
  292. type: object
  293. models.ApiNode:
  294. properties:
  295. additional_rag_ips:
  296. items:
  297. type: string
  298. type: array
  299. address:
  300. type: string
  301. address6:
  302. type: string
  303. allowedips:
  304. items:
  305. type: string
  306. type: array
  307. connected:
  308. type: boolean
  309. defaultacl:
  310. description: == PRO ==
  311. type: string
  312. dnson:
  313. type: boolean
  314. egressgatewaynatenabled:
  315. type: boolean
  316. egressgatewayranges:
  317. items:
  318. type: string
  319. type: array
  320. egressgatewayranges_with_metric:
  321. items:
  322. $ref: '#/definitions/models.EgressRangeMetric'
  323. type: array
  324. expdatetime:
  325. format: int64
  326. type: integer
  327. fail_over_peers:
  328. additionalProperties:
  329. type: object
  330. type: object
  331. failed_over_by:
  332. type: string
  333. hostid:
  334. minLength: 5
  335. type: string
  336. id:
  337. minLength: 5
  338. type: string
  339. inet_node_req:
  340. $ref: '#/definitions/models.InetNodeReq'
  341. ingressdns:
  342. type: string
  343. ingressmtu:
  344. type: integer
  345. ingresspersistentkeepalive:
  346. type: integer
  347. internetgw_node_id:
  348. type: string
  349. is_fail_over:
  350. type: boolean
  351. is_static:
  352. type: boolean
  353. is_user_node:
  354. type: boolean
  355. isegressgateway:
  356. type: boolean
  357. isingressgateway:
  358. type: boolean
  359. isinternetgateway:
  360. type: boolean
  361. isrelay:
  362. type: boolean
  363. isrelayed:
  364. type: boolean
  365. lastcheckin:
  366. format: int64
  367. type: integer
  368. lastmodified:
  369. format: int64
  370. type: integer
  371. lastpeerupdate:
  372. format: int64
  373. type: integer
  374. localaddress:
  375. type: string
  376. metadata:
  377. type: string
  378. network:
  379. type: string
  380. networkrange:
  381. type: string
  382. networkrange6:
  383. type: string
  384. pendingdelete:
  385. type: boolean
  386. relayedby:
  387. type: string
  388. relaynodes:
  389. items:
  390. type: string
  391. type: array
  392. server:
  393. type: string
  394. static_node:
  395. $ref: '#/definitions/models.ExtClient'
  396. status:
  397. $ref: '#/definitions/models.NodeStatus'
  398. tags:
  399. additionalProperties:
  400. type: object
  401. type: object
  402. required:
  403. - hostid
  404. - id
  405. type: object
  406. models.AuthParams:
  407. properties:
  408. id:
  409. type: string
  410. macaddress:
  411. type: string
  412. password:
  413. type: string
  414. type: object
  415. models.DNSEntry:
  416. properties:
  417. address:
  418. type: string
  419. address6:
  420. type: string
  421. name:
  422. maxLength: 192
  423. minLength: 1
  424. type: string
  425. network:
  426. type: string
  427. required:
  428. - name
  429. type: object
  430. models.EgressGatewayRequest:
  431. properties:
  432. natenabled:
  433. type: string
  434. netid:
  435. type: string
  436. nodeid:
  437. type: string
  438. ranges:
  439. items:
  440. type: string
  441. type: array
  442. ranges_with_metric:
  443. items:
  444. $ref: '#/definitions/models.EgressRangeMetric'
  445. type: array
  446. type: object
  447. models.EgressInfo:
  448. properties:
  449. egress_fw_rules:
  450. additionalProperties:
  451. $ref: '#/definitions/models.AclRule'
  452. type: object
  453. egress_gateway_cfg:
  454. $ref: '#/definitions/models.EgressGatewayRequest'
  455. egress_gw_addr:
  456. $ref: '#/definitions/net.IPNet'
  457. egress_gw_addr6:
  458. $ref: '#/definitions/net.IPNet'
  459. egress_id:
  460. type: string
  461. network:
  462. $ref: '#/definitions/net.IPNet'
  463. network6:
  464. $ref: '#/definitions/net.IPNet'
  465. type: object
  466. models.EgressNetworkRoutes:
  467. properties:
  468. egress_gw_addr:
  469. $ref: '#/definitions/net.IPNet'
  470. egress_gw_addr6:
  471. $ref: '#/definitions/net.IPNet'
  472. egress_ranges:
  473. items:
  474. type: string
  475. type: array
  476. egress_ranges_metric:
  477. items:
  478. $ref: '#/definitions/models.EgressRangeMetric'
  479. type: array
  480. network:
  481. type: string
  482. node_addr:
  483. $ref: '#/definitions/net.IPNet'
  484. node_addr6:
  485. $ref: '#/definitions/net.IPNet'
  486. peer_key:
  487. type: string
  488. type: object
  489. models.EgressRangeMetric:
  490. properties:
  491. network:
  492. type: string
  493. route_metric:
  494. description: preffered range 1-999
  495. type: integer
  496. type: object
  497. models.EnrollmentKey:
  498. properties:
  499. default:
  500. type: boolean
  501. expiration:
  502. type: string
  503. groups:
  504. items:
  505. type: string
  506. type: array
  507. networks:
  508. items:
  509. type: string
  510. type: array
  511. relay:
  512. type: string
  513. tags:
  514. items:
  515. type: string
  516. type: array
  517. token:
  518. description: B64 value of EnrollmentToken
  519. type: string
  520. type:
  521. $ref: '#/definitions/models.KeyType'
  522. unlimited:
  523. type: boolean
  524. uses_remaining:
  525. type: integer
  526. value:
  527. type: string
  528. type: object
  529. models.ErrorResponse:
  530. properties:
  531. code:
  532. type: integer
  533. message:
  534. type: string
  535. type: object
  536. models.ExtClient:
  537. properties:
  538. address:
  539. type: string
  540. address6:
  541. type: string
  542. allowed_ips:
  543. items:
  544. type: string
  545. type: array
  546. clientid:
  547. type: string
  548. country:
  549. type: string
  550. deniednodeacls:
  551. additionalProperties:
  552. type: object
  553. type: object
  554. device_name:
  555. type: string
  556. dns:
  557. type: string
  558. enabled:
  559. type: boolean
  560. extraallowedips:
  561. items:
  562. type: string
  563. type: array
  564. ingressgatewayendpoint:
  565. type: string
  566. ingressgatewayid:
  567. type: string
  568. lastmodified:
  569. format: int64
  570. type: integer
  571. network:
  572. type: string
  573. os:
  574. type: string
  575. ownerid:
  576. type: string
  577. postdown:
  578. type: string
  579. postup:
  580. type: string
  581. privatekey:
  582. type: string
  583. public_endpoint:
  584. type: string
  585. publickey:
  586. type: string
  587. remote_access_client_id:
  588. description: unique ID (MAC address) of RAC machine
  589. type: string
  590. tags:
  591. additionalProperties:
  592. type: object
  593. type: object
  594. type: object
  595. models.FailOverMeReq:
  596. properties:
  597. node_id:
  598. type: string
  599. type: object
  600. models.FwRule:
  601. properties:
  602. allow:
  603. type: boolean
  604. allowed_ports:
  605. items:
  606. type: string
  607. type: array
  608. allowed_protocols:
  609. allOf:
  610. - $ref: '#/definitions/models.Protocol'
  611. description: tcp, udp, etc.
  612. dst_ip:
  613. $ref: '#/definitions/net.IPNet'
  614. src_ip:
  615. $ref: '#/definitions/net.IPNet'
  616. type: object
  617. models.FwUpdate:
  618. properties:
  619. acl_rules:
  620. additionalProperties:
  621. $ref: '#/definitions/models.AclRule'
  622. type: object
  623. allow_all:
  624. type: boolean
  625. egress_info:
  626. additionalProperties:
  627. $ref: '#/definitions/models.EgressInfo'
  628. type: object
  629. ingress_info:
  630. additionalProperties:
  631. $ref: '#/definitions/models.IngressInfo'
  632. type: object
  633. is_egress_gw:
  634. type: boolean
  635. is_ingress_gw:
  636. type: boolean
  637. networks:
  638. items:
  639. $ref: '#/definitions/net.IPNet'
  640. type: array
  641. type: object
  642. models.Host:
  643. properties:
  644. autoupdate:
  645. type: boolean
  646. daemoninstalled:
  647. type: boolean
  648. debug:
  649. type: boolean
  650. defaultinterface:
  651. type: string
  652. endpointip:
  653. items:
  654. type: integer
  655. type: array
  656. endpointipv6:
  657. items:
  658. type: integer
  659. type: array
  660. firewallinuse:
  661. type: string
  662. hostpass:
  663. type: string
  664. id:
  665. type: string
  666. interface:
  667. type: string
  668. interfaces:
  669. items:
  670. $ref: '#/definitions/models.Iface'
  671. type: array
  672. ipforwarding:
  673. type: boolean
  674. isdefault:
  675. type: boolean
  676. isdocker:
  677. type: boolean
  678. isk8s:
  679. type: boolean
  680. isstatic:
  681. type: boolean
  682. isstaticport:
  683. type: boolean
  684. listenport:
  685. type: integer
  686. macaddress:
  687. items:
  688. type: integer
  689. type: array
  690. mtu:
  691. type: integer
  692. name:
  693. type: string
  694. nat_type:
  695. type: string
  696. nodes:
  697. items:
  698. type: string
  699. type: array
  700. os:
  701. type: string
  702. persistentkeepalive:
  703. format: int64
  704. type: integer
  705. publickey:
  706. items:
  707. type: integer
  708. type: array
  709. traffickeypublic:
  710. items:
  711. type: integer
  712. type: array
  713. turn_endpoint:
  714. $ref: '#/definitions/netip.AddrPort'
  715. verbosity:
  716. type: integer
  717. version:
  718. type: string
  719. wg_public_listen_port:
  720. type: integer
  721. type: object
  722. models.HostInfoMap:
  723. additionalProperties:
  724. $ref: '#/definitions/models.HostNetworkInfo'
  725. type: object
  726. models.HostMqAction:
  727. enum:
  728. - UPGRADE
  729. - FORCE_UPGRADE
  730. - SIGNAL_HOST
  731. - UPDATE_HOST
  732. - DELETE_HOST
  733. - JOIN_HOST_TO_NETWORK
  734. - ACK
  735. - REQ_ACK
  736. - CHECK_IN
  737. - UPDATE_KEYS
  738. - REQ_PULL
  739. - SIGNAL_PULL
  740. - UPDATE_METRICS
  741. type: string
  742. x-enum-varnames:
  743. - Upgrade
  744. - ForceUpgrade
  745. - SignalHost
  746. - UpdateHost
  747. - DeleteHost
  748. - JoinHostToNetwork
  749. - Acknowledgement
  750. - RequestAck
  751. - CheckIn
  752. - UpdateKeys
  753. - RequestPull
  754. - SignalPull
  755. - UpdateMetrics
  756. models.HostNetworkInfo:
  757. properties:
  758. interfaces:
  759. items:
  760. $ref: '#/definitions/models.Iface'
  761. type: array
  762. is_static:
  763. type: boolean
  764. is_static_port:
  765. type: boolean
  766. listen_port:
  767. type: integer
  768. version:
  769. type: string
  770. type: object
  771. models.HostPull:
  772. properties:
  773. change_default_gw:
  774. type: boolean
  775. default_gw_ip:
  776. items:
  777. type: integer
  778. type: array
  779. egress_network_routes:
  780. items:
  781. $ref: '#/definitions/models.EgressNetworkRoutes'
  782. type: array
  783. endpoint_detection:
  784. type: boolean
  785. fw_update:
  786. $ref: '#/definitions/models.FwUpdate'
  787. host:
  788. $ref: '#/definitions/models.Host'
  789. host_network_info:
  790. $ref: '#/definitions/models.HostInfoMap'
  791. is_inet_gw:
  792. type: boolean
  793. nodes:
  794. items:
  795. $ref: '#/definitions/models.Node'
  796. type: array
  797. peer_ids:
  798. $ref: '#/definitions/models.PeerMap'
  799. peers:
  800. items:
  801. $ref: '#/definitions/wgtypes.PeerConfig'
  802. type: array
  803. server_config:
  804. $ref: '#/definitions/models.ServerConfig'
  805. type: object
  806. models.HostUpdate:
  807. properties:
  808. action:
  809. $ref: '#/definitions/models.HostMqAction'
  810. host:
  811. $ref: '#/definitions/models.Host'
  812. newMetrics:
  813. $ref: '#/definitions/models.Metrics'
  814. node:
  815. $ref: '#/definitions/models.Node'
  816. signal:
  817. $ref: '#/definitions/models.Signal'
  818. type: object
  819. models.IDandAddr:
  820. properties:
  821. address:
  822. type: string
  823. host_id:
  824. type: string
  825. id:
  826. type: string
  827. is_extclient:
  828. type: boolean
  829. isserver:
  830. type: string
  831. listen_port:
  832. type: integer
  833. name:
  834. type: string
  835. network:
  836. type: string
  837. type: object
  838. models.Iface:
  839. properties:
  840. address:
  841. $ref: '#/definitions/net.IPNet'
  842. addressString:
  843. type: string
  844. name:
  845. type: string
  846. type: object
  847. models.InetNodeReq:
  848. properties:
  849. inet_node_client_ids:
  850. items:
  851. type: string
  852. type: array
  853. type: object
  854. models.IngressGwUsers:
  855. properties:
  856. network:
  857. type: string
  858. node_id:
  859. type: string
  860. users:
  861. items:
  862. $ref: '#/definitions/models.ReturnUser'
  863. type: array
  864. type: object
  865. models.IngressInfo:
  866. properties:
  867. egress_ranges:
  868. items:
  869. $ref: '#/definitions/net.IPNet'
  870. type: array
  871. egress_ranges6:
  872. items:
  873. $ref: '#/definitions/net.IPNet'
  874. type: array
  875. ingress_id:
  876. type: string
  877. network:
  878. $ref: '#/definitions/net.IPNet'
  879. network6:
  880. $ref: '#/definitions/net.IPNet'
  881. rules:
  882. items:
  883. $ref: '#/definitions/models.FwRule'
  884. type: array
  885. static_node_ips:
  886. items:
  887. items:
  888. type: integer
  889. type: array
  890. type: array
  891. type: object
  892. models.KeyType:
  893. enum:
  894. - 0
  895. - 1
  896. - 2
  897. - 3
  898. type: integer
  899. x-enum-varnames:
  900. - Undefined
  901. - TimeExpiration
  902. - Uses
  903. - Unlimited
  904. models.Metric:
  905. properties:
  906. actualuptime:
  907. format: int64
  908. type: integer
  909. connected:
  910. type: boolean
  911. lasttotalreceived:
  912. format: int64
  913. type: integer
  914. lasttotalsent:
  915. format: int64
  916. type: integer
  917. latency:
  918. format: int64
  919. type: integer
  920. node_name:
  921. type: string
  922. percentup:
  923. type: number
  924. totalreceived:
  925. format: int64
  926. type: integer
  927. totalsent:
  928. format: int64
  929. type: integer
  930. totaltime:
  931. format: int64
  932. type: integer
  933. uptime:
  934. format: int64
  935. type: integer
  936. type: object
  937. models.Metrics:
  938. properties:
  939. connectivity:
  940. additionalProperties:
  941. $ref: '#/definitions/models.Metric'
  942. type: object
  943. network:
  944. type: string
  945. node_id:
  946. type: string
  947. node_name:
  948. type: string
  949. type: object
  950. models.Network:
  951. properties:
  952. addressrange:
  953. type: string
  954. addressrange6:
  955. type: string
  956. allowmanualsignup:
  957. type: string
  958. defaultacl:
  959. type: string
  960. defaultinterface:
  961. maxLength: 35
  962. minLength: 1
  963. type: string
  964. defaultkeepalive:
  965. maximum: 1000
  966. type: integer
  967. defaultlistenport:
  968. maximum: 65535
  969. minimum: 1024
  970. type: integer
  971. defaultmtu:
  972. type: integer
  973. defaultpostdown:
  974. type: string
  975. defaultudpholepunch:
  976. type: string
  977. dns_nameservers:
  978. items:
  979. type: string
  980. type: array
  981. isipv4:
  982. type: string
  983. isipv6:
  984. type: string
  985. netid:
  986. maxLength: 32
  987. minLength: 1
  988. type: string
  989. networklastmodified:
  990. format: int64
  991. type: integer
  992. nodelimit:
  993. type: integer
  994. nodeslastmodified:
  995. format: int64
  996. type: integer
  997. required:
  998. - netid
  999. type: object
  1000. models.NetworkID:
  1001. enum:
  1002. - all_networks
  1003. type: string
  1004. x-enum-varnames:
  1005. - AllNetworks
  1006. models.Node:
  1007. properties:
  1008. action:
  1009. type: string
  1010. additional_rag_ips:
  1011. items:
  1012. type: number
  1013. type: array
  1014. address:
  1015. $ref: '#/definitions/net.IPNet'
  1016. address6:
  1017. $ref: '#/definitions/net.IPNet'
  1018. connected:
  1019. type: boolean
  1020. defaultacl:
  1021. description: == PRO ==
  1022. type: string
  1023. dnson:
  1024. type: boolean
  1025. egressgatewaynatenabled:
  1026. type: boolean
  1027. egressgatewayranges:
  1028. items:
  1029. type: string
  1030. type: array
  1031. egressgatewayrequest:
  1032. $ref: '#/definitions/models.EgressGatewayRequest'
  1033. expdatetime:
  1034. type: string
  1035. fail_over_peers:
  1036. additionalProperties:
  1037. type: object
  1038. type: object
  1039. failed_over_by:
  1040. type: string
  1041. hostid:
  1042. type: string
  1043. id:
  1044. type: string
  1045. inet_node_req:
  1046. $ref: '#/definitions/models.InetNodeReq'
  1047. ingressdns:
  1048. type: string
  1049. ingressgatewayrange:
  1050. type: string
  1051. ingressgatewayrange6:
  1052. type: string
  1053. ingressmtu:
  1054. type: integer
  1055. ingresspersistentkeepalive:
  1056. type: integer
  1057. internetgw_node_id:
  1058. type: string
  1059. is_fail_over:
  1060. type: boolean
  1061. is_gw:
  1062. type: boolean
  1063. is_static:
  1064. type: boolean
  1065. is_user_node:
  1066. type: boolean
  1067. isegressgateway:
  1068. type: boolean
  1069. isingressgateway:
  1070. type: boolean
  1071. isinternetgateway:
  1072. type: boolean
  1073. isrelay:
  1074. type: boolean
  1075. isrelayed:
  1076. type: boolean
  1077. lastcheckin:
  1078. type: string
  1079. lastmodified:
  1080. type: string
  1081. lastpeerupdate:
  1082. type: string
  1083. localaddress:
  1084. $ref: '#/definitions/net.IPNet'
  1085. metadata:
  1086. type: string
  1087. network:
  1088. type: string
  1089. networkrange:
  1090. type: integer
  1091. networkrange6:
  1092. type: number
  1093. node_status:
  1094. $ref: '#/definitions/models.NodeStatus'
  1095. ownerid:
  1096. type: string
  1097. pendingdelete:
  1098. type: boolean
  1099. relayedby:
  1100. type: string
  1101. relaynodes:
  1102. items:
  1103. type: string
  1104. type: array
  1105. server:
  1106. type: string
  1107. static_node:
  1108. $ref: '#/definitions/models.ExtClient'
  1109. tags:
  1110. additionalProperties:
  1111. type: object
  1112. type: object
  1113. type: object
  1114. models.NodeGet:
  1115. properties:
  1116. host:
  1117. $ref: '#/definitions/models.Host'
  1118. host_peers:
  1119. items:
  1120. $ref: '#/definitions/wgtypes.PeerConfig'
  1121. type: array
  1122. node:
  1123. $ref: '#/definitions/models.Node'
  1124. peerids:
  1125. $ref: '#/definitions/models.PeerMap'
  1126. peers:
  1127. items:
  1128. $ref: '#/definitions/wgtypes.PeerConfig'
  1129. type: array
  1130. serverconfig:
  1131. $ref: '#/definitions/models.ServerConfig'
  1132. type: object
  1133. models.NodeStatus:
  1134. enum:
  1135. - online
  1136. - offline
  1137. - warning
  1138. - error
  1139. - unknown
  1140. - disconnected
  1141. type: string
  1142. x-enum-varnames:
  1143. - OnlineSt
  1144. - OfflineSt
  1145. - WarningSt
  1146. - ErrorSt
  1147. - UnKnown
  1148. - Disconnected
  1149. models.PeerMap:
  1150. additionalProperties:
  1151. $ref: '#/definitions/models.IDandAddr'
  1152. type: object
  1153. models.Protocol:
  1154. enum:
  1155. - all
  1156. - udp
  1157. - tcp
  1158. - icmp
  1159. type: string
  1160. x-enum-varnames:
  1161. - ALL
  1162. - UDP
  1163. - TCP
  1164. - ICMP
  1165. models.RegisterResponse:
  1166. properties:
  1167. requested_host:
  1168. $ref: '#/definitions/models.Host'
  1169. server_config:
  1170. $ref: '#/definitions/models.ServerConfig'
  1171. type: object
  1172. models.ReturnUser:
  1173. properties:
  1174. auth_type:
  1175. type: string
  1176. isadmin:
  1177. type: boolean
  1178. issuperadmin:
  1179. type: boolean
  1180. last_login_time:
  1181. type: string
  1182. network_roles:
  1183. additionalProperties:
  1184. additionalProperties:
  1185. type: object
  1186. type: object
  1187. type: object
  1188. platform_role_id:
  1189. $ref: '#/definitions/models.UserRoleID'
  1190. remote_gw_ids:
  1191. additionalProperties:
  1192. type: object
  1193. description: deprecated
  1194. type: object
  1195. user_group_ids:
  1196. additionalProperties:
  1197. type: object
  1198. type: object
  1199. username:
  1200. type: string
  1201. type: object
  1202. models.RsrcPermissionScope:
  1203. properties:
  1204. create:
  1205. type: boolean
  1206. delete:
  1207. type: boolean
  1208. read:
  1209. type: boolean
  1210. self_only:
  1211. type: boolean
  1212. update:
  1213. type: boolean
  1214. vpn_access:
  1215. type: boolean
  1216. type: object
  1217. models.ServerConfig:
  1218. properties:
  1219. Is_EE:
  1220. type: boolean
  1221. api:
  1222. type: string
  1223. apiport:
  1224. type: string
  1225. broker:
  1226. type: string
  1227. brokerType:
  1228. type: string
  1229. coreDNSAddr:
  1230. type: string
  1231. defaultDomain:
  1232. type: string
  1233. dnsmode:
  1234. type: string
  1235. endpointDetection:
  1236. type: boolean
  1237. manageDNS:
  1238. type: boolean
  1239. metricInterval:
  1240. type: string
  1241. metricsPort:
  1242. type: integer
  1243. mqpassword:
  1244. type: string
  1245. mqport:
  1246. type: string
  1247. mquserName:
  1248. type: string
  1249. server:
  1250. type: string
  1251. stun:
  1252. type: boolean
  1253. stunServers:
  1254. type: string
  1255. trafficKey:
  1256. items:
  1257. type: integer
  1258. type: array
  1259. version:
  1260. type: string
  1261. type: object
  1262. models.Signal:
  1263. properties:
  1264. action:
  1265. $ref: '#/definitions/models.SignalAction'
  1266. from_host_id:
  1267. type: string
  1268. from_host_pubkey:
  1269. type: string
  1270. from_node_id:
  1271. type: string
  1272. is_pro:
  1273. type: boolean
  1274. reply:
  1275. type: boolean
  1276. server:
  1277. type: string
  1278. timestamp:
  1279. type: integer
  1280. to_host_id:
  1281. type: string
  1282. to_host_pubkey:
  1283. type: string
  1284. to_node_id:
  1285. type: string
  1286. type: object
  1287. models.SignalAction:
  1288. enum:
  1289. - CONNECTION_NEGOTIATION
  1290. - RELAY_ME
  1291. type: string
  1292. x-enum-varnames:
  1293. - ConnNegotiation
  1294. - RelayME
  1295. models.SuccessResponse:
  1296. properties:
  1297. code:
  1298. type: integer
  1299. message:
  1300. type: string
  1301. response: {}
  1302. type: object
  1303. models.User:
  1304. properties:
  1305. auth_type:
  1306. type: string
  1307. external_identity_provider_id:
  1308. type: string
  1309. isadmin:
  1310. description: deprecated
  1311. type: boolean
  1312. issuperadmin:
  1313. description: deprecated
  1314. type: boolean
  1315. last_login_time:
  1316. type: string
  1317. network_roles:
  1318. additionalProperties:
  1319. additionalProperties:
  1320. type: object
  1321. type: object
  1322. type: object
  1323. password:
  1324. minLength: 5
  1325. type: string
  1326. platform_role_id:
  1327. $ref: '#/definitions/models.UserRoleID'
  1328. remote_gw_ids:
  1329. additionalProperties:
  1330. type: object
  1331. description: deprecated
  1332. type: object
  1333. user_group_ids:
  1334. additionalProperties:
  1335. type: object
  1336. type: object
  1337. username:
  1338. minLength: 3
  1339. type: string
  1340. required:
  1341. - password
  1342. type: object
  1343. models.UserAuthParams:
  1344. properties:
  1345. password:
  1346. type: string
  1347. username:
  1348. type: string
  1349. type: object
  1350. models.UserRemoteGws:
  1351. properties:
  1352. addresses:
  1353. type: string
  1354. allowed_endpoints:
  1355. items:
  1356. type: string
  1357. type: array
  1358. connected:
  1359. type: boolean
  1360. dns_address:
  1361. type: string
  1362. gw_client:
  1363. $ref: '#/definitions/models.ExtClient'
  1364. gw_listen_port:
  1365. type: integer
  1366. gw_name:
  1367. type: string
  1368. gw_peer_public_key:
  1369. type: string
  1370. is_internet_gateway:
  1371. type: boolean
  1372. metadata:
  1373. type: string
  1374. network:
  1375. type: string
  1376. network_addresses:
  1377. items:
  1378. type: string
  1379. type: array
  1380. remote_access_gw_id:
  1381. type: string
  1382. status:
  1383. $ref: '#/definitions/models.NodeStatus'
  1384. type: object
  1385. models.UserRoleID:
  1386. enum:
  1387. - super-admin
  1388. - admin
  1389. - service-user
  1390. - platform-user
  1391. - network-admin
  1392. - network-user
  1393. type: string
  1394. x-enum-varnames:
  1395. - SuperAdminRole
  1396. - AdminRole
  1397. - ServiceUser
  1398. - PlatformUser
  1399. - NetworkAdmin
  1400. - NetworkUser
  1401. models.UserRolePermissionTemplate:
  1402. properties:
  1403. default:
  1404. type: boolean
  1405. deny_dashboard_access:
  1406. type: boolean
  1407. full_access:
  1408. type: boolean
  1409. global_level_access:
  1410. additionalProperties:
  1411. additionalProperties:
  1412. $ref: '#/definitions/models.RsrcPermissionScope'
  1413. type: object
  1414. type: object
  1415. id:
  1416. $ref: '#/definitions/models.UserRoleID'
  1417. meta_data:
  1418. type: string
  1419. name:
  1420. type: string
  1421. network_id:
  1422. $ref: '#/definitions/models.NetworkID'
  1423. network_level_access:
  1424. additionalProperties:
  1425. additionalProperties:
  1426. $ref: '#/definitions/models.RsrcPermissionScope'
  1427. type: object
  1428. type: object
  1429. type: object
  1430. net.IPNet:
  1431. properties:
  1432. ip:
  1433. description: network number
  1434. items:
  1435. type: integer
  1436. type: array
  1437. mask:
  1438. description: network mask
  1439. items:
  1440. type: integer
  1441. type: array
  1442. type: object
  1443. net.UDPAddr:
  1444. properties:
  1445. ip:
  1446. items:
  1447. type: integer
  1448. type: array
  1449. port:
  1450. type: integer
  1451. zone:
  1452. description: IPv6 scoped addressing zone
  1453. type: string
  1454. type: object
  1455. netip.AddrPort:
  1456. type: object
  1457. wgtypes.PeerConfig:
  1458. properties:
  1459. allowedIPs:
  1460. description: |-
  1461. AllowedIPs specifies a list of allowed IP addresses in CIDR notation
  1462. for this peer.
  1463. items:
  1464. $ref: '#/definitions/net.IPNet'
  1465. type: array
  1466. endpoint:
  1467. allOf:
  1468. - $ref: '#/definitions/net.UDPAddr'
  1469. description: Endpoint specifies the endpoint of this peer entry, if not nil.
  1470. persistentKeepaliveInterval:
  1471. description: |-
  1472. PersistentKeepaliveInterval specifies the persistent keepalive interval
  1473. for this peer, if not nil.
  1474. A non-nil value of 0 will clear the persistent keepalive interval.
  1475. type: integer
  1476. presharedKey:
  1477. description: |-
  1478. PresharedKey specifies a peer's preshared key configuration, if not nil.
  1479. A non-nil, zero-value Key will clear the preshared key.
  1480. items:
  1481. type: integer
  1482. type: array
  1483. publicKey:
  1484. description: |-
  1485. PublicKey specifies the public key of this peer. PublicKey is a
  1486. mandatory field for all PeerConfigs.
  1487. items:
  1488. type: integer
  1489. type: array
  1490. remove:
  1491. description: |-
  1492. Remove specifies if the peer with this public key should be removed
  1493. from a device's peer list.
  1494. type: boolean
  1495. replaceAllowedIPs:
  1496. description: |-
  1497. ReplaceAllowedIPs specifies if the allowed IPs specified in this peer
  1498. configuration should replace any existing ones, instead of appending them
  1499. to the allowed IPs list.
  1500. type: boolean
  1501. updateOnly:
  1502. description: |-
  1503. UpdateOnly specifies that an operation will only occur on this peer
  1504. if the peer already exists as part of the interface.
  1505. type: boolean
  1506. type: object
  1507. host: api.demo.netmaker.io
  1508. info:
  1509. contact: {}
  1510. description: NetMaker API Docs
  1511. title: NetMaker
  1512. version: 1.0.0
  1513. paths:
  1514. /api/dns:
  1515. get:
  1516. consumes:
  1517. - application/json
  1518. responses:
  1519. "200":
  1520. description: OK
  1521. schema:
  1522. items:
  1523. $ref: '#/definitions/models.DNSEntry'
  1524. type: array
  1525. "500":
  1526. description: Internal Server Error
  1527. schema:
  1528. $ref: '#/definitions/models.ErrorResponse'
  1529. summary: Get all DNS entries
  1530. tags:
  1531. - DNS
  1532. /api/dns/{network}:
  1533. get:
  1534. consumes:
  1535. - application/json
  1536. parameters:
  1537. - description: Network identifier
  1538. in: path
  1539. name: network
  1540. required: true
  1541. type: string
  1542. responses:
  1543. "200":
  1544. description: OK
  1545. schema:
  1546. items:
  1547. $ref: '#/definitions/models.DNSEntry'
  1548. type: array
  1549. "500":
  1550. description: Internal Server Error
  1551. schema:
  1552. $ref: '#/definitions/models.ErrorResponse'
  1553. summary: Gets node DNS entries associated with a network
  1554. tags:
  1555. - DNS
  1556. /api/dns/{network}/{domain}:
  1557. delete:
  1558. consumes:
  1559. - application/json
  1560. parameters:
  1561. - description: Network identifier
  1562. in: path
  1563. name: network
  1564. required: true
  1565. type: string
  1566. - description: Domain Name
  1567. in: path
  1568. name: domain
  1569. required: true
  1570. type: string
  1571. responses:
  1572. "200":
  1573. description: OK
  1574. schema:
  1575. items:
  1576. $ref: '#/definitions/models.DNSEntry'
  1577. type: array
  1578. "500":
  1579. description: Internal Server Error
  1580. schema:
  1581. $ref: '#/definitions/models.ErrorResponse'
  1582. summary: Delete a DNS entry
  1583. tags:
  1584. - DNS
  1585. /api/dns/adm/{network}:
  1586. get:
  1587. consumes:
  1588. - application/json
  1589. parameters:
  1590. - description: Network identifier
  1591. in: path
  1592. name: network
  1593. required: true
  1594. type: string
  1595. responses:
  1596. "200":
  1597. description: OK
  1598. schema:
  1599. items:
  1600. $ref: '#/definitions/models.DNSEntry'
  1601. type: array
  1602. "500":
  1603. description: Internal Server Error
  1604. schema:
  1605. $ref: '#/definitions/models.ErrorResponse'
  1606. summary: Get all DNS entries associated with the network
  1607. tags:
  1608. - DNS
  1609. post:
  1610. consumes:
  1611. - application/json
  1612. parameters:
  1613. - description: Network identifier
  1614. in: path
  1615. name: network
  1616. required: true
  1617. type: string
  1618. - description: DNS entry details
  1619. in: body
  1620. name: body
  1621. required: true
  1622. schema:
  1623. $ref: '#/definitions/models.DNSEntry'
  1624. responses:
  1625. "200":
  1626. description: OK
  1627. schema:
  1628. $ref: '#/definitions/models.DNSEntry'
  1629. "400":
  1630. description: Bad Request
  1631. schema:
  1632. $ref: '#/definitions/models.ErrorResponse'
  1633. "500":
  1634. description: Internal Server Error
  1635. schema:
  1636. $ref: '#/definitions/models.ErrorResponse'
  1637. summary: Create a new DNS entry
  1638. tags:
  1639. - DNS
  1640. /api/dns/adm/{network}/custom:
  1641. get:
  1642. consumes:
  1643. - application/json
  1644. parameters:
  1645. - description: Network identifier
  1646. in: path
  1647. name: network
  1648. required: true
  1649. type: string
  1650. responses:
  1651. "200":
  1652. description: OK
  1653. schema:
  1654. items:
  1655. $ref: '#/definitions/models.DNSEntry'
  1656. type: array
  1657. "500":
  1658. description: Internal Server Error
  1659. schema:
  1660. $ref: '#/definitions/models.ErrorResponse'
  1661. summary: Gets custom DNS entries associated with a network
  1662. tags:
  1663. - DNS
  1664. /api/dns/adm/{network}/sync:
  1665. post:
  1666. consumes:
  1667. - application/json
  1668. responses:
  1669. "200":
  1670. description: DNS Sync completed successfully
  1671. schema:
  1672. type: string
  1673. "400":
  1674. description: Bad Request
  1675. schema:
  1676. $ref: '#/definitions/models.ErrorResponse'
  1677. "500":
  1678. description: Internal Server Error
  1679. schema:
  1680. $ref: '#/definitions/models.ErrorResponse'
  1681. summary: Sync DNS entries for a given network
  1682. tags:
  1683. - DNS
  1684. /api/dns/adm/pushdns:
  1685. post:
  1686. consumes:
  1687. - application/json
  1688. responses:
  1689. "200":
  1690. description: DNS Pushed to CoreDNS
  1691. schema:
  1692. type: string
  1693. "400":
  1694. description: Bad Request
  1695. schema:
  1696. $ref: '#/definitions/models.ErrorResponse'
  1697. "500":
  1698. description: Internal Server Error
  1699. schema:
  1700. $ref: '#/definitions/models.ErrorResponse'
  1701. summary: Push DNS entries to nameserver
  1702. tags:
  1703. - DNS
  1704. /api/emqx/hosts:
  1705. delete:
  1706. responses:
  1707. "200":
  1708. description: deleted hosts data on emqx
  1709. schema:
  1710. type: string
  1711. "500":
  1712. description: Internal Server Error
  1713. schema:
  1714. $ref: '#/definitions/models.ErrorResponse'
  1715. security:
  1716. - oauth: []
  1717. summary: Deletes all EMQX hosts
  1718. tags:
  1719. - Hosts
  1720. /api/extclients:
  1721. get:
  1722. responses:
  1723. "200":
  1724. description: OK
  1725. schema:
  1726. $ref: '#/definitions/models.ExtClient'
  1727. "500":
  1728. description: Internal Server Error
  1729. schema:
  1730. $ref: '#/definitions/models.ErrorResponse'
  1731. security:
  1732. - oauth2: []
  1733. summary: Fetches All Remote Access Clients across all networks
  1734. tags:
  1735. - Remote Access Client
  1736. /api/extclients/{network}:
  1737. get:
  1738. responses:
  1739. "200":
  1740. description: OK
  1741. schema:
  1742. $ref: '#/definitions/models.ExtClient'
  1743. "500":
  1744. description: Internal Server Error
  1745. schema:
  1746. $ref: '#/definitions/models.ErrorResponse'
  1747. security:
  1748. - oauth2: []
  1749. summary: Get all remote access client associated with network
  1750. tags:
  1751. - Remote Access Client
  1752. /api/extclients/{network}/{clientid}:
  1753. delete:
  1754. responses:
  1755. "200":
  1756. description: OK
  1757. "403":
  1758. description: Forbidden
  1759. schema:
  1760. $ref: '#/definitions/models.ErrorResponse'
  1761. "500":
  1762. description: Internal Server Error
  1763. schema:
  1764. $ref: '#/definitions/models.ErrorResponse'
  1765. security:
  1766. - oauth2: []
  1767. summary: Delete an individual remote access client
  1768. tags:
  1769. - Remote Access Client
  1770. get:
  1771. responses:
  1772. "200":
  1773. description: OK
  1774. schema:
  1775. $ref: '#/definitions/models.ExtClient'
  1776. "403":
  1777. description: Forbidden
  1778. schema:
  1779. $ref: '#/definitions/models.ErrorResponse'
  1780. "500":
  1781. description: Internal Server Error
  1782. schema:
  1783. $ref: '#/definitions/models.ErrorResponse'
  1784. security:
  1785. - oauth2: []
  1786. summary: Get an individual remote access client
  1787. tags:
  1788. - Remote Access Client
  1789. put:
  1790. responses:
  1791. "200":
  1792. description: OK
  1793. schema:
  1794. $ref: '#/definitions/models.ExtClient'
  1795. "400":
  1796. description: Bad Request
  1797. schema:
  1798. $ref: '#/definitions/models.ErrorResponse'
  1799. "403":
  1800. description: Forbidden
  1801. schema:
  1802. $ref: '#/definitions/models.ErrorResponse'
  1803. "500":
  1804. description: Internal Server Error
  1805. schema:
  1806. $ref: '#/definitions/models.ErrorResponse'
  1807. security:
  1808. - oauth2: []
  1809. summary: Update an individual remote access client
  1810. tags:
  1811. - Remote Access Client
  1812. /api/extclients/{network}/{clientid}/{type}:
  1813. get:
  1814. responses:
  1815. "200":
  1816. description: OK
  1817. schema:
  1818. $ref: '#/definitions/models.ExtClient'
  1819. "403":
  1820. description: Forbidden
  1821. schema:
  1822. $ref: '#/definitions/models.ErrorResponse'
  1823. "500":
  1824. description: Internal Server Error
  1825. schema:
  1826. $ref: '#/definitions/models.ErrorResponse'
  1827. security:
  1828. - oauth2: []
  1829. summary: Get an individual remote access client
  1830. tags:
  1831. - Remote Access Client
  1832. /api/extclients/{network}/{nodeid}:
  1833. post:
  1834. responses:
  1835. "200":
  1836. description: OK
  1837. schema:
  1838. type: string
  1839. "400":
  1840. description: Bad Request
  1841. schema:
  1842. $ref: '#/definitions/models.ErrorResponse'
  1843. "403":
  1844. description: Forbidden
  1845. schema:
  1846. $ref: '#/definitions/models.ErrorResponse'
  1847. "500":
  1848. description: Internal Server Error
  1849. schema:
  1850. $ref: '#/definitions/models.ErrorResponse'
  1851. security:
  1852. - oauth2: []
  1853. summary: Create an individual remote access client
  1854. tags:
  1855. - Remote Access Client
  1856. /api/getip:
  1857. get:
  1858. responses:
  1859. "200":
  1860. description: The public IP address.
  1861. schema:
  1862. type: string
  1863. "400":
  1864. description: Invalid IP address or no IP found.
  1865. schema:
  1866. type: string
  1867. security:
  1868. - oauth2: []
  1869. summary: Get the current public IP address.
  1870. tags:
  1871. - IP Service
  1872. /api/host/{hostid}/peer_info:
  1873. get:
  1874. parameters:
  1875. - description: Host ID
  1876. in: path
  1877. name: hostid
  1878. required: true
  1879. type: string
  1880. responses:
  1881. "200":
  1882. description: OK
  1883. schema:
  1884. $ref: '#/definitions/models.SuccessResponse'
  1885. "500":
  1886. description: Internal Server Error
  1887. schema:
  1888. $ref: '#/definitions/models.ErrorResponse'
  1889. security:
  1890. - oauth: []
  1891. summary: Fetches host peerinfo
  1892. tags:
  1893. - Hosts
  1894. /api/hosts:
  1895. get:
  1896. responses:
  1897. "200":
  1898. description: OK
  1899. schema:
  1900. items:
  1901. $ref: '#/definitions/models.ApiHost'
  1902. type: array
  1903. "500":
  1904. description: Internal Server Error
  1905. schema:
  1906. $ref: '#/definitions/models.ErrorResponse'
  1907. security:
  1908. - oauth: []
  1909. summary: List all hosts
  1910. tags:
  1911. - Hosts
  1912. /api/hosts/{hostid}:
  1913. delete:
  1914. parameters:
  1915. - description: Host ID
  1916. in: path
  1917. name: hostid
  1918. required: true
  1919. type: string
  1920. - description: Force delete
  1921. in: query
  1922. name: force
  1923. type: boolean
  1924. responses:
  1925. "200":
  1926. description: OK
  1927. schema:
  1928. $ref: '#/definitions/models.ApiHost'
  1929. "500":
  1930. description: Internal Server Error
  1931. schema:
  1932. $ref: '#/definitions/models.ErrorResponse'
  1933. security:
  1934. - oauth: []
  1935. summary: Deletes a Netclient host from Netmaker server
  1936. tags:
  1937. - Hosts
  1938. put:
  1939. parameters:
  1940. - description: Host ID
  1941. in: path
  1942. name: hostid
  1943. required: true
  1944. type: string
  1945. - description: New host data
  1946. in: body
  1947. name: body
  1948. required: true
  1949. schema:
  1950. $ref: '#/definitions/models.ApiHost'
  1951. responses:
  1952. "200":
  1953. description: OK
  1954. schema:
  1955. $ref: '#/definitions/models.ApiHost'
  1956. "500":
  1957. description: Internal Server Error
  1958. schema:
  1959. $ref: '#/definitions/models.ErrorResponse'
  1960. security:
  1961. - oauth: []
  1962. summary: Updates a Netclient host on Netmaker server
  1963. tags:
  1964. - Hosts
  1965. /api/hosts/{hostid}/keys:
  1966. put:
  1967. parameters:
  1968. - description: Host ID
  1969. in: path
  1970. name: hostid
  1971. required: true
  1972. type: string
  1973. responses:
  1974. "200":
  1975. description: OK
  1976. schema:
  1977. type: string
  1978. "400":
  1979. description: Bad Request
  1980. schema:
  1981. $ref: '#/definitions/models.ErrorResponse'
  1982. security:
  1983. - oauth: []
  1984. summary: Update keys for a host
  1985. tags:
  1986. - Hosts
  1987. /api/hosts/{hostid}/networks/{network}:
  1988. delete:
  1989. parameters:
  1990. - description: Host ID
  1991. in: path
  1992. name: hostid
  1993. required: true
  1994. type: string
  1995. - description: Network name
  1996. in: path
  1997. name: network
  1998. required: true
  1999. type: string
  2000. - description: Force delete
  2001. in: query
  2002. name: force
  2003. type: boolean
  2004. responses:
  2005. "200":
  2006. description: OK
  2007. schema:
  2008. type: string
  2009. "500":
  2010. description: Internal Server Error
  2011. schema:
  2012. $ref: '#/definitions/models.ErrorResponse'
  2013. security:
  2014. - oauth: []
  2015. summary: To Remove Host from Network
  2016. tags:
  2017. - Hosts
  2018. post:
  2019. parameters:
  2020. - description: Host ID
  2021. in: path
  2022. name: hostid
  2023. required: true
  2024. type: string
  2025. - description: Network name
  2026. in: path
  2027. name: network
  2028. required: true
  2029. type: string
  2030. responses:
  2031. "200":
  2032. description: OK
  2033. schema:
  2034. type: string
  2035. "500":
  2036. description: Internal Server Error
  2037. schema:
  2038. $ref: '#/definitions/models.ErrorResponse'
  2039. security:
  2040. - oauth: []
  2041. summary: To Add Host To Network
  2042. tags:
  2043. - Hosts
  2044. /api/hosts/{hostid}/sync:
  2045. post:
  2046. parameters:
  2047. - description: Host ID
  2048. in: path
  2049. name: hostid
  2050. required: true
  2051. type: string
  2052. responses:
  2053. "200":
  2054. description: OK
  2055. schema:
  2056. type: string
  2057. "400":
  2058. description: Bad Request
  2059. schema:
  2060. $ref: '#/definitions/models.ErrorResponse'
  2061. security:
  2062. - oauth: []
  2063. summary: Requests a host to pull
  2064. tags:
  2065. - Hosts
  2066. /api/hosts/{hostid}/upgrade:
  2067. put:
  2068. parameters:
  2069. - description: Host ID
  2070. in: path
  2071. name: hostid
  2072. required: true
  2073. type: string
  2074. - description: Force upgrade
  2075. in: query
  2076. name: force
  2077. type: boolean
  2078. responses:
  2079. "200":
  2080. description: passed message to upgrade host
  2081. schema:
  2082. type: string
  2083. "500":
  2084. description: Internal Server Error
  2085. schema:
  2086. $ref: '#/definitions/models.ErrorResponse'
  2087. security:
  2088. - oauth: []
  2089. summary: Upgrade a host
  2090. tags:
  2091. - Hosts
  2092. /api/hosts/adm/authenticate:
  2093. post:
  2094. consumes:
  2095. - application/json
  2096. parameters:
  2097. - description: Authentication parameters
  2098. in: body
  2099. name: body
  2100. required: true
  2101. schema:
  2102. $ref: '#/definitions/models.AuthParams'
  2103. responses:
  2104. "200":
  2105. description: OK
  2106. schema:
  2107. $ref: '#/definitions/models.SuccessResponse'
  2108. "400":
  2109. description: Bad Request
  2110. schema:
  2111. $ref: '#/definitions/models.ErrorResponse'
  2112. "401":
  2113. description: Unauthorized
  2114. schema:
  2115. $ref: '#/definitions/models.ErrorResponse'
  2116. "500":
  2117. description: Internal Server Error
  2118. schema:
  2119. $ref: '#/definitions/models.ErrorResponse'
  2120. summary: To Fetch Auth Token for a Host
  2121. tags:
  2122. - Auth
  2123. /api/hosts/keys:
  2124. put:
  2125. responses:
  2126. "200":
  2127. description: OK
  2128. schema:
  2129. type: string
  2130. "400":
  2131. description: Bad Request
  2132. schema:
  2133. $ref: '#/definitions/models.ErrorResponse'
  2134. security:
  2135. - oauth: []
  2136. summary: Update keys for all hosts
  2137. tags:
  2138. - Hosts
  2139. /api/hosts/sync:
  2140. post:
  2141. responses:
  2142. "200":
  2143. description: sync all hosts request received
  2144. schema:
  2145. type: string
  2146. security:
  2147. - oauth: []
  2148. summary: Requests all the hosts to pull
  2149. tags:
  2150. - Hosts
  2151. /api/hosts/upgrade:
  2152. post:
  2153. parameters:
  2154. - description: Force upgrade
  2155. in: query
  2156. name: force
  2157. type: boolean
  2158. responses:
  2159. "200":
  2160. description: upgrade all hosts request received
  2161. schema:
  2162. type: string
  2163. security:
  2164. - oauth: []
  2165. summary: Requests all the hosts to upgrade their version
  2166. tags:
  2167. - Hosts
  2168. /api/networks:
  2169. get:
  2170. produces:
  2171. - application/json
  2172. responses:
  2173. "200":
  2174. description: OK
  2175. schema:
  2176. $ref: '#/definitions/models.Network'
  2177. "500":
  2178. description: Internal Server Error
  2179. schema:
  2180. $ref: '#/definitions/models.ErrorResponse'
  2181. security:
  2182. - oauth: []
  2183. summary: Lists all networks
  2184. tags:
  2185. - Networks
  2186. post:
  2187. parameters:
  2188. - description: Network details
  2189. in: body
  2190. name: body
  2191. required: true
  2192. schema:
  2193. $ref: '#/definitions/models.Network'
  2194. produces:
  2195. - application/json
  2196. responses:
  2197. "200":
  2198. description: OK
  2199. schema:
  2200. $ref: '#/definitions/models.Network'
  2201. "400":
  2202. description: Bad Request
  2203. schema:
  2204. $ref: '#/definitions/models.ErrorResponse'
  2205. security:
  2206. - oauth: []
  2207. summary: Create a network
  2208. tags:
  2209. - Networks
  2210. /api/networks/{networkname}:
  2211. delete:
  2212. parameters:
  2213. - description: Network name
  2214. in: path
  2215. name: networkname
  2216. required: true
  2217. type: string
  2218. - description: Force Delete
  2219. in: query
  2220. name: force
  2221. type: boolean
  2222. produces:
  2223. - application/json
  2224. responses:
  2225. "200":
  2226. description: OK
  2227. schema:
  2228. $ref: '#/definitions/models.SuccessResponse'
  2229. "400":
  2230. description: Bad Request
  2231. schema:
  2232. $ref: '#/definitions/models.ErrorResponse'
  2233. "403":
  2234. description: Forbidden
  2235. schema:
  2236. $ref: '#/definitions/models.ErrorResponse'
  2237. security:
  2238. - oauth: []
  2239. summary: Delete a network
  2240. tags:
  2241. - Networks
  2242. get:
  2243. parameters:
  2244. - description: Network name
  2245. in: path
  2246. name: networkname
  2247. required: true
  2248. type: string
  2249. produces:
  2250. - application/json
  2251. responses:
  2252. "200":
  2253. description: OK
  2254. schema:
  2255. $ref: '#/definitions/models.Network'
  2256. "500":
  2257. description: Internal Server Error
  2258. schema:
  2259. $ref: '#/definitions/models.ErrorResponse'
  2260. security:
  2261. - oauth: []
  2262. summary: Get a network
  2263. tags:
  2264. - Networks
  2265. put:
  2266. parameters:
  2267. - description: Network name
  2268. in: path
  2269. name: networkname
  2270. required: true
  2271. type: string
  2272. - description: Network details
  2273. in: body
  2274. name: body
  2275. required: true
  2276. schema:
  2277. $ref: '#/definitions/models.Network'
  2278. produces:
  2279. - application/json
  2280. responses:
  2281. "200":
  2282. description: OK
  2283. schema:
  2284. $ref: '#/definitions/models.Network'
  2285. "400":
  2286. description: Bad Request
  2287. schema:
  2288. $ref: '#/definitions/models.ErrorResponse'
  2289. security:
  2290. - oauth: []
  2291. summary: Update network settings
  2292. tags:
  2293. - Networks
  2294. /api/networks/{networkname}/acls:
  2295. get:
  2296. parameters:
  2297. - description: Network name
  2298. in: path
  2299. name: networkname
  2300. required: true
  2301. type: string
  2302. produces:
  2303. - application/json
  2304. responses:
  2305. "200":
  2306. description: OK
  2307. schema:
  2308. $ref: '#/definitions/acls.ACLContainer'
  2309. "500":
  2310. description: Internal Server Error
  2311. schema:
  2312. $ref: '#/definitions/models.ErrorResponse'
  2313. security:
  2314. - oauth: []
  2315. summary: Get a network ACL (Access Control List)
  2316. tags:
  2317. - Networks
  2318. put:
  2319. parameters:
  2320. - description: Network name
  2321. in: path
  2322. name: networkname
  2323. required: true
  2324. type: string
  2325. - description: ACL container
  2326. in: body
  2327. name: body
  2328. required: true
  2329. schema:
  2330. $ref: '#/definitions/acls.ACLContainer'
  2331. produces:
  2332. - application/json
  2333. responses:
  2334. "200":
  2335. description: OK
  2336. schema:
  2337. $ref: '#/definitions/acls.ACLContainer'
  2338. "400":
  2339. description: Bad Request
  2340. schema:
  2341. $ref: '#/definitions/models.ErrorResponse'
  2342. "500":
  2343. description: Internal Server Error
  2344. schema:
  2345. $ref: '#/definitions/models.ErrorResponse'
  2346. security:
  2347. - oauth: []
  2348. summary: Update a network ACL (Access Control List)
  2349. tags:
  2350. - Networks
  2351. /api/networks/{networkname}/acls/v2:
  2352. put:
  2353. parameters:
  2354. - description: Network name
  2355. in: path
  2356. name: networkname
  2357. required: true
  2358. type: string
  2359. - description: ACL container
  2360. in: body
  2361. name: body
  2362. required: true
  2363. schema:
  2364. $ref: '#/definitions/acls.ACLContainer'
  2365. produces:
  2366. - application/json
  2367. responses:
  2368. "200":
  2369. description: OK
  2370. schema:
  2371. $ref: '#/definitions/acls.ACLContainer'
  2372. "400":
  2373. description: Bad Request
  2374. schema:
  2375. $ref: '#/definitions/models.ErrorResponse'
  2376. "500":
  2377. description: Internal Server Error
  2378. schema:
  2379. $ref: '#/definitions/models.ErrorResponse'
  2380. security:
  2381. - oauth: []
  2382. summary: Update a network ACL (Access Control List)
  2383. tags:
  2384. - Networks
  2385. /api/networks/{networkname}/egress_routes:
  2386. get:
  2387. parameters:
  2388. - description: Network name
  2389. in: path
  2390. name: networkname
  2391. required: true
  2392. type: string
  2393. produces:
  2394. - application/json
  2395. responses:
  2396. "200":
  2397. description: OK
  2398. schema:
  2399. $ref: '#/definitions/models.SuccessResponse'
  2400. "500":
  2401. description: Internal Server Error
  2402. schema:
  2403. $ref: '#/definitions/models.ErrorResponse'
  2404. security:
  2405. - oauth: []
  2406. summary: Get a network Egress routes
  2407. tags:
  2408. - Networks
  2409. /api/nodes:
  2410. get:
  2411. responses:
  2412. "200":
  2413. description: OK
  2414. schema:
  2415. items:
  2416. $ref: '#/definitions/models.ApiNode'
  2417. type: array
  2418. "500":
  2419. description: Internal Server Error
  2420. schema:
  2421. $ref: '#/definitions/models.ErrorResponse'
  2422. summary: Get all nodes across all networks
  2423. tags:
  2424. - Nodes
  2425. /api/nodes/{network}/{nodeid}:
  2426. delete:
  2427. responses:
  2428. "200":
  2429. description: Node deleted.
  2430. schema:
  2431. type: string
  2432. "500":
  2433. description: Internal Server Error
  2434. schema:
  2435. $ref: '#/definitions/models.ErrorResponse'
  2436. security:
  2437. - oauth2: []
  2438. summary: Delete an individual node
  2439. tags:
  2440. - Nodes
  2441. get:
  2442. responses:
  2443. "200":
  2444. description: OK
  2445. schema:
  2446. $ref: '#/definitions/models.NodeGet'
  2447. "500":
  2448. description: Internal Server Error
  2449. schema:
  2450. $ref: '#/definitions/models.ErrorResponse'
  2451. security:
  2452. - oauth2: []
  2453. summary: Get an individual node
  2454. tags:
  2455. - Nodes
  2456. put:
  2457. responses:
  2458. "200":
  2459. description: OK
  2460. schema:
  2461. $ref: '#/definitions/models.ApiNode'
  2462. "500":
  2463. description: Internal Server Error
  2464. schema:
  2465. $ref: '#/definitions/models.ErrorResponse'
  2466. security:
  2467. - oauth2: []
  2468. summary: Update an individual node
  2469. tags:
  2470. - Nodes
  2471. /api/nodes/{network}/{nodeid}/creategateway:
  2472. post:
  2473. responses:
  2474. "200":
  2475. description: OK
  2476. schema:
  2477. $ref: '#/definitions/models.ApiNode'
  2478. "500":
  2479. description: Internal Server Error
  2480. schema:
  2481. $ref: '#/definitions/models.ErrorResponse'
  2482. security:
  2483. - oauth2: []
  2484. summary: Create an egress gateway
  2485. tags:
  2486. - Nodes
  2487. /api/nodes/{network}/{nodeid}/deletegateway:
  2488. delete:
  2489. responses:
  2490. "200":
  2491. description: OK
  2492. schema:
  2493. $ref: '#/definitions/models.ApiNode'
  2494. "500":
  2495. description: Internal Server Error
  2496. schema:
  2497. $ref: '#/definitions/models.ErrorResponse'
  2498. security:
  2499. - oauth2: []
  2500. summary: Delete an egress gateway
  2501. tags:
  2502. - Nodes
  2503. /api/nodes/{network}/{nodeid}/gateway:
  2504. delete:
  2505. responses:
  2506. "200":
  2507. description: OK
  2508. schema:
  2509. $ref: '#/definitions/models.ApiNode'
  2510. "500":
  2511. description: Internal Server Error
  2512. schema:
  2513. $ref: '#/definitions/models.ErrorResponse'
  2514. security:
  2515. - oauth2: []
  2516. summary: Delete a gateway
  2517. tags:
  2518. - Nodes
  2519. post:
  2520. responses:
  2521. "200":
  2522. description: OK
  2523. schema:
  2524. $ref: '#/definitions/models.ApiNode'
  2525. "500":
  2526. description: Internal Server Error
  2527. schema:
  2528. $ref: '#/definitions/models.ErrorResponse'
  2529. security:
  2530. - oauth2: []
  2531. summary: Create a gateway
  2532. tags:
  2533. - Nodes
  2534. /api/nodes/{network}/{nodeid}/inet_gw:
  2535. delete:
  2536. parameters:
  2537. - description: Network ID
  2538. in: path
  2539. name: network
  2540. required: true
  2541. type: string
  2542. - description: Node ID
  2543. in: path
  2544. name: nodeid
  2545. required: true
  2546. type: string
  2547. responses:
  2548. "200":
  2549. description: OK
  2550. schema:
  2551. $ref: '#/definitions/models.Node'
  2552. "400":
  2553. description: Bad Request
  2554. schema:
  2555. $ref: '#/definitions/models.ErrorResponse'
  2556. "500":
  2557. description: Internal Server Error
  2558. schema:
  2559. $ref: '#/definitions/models.ErrorResponse'
  2560. summary: Delete an internet gateway
  2561. tags:
  2562. - PRO
  2563. post:
  2564. consumes:
  2565. - application/json
  2566. parameters:
  2567. - description: Network ID
  2568. in: path
  2569. name: network
  2570. required: true
  2571. type: string
  2572. - description: Node ID
  2573. in: path
  2574. name: nodeid
  2575. required: true
  2576. type: string
  2577. - description: Internet gateway request
  2578. in: body
  2579. name: body
  2580. required: true
  2581. schema:
  2582. $ref: '#/definitions/models.InetNodeReq'
  2583. responses:
  2584. "200":
  2585. description: OK
  2586. schema:
  2587. $ref: '#/definitions/models.Node'
  2588. "400":
  2589. description: Bad Request
  2590. schema:
  2591. $ref: '#/definitions/models.ErrorResponse'
  2592. "500":
  2593. description: Internal Server Error
  2594. schema:
  2595. $ref: '#/definitions/models.ErrorResponse'
  2596. summary: Create an internet gateway
  2597. tags:
  2598. - PRO
  2599. put:
  2600. consumes:
  2601. - application/json
  2602. parameters:
  2603. - description: Network ID
  2604. in: path
  2605. name: network
  2606. required: true
  2607. type: string
  2608. - description: Node ID
  2609. in: path
  2610. name: nodeid
  2611. required: true
  2612. type: string
  2613. - description: Internet gateway request
  2614. in: body
  2615. name: body
  2616. required: true
  2617. schema:
  2618. $ref: '#/definitions/models.InetNodeReq'
  2619. responses:
  2620. "200":
  2621. description: OK
  2622. schema:
  2623. $ref: '#/definitions/models.Node'
  2624. "400":
  2625. description: Bad Request
  2626. schema:
  2627. $ref: '#/definitions/models.ErrorResponse'
  2628. "500":
  2629. description: Internal Server Error
  2630. schema:
  2631. $ref: '#/definitions/models.ErrorResponse'
  2632. summary: Update an internet gateway
  2633. tags:
  2634. - PRO
  2635. /api/nodes/{network}/{nodeid}/ingress/users:
  2636. get:
  2637. consumes:
  2638. - application/json
  2639. parameters:
  2640. - description: Ingress Gateway ID
  2641. in: path
  2642. name: ingress_id
  2643. required: true
  2644. type: string
  2645. produces:
  2646. - application/json
  2647. responses:
  2648. "200":
  2649. description: OK
  2650. schema:
  2651. items:
  2652. $ref: '#/definitions/models.IngressGwUsers'
  2653. type: array
  2654. "400":
  2655. description: Bad Request
  2656. schema:
  2657. $ref: '#/definitions/models.ErrorResponse'
  2658. "500":
  2659. description: Internal Server Error
  2660. schema:
  2661. $ref: '#/definitions/models.ErrorResponse'
  2662. summary: List users attached to an remote access gateway
  2663. tags:
  2664. - PRO
  2665. /api/nodes/adm/{network}:
  2666. get:
  2667. responses:
  2668. "200":
  2669. description: OK
  2670. schema:
  2671. items:
  2672. $ref: '#/definitions/models.Node'
  2673. type: array
  2674. "500":
  2675. description: Internal Server Error
  2676. schema:
  2677. $ref: '#/definitions/models.ErrorResponse'
  2678. summary: Gets all nodes associated with network including pending nodes
  2679. tags:
  2680. - Nodes
  2681. /api/server/getconfig:
  2682. get:
  2683. responses:
  2684. "200":
  2685. description: OK
  2686. schema:
  2687. $ref: '#/definitions/config.ServerConfig'
  2688. security:
  2689. - oauth2: []
  2690. summary: Get the server configuration
  2691. tags:
  2692. - Server
  2693. /api/server/getserverinfo:
  2694. get:
  2695. responses:
  2696. "200":
  2697. description: OK
  2698. schema:
  2699. $ref: '#/definitions/models.ServerConfig'
  2700. security:
  2701. - oauth2: []
  2702. summary: Get the server information
  2703. tags:
  2704. - Server
  2705. /api/server/status:
  2706. get:
  2707. responses: {}
  2708. security:
  2709. - oauth2: []
  2710. summary: Get the server status
  2711. tags:
  2712. - Server
  2713. /api/users/{username}:
  2714. delete:
  2715. parameters:
  2716. - description: Username of the user to delete
  2717. in: path
  2718. name: username
  2719. required: true
  2720. type: string
  2721. responses:
  2722. "200":
  2723. description: OK
  2724. schema:
  2725. type: string
  2726. "500":
  2727. description: Internal Server Error
  2728. schema:
  2729. $ref: '#/definitions/models.ErrorResponse'
  2730. summary: Delete a user
  2731. tags:
  2732. - Users
  2733. get:
  2734. parameters:
  2735. - description: Username of the user to fetch
  2736. in: path
  2737. name: username
  2738. required: true
  2739. type: string
  2740. responses:
  2741. "200":
  2742. description: OK
  2743. schema:
  2744. $ref: '#/definitions/models.User'
  2745. "500":
  2746. description: Internal Server Error
  2747. schema:
  2748. $ref: '#/definitions/models.ErrorResponse'
  2749. summary: Get an individual user
  2750. tags:
  2751. - Users
  2752. post:
  2753. parameters:
  2754. - description: Username of the user to create
  2755. in: path
  2756. name: username
  2757. required: true
  2758. type: string
  2759. - description: User details
  2760. in: body
  2761. name: body
  2762. required: true
  2763. schema:
  2764. $ref: '#/definitions/models.User'
  2765. responses:
  2766. "200":
  2767. description: OK
  2768. schema:
  2769. $ref: '#/definitions/models.User'
  2770. "400":
  2771. description: Bad Request
  2772. schema:
  2773. $ref: '#/definitions/models.ErrorResponse'
  2774. "403":
  2775. description: Forbidden
  2776. schema:
  2777. $ref: '#/definitions/models.ErrorResponse'
  2778. "500":
  2779. description: Internal Server Error
  2780. schema:
  2781. $ref: '#/definitions/models.ErrorResponse'
  2782. summary: Create a user
  2783. tags:
  2784. - Users
  2785. put:
  2786. parameters:
  2787. - description: Username of the user to update
  2788. in: path
  2789. name: username
  2790. required: true
  2791. type: string
  2792. - description: User details
  2793. in: body
  2794. name: body
  2795. required: true
  2796. schema:
  2797. $ref: '#/definitions/models.User'
  2798. responses:
  2799. "200":
  2800. description: OK
  2801. schema:
  2802. $ref: '#/definitions/models.User'
  2803. "400":
  2804. description: Bad Request
  2805. schema:
  2806. $ref: '#/definitions/models.ErrorResponse'
  2807. "403":
  2808. description: Forbidden
  2809. schema:
  2810. $ref: '#/definitions/models.ErrorResponse'
  2811. "500":
  2812. description: Internal Server Error
  2813. schema:
  2814. $ref: '#/definitions/models.ErrorResponse'
  2815. summary: Update a user
  2816. tags:
  2817. - Users
  2818. /api/users/{username}/remote_access_gw:
  2819. get:
  2820. parameters:
  2821. - description: Username to fetch all the gateways with access
  2822. in: path
  2823. name: username
  2824. required: true
  2825. type: string
  2826. responses:
  2827. "200":
  2828. description: OK
  2829. schema:
  2830. additionalProperties:
  2831. items:
  2832. $ref: '#/definitions/models.UserRemoteGws'
  2833. type: array
  2834. type: object
  2835. "500":
  2836. description: Internal Server Error
  2837. schema:
  2838. $ref: '#/definitions/models.ErrorResponse'
  2839. summary: Get Users Remote Access Gw.
  2840. tags:
  2841. - Users
  2842. /api/users/{username}/remote_access_gw/{remote_access_gateway_id}:
  2843. delete:
  2844. consumes:
  2845. - application/json
  2846. parameters:
  2847. - description: Username
  2848. in: path
  2849. name: username
  2850. required: true
  2851. type: string
  2852. - description: Remote Access Gateway ID
  2853. in: path
  2854. name: remote_access_gateway_id
  2855. required: true
  2856. type: string
  2857. produces:
  2858. - application/json
  2859. responses:
  2860. "200":
  2861. description: OK
  2862. schema:
  2863. $ref: '#/definitions/models.ReturnUser'
  2864. "400":
  2865. description: Bad Request
  2866. schema:
  2867. $ref: '#/definitions/models.ErrorResponse'
  2868. "500":
  2869. description: Internal Server Error
  2870. schema:
  2871. $ref: '#/definitions/models.ErrorResponse'
  2872. summary: Remove user from a remote access gateway
  2873. tags:
  2874. - PRO
  2875. post:
  2876. consumes:
  2877. - application/json
  2878. parameters:
  2879. - description: Username
  2880. in: path
  2881. name: username
  2882. required: true
  2883. type: string
  2884. - description: Remote Access Gateway ID
  2885. in: path
  2886. name: remote_access_gateway_id
  2887. required: true
  2888. type: string
  2889. produces:
  2890. - application/json
  2891. responses:
  2892. "200":
  2893. description: OK
  2894. schema:
  2895. $ref: '#/definitions/models.ReturnUser'
  2896. "400":
  2897. description: Bad Request
  2898. schema:
  2899. $ref: '#/definitions/models.ErrorResponse'
  2900. "500":
  2901. description: Internal Server Error
  2902. schema:
  2903. $ref: '#/definitions/models.ErrorResponse'
  2904. summary: Attach user to a remote access gateway
  2905. tags:
  2906. - PRO
  2907. /api/users/adm/authenticate:
  2908. post:
  2909. consumes:
  2910. - application/json
  2911. parameters:
  2912. - description: Authentication parameters
  2913. in: body
  2914. name: body
  2915. required: true
  2916. schema:
  2917. $ref: '#/definitions/models.UserAuthParams'
  2918. responses:
  2919. "200":
  2920. description: OK
  2921. schema:
  2922. $ref: '#/definitions/models.SuccessResponse'
  2923. "400":
  2924. description: Bad Request
  2925. schema:
  2926. $ref: '#/definitions/models.ErrorResponse'
  2927. "401":
  2928. description: Unauthorized
  2929. schema:
  2930. $ref: '#/definitions/models.ErrorResponse'
  2931. "500":
  2932. description: Internal Server Error
  2933. schema:
  2934. $ref: '#/definitions/models.ErrorResponse'
  2935. summary: Authenticate a user to retrieve an authorization token
  2936. tags:
  2937. - Auth
  2938. /api/users/adm/createsuperadmin:
  2939. post:
  2940. parameters:
  2941. - description: User details
  2942. in: body
  2943. name: body
  2944. required: true
  2945. schema:
  2946. $ref: '#/definitions/models.User'
  2947. responses:
  2948. "200":
  2949. description: OK
  2950. schema:
  2951. $ref: '#/definitions/models.User'
  2952. "400":
  2953. description: Bad Request
  2954. schema:
  2955. $ref: '#/definitions/models.ErrorResponse'
  2956. "500":
  2957. description: Internal Server Error
  2958. schema:
  2959. $ref: '#/definitions/models.ErrorResponse'
  2960. summary: Create a super admin
  2961. tags:
  2962. - Users
  2963. /api/users/adm/hassuperadmin:
  2964. get:
  2965. responses:
  2966. "200":
  2967. description: OK
  2968. schema:
  2969. type: boolean
  2970. "500":
  2971. description: Internal Server Error
  2972. schema:
  2973. $ref: '#/definitions/models.ErrorResponse'
  2974. summary: Check if the server has a super admin
  2975. tags:
  2976. - Users
  2977. /api/users/adm/transfersuperadmin/{username}:
  2978. post:
  2979. parameters:
  2980. - description: Username of the user to transfer super admin role
  2981. in: path
  2982. name: username
  2983. required: true
  2984. type: string
  2985. responses:
  2986. "200":
  2987. description: OK
  2988. schema:
  2989. $ref: '#/definitions/models.User'
  2990. "403":
  2991. description: Forbidden
  2992. schema:
  2993. $ref: '#/definitions/models.ErrorResponse'
  2994. "500":
  2995. description: Internal Server Error
  2996. schema:
  2997. $ref: '#/definitions/models.ErrorResponse'
  2998. summary: Transfer super admin role to another admin user
  2999. tags:
  3000. - Users
  3001. /api/users_pending:
  3002. delete:
  3003. responses:
  3004. "200":
  3005. description: OK
  3006. schema:
  3007. type: string
  3008. "500":
  3009. description: Internal Server Error
  3010. schema:
  3011. $ref: '#/definitions/models.ErrorResponse'
  3012. summary: Delete all pending users
  3013. tags:
  3014. - Users
  3015. get:
  3016. responses:
  3017. "200":
  3018. description: OK
  3019. schema:
  3020. items:
  3021. $ref: '#/definitions/models.User'
  3022. type: array
  3023. "500":
  3024. description: Internal Server Error
  3025. schema:
  3026. $ref: '#/definitions/models.ErrorResponse'
  3027. summary: Get all pending users
  3028. tags:
  3029. - Users
  3030. /api/users_pending/user/{username}:
  3031. delete:
  3032. parameters:
  3033. - description: Username of the pending user to delete
  3034. in: path
  3035. name: username
  3036. required: true
  3037. type: string
  3038. responses:
  3039. "200":
  3040. description: OK
  3041. schema:
  3042. type: string
  3043. "500":
  3044. description: Internal Server Error
  3045. schema:
  3046. $ref: '#/definitions/models.ErrorResponse'
  3047. summary: Delete a pending user
  3048. tags:
  3049. - Users
  3050. post:
  3051. parameters:
  3052. - description: Username of the pending user to approve
  3053. in: path
  3054. name: username
  3055. required: true
  3056. type: string
  3057. responses:
  3058. "200":
  3059. description: OK
  3060. schema:
  3061. type: string
  3062. "500":
  3063. description: Internal Server Error
  3064. schema:
  3065. $ref: '#/definitions/models.ErrorResponse'
  3066. summary: Approve a pending user
  3067. tags:
  3068. - Users
  3069. /api/v1/acls:
  3070. delete:
  3071. consumes:
  3072. - application/json
  3073. responses:
  3074. "200":
  3075. description: OK
  3076. schema:
  3077. items:
  3078. $ref: '#/definitions/models.SuccessResponse'
  3079. type: array
  3080. "500":
  3081. description: Internal Server Error
  3082. schema:
  3083. $ref: '#/definitions/models.ErrorResponse'
  3084. summary: Delete Acl
  3085. tags:
  3086. - ACL
  3087. get:
  3088. consumes:
  3089. - application/json
  3090. responses:
  3091. "200":
  3092. description: OK
  3093. schema:
  3094. items:
  3095. $ref: '#/definitions/models.SuccessResponse'
  3096. type: array
  3097. "500":
  3098. description: Internal Server Error
  3099. schema:
  3100. $ref: '#/definitions/models.ErrorResponse'
  3101. summary: List Acls in a network
  3102. tags:
  3103. - ACL
  3104. post:
  3105. consumes:
  3106. - application/json
  3107. responses:
  3108. "200":
  3109. description: OK
  3110. schema:
  3111. items:
  3112. $ref: '#/definitions/models.SuccessResponse'
  3113. type: array
  3114. "500":
  3115. description: Internal Server Error
  3116. schema:
  3117. $ref: '#/definitions/models.ErrorResponse'
  3118. summary: Create Acl
  3119. tags:
  3120. - ACL
  3121. put:
  3122. consumes:
  3123. - application/json
  3124. responses:
  3125. "200":
  3126. description: OK
  3127. schema:
  3128. items:
  3129. $ref: '#/definitions/models.SuccessResponse'
  3130. type: array
  3131. "500":
  3132. description: Internal Server Error
  3133. schema:
  3134. $ref: '#/definitions/models.ErrorResponse'
  3135. summary: Update Acl
  3136. tags:
  3137. - ACL
  3138. /api/v1/acls/policy_types:
  3139. get:
  3140. consumes:
  3141. - application/json
  3142. responses:
  3143. "200":
  3144. description: OK
  3145. schema:
  3146. items:
  3147. $ref: '#/definitions/models.SuccessResponse'
  3148. type: array
  3149. "500":
  3150. description: Internal Server Error
  3151. schema:
  3152. $ref: '#/definitions/models.ErrorResponse'
  3153. summary: List Acl Policy types
  3154. tags:
  3155. - ACL
  3156. /api/v1/enrollment-keys:
  3157. get:
  3158. responses:
  3159. "200":
  3160. description: OK
  3161. schema:
  3162. items:
  3163. $ref: '#/definitions/models.EnrollmentKey'
  3164. type: array
  3165. "500":
  3166. description: Internal Server Error
  3167. schema:
  3168. $ref: '#/definitions/models.ErrorResponse'
  3169. security:
  3170. - oauth: []
  3171. summary: Lists all EnrollmentKeys for admins
  3172. tags:
  3173. - EnrollmentKeys
  3174. post:
  3175. parameters:
  3176. - description: Enrollment Key parameters
  3177. in: body
  3178. name: body
  3179. required: true
  3180. schema:
  3181. $ref: '#/definitions/models.APIEnrollmentKey'
  3182. responses:
  3183. "200":
  3184. description: OK
  3185. schema:
  3186. $ref: '#/definitions/models.EnrollmentKey'
  3187. "400":
  3188. description: Bad Request
  3189. schema:
  3190. $ref: '#/definitions/models.ErrorResponse'
  3191. "500":
  3192. description: Internal Server Error
  3193. schema:
  3194. $ref: '#/definitions/models.ErrorResponse'
  3195. security:
  3196. - oauth: []
  3197. summary: Creates an EnrollmentKey for hosts to register with server and join
  3198. networks
  3199. tags:
  3200. - EnrollmentKeys
  3201. /api/v1/enrollment-keys/{keyid}:
  3202. delete:
  3203. parameters:
  3204. - description: Enrollment Key ID
  3205. in: path
  3206. name: keyid
  3207. required: true
  3208. type: string
  3209. responses:
  3210. "200":
  3211. description: OK
  3212. "500":
  3213. description: Internal Server Error
  3214. schema:
  3215. $ref: '#/definitions/models.ErrorResponse'
  3216. security:
  3217. - oauth: []
  3218. summary: Deletes an EnrollmentKey from Netmaker server
  3219. tags:
  3220. - EnrollmentKeys
  3221. put:
  3222. parameters:
  3223. - description: Enrollment Key ID
  3224. in: path
  3225. name: keyid
  3226. required: true
  3227. type: string
  3228. - description: Enrollment Key parameters
  3229. in: body
  3230. name: body
  3231. required: true
  3232. schema:
  3233. $ref: '#/definitions/models.APIEnrollmentKey'
  3234. responses:
  3235. "200":
  3236. description: OK
  3237. schema:
  3238. $ref: '#/definitions/models.EnrollmentKey'
  3239. "400":
  3240. description: Bad Request
  3241. schema:
  3242. $ref: '#/definitions/models.ErrorResponse'
  3243. "500":
  3244. description: Internal Server Error
  3245. schema:
  3246. $ref: '#/definitions/models.ErrorResponse'
  3247. security:
  3248. - oauth: []
  3249. summary: Updates an EnrollmentKey. Updates are only limited to the relay to
  3250. use
  3251. tags:
  3252. - EnrollmentKeys
  3253. /api/v1/fallback/host/{hostid}:
  3254. put:
  3255. parameters:
  3256. - description: Host ID
  3257. in: path
  3258. name: hostid
  3259. required: true
  3260. type: string
  3261. - description: Host update data
  3262. in: body
  3263. name: body
  3264. required: true
  3265. schema:
  3266. $ref: '#/definitions/models.HostUpdate'
  3267. responses:
  3268. "200":
  3269. description: updated host data
  3270. schema:
  3271. type: string
  3272. "500":
  3273. description: Internal Server Error
  3274. schema:
  3275. $ref: '#/definitions/models.ErrorResponse'
  3276. security:
  3277. - oauth: []
  3278. summary: Updates a Netclient host on Netmaker server
  3279. tags:
  3280. - Hosts
  3281. /api/v1/host:
  3282. get:
  3283. responses:
  3284. "200":
  3285. description: OK
  3286. schema:
  3287. $ref: '#/definitions/models.HostPull'
  3288. "500":
  3289. description: Internal Server Error
  3290. schema:
  3291. $ref: '#/definitions/models.ErrorResponse'
  3292. security:
  3293. - oauth: []
  3294. summary: Used by clients for "pull" command
  3295. tags:
  3296. - Hosts
  3297. /api/v1/host/{hostid}/signalpeer:
  3298. post:
  3299. parameters:
  3300. - description: Host ID
  3301. in: path
  3302. name: hostid
  3303. required: true
  3304. type: string
  3305. - description: Signal data
  3306. in: body
  3307. name: body
  3308. required: true
  3309. schema:
  3310. $ref: '#/definitions/models.Signal'
  3311. responses:
  3312. "200":
  3313. description: OK
  3314. schema:
  3315. $ref: '#/definitions/models.Signal'
  3316. "400":
  3317. description: Bad Request
  3318. schema:
  3319. $ref: '#/definitions/models.ErrorResponse'
  3320. security:
  3321. - oauth: []
  3322. summary: Send signal to peer
  3323. tags:
  3324. - Hosts
  3325. /api/v1/host/register/{token}:
  3326. post:
  3327. parameters:
  3328. - description: Enrollment Key Token
  3329. in: path
  3330. name: token
  3331. required: true
  3332. type: string
  3333. - description: Host registration parameters
  3334. in: body
  3335. name: body
  3336. required: true
  3337. schema:
  3338. $ref: '#/definitions/models.Host'
  3339. responses:
  3340. "200":
  3341. description: OK
  3342. schema:
  3343. $ref: '#/definitions/models.RegisterResponse'
  3344. "400":
  3345. description: Bad Request
  3346. schema:
  3347. $ref: '#/definitions/models.ErrorResponse'
  3348. "500":
  3349. description: Internal Server Error
  3350. schema:
  3351. $ref: '#/definitions/models.ErrorResponse'
  3352. security:
  3353. - oauth: []
  3354. summary: Handles a Netclient registration with server and add nodes accordingly
  3355. tags:
  3356. - EnrollmentKeys
  3357. /api/v1/legacy/nodes:
  3358. delete:
  3359. responses:
  3360. "200":
  3361. description: Wiped all legacy nodes.
  3362. schema:
  3363. type: string
  3364. "400":
  3365. description: Bad Request
  3366. schema:
  3367. $ref: '#/definitions/models.ErrorResponse'
  3368. security:
  3369. - oauth2: []
  3370. summary: Delete all legacy nodes from DB.
  3371. tags:
  3372. - Nodes
  3373. /api/v1/networks/stats:
  3374. get:
  3375. produces:
  3376. - application/json
  3377. responses:
  3378. "200":
  3379. description: OK
  3380. schema:
  3381. $ref: '#/definitions/models.SuccessResponse'
  3382. "500":
  3383. description: Internal Server Error
  3384. schema:
  3385. $ref: '#/definitions/models.ErrorResponse'
  3386. security:
  3387. - oauth: []
  3388. summary: Lists all networks with stats
  3389. tags:
  3390. - Networks
  3391. /api/v1/node/{network}/failover/reset:
  3392. post:
  3393. parameters:
  3394. - description: Network ID
  3395. in: path
  3396. name: network
  3397. required: true
  3398. type: string
  3399. responses:
  3400. "200":
  3401. description: OK
  3402. schema:
  3403. $ref: '#/definitions/models.SuccessResponse'
  3404. "500":
  3405. description: Internal Server Error
  3406. schema:
  3407. $ref: '#/definitions/models.ErrorResponse'
  3408. summary: Reset failover for a network
  3409. tags:
  3410. - PRO
  3411. /api/v1/node/{nodeid}/failover:
  3412. delete:
  3413. parameters:
  3414. - description: Node ID
  3415. in: path
  3416. name: nodeid
  3417. required: true
  3418. type: string
  3419. responses:
  3420. "200":
  3421. description: OK
  3422. schema:
  3423. $ref: '#/definitions/models.Node'
  3424. "400":
  3425. description: Bad Request
  3426. schema:
  3427. $ref: '#/definitions/models.ErrorResponse'
  3428. "500":
  3429. description: Internal Server Error
  3430. schema:
  3431. $ref: '#/definitions/models.ErrorResponse'
  3432. summary: Delete failover node
  3433. tags:
  3434. - PRO
  3435. get:
  3436. parameters:
  3437. - description: Node ID
  3438. in: path
  3439. name: nodeid
  3440. required: true
  3441. type: string
  3442. responses:
  3443. "200":
  3444. description: OK
  3445. schema:
  3446. $ref: '#/definitions/models.Node'
  3447. "400":
  3448. description: Bad Request
  3449. schema:
  3450. $ref: '#/definitions/models.ErrorResponse'
  3451. "404":
  3452. description: Not Found
  3453. schema:
  3454. $ref: '#/definitions/models.ErrorResponse'
  3455. summary: Get failover node
  3456. tags:
  3457. - PRO
  3458. post:
  3459. parameters:
  3460. - description: Node ID
  3461. in: path
  3462. name: nodeid
  3463. required: true
  3464. type: string
  3465. responses:
  3466. "200":
  3467. description: OK
  3468. schema:
  3469. $ref: '#/definitions/models.Node'
  3470. "400":
  3471. description: Bad Request
  3472. schema:
  3473. $ref: '#/definitions/models.ErrorResponse'
  3474. "500":
  3475. description: Internal Server Error
  3476. schema:
  3477. $ref: '#/definitions/models.ErrorResponse'
  3478. summary: Create failover node
  3479. tags:
  3480. - PRO
  3481. /api/v1/node/{nodeid}/failover_check:
  3482. get:
  3483. consumes:
  3484. - application/json
  3485. parameters:
  3486. - description: Node ID
  3487. in: path
  3488. name: nodeid
  3489. required: true
  3490. type: string
  3491. - description: Failover request
  3492. in: body
  3493. name: body
  3494. required: true
  3495. schema:
  3496. $ref: '#/definitions/models.FailOverMeReq'
  3497. responses:
  3498. "200":
  3499. description: OK
  3500. schema:
  3501. $ref: '#/definitions/models.SuccessResponse'
  3502. "400":
  3503. description: Bad Request
  3504. schema:
  3505. $ref: '#/definitions/models.ErrorResponse'
  3506. "500":
  3507. description: Internal Server Error
  3508. schema:
  3509. $ref: '#/definitions/models.ErrorResponse'
  3510. summary: checkfailOverCtx
  3511. tags:
  3512. - PRO
  3513. /api/v1/node/{nodeid}/failover_me:
  3514. post:
  3515. consumes:
  3516. - application/json
  3517. parameters:
  3518. - description: Node ID
  3519. in: path
  3520. name: nodeid
  3521. required: true
  3522. type: string
  3523. - description: Failover request
  3524. in: body
  3525. name: body
  3526. required: true
  3527. schema:
  3528. $ref: '#/definitions/models.FailOverMeReq'
  3529. responses:
  3530. "200":
  3531. description: OK
  3532. schema:
  3533. $ref: '#/definitions/models.SuccessResponse'
  3534. "400":
  3535. description: Bad Request
  3536. schema:
  3537. $ref: '#/definitions/models.ErrorResponse'
  3538. "500":
  3539. description: Internal Server Error
  3540. schema:
  3541. $ref: '#/definitions/models.ErrorResponse'
  3542. summary: Failover me
  3543. tags:
  3544. - PRO
  3545. /api/v1/nodes/{network}/status:
  3546. get:
  3547. responses:
  3548. "200":
  3549. description: OK
  3550. schema:
  3551. items:
  3552. $ref: '#/definitions/models.ApiNode'
  3553. type: array
  3554. "500":
  3555. description: Internal Server Error
  3556. schema:
  3557. $ref: '#/definitions/models.ErrorResponse'
  3558. summary: Get all nodes status on the network
  3559. tags:
  3560. - Nodes
  3561. /api/v1/tags:
  3562. delete:
  3563. consumes:
  3564. - application/json
  3565. responses:
  3566. "200":
  3567. description: OK
  3568. schema:
  3569. items:
  3570. $ref: '#/definitions/models.SuccessResponse'
  3571. type: array
  3572. "500":
  3573. description: Internal Server Error
  3574. schema:
  3575. $ref: '#/definitions/models.ErrorResponse'
  3576. summary: Delete Tag
  3577. tags:
  3578. - TAG
  3579. get:
  3580. consumes:
  3581. - application/json
  3582. responses:
  3583. "200":
  3584. description: OK
  3585. schema:
  3586. items:
  3587. $ref: '#/definitions/models.SuccessResponse'
  3588. type: array
  3589. "500":
  3590. description: Internal Server Error
  3591. schema:
  3592. $ref: '#/definitions/models.ErrorResponse'
  3593. summary: List Tags in a network
  3594. tags:
  3595. - TAG
  3596. post:
  3597. consumes:
  3598. - application/json
  3599. responses:
  3600. "200":
  3601. description: OK
  3602. schema:
  3603. items:
  3604. $ref: '#/definitions/models.SuccessResponse'
  3605. type: array
  3606. "500":
  3607. description: Internal Server Error
  3608. schema:
  3609. $ref: '#/definitions/models.ErrorResponse'
  3610. summary: Create Tag
  3611. tags:
  3612. - TAG
  3613. put:
  3614. consumes:
  3615. - application/json
  3616. responses:
  3617. "200":
  3618. description: OK
  3619. schema:
  3620. items:
  3621. $ref: '#/definitions/models.SuccessResponse'
  3622. type: array
  3623. "500":
  3624. description: Internal Server Error
  3625. schema:
  3626. $ref: '#/definitions/models.ErrorResponse'
  3627. summary: Update Tag
  3628. tags:
  3629. - TAG
  3630. /api/v1/user/group:
  3631. delete:
  3632. parameters:
  3633. - description: group id required to delete the role
  3634. in: query
  3635. name: group_id
  3636. required: true
  3637. type: string
  3638. responses:
  3639. "200":
  3640. description: OK
  3641. schema:
  3642. type: string
  3643. "500":
  3644. description: Internal Server Error
  3645. schema:
  3646. $ref: '#/definitions/models.ErrorResponse'
  3647. summary: Delete user group.
  3648. tags:
  3649. - Users
  3650. /api/v1/user/role:
  3651. delete:
  3652. parameters:
  3653. - description: roleid required to delete the role
  3654. in: query
  3655. name: role_id
  3656. required: true
  3657. type: string
  3658. responses:
  3659. "200":
  3660. description: OK
  3661. schema:
  3662. type: string
  3663. "500":
  3664. description: Internal Server Error
  3665. schema:
  3666. $ref: '#/definitions/models.ErrorResponse'
  3667. summary: Delete user role permission template.
  3668. tags:
  3669. - Users
  3670. get:
  3671. parameters:
  3672. - description: roleid required to get the role details
  3673. in: query
  3674. name: role_id
  3675. required: true
  3676. type: string
  3677. responses:
  3678. "200":
  3679. description: OK
  3680. schema:
  3681. $ref: '#/definitions/models.UserRolePermissionTemplate'
  3682. "500":
  3683. description: Internal Server Error
  3684. schema:
  3685. $ref: '#/definitions/models.ErrorResponse'
  3686. summary: Get user role permission template.
  3687. tags:
  3688. - Users
  3689. post:
  3690. parameters:
  3691. - description: user role template
  3692. in: body
  3693. name: body
  3694. required: true
  3695. schema:
  3696. $ref: '#/definitions/models.UserRolePermissionTemplate'
  3697. responses:
  3698. "200":
  3699. description: OK
  3700. schema:
  3701. $ref: '#/definitions/models.UserRolePermissionTemplate'
  3702. "500":
  3703. description: Internal Server Error
  3704. schema:
  3705. $ref: '#/definitions/models.ErrorResponse'
  3706. summary: Create user role permission template.
  3707. tags:
  3708. - Users
  3709. put:
  3710. parameters:
  3711. - description: user role template
  3712. in: body
  3713. name: body
  3714. required: true
  3715. schema:
  3716. $ref: '#/definitions/models.UserRolePermissionTemplate'
  3717. responses:
  3718. "200":
  3719. description: OK
  3720. schema:
  3721. $ref: '#/definitions/models.UserRolePermissionTemplate'
  3722. "500":
  3723. description: Internal Server Error
  3724. schema:
  3725. $ref: '#/definitions/models.ErrorResponse'
  3726. summary: Update user role permission template.
  3727. tags:
  3728. - Users
  3729. /api/v1/user/roles:
  3730. get:
  3731. parameters:
  3732. - description: roleid required to get the role details
  3733. in: query
  3734. name: role_id
  3735. required: true
  3736. type: string
  3737. responses:
  3738. "200":
  3739. description: OK
  3740. schema:
  3741. items:
  3742. $ref: '#/definitions/models.UserRolePermissionTemplate'
  3743. type: array
  3744. "500":
  3745. description: Internal Server Error
  3746. schema:
  3747. $ref: '#/definitions/models.ErrorResponse'
  3748. summary: lists all user roles.
  3749. tags:
  3750. - Users
  3751. /meshclient/files/{filename}:
  3752. get:
  3753. responses:
  3754. "200":
  3755. description: file
  3756. schema:
  3757. type: body
  3758. "404":
  3759. description: 404 not found
  3760. schema:
  3761. type: string
  3762. summary: Retrieve a file from the file server
  3763. tags:
  3764. - Meshclient
  3765. swagger: "2.0"
  3766. tags:
  3767. - description: |
  3768. 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.
  3769. name: APIUsage
  3770. - description: |
  3771. API calls are primarily authenticated using a user authentication token. This token should be included in the header as follows:
  3772. -H "Authorization: Bearer <YOUR_AUTH_TOKEN>"
  3773. To obtain YOUR_AUTH_TOKEN:
  3774. Call the api/users/adm/authenticate endpoint (see documentation below for details).
  3775. 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.
  3776. For more information on configuration and security best practices, refer to the [Netmaker documentation](https://docs.netmaker.io/).
  3777. name: Authentication
  3778. - description: |
  3779. 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.
  3780. name: Pricing