2
0

swagger.yaml 59 KB

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