-// 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.
-//
-// # Authentication
-//
-// 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.
-//
-// Schemes: https
-// BasePath: /
-// Version: 0.24.3
-// Host: api.demo.netmaker.io
-//
-// Consumes:
-// - application/json
-//
-// Produces:
-// - application/json
-//
-// Security:
-// - oauth
-//
-// swagger:meta
-package controller
-
-import (
- "os"
-
- "github.com/gravitl/netmaker/config"
- "github.com/gravitl/netmaker/logic/acls"
- "github.com/gravitl/netmaker/models"
-)
-
-var _ = useUnused() // "use" the function to prevent "unused function" errors
+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.
+API calls are primarily authenticated using a user authentication token. This token should be included in the header as follows:
+
+-H "Authorization: Bearer <YOUR_AUTH_TOKEN>"
+
+To obtain YOUR_AUTH_TOKEN:
+Call the api/users/adm/authenticate endpoint (see documentation below for details).
+
+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.
+
+For more information on configuration and security best practices, refer to the [Netmaker documentation](https://docs.netmaker.org/index.html).
+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.
-- Static Host Functionality With Separate Settings For Port and endpoint IP
-- Network Info And Metadata Info Added To Remote-Access-Client
+- Validation Checks For Egress Routes
+- Network Change Detection System
+- Removed Creation Of ACLs For EMQX
## What's Fixed/Improved 🛠
## What's Fixed/Improved 🛠
-- Improved FailOver Functionality
-- Local Peer Routing In Dual-Stack Environment
-- Stale Node Issue On Multinet With `netclient uninstall`
-- IPv6 Internet Gateways Improvements
-- Handled New Oauth User SignUp via Remote-Access-Client
-- PeerUpdate Improvements Around Default Host and Multi-nets
+- Removed RAG Metadata Length Restriction
+- Scalability Improvements
+- Optimised Traffic Flow Over MQ
+- Improved Validation Checks For Internet GWS
## Known Issues 🐞
## Known Issues 🐞
- Erratic Traffic Data In Metrics.
- Erratic Traffic Data In Metrics.
-- Stale peer on the interface, when forced removed from multiple networks at once.
+- Adding Custom Private/Public Key For Remote Access Gw Clients Doesn't Get Propagated To Other Peers.
+- IPv6 DNS Entries Are Not Working.
+- Stale Peer On The Interface, When Forced Removed From Multiple Networks At Once.
+- Can Still Ping Domain Name Even When DNS Toggle Is Switched Off.
+- WireGuard DNS issue on most flavors of Ubuntu 24.04 and some other newer Linux distributions. The issue is affecting the Remote Access Client (RAC) and the plain WireGuard external clients. Workaround can be found here https://help.netmaker.io/en/articles/9612016-extclient-rac-dns-issue-on-ubuntu-24-04.
+ summary: Remove user from a remote access gateway
+ tags:
+ - PRO
+ post:
+ consumes:
+ - application/json
+ parameters:
+ - description: Username
+ in: path
+ name: username
+ required: true
+ type: string
+ - description: Remote Access Gateway ID
+ in: path
+ name: remote_access_gateway_id
+ required: true
+ type: string
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/models.ReturnUser'
+ "400":
+ description: Bad Request
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ summary: Attach user to a remote access gateway
+ tags:
+ - PRO
+ /api/users/adm/authenticate:
+ post:
+ consumes:
+ - application/json
+ parameters:
+ - description: Authentication parameters
+ in: body
+ name: body
+ required: true
+ schema:
+ $ref: '#/definitions/models.UserAuthParams'
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/models.SuccessResponse'
+ "400":
+ description: Bad Request
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ "401":
+ description: Unauthorized
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ summary: Authenticate a user to retrieve an authorization token
+ tags:
+ - Auth
+ /api/users/adm/createsuperadmin:
+ post:
+ parameters:
+ - description: User details
+ in: body
+ name: body
+ required: true
+ schema:
+ $ref: '#/definitions/models.User'
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/models.User'
+ "400":
+ description: Bad Request
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ summary: Create a super admin
+ tags:
+ - Users
+ /api/users/adm/hassuperadmin:
+ get:
+ responses:
+ "200":
+ description: OK
+ schema:
+ type: boolean
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ summary: Check if the server has a super admin
+ tags:
+ - Users
+ /api/users/adm/transfersuperadmin/{username}:
+ post:
+ parameters:
+ - description: Username of the user to transfer super admin role
+ in: path
+ name: username
+ required: true
+ type: string
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/models.User'
+ "403":
+ description: Forbidden
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ summary: Transfer super admin role to another admin user
+ tags:
+ - Users
+ /api/users_pending:
+ delete:
+ responses:
+ "200":
+ description: OK
+ schema:
+ type: string
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ summary: Delete all pending users
+ tags:
+ - Users
+ get:
+ responses:
+ "200":
+ description: OK
+ schema:
+ items:
+ $ref: '#/definitions/models.User'
+ type: array
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ summary: Get all pending users
+ tags:
+ - Users
+ /api/users_pending/user/{username}:
+ delete:
+ parameters:
+ - description: Username of the pending user to delete
+ in: path
+ name: username
+ required: true
+ type: string
+ responses:
+ "200":
+ description: OK
+ schema:
+ type: string
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ summary: Delete a pending user
+ tags:
+ - Users
+ post:
+ parameters:
+ - description: Username of the pending user to approve
+ in: path
+ name: username
+ required: true
+ type: string
+ responses:
+ "200":
+ description: OK
+ schema:
+ type: string
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ summary: Approve a pending user
+ tags:
+ - Users
+ /api/v1/enrollment-keys:
+ get:
+ responses:
+ "200":
+ description: OK
+ schema:
+ items:
+ $ref: '#/definitions/models.EnrollmentKey'
+ type: array
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ security:
+ - oauth: []
+ summary: Lists all EnrollmentKeys for admins
+ tags:
+ - EnrollmentKeys
+ post:
+ parameters:
+ - description: Enrollment Key parameters
+ in: body
+ name: body
+ required: true
+ schema:
+ $ref: '#/definitions/models.APIEnrollmentKey'
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/models.EnrollmentKey'
+ "400":
+ description: Bad Request
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ security:
+ - oauth: []
+ summary: Creates an EnrollmentKey for hosts to register with server and join
+ networks
+ tags:
+ - EnrollmentKeys
+ /api/v1/enrollment-keys/{keyid}:
+ delete:
+ parameters:
+ - description: Enrollment Key ID
+ in: path
+ name: keyid
+ required: true
+ type: string
+ responses:
+ "200":
+ description: OK
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ security:
+ - oauth: []
+ summary: Deletes an EnrollmentKey from Netmaker server
+ tags:
+ - EnrollmentKeys
+ put:
+ parameters:
+ - description: Enrollment Key ID
+ in: path
+ name: keyid
+ required: true
+ type: string
+ - description: Enrollment Key parameters
+ in: body
+ name: body
+ required: true
+ schema:
+ $ref: '#/definitions/models.APIEnrollmentKey'
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/models.EnrollmentKey'
+ "400":
+ description: Bad Request
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ security:
+ - oauth: []
+ summary: Updates an EnrollmentKey. Updates are only limited to the relay to
+ use
+ tags:
+ - EnrollmentKeys
+ /api/v1/fallback/host/{hostid}:
+ put:
+ parameters:
+ - description: Host ID
+ in: path
+ name: hostid
+ required: true
+ type: string
+ - description: Host update data
+ in: body
+ name: body
+ required: true
+ schema:
+ $ref: '#/definitions/models.HostUpdate'
+ responses:
+ "200":
+ description: updated host data
+ schema:
+ type: string
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ security:
+ - oauth: []
+ summary: Updates a Netclient host on Netmaker server
+ tags:
+ - Hosts
+ /api/v1/host:
+ get:
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/models.HostPull'
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ security:
+ - oauth: []
+ summary: Used by clients for "pull" command
+ tags:
+ - Hosts
+ /api/v1/host/{hostid}/signalpeer:
+ post:
+ parameters:
+ - description: Host ID
+ in: path
+ name: hostid
+ required: true
+ type: string
+ - description: Signal data
+ in: body
+ name: body
+ required: true
+ schema:
+ $ref: '#/definitions/models.Signal'
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/models.Signal'
+ "400":
+ description: Bad Request
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ security:
+ - oauth: []
+ summary: Send signal to peer
+ tags:
+ - Hosts
+ /api/v1/host/register/{token}:
+ post:
+ parameters:
+ - description: Enrollment Key Token
+ in: path
+ name: token
+ required: true
+ type: string
+ - description: Host registration parameters
+ in: body
+ name: body
+ required: true
+ schema:
+ $ref: '#/definitions/models.Host'
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/models.RegisterResponse'
+ "400":
+ description: Bad Request
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ security:
+ - oauth: []
+ summary: Handles a Netclient registration with server and add nodes accordingly
+ tags:
+ - EnrollmentKeys
+ /api/v1/legacy/nodes:
+ delete:
+ responses:
+ "200":
+ description: Wiped all legacy nodes.
+ schema:
+ type: string
+ "400":
+ description: Bad Request
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ security:
+ - oauth2: []
+ summary: Delete all legacy nodes from DB.
+ tags:
+ - Nodes
+ /api/v1/node/{network}/failover/reset:
+ post:
+ parameters:
+ - description: Network ID
+ in: path
+ name: network
+ required: true
+ type: string
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/models.SuccessResponse'
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ summary: Reset failover for a network
+ tags:
+ - PRO
+ /api/v1/node/{nodeid}/failover:
+ delete:
+ parameters:
+ - description: Node ID
+ in: path
+ name: nodeid
+ required: true
+ type: string
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/models.Node'
+ "400":
+ description: Bad Request
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ summary: Delete failover node
+ tags:
+ - PRO
+ get:
+ parameters:
+ - description: Node ID
+ in: path
+ name: nodeid
+ required: true
+ type: string
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/models.Node'
+ "400":
+ description: Bad Request
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ "404":
+ description: Not Found
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ summary: Get failover node
+ tags:
+ - PRO
+ post:
+ parameters:
+ - description: Node ID
+ in: path
+ name: nodeid
+ required: true
+ type: string
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/models.Node'
+ "400":
+ description: Bad Request
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ summary: Create failover node
+ tags:
+ - PRO
+ /api/v1/node/{nodeid}/failover_me:
+ post:
+ consumes:
+ - application/json
+ parameters:
+ - description: Node ID
+ in: path
+ name: nodeid
+ required: true
+ type: string
+ - description: Failover request
+ in: body
+ name: body
+ required: true
+ schema:
+ $ref: '#/definitions/models.FailOverMeReq'
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/models.SuccessResponse'
+ "400":
+ description: Bad Request
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ "500":
+ description: Internal Server Error
+ schema:
+ $ref: '#/definitions/models.ErrorResponse'
+ summary: Failover me
+ tags:
+ - PRO
+ /meshclient/files/{filename}:
+ get:
+ responses:
+ "200":
+ description: file
+ schema:
+ type: body
+ "404":
+ description: 404 not found
+ schema:
+ type: string
+ summary: Retrieve a file from the file server
+ tags:
+ - Meshclient
+swagger: "2.0"
+tags:
+- description: |
+ 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.
+ name: APIUsage
+- description: |
+ API calls are primarily authenticated using a user authentication token. This token should be included in the header as follows:
+
+ -H "Authorization: Bearer <YOUR_AUTH_TOKEN>"
+
+ To obtain YOUR_AUTH_TOKEN:
+ Call the api/users/adm/authenticate endpoint (see documentation below for details).
+
+ 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.
+
+ For more information on configuration and security best practices, refer to the [Netmaker documentation](https://docs.netmaker.org/index.html).
+ name: Authentication
+- description: |
+ 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.
- 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.
-
- # Authentication
-
- 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.
- title: Netmaker
- version: 0.24.3
-paths:
- /api/dns:
- get:
- operationId: getAllDNS
- responses:
- "200":
- $ref: '#/responses/dnsResponse'
- schemes:
- - https
- summary: Gets all DNS entries.
- tags:
- - dns
- /api/dns/{network}:
- post:
- operationId: createDNS
- parameters:
- - description: Network
- in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- - description: DNS Entry
- in: body
- name: body
- schema:
- items:
- $ref: '#/definitions/DNSEntry'
- type: array
- x-go-name: Body
- responses:
- "200":
- $ref: '#/responses/dnsResponse'
- schemes:
- - https
- summary: Create a DNS entry.
- tags:
- - dns
- /api/dns/{network}/{domain}:
- delete:
- operationId: deleteDNS
- parameters:
- - description: Network
- in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- - description: Domain
- in: path
- name: domain
- required: true
- type: string
- x-go-name: Domain
- responses:
- "200":
- $ref: '#/responses/stringJSONResponse'
- schemes:
- - https
- summary: Delete a DNS entry.
- tags:
- - dns
- /api/dns/adm/{network}:
- get:
- operationId: getDNS
- parameters:
- - description: Network
- in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- responses:
- "200":
- $ref: '#/responses/dnsResponse'
- schemes:
- - https
- summary: Gets all DNS entries associated with the network.
- tags:
- - dns
- /api/dns/adm/{network}/custom:
- get:
- operationId: getCustomDNS
- parameters:
- - description: Network
- in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- responses:
- "200":
- $ref: '#/responses/dnsResponse'
- schemes:
- - https
- summary: Gets custom DNS entries associated with a network.
- tags:
- - dns
- /api/dns/adm/{network}/nodes:
- get:
- operationId: getNodeDNS
- parameters:
- - description: Network
- in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- responses:
- "200":
- $ref: '#/responses/dnsResponse'
- schemes:
- - https
- summary: Gets node DNS entries associated with a network.
- tags:
- - dns
- /api/dns/adm/pushdns:
- post:
- operationId: pushDNS
- responses:
- "200":
- $ref: '#/responses/dnsResponse'
- schemes:
- - https
- summary: Push DNS entries to nameserver.
- tags:
- - dns
- /api/emqx/hosts:
- delete:
- operationId: delEmqxHosts
- responses:
- "200":
- $ref: '#/responses/apiHostResponse'
- schemes:
- - https
- summary: Lists all hosts.
- tags:
- - hosts
- /api/extclients:
- get:
- operationId: getAllExtClients
- parameters:
- - description: Networks
- in: body
- name: networks
- schema:
- items:
- type: string
- type: array
- x-go-name: Networks
- responses:
- "200":
- $ref: '#/responses/extClientSliceResponse'
- schemes:
- - https
- summary: A separate function to get all extclients, not just extclients for a particular network.
- tags:
- - ext_client
- /api/extclients/{network}:
- get:
- description: Gets all extclients associated with network, including pending extclients.
- operationId: getNetworkExtClients
- parameters:
- - description: Network
- in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- responses:
- "200":
- $ref: '#/responses/extClientSliceResponse'
- schemes:
- - https
- summary: Get all extclients associated with network.
- tags:
- - ext_client
- /api/extclients/{network}/{clientid}:
- delete:
- operationId: deleteExtClient
- parameters:
- - description: Client ID
- in: path
- name: clientid
- required: true
- type: string
- x-go-name: ClientID
- - description: Network
- in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- responses:
- "200":
- $ref: '#/responses/successResponse'
- schemes:
- - https
- summary: Delete an individual extclient.
- tags:
- - ext_client
- get:
- operationId: getExtClient
- parameters:
- - description: Client ID
- in: path
- name: clientid
- required: true
- type: string
- x-go-name: ClientID
- - description: Network
- in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- responses:
- "200":
- $ref: '#/responses/extClientResponse'
- schemes:
- - https
- summary: Get an individual extclient.
- tags:
- - ext_client
- put:
- operationId: updateExtClient
- parameters:
- - description: Client ID
- in: path
- name: clientid
- required: true
- type: string
- x-go-name: ClientID
- - description: Network
- in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- - description: ExtClient
- in: body
- name: ext_client
- schema:
- $ref: '#/definitions/ExtClient'
- x-go-name: ExtClient
- responses:
- "200":
- $ref: '#/responses/extClientResponse'
- schemes:
- - https
- summary: Update an individual extclient.
- tags:
- - ext_client
- /api/extclients/{network}/{clientid}/{type}:
- get:
- operationId: getExtClientConf
- parameters:
- - description: Type
- in: path
- name: type
- required: true
- type: string
- x-go-name: Type
- - description: Client ID
- in: path
- name: clientid
- required: true
- type: string
- x-go-name: ClientID
- - description: Network
- in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- responses:
- "200":
- $ref: '#/responses/extClientResponse'
- schemes:
- - https
- summary: Get an individual extclient.
- tags:
- - ext_client
- /api/extclients/{network}/{nodeid}:
- post:
- operationId: createExtClient
- parameters:
- - description: Network
- in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- - description: Node ID
- in: path
- name: nodeid
- required: true
- type: string
- x-go-name: NodeID
- - description: Custom ExtClient
- in: body
- name: custom_ext_client
- schema:
- $ref: '#/definitions/CustomExtClient'
- x-go-name: CustomExtClient
- responses:
- "200":
- $ref: '#/responses/okResponse'
- schemes:
- - https
- summary: Create an individual extclient. Must have valid key and be unique.
- tags:
- - ext_client
- /api/getip:
- get:
- operationId: getPublicIP
- responses:
- "200":
- $ref: '#/responses/byteArrayResponse'
- schemes:
- - https
- summary: Get the current public IP address.
- tags:
- - ipservice
- /api/hosts:
- get:
- operationId: getHosts
- responses:
- "200":
- $ref: '#/responses/apiHostSliceResponse'
- schemes:
- - https
- summary: Lists all hosts.
- tags:
- - hosts
- /api/hosts/{hostid}:
- delete:
- operationId: deleteHost
- parameters:
- - description: HostID
- in: path
- name: hostid
- required: true
- type: string
- x-go-name: HostID
- responses:
- "200":
- $ref: '#/responses/apiHostResponse'
- schemes:
- - https
- summary: Deletes a Netclient host from Netmaker server.
- tags:
- - hosts
- put:
- operationId: updateHost
- parameters:
- - description: HostID
- in: path
- name: hostid
- required: true
- type: string
- x-go-name: HostID
- responses:
- "200":
- $ref: '#/responses/apiHostResponse'
- schemes:
- - https
- summary: Updates a Netclient host on Netmaker server.
- tags:
- - hosts
- /api/hosts/{hostid}/networks/{network}:
- delete:
- operationId: deleteHostFromNetwork
- parameters:
- - description: hostid to add or delete from network
- in: path
- name: hostid
- required: true
- type: string
- x-go-name: HostID
- - description: network
- in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- responses:
- "200":
- $ref: '#/responses/okResponse'
- schemes:
- - https
- summary: Given a network, a host is removed from the network.
- tags:
- - hosts
- post:
- operationId: addHostToNetwork
- parameters:
- - description: hostid to add or delete from network
- in: path
- name: hostid
- required: true
- type: string
- x-go-name: HostID
- - description: network
- in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- responses:
- "200":
- $ref: '#/responses/okResponse'
- schemes:
- - https
- summary: Given a network, a host is added to the network.
- tags:
- - hosts
- /api/hosts/{hostid}/signalpeer:
- post:
- operationId: signalPeer
- parameters:
- - description: HostID
- in: path
- name: hostid
- required: true
- type: string
- x-go-name: HostID
- responses:
- "200":
- $ref: '#/responses/signal'
- schemes:
- - https
- summary: send signal to peer.
- tags:
- - hosts
- /api/hosts/{hostid}/sync:
- post:
- operationId: synchost
- parameters:
- - description: HostID
- in: path
- name: hostid
- required: true
- type: string
- x-go-name: HostID
- responses:
- "200":
- $ref: '#/responses/networkBodyResponse'
- schemes:
- - https
- summary: Requests a host to pull.
- tags:
- - hosts
- /api/hosts/{hostid}keys:
- post:
- operationId: updateKeys
- parameters:
- - description: HostID
- in: path
- name: hostid
- required: true
- type: string
- x-go-name: HostID
- responses:
- "200":
- $ref: '#/responses/networkBodyResponse'
- schemes:
- - https
- summary: Update keys for a network.
- tags:
- - hosts
- /api/hosts/adm/authenticate:
- post:
- operationId: authenticateHost
- responses:
- "200":
- $ref: '#/responses/successResponse'
- schemes:
- - https
- summary: Host based authentication for making further API calls.
- tags:
- - authenticate
- /api/hosts/keys:
- post:
- operationId: updateAllKeys
- responses:
- "200":
- $ref: '#/responses/networkBodyResponse'
- schemes:
- - https
- summary: Update keys for a network.
- tags:
- - hosts
- /api/networks:
- get:
- operationId: getNetworks
- responses:
- "200":
- $ref: '#/responses/getNetworksSliceResponse'
- schemes:
- - https
- summary: Lists all networks.
- tags:
- - networks
- post:
- operationId: createNetwork
- parameters:
- - description: Network
- in: body
- name: network
- schema:
- $ref: '#/definitions/Network'
- x-go-name: Network
- responses:
- "200":
- $ref: '#/responses/networkBodyResponse'
- schemes:
- - https
- summary: Create a network.
- tags:
- - networks
- /api/networks/{networkname}:
- delete:
- operationId: deleteNetwork
- parameters:
- - description: 'name: network name'
- in: path
- name: networkname
- required: true
- type: string
- x-go-name: Networkname
- responses:
- "200":
- $ref: '#/responses/successResponse'
- schemes:
- - https
- summary: Delete a network. Will not delete if there are any nodes that belong to the network.
- tags:
- - networks
- get:
- operationId: getNetwork
- parameters:
- - description: 'name: network name'
- in: path
- name: networkname
- required: true
- type: string
- x-go-name: Networkname
- responses:
- "200":
- $ref: '#/responses/networkBodyResponse'
- schemes:
- - https
- summary: Get a network.
- tags:
- - networks
- put:
- operationId: updateNetwork
- parameters:
- - description: 'name: network name'
- in: path
- name: networkname
- required: true
- type: string
- x-go-name: Networkname
- - description: Network
- in: body
- name: network
- schema:
- $ref: '#/definitions/Network'
- x-go-name: Network
- responses:
- "200":
- $ref: '#/responses/networkBodyResponse'
- schemes:
- - https
- summary: Update pro settings for a network.
- tags:
- - networks
- /api/networks/{networkname}/acls:
- get:
- operationId: getNetworkACL
- parameters:
- - description: 'name: network name'
- in: path
- name: networkname
- required: true
- type: string
- x-go-name: Networkname
- responses:
- "200":
- $ref: '#/responses/aclContainerResponse'
- schemes:
- - https
- summary: Get a network ACL (Access Control List).
- tags:
- - networks
- put:
- operationId: updateNetworkACL
- parameters:
- - description: 'name: network name'
- in: path
- name: networkname
- required: true
- type: string
- x-go-name: Networkname
- - description: ACL Container
- in: body
- name: acl_container
- schema:
- $ref: '#/definitions/ACLContainer'
- x-go-name: ACLContainer
- responses:
- "200":
- $ref: '#/responses/aclContainerResponse'
- schemes:
- - https
- summary: Update a network ACL (Access Control List).
- tags:
- - networks
- /api/networks/{networkname}/acls/v2:
- put:
- operationId: updateNetworkACL
- parameters:
- - description: 'name: network name'
- in: path
- name: networkname
- required: true
- type: string
- x-go-name: Networkname
- - description: ACL Container
- in: body
- name: acl_container
- schema:
- $ref: '#/definitions/ACLContainer'
- x-go-name: ACLContainer
- responses:
- "200":
- $ref: '#/responses/aclContainerResponse'
- schemes:
- - https
- summary: Update a network ACL (Access Control List).
- tags:
- - networks
- /api/node/{nodeid}/failOverME:
- post:
- operationId: failOver_me
- responses:
- "200":
- $ref: '#/responses/nodeResponse'
- schemes:
- - https
- summary: Create a relay.
- tags:
- - node
- /api/nodes:
- get:
- operationId: getAllNodes
- responses:
- "200":
- $ref: '#/responses/nodeSliceResponse'
- schemes:
- - https
- summary: Get all nodes across all networks.
- tags:
- - nodes
- /api/nodes/{network}:
- get:
- operationId: getNetworkNodes
- parameters:
- - description: Network
- in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- responses:
- "200":
- $ref: '#/responses/nodeSliceResponse'
- schemes:
- - https
- summary: Gets all nodes associated with network including pending nodes.
- tags:
- - nodes
- /api/nodes/{network}/{nodeid}:
- delete:
- operationId: deleteNode
- parameters:
- - in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- - in: path
- name: nodeid
- required: true
- type: string
- x-go-name: NodeID
- - description: Node
- in: body
- name: node
- schema:
- $ref: '#/definitions/LegacyNode'
- x-go-name: Node
- responses:
- "200":
- $ref: '#/responses/nodeResponse'
- schemes:
- - https
- summary: Delete an individual node.
- tags:
- - nodes
- get:
- operationId: getNode
- parameters:
- - in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- - in: path
- name: nodeid
- required: true
- type: string
- x-go-name: NodeID
- responses:
- "200":
- $ref: '#/responses/nodeResponse'
- schemes:
- - https
- summary: Get an individual node.
- tags:
- - nodes
- put:
- operationId: updateNode
- parameters:
- - in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- - in: path
- name: nodeid
- required: true
- type: string
- x-go-name: NodeID
- - description: Node
- in: body
- name: node
- schema:
- $ref: '#/definitions/LegacyNode'
- x-go-name: Node
- responses:
- "200":
- $ref: '#/responses/nodeResponse'
- schemes:
- - https
- summary: Update an individual node.
- tags:
- - nodes
- /api/nodes/{network}/{nodeid}/creategateway:
- post:
- operationId: createEgressGateway
- parameters:
- - in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- - in: path
- name: nodeid
- required: true
- type: string
- x-go-name: NodeID
- - description: Egress Gateway Request
- in: body
- name: egress_gateway_request
- schema:
- $ref: '#/definitions/EgressGatewayRequest'
- x-go-name: EgressGatewayRequest
- responses:
- "200":
- $ref: '#/responses/nodeResponse'
- schemes:
- - https
- summary: Create an egress gateway.
- tags:
- - nodes
- /api/nodes/{network}/{nodeid}/createingress:
- post:
- operationId: createIngressGateway
- parameters:
- - in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- - in: path
- name: nodeid
- required: true
- type: string
- x-go-name: NodeID
- responses:
- "200":
- $ref: '#/responses/nodeResponse'
- schemes:
- - https
- summary: Create an ingress gateway.
- tags:
- - nodes
- /api/nodes/{network}/{nodeid}/createrelay:
- post:
- operationId: createRelay
- parameters:
- - in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- - in: path
- name: nodeid
- required: true
- type: string
- x-go-name: NodeID
- - description: Relay Request
- in: body
- name: relay_request
- schema:
- $ref: '#/definitions/RelayRequest'
- x-go-name: RelayRequest
- responses:
- "200":
- $ref: '#/responses/nodeResponse'
- schemes:
- - https
- summary: Create a relay.
- tags:
- - nodes
- /api/nodes/{network}/{nodeid}/deletegateway:
- delete:
- operationId: deleteEgressGateway
- parameters:
- - in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- - in: path
- name: nodeid
- required: true
- type: string
- x-go-name: NodeID
- responses:
- "200":
- $ref: '#/responses/nodeResponse'
- schemes:
- - https
- summary: Delete an egress gateway.
- tags:
- - nodes
- /api/nodes/{network}/{nodeid}/deleteingress:
- delete:
- operationId: deleteIngressGateway
- parameters:
- - in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- - in: path
- name: nodeid
- required: true
- type: string
- x-go-name: NodeID
- responses:
- "200":
- $ref: '#/responses/nodeResponse'
- schemes:
- - https
- summary: Delete an ingress gateway.
- tags:
- - nodes
- /api/nodes/{network}/{nodeid}/deleterelay:
- delete:
- operationId: deleteRelay
- parameters:
- - in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- - in: path
- name: nodeid
- required: true
- type: string
- x-go-name: NodeID
- responses:
- "200":
- $ref: '#/responses/nodeResponse'
- schemes:
- - https
- summary: Remove a relay.
- tags:
- - nodes
- /api/nodes/{network}/{nodeid}/inet_gw:
- delete:
- operationId: deleteInternetGw
- responses:
- "200":
- $ref: '#/responses/nodeResponse'
- schemes:
- - https
- summary: Delete an internet gw.
- tags:
- - nodes
- post:
- operationId: createInternetGw
- responses:
- "200":
- $ref: '#/responses/nodeResponse'
- schemes:
- - https
- summary: Create an inet node.
- tags:
- - nodes
- put:
- operationId: updateInternetGw
- responses:
- "200":
- $ref: '#/responses/nodeResponse'
- schemes:
- - https
- summary: update an inet node.
- tags:
- - nodes
- /api/nodes/{network}/{nodeid}/ingress/users:
- get:
- operationId: ingressGatewayUsers
- parameters:
- - in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- - in: path
- name: nodeid
- required: true
- type: string
- x-go-name: NodeID
- responses:
- "200":
- $ref: '#/responses/nodeResponse'
- schemes:
- - https
- summary: Lists all the users attached to an ingress gateway.
- tags:
- - users
- /api/nodes/adm/{network}/authenticate:
- post:
- operationId: authenticate
- parameters:
- - description: network
- in: path
- name: network
- required: true
- type: string
- x-go-name: Network
- - description: AuthParams
- in: body
- name: auth_params
- schema:
- $ref: '#/definitions/AuthParams'
- x-go-name: AuthParams
- responses:
- "200":
- $ref: '#/responses/successResponse'
- schemes:
- - https
- summary: Authenticate to make further API calls related to a network.
- tags:
- - authenticate
- /api/oauth/login:
- get:
- operationId: HandleAuthLogin
- responses:
- "200":
- $ref: '#/responses/okResponse'
- schemes:
- - https
- summary: Handles OAuth login.
- tags:
- - nodes
- /api/server/getconfig:
- get:
- operationId: getConfig
- responses:
- "200":
- $ref: '#/responses/serverConfigResponse'
- schemes:
- - https
- summary: Get the server configuration.
- tags:
- - server
- /api/server/getserverinfo:
- get:
- operationId: getServerInfo
- responses:
- "200":
- $ref: '#/responses/serverConfigResponse'
- schemes:
- - https
- summary: Get the server configuration.
- tags:
- - server
- /api/server/status:
- get:
- operationId: getStatus
- responses:
- "200":
- $ref: '#/responses/serverConfigResponse'
- schemes:
- - https
- summary: Get the server configuration.
- tags:
- - server
- /api/users:
- get:
- operationId: getUsers
- responses:
- "200":
- $ref: '#/responses/userBodyResponse'
- schemes:
- - https
- summary: Get all users.
- tags:
- - user
- /api/users/{username}:
- delete:
- operationId: deleteUser
- parameters:
- - description: Username
- in: path
- name: username
- required: true
- type: string
- x-go-name: Username
- responses:
- "200":
- $ref: '#/responses/userBodyResponse'
- schemes:
- - https
- summary: Delete a user.
- tags:
- - user
- get:
- operationId: getUser
- parameters:
- - description: Username
- in: path
- name: username
- required: true
- type: string
- x-go-name: Username
- responses:
- "200":
- $ref: '#/responses/userBodyResponse'
- schemes:
- - https
- summary: Get an individual user.
- tags:
- - user
- post:
- operationId: createUser
- parameters:
- - description: User
- in: body
- name: user
- schema:
- $ref: '#/definitions/User'
- x-go-name: User
- - description: Username
- in: path
- name: username
- required: true
- type: string
- x-go-name: Username
- responses:
- "200":
- $ref: '#/responses/userBodyResponse'
- schemes:
- - https
- summary: Create a user.
- tags:
- - user
- put:
- operationId: updateUser
- parameters:
- - description: User
- in: body
- name: user
- schema:
- $ref: '#/definitions/User'
- x-go-name: User
- - description: Username
- in: path
- name: username
- required: true
- type: string
- x-go-name: Username
- responses:
- "200":
- $ref: '#/responses/userBodyResponse'
- schemes:
- - https
- summary: Update a user.
- tags:
- - user
- /api/users/{username}/remote_access_gw:
- delete:
- operationId: removeUserFromRemoteAccessGW
- parameters:
- - in: path
- name: username
- required: true
- type: string
- x-go-name: Username
- responses:
- "200":
- $ref: '#/responses/userBodyResponse'
- schemes:
- - https
- summary: Delete User from a remote access gateway.
- tags:
- - user
- post:
- operationId: attachUserToRemoteAccessGateway
- parameters:
- - in: path
- name: username
- required: true
- type: string
- x-go-name: Username
- responses:
- "200":
- $ref: '#/responses/userBodyResponse'
- schemes:
- - https
- summary: Attach User to a remote access gateway.
- tags:
- - user
- /api/users/adm/authenticate:
- post:
- operationId: authenticateUser
- parameters:
- - description: User Auth Params
- in: body
- name: user_auth_params
- schema:
- $ref: '#/definitions/UserAuthParams'
- x-go-name: UserAuthParams
- responses:
- "200":
- $ref: '#/responses/successResponse'
- schemes:
- - https
- summary: User authenticates using its password and retrieves a JWT for authorization.
- tags:
- - authenticate
- /api/users/adm/createsuperadmin:
- post:
- operationId: createAdmin
- parameters:
- - description: User
- in: body
- name: user
- schema:
- $ref: '#/definitions/User'
- x-go-name: User
- responses:
- "200":
- $ref: '#/responses/userBodyResponse'
- schemes:
- - https
- summary: Make a user an admin.
- tags:
- - user
- /api/users/adm/hassuperadmin:
- get:
- operationId: hasSuperAdmin
- responses:
- "200":
- $ref: '#/responses/hasAdmin'
- schemes:
- - https
- summary: Checks whether the server has an admin.
- tags:
- - user
- /api/users/adm/transfersuperadmin:
- post:
- operationId: transferSuperAdmin
- responses:
- "200":
- $ref: '#/responses/userBodyResponse'
- schemes:
- - https
- summary: Transfers superadmin role to an admin user.
- tags:
- - user
- /api/users_pending:
- get:
- operationId: getPendingUsers
- responses:
- "200":
- $ref: '#/responses/userBodyResponse'
- schemes:
- - https
- summary: Get all pending users.
- tags:
- - user
- /api/users_pending/{username}/pending:
- delete:
- operationId: deleteAllPendingUsers
- responses:
- "200":
- $ref: '#/responses/userBodyResponse'
- schemes:
- - https
- summary: delete all pending users.
- tags:
- - user
- /api/users_pending/user/{username}:
- delete:
- operationId: deletePendingUser
- responses:
- "200":
- $ref: '#/responses/userBodyResponse'
- schemes:
- - https
- summary: delete pending user.
- tags:
- - user
- post:
- operationId: approvePendingUser
- responses:
- "200":
- $ref: '#/responses/userBodyResponse'
- schemes:
- - https
- summary: approve pending user.
- tags:
- - user
- /api/v1/enrollment-keys:
- get:
- operationId: getEnrollmentKeys
- responses:
- "200":
- $ref: '#/responses/EnrollmentKeys'
- schemes:
- - https
- summary: Lists all EnrollmentKeys for admins.
- tags:
- - enrollmentKeys
- post:
- operationId: createEnrollmentKey
- parameters:
- - description: APIEnrollmentKey
- in: body
- name: body
- schema:
- $ref: '#/definitions/APIEnrollmentKey'
- x-go-name: Body
- responses:
- "200":
- $ref: '#/responses/EnrollmentKey'
- schemes:
- - https
- summary: Creates an EnrollmentKey for hosts to use on Netmaker server.
- tags:
- - enrollmentKeys
- /api/v1/enrollment-keys/{keyid}:
- delete:
- operationId: deleteEnrollmentKey
- parameters:
- - in: path
- name: keyid
- required: true
- type: string
- x-go-name: KeyID
- responses:
- "200":
- $ref: '#/responses/okResponse'
- schemes:
- - https
- summary: Deletes an EnrollmentKey from Netmaker server.
- tags:
- - enrollmentKeys
- put:
- operationId: updateEnrollmentKey
- parameters:
- - description: KeyID
- in: path
- name: keyid
- required: true
- type: string
- x-go-name: KeyID
- - description: APIEnrollmentKey
- in: body
- name: body
- schema:
- $ref: '#/definitions/APIEnrollmentKey'
- x-go-name: Body
- responses:
- "200":
- $ref: '#/responses/EnrollmentKey'
- schemes:
- - https
- summary: Updates an EnrollmentKey for hosts to use on Netmaker server. Updates only the relay to use.
- tags:
- - enrollmentKeys
- /api/v1/enrollment-keys/{token}:
- post:
- operationId: handleHostRegister
- parameters:
- - in: path
- name: token
- required: true
- type: string
- x-go-name: Token
- - in: body
- name: host
- schema:
- $ref: '#/definitions/Host'
- x-go-name: Host
- responses:
- "200":
- $ref: '#/responses/RegisterResponse'
- schemes:
- - https
- summary: Handles a Netclient registration with server and add nodes accordingly.
- tags:
- - enrollmentKeys
- /api/v1/fallback/host/{hostid}:
- put:
- operationId: hostUpdateFallback
- responses:
- "200":
- $ref: '#/responses/apiHostResponse'
- schemes:
- - https
- summary: Updates a Netclient host on Netmaker server.