> For the complete documentation index, see [llms.txt](https://learn.netmaker.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.netmaker.io/api-spec/nodes.md).

# Nodes

## GET /api/nodes

> Get all nodes across all networks

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/nodes":{"get":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/models.ApiNode"},"type":"array"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Get all nodes across all networks","tags":["Nodes"]}}},"components":{"schemas":{"models.ApiNode":{"properties":{"additional_rag_ips":{"items":{"type":"string"},"type":"array"},"address":{"type":"string"},"address6":{"type":"string"},"allowedips":{"items":{"type":"string"},"type":"array"},"auto_assign_gw":{"type":"boolean"},"auto_relayed_peers":{"additionalProperties":{"type":"string"},"type":"object"},"connected":{"type":"boolean"},"country":{"type":"string"},"defaultacl":{"description":"== PRO ==","type":"string"},"dnson":{"type":"boolean"},"egressgatewaynatenabled":{"type":"boolean"},"egressgatewayranges":{"items":{"type":"string"},"type":"array"},"egressgatewayranges_with_metric":{"items":{"$ref":"#/components/schemas/models.EgressRangeMetric"},"type":"array"},"expdatetime":{"format":"int64","type":"integer"},"fail_over_peers":{"additionalProperties":{"type":"object"},"type":"object"},"failed_over_by":{"type":"string"},"hostid":{"minLength":5,"type":"string"},"id":{"minLength":5,"type":"string"},"inet_node_req":{"$ref":"#/components/schemas/models.InetNodeReq"},"ingressdns":{"type":"string"},"ingressmtu":{"type":"integer"},"ingresspersistentkeepalive":{"type":"integer"},"internetgw_node_id":{"type":"string"},"is_auto_relay":{"type":"boolean"},"is_fail_over":{"type":"boolean"},"is_gw":{"type":"boolean"},"is_static":{"type":"boolean"},"is_user_node":{"type":"boolean"},"isegressgateway":{"type":"boolean"},"isingressgateway":{"type":"boolean"},"isinternetgateway":{"type":"boolean"},"isrelay":{"type":"boolean"},"isrelayed":{"type":"boolean"},"last_evaluated_at":{"type":"string"},"lastcheckin":{"format":"int64","type":"integer"},"lastmodified":{"format":"int64","type":"integer"},"lastpeerupdate":{"format":"int64","type":"integer"},"localaddress":{"type":"string"},"location":{"type":"string"},"metadata":{"type":"string"},"network":{"type":"string"},"networkrange":{"type":"string"},"networkrange6":{"type":"string"},"pendingdelete":{"type":"boolean"},"posture_check_violation_severity_level":{"$ref":"#/components/schemas/models.Severity"},"posture_check_violations":{"items":{"$ref":"#/components/schemas/models.Violation"},"type":"array"},"relayedby":{"description":"AutoRelayedBy                 uuid.UUID           `json:\"auto_relayed_by\"`","type":"string"},"relaynodes":{"items":{"type":"string"},"type":"array"},"server":{"type":"string"},"static_node":{"$ref":"#/components/schemas/models.ExtClient"},"status":{"$ref":"#/components/schemas/models.NodeStatus"},"tags":{"additionalProperties":{"type":"object"},"type":"object"}},"required":["hostid","id"],"type":"object"},"models.EgressRangeMetric":{"properties":{"nat":{"type":"boolean"},"nat_mode":{"$ref":"#/components/schemas/models.EgressNATMode"},"network":{"type":"string"},"route_metric":{"description":"preffered range 1-999","type":"integer"},"virtual_network":{"type":"string"}},"type":"object"},"models.EgressNATMode":{"enum":["virtual_nat","direct_nat"],"type":"string"},"models.InetNodeReq":{"properties":{"inet_node_client_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"},"models.Severity":{"enum":[0,1,2,3,4],"type":"integer"},"models.Violation":{"properties":{"attribute":{"type":"string"},"check_id":{"type":"string"},"message":{"type":"string"},"name":{"type":"string"},"severity":{"$ref":"#/components/schemas/models.Severity"}},"type":"object"},"models.ExtClient":{"properties":{"address":{"type":"string"},"address6":{"type":"string"},"allowed_ips":{"items":{"type":"string"},"type":"array"},"client_version":{"type":"string"},"clientid":{"type":"string"},"country":{"type":"string"},"deniednodeacls":{"additionalProperties":{"type":"object"},"type":"object"},"device_id":{"type":"string"},"device_name":{"type":"string"},"dns":{"type":"string"},"enabled":{"type":"boolean"},"extraallowedips":{"items":{"type":"string"},"type":"array"},"ingressgatewayendpoint":{"type":"string"},"ingressgatewayid":{"type":"string"},"jit_expires_at":{"description":"JIT grant expiry time (nil if JIT not enabled or user is admin)","type":"string"},"kernel_version":{"type":"string"},"last_evaluated_at":{"type":"string"},"lastmodified":{"format":"int64","type":"integer"},"location":{"description":"format: lat,long","type":"string"},"network":{"type":"string"},"os":{"type":"string"},"os_family":{"type":"string"},"os_version":{"type":"string"},"ownerid":{"type":"string"},"postdown":{"type":"string"},"postup":{"type":"string"},"posture_check_violation_severity_level":{"$ref":"#/components/schemas/models.Severity"},"posture_check_violations":{"items":{"$ref":"#/components/schemas/models.Violation"},"type":"array"},"privatekey":{"type":"string"},"public_endpoint":{"type":"string"},"publickey":{"type":"string"},"remote_access_client_id":{"description":"unique ID (MAC address) of RAC machine","type":"string"},"tags":{"additionalProperties":{"type":"object"},"type":"object"}},"type":"object"},"models.NodeStatus":{"enum":["online","offline","warning","error","unknown","disconnected"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/nodes/{network}

> Gets all nodes associated with network including pending nodes

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/nodes/{network}":{"get":{"parameters":[{"schema":{"type":"string"},"description":"Network ID","in":"path","name":"network","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/models.ApiNode"},"type":"array"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Gets all nodes associated with network including pending nodes","tags":["Nodes"]}}},"components":{"schemas":{"models.ApiNode":{"properties":{"additional_rag_ips":{"items":{"type":"string"},"type":"array"},"address":{"type":"string"},"address6":{"type":"string"},"allowedips":{"items":{"type":"string"},"type":"array"},"auto_assign_gw":{"type":"boolean"},"auto_relayed_peers":{"additionalProperties":{"type":"string"},"type":"object"},"connected":{"type":"boolean"},"country":{"type":"string"},"defaultacl":{"description":"== PRO ==","type":"string"},"dnson":{"type":"boolean"},"egressgatewaynatenabled":{"type":"boolean"},"egressgatewayranges":{"items":{"type":"string"},"type":"array"},"egressgatewayranges_with_metric":{"items":{"$ref":"#/components/schemas/models.EgressRangeMetric"},"type":"array"},"expdatetime":{"format":"int64","type":"integer"},"fail_over_peers":{"additionalProperties":{"type":"object"},"type":"object"},"failed_over_by":{"type":"string"},"hostid":{"minLength":5,"type":"string"},"id":{"minLength":5,"type":"string"},"inet_node_req":{"$ref":"#/components/schemas/models.InetNodeReq"},"ingressdns":{"type":"string"},"ingressmtu":{"type":"integer"},"ingresspersistentkeepalive":{"type":"integer"},"internetgw_node_id":{"type":"string"},"is_auto_relay":{"type":"boolean"},"is_fail_over":{"type":"boolean"},"is_gw":{"type":"boolean"},"is_static":{"type":"boolean"},"is_user_node":{"type":"boolean"},"isegressgateway":{"type":"boolean"},"isingressgateway":{"type":"boolean"},"isinternetgateway":{"type":"boolean"},"isrelay":{"type":"boolean"},"isrelayed":{"type":"boolean"},"last_evaluated_at":{"type":"string"},"lastcheckin":{"format":"int64","type":"integer"},"lastmodified":{"format":"int64","type":"integer"},"lastpeerupdate":{"format":"int64","type":"integer"},"localaddress":{"type":"string"},"location":{"type":"string"},"metadata":{"type":"string"},"network":{"type":"string"},"networkrange":{"type":"string"},"networkrange6":{"type":"string"},"pendingdelete":{"type":"boolean"},"posture_check_violation_severity_level":{"$ref":"#/components/schemas/models.Severity"},"posture_check_violations":{"items":{"$ref":"#/components/schemas/models.Violation"},"type":"array"},"relayedby":{"description":"AutoRelayedBy                 uuid.UUID           `json:\"auto_relayed_by\"`","type":"string"},"relaynodes":{"items":{"type":"string"},"type":"array"},"server":{"type":"string"},"static_node":{"$ref":"#/components/schemas/models.ExtClient"},"status":{"$ref":"#/components/schemas/models.NodeStatus"},"tags":{"additionalProperties":{"type":"object"},"type":"object"}},"required":["hostid","id"],"type":"object"},"models.EgressRangeMetric":{"properties":{"nat":{"type":"boolean"},"nat_mode":{"$ref":"#/components/schemas/models.EgressNATMode"},"network":{"type":"string"},"route_metric":{"description":"preffered range 1-999","type":"integer"},"virtual_network":{"type":"string"}},"type":"object"},"models.EgressNATMode":{"enum":["virtual_nat","direct_nat"],"type":"string"},"models.InetNodeReq":{"properties":{"inet_node_client_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"},"models.Severity":{"enum":[0,1,2,3,4],"type":"integer"},"models.Violation":{"properties":{"attribute":{"type":"string"},"check_id":{"type":"string"},"message":{"type":"string"},"name":{"type":"string"},"severity":{"$ref":"#/components/schemas/models.Severity"}},"type":"object"},"models.ExtClient":{"properties":{"address":{"type":"string"},"address6":{"type":"string"},"allowed_ips":{"items":{"type":"string"},"type":"array"},"client_version":{"type":"string"},"clientid":{"type":"string"},"country":{"type":"string"},"deniednodeacls":{"additionalProperties":{"type":"object"},"type":"object"},"device_id":{"type":"string"},"device_name":{"type":"string"},"dns":{"type":"string"},"enabled":{"type":"boolean"},"extraallowedips":{"items":{"type":"string"},"type":"array"},"ingressgatewayendpoint":{"type":"string"},"ingressgatewayid":{"type":"string"},"jit_expires_at":{"description":"JIT grant expiry time (nil if JIT not enabled or user is admin)","type":"string"},"kernel_version":{"type":"string"},"last_evaluated_at":{"type":"string"},"lastmodified":{"format":"int64","type":"integer"},"location":{"description":"format: lat,long","type":"string"},"network":{"type":"string"},"os":{"type":"string"},"os_family":{"type":"string"},"os_version":{"type":"string"},"ownerid":{"type":"string"},"postdown":{"type":"string"},"postup":{"type":"string"},"posture_check_violation_severity_level":{"$ref":"#/components/schemas/models.Severity"},"posture_check_violations":{"items":{"$ref":"#/components/schemas/models.Violation"},"type":"array"},"privatekey":{"type":"string"},"public_endpoint":{"type":"string"},"publickey":{"type":"string"},"remote_access_client_id":{"description":"unique ID (MAC address) of RAC machine","type":"string"},"tags":{"additionalProperties":{"type":"object"},"type":"object"}},"type":"object"},"models.NodeStatus":{"enum":["online","offline","warning","error","unknown","disconnected"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/nodes/{network}/{nodeid}

> Get an individual node

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/nodes/{network}/{nodeid}":{"get":{"parameters":[{"schema":{"type":"string"},"description":"Network ID","in":"path","name":"network","required":true},{"schema":{"type":"string"},"description":"Node ID","in":"path","name":"nodeid","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.NodeGet"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Get an individual node","tags":["Nodes"]}}},"components":{"schemas":{"models.NodeGet":{"properties":{"host":{"$ref":"#/components/schemas/models.Host"},"host_peers":{"items":{"$ref":"#/components/schemas/wgtypes.PeerConfig"},"type":"array"},"node":{"$ref":"#/components/schemas/models.Node"},"peerids":{"$ref":"#/components/schemas/models.PeerMap"},"peers":{"items":{"$ref":"#/components/schemas/wgtypes.PeerConfig"},"type":"array"},"serverconfig":{"$ref":"#/components/schemas/models.ServerConfig"}},"type":"object"},"models.Host":{"properties":{"autoupdate":{"type":"boolean"},"country_code":{"type":"string"},"daemoninstalled":{"type":"boolean"},"debug":{"type":"boolean"},"defaultinterface":{"type":"string"},"dns_status":{"type":"string"},"enable_flow_logs":{"type":"boolean"},"endpointip":{"items":{"type":"integer"},"type":"array"},"endpointipv6":{"items":{"type":"integer"},"type":"array"},"firewallinuse":{"type":"string"},"hostpass":{"type":"string"},"id":{"type":"string"},"interface":{"type":"string"},"interfaces":{"items":{"$ref":"#/components/schemas/models.Iface"},"type":"array"},"ipforwarding":{"type":"boolean"},"isdefault":{"type":"boolean"},"isdocker":{"type":"boolean"},"isk8s":{"type":"boolean"},"isstatic":{"type":"boolean"},"isstaticport":{"type":"boolean"},"kernel_version":{"type":"string"},"listenport":{"type":"integer"},"location":{"description":"Format: \"lat,lon\"","type":"string"},"macaddress":{"items":{"type":"integer"},"type":"array"},"mtu":{"type":"integer"},"name":{"type":"string"},"nat_type":{"type":"string"},"nodes":{"items":{"type":"string"},"type":"array"},"os":{"type":"string"},"os_family":{"type":"string"},"os_version":{"type":"string"},"persistentkeepalive":{"format":"int64","type":"integer"},"publickey":{"items":{"type":"integer"},"type":"array"},"traffickeypublic":{"items":{"type":"integer"},"type":"array"},"turn_endpoint":{"$ref":"#/components/schemas/netip.AddrPort"},"verbosity":{"type":"integer"},"version":{"type":"string"},"wg_public_listen_port":{"type":"integer"}},"type":"object"},"models.Iface":{"properties":{"address":{"$ref":"#/components/schemas/net.IPNet"},"addressString":{"type":"string"},"name":{"type":"string"}},"type":"object"},"net.IPNet":{"properties":{"ip":{"description":"network number","items":{"type":"integer"},"type":"array"},"mask":{"description":"network mask","items":{"format":"int32","type":"integer"},"type":"array"}},"type":"object"},"netip.AddrPort":{"type":"object"},"wgtypes.PeerConfig":{"properties":{"allowedIPs":{"description":"AllowedIPs specifies a list of allowed IP addresses in CIDR notation\nfor this peer.","items":{"$ref":"#/components/schemas/net.IPNet"},"type":"array"},"endpoint":{"allOf":[{"$ref":"#/components/schemas/net.UDPAddr"}],"description":"Endpoint specifies the endpoint of this peer entry, if not nil."},"persistentKeepaliveInterval":{"description":"PersistentKeepaliveInterval specifies the persistent keepalive interval\nfor this peer, if not nil.\n\nA non-nil value of 0 will clear the persistent keepalive interval.","format":"int64","type":"integer"},"presharedKey":{"description":"PresharedKey specifies a peer's preshared key configuration, if not nil.\n\nA non-nil, zero-value Key will clear the preshared key.","items":{"type":"integer"},"type":"array"},"publicKey":{"description":"PublicKey specifies the public key of this peer.  PublicKey is a\nmandatory field for all PeerConfigs.","items":{"type":"integer"},"type":"array"},"remove":{"description":"Remove specifies if the peer with this public key should be removed\nfrom a device's peer list.","type":"boolean"},"replaceAllowedIPs":{"description":"ReplaceAllowedIPs specifies if the allowed IPs specified in this peer\nconfiguration should replace any existing ones, instead of appending them\nto the allowed IPs list.","type":"boolean"},"updateOnly":{"description":"UpdateOnly specifies that an operation will only occur on this peer\nif the peer already exists as part of the interface.","type":"boolean"}},"type":"object"},"net.UDPAddr":{"properties":{"ip":{"items":{"type":"integer"},"type":"array"},"port":{"type":"integer"},"zone":{"description":"IPv6 scoped addressing zone","type":"string"}},"type":"object"},"models.Node":{"properties":{"action":{"type":"string"},"additional_rag_ips":{"items":{"type":"number"},"type":"array"},"address":{"$ref":"#/components/schemas/net.IPNet"},"address6":{"$ref":"#/components/schemas/net.IPNet"},"auto_assign_gw":{"type":"boolean"},"auto_relayed_peers_v1":{"additionalProperties":{"type":"string"},"description":"AutoRelayedPeers   map[string]struct{} `json:\"auto_relayed_peers\"`","type":"object"},"connected":{"type":"boolean"},"country_code":{"type":"string"},"defaultacl":{"description":"== PRO ==","type":"string"},"egressgatewaynatenabled":{"type":"boolean"},"egressgatewayranges":{"items":{"type":"string"},"type":"array"},"egressgatewayrequest":{"$ref":"#/components/schemas/models.EgressGatewayRequest"},"expdatetime":{"type":"string"},"fail_over_peers":{"additionalProperties":{"type":"object"},"description":"AutoRelayedBy     uuid.UUID           `json:\"auto_relayed_by\"`","type":"object"},"failed_over_by":{"type":"string"},"hostid":{"type":"string"},"id":{"type":"string"},"inet_node_req":{"$ref":"#/components/schemas/models.InetNodeReq"},"ingressdns":{"type":"string"},"ingressgatewayrange":{"type":"string"},"ingressgatewayrange6":{"type":"string"},"ingressmtu":{"type":"integer"},"ingresspersistentkeepalive":{"type":"integer"},"internetgw_node_id":{"type":"string"},"is_auto_relay":{"type":"boolean"},"is_fail_over":{"type":"boolean"},"is_gw":{"type":"boolean"},"is_static":{"type":"boolean"},"is_user_node":{"type":"boolean"},"isegressgateway":{"type":"boolean"},"isingressgateway":{"type":"boolean"},"isinternetgateway":{"type":"boolean"},"isrelay":{"type":"boolean"},"isrelayed":{"type":"boolean"},"last_evaluated_at":{"type":"string"},"lastcheckin":{"type":"string"},"lastmodified":{"type":"string"},"lastpeerupdate":{"type":"string"},"localaddress":{"$ref":"#/components/schemas/net.IPNet"},"location":{"description":"Format: \"lat,lon\"","type":"string"},"metadata":{"type":"string"},"network":{"type":"string"},"networkrange":{"type":"integer"},"networkrange6":{"type":"number"},"node_status":{"$ref":"#/components/schemas/models.NodeStatus"},"ownerid":{"type":"string"},"pendingdelete":{"type":"boolean"},"posture_check_violation_severity_level":{"$ref":"#/components/schemas/models.Severity"},"posture_check_violations":{"items":{"$ref":"#/components/schemas/models.Violation"},"type":"array"},"relayedby":{"type":"string"},"relaynodes":{"items":{"type":"string"},"type":"array"},"server":{"type":"string"},"static_node":{"$ref":"#/components/schemas/models.ExtClient"},"tags":{"additionalProperties":{"type":"object"},"type":"object"}},"type":"object"},"models.EgressGatewayRequest":{"properties":{"natenabled":{"type":"string"},"netid":{"type":"string"},"nodeid":{"type":"string"},"ranges":{"items":{"type":"string"},"type":"array"},"ranges_with_metric":{"items":{"$ref":"#/components/schemas/models.EgressRangeMetric"},"type":"array"}},"type":"object"},"models.EgressRangeMetric":{"properties":{"nat":{"type":"boolean"},"nat_mode":{"$ref":"#/components/schemas/models.EgressNATMode"},"network":{"type":"string"},"route_metric":{"description":"preffered range 1-999","type":"integer"},"virtual_network":{"type":"string"}},"type":"object"},"models.EgressNATMode":{"enum":["virtual_nat","direct_nat"],"type":"string"},"models.InetNodeReq":{"properties":{"inet_node_client_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"},"models.NodeStatus":{"enum":["online","offline","warning","error","unknown","disconnected"],"type":"string"},"models.Severity":{"enum":[0,1,2,3,4],"type":"integer"},"models.Violation":{"properties":{"attribute":{"type":"string"},"check_id":{"type":"string"},"message":{"type":"string"},"name":{"type":"string"},"severity":{"$ref":"#/components/schemas/models.Severity"}},"type":"object"},"models.ExtClient":{"properties":{"address":{"type":"string"},"address6":{"type":"string"},"allowed_ips":{"items":{"type":"string"},"type":"array"},"client_version":{"type":"string"},"clientid":{"type":"string"},"country":{"type":"string"},"deniednodeacls":{"additionalProperties":{"type":"object"},"type":"object"},"device_id":{"type":"string"},"device_name":{"type":"string"},"dns":{"type":"string"},"enabled":{"type":"boolean"},"extraallowedips":{"items":{"type":"string"},"type":"array"},"ingressgatewayendpoint":{"type":"string"},"ingressgatewayid":{"type":"string"},"jit_expires_at":{"description":"JIT grant expiry time (nil if JIT not enabled or user is admin)","type":"string"},"kernel_version":{"type":"string"},"last_evaluated_at":{"type":"string"},"lastmodified":{"format":"int64","type":"integer"},"location":{"description":"format: lat,long","type":"string"},"network":{"type":"string"},"os":{"type":"string"},"os_family":{"type":"string"},"os_version":{"type":"string"},"ownerid":{"type":"string"},"postdown":{"type":"string"},"postup":{"type":"string"},"posture_check_violation_severity_level":{"$ref":"#/components/schemas/models.Severity"},"posture_check_violations":{"items":{"$ref":"#/components/schemas/models.Violation"},"type":"array"},"privatekey":{"type":"string"},"public_endpoint":{"type":"string"},"publickey":{"type":"string"},"remote_access_client_id":{"description":"unique ID (MAC address) of RAC machine","type":"string"},"tags":{"additionalProperties":{"type":"object"},"type":"object"}},"type":"object"},"models.PeerMap":{"additionalProperties":{"$ref":"#/components/schemas/models.IDandAddr"},"type":"object"},"models.IDandAddr":{"properties":{"address":{"type":"string"},"address4":{"type":"string"},"address6":{"type":"string"},"host_id":{"type":"string"},"id":{"type":"string"},"is_extclient":{"type":"boolean"},"isserver":{"type":"string"},"listen_port":{"type":"integer"},"name":{"type":"string"},"network":{"type":"string"},"username":{"type":"string"}},"type":"object"},"models.ServerConfig":{"properties":{"Is_EE":{"type":"boolean"},"api":{"type":"string"},"apihost":{"type":"string"},"apiport":{"type":"string"},"broker":{"type":"string"},"brokerType":{"type":"string"},"coreDNSAddr":{"type":"string"},"defaultDomain":{"type":"string"},"dnsmode":{"type":"string"},"endpointDetection":{"type":"boolean"},"grpc":{"type":"string"},"ipdetectionInterval":{"type":"integer"},"manageDNS":{"type":"boolean"},"metricInterval":{"type":"string"},"metricsPort":{"type":"integer"},"mqpassword":{"type":"string"},"mqport":{"type":"string"},"mquserName":{"type":"string"},"peerConnectionCheckInterval":{"type":"string"},"server":{"type":"string"},"stun":{"type":"boolean"},"stunServers":{"type":"string"},"trafficKey":{"items":{"type":"integer"},"type":"array"},"version":{"type":"string"}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## PUT /api/nodes/{network}/{nodeid}

> Update an individual node

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/nodes/{network}/{nodeid}":{"put":{"parameters":[{"schema":{"type":"string"},"description":"Network ID","in":"path","name":"network","required":true},{"schema":{"type":"string"},"description":"Node ID","in":"path","name":"nodeid","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ApiNode"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Update an individual node","tags":["Nodes"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ApiNode"}}},"description":"Node update data","required":true}}}},"components":{"schemas":{"models.ApiNode":{"properties":{"additional_rag_ips":{"items":{"type":"string"},"type":"array"},"address":{"type":"string"},"address6":{"type":"string"},"allowedips":{"items":{"type":"string"},"type":"array"},"auto_assign_gw":{"type":"boolean"},"auto_relayed_peers":{"additionalProperties":{"type":"string"},"type":"object"},"connected":{"type":"boolean"},"country":{"type":"string"},"defaultacl":{"description":"== PRO ==","type":"string"},"dnson":{"type":"boolean"},"egressgatewaynatenabled":{"type":"boolean"},"egressgatewayranges":{"items":{"type":"string"},"type":"array"},"egressgatewayranges_with_metric":{"items":{"$ref":"#/components/schemas/models.EgressRangeMetric"},"type":"array"},"expdatetime":{"format":"int64","type":"integer"},"fail_over_peers":{"additionalProperties":{"type":"object"},"type":"object"},"failed_over_by":{"type":"string"},"hostid":{"minLength":5,"type":"string"},"id":{"minLength":5,"type":"string"},"inet_node_req":{"$ref":"#/components/schemas/models.InetNodeReq"},"ingressdns":{"type":"string"},"ingressmtu":{"type":"integer"},"ingresspersistentkeepalive":{"type":"integer"},"internetgw_node_id":{"type":"string"},"is_auto_relay":{"type":"boolean"},"is_fail_over":{"type":"boolean"},"is_gw":{"type":"boolean"},"is_static":{"type":"boolean"},"is_user_node":{"type":"boolean"},"isegressgateway":{"type":"boolean"},"isingressgateway":{"type":"boolean"},"isinternetgateway":{"type":"boolean"},"isrelay":{"type":"boolean"},"isrelayed":{"type":"boolean"},"last_evaluated_at":{"type":"string"},"lastcheckin":{"format":"int64","type":"integer"},"lastmodified":{"format":"int64","type":"integer"},"lastpeerupdate":{"format":"int64","type":"integer"},"localaddress":{"type":"string"},"location":{"type":"string"},"metadata":{"type":"string"},"network":{"type":"string"},"networkrange":{"type":"string"},"networkrange6":{"type":"string"},"pendingdelete":{"type":"boolean"},"posture_check_violation_severity_level":{"$ref":"#/components/schemas/models.Severity"},"posture_check_violations":{"items":{"$ref":"#/components/schemas/models.Violation"},"type":"array"},"relayedby":{"description":"AutoRelayedBy                 uuid.UUID           `json:\"auto_relayed_by\"`","type":"string"},"relaynodes":{"items":{"type":"string"},"type":"array"},"server":{"type":"string"},"static_node":{"$ref":"#/components/schemas/models.ExtClient"},"status":{"$ref":"#/components/schemas/models.NodeStatus"},"tags":{"additionalProperties":{"type":"object"},"type":"object"}},"required":["hostid","id"],"type":"object"},"models.EgressRangeMetric":{"properties":{"nat":{"type":"boolean"},"nat_mode":{"$ref":"#/components/schemas/models.EgressNATMode"},"network":{"type":"string"},"route_metric":{"description":"preffered range 1-999","type":"integer"},"virtual_network":{"type":"string"}},"type":"object"},"models.EgressNATMode":{"enum":["virtual_nat","direct_nat"],"type":"string"},"models.InetNodeReq":{"properties":{"inet_node_client_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"},"models.Severity":{"enum":[0,1,2,3,4],"type":"integer"},"models.Violation":{"properties":{"attribute":{"type":"string"},"check_id":{"type":"string"},"message":{"type":"string"},"name":{"type":"string"},"severity":{"$ref":"#/components/schemas/models.Severity"}},"type":"object"},"models.ExtClient":{"properties":{"address":{"type":"string"},"address6":{"type":"string"},"allowed_ips":{"items":{"type":"string"},"type":"array"},"client_version":{"type":"string"},"clientid":{"type":"string"},"country":{"type":"string"},"deniednodeacls":{"additionalProperties":{"type":"object"},"type":"object"},"device_id":{"type":"string"},"device_name":{"type":"string"},"dns":{"type":"string"},"enabled":{"type":"boolean"},"extraallowedips":{"items":{"type":"string"},"type":"array"},"ingressgatewayendpoint":{"type":"string"},"ingressgatewayid":{"type":"string"},"jit_expires_at":{"description":"JIT grant expiry time (nil if JIT not enabled or user is admin)","type":"string"},"kernel_version":{"type":"string"},"last_evaluated_at":{"type":"string"},"lastmodified":{"format":"int64","type":"integer"},"location":{"description":"format: lat,long","type":"string"},"network":{"type":"string"},"os":{"type":"string"},"os_family":{"type":"string"},"os_version":{"type":"string"},"ownerid":{"type":"string"},"postdown":{"type":"string"},"postup":{"type":"string"},"posture_check_violation_severity_level":{"$ref":"#/components/schemas/models.Severity"},"posture_check_violations":{"items":{"$ref":"#/components/schemas/models.Violation"},"type":"array"},"privatekey":{"type":"string"},"public_endpoint":{"type":"string"},"publickey":{"type":"string"},"remote_access_client_id":{"description":"unique ID (MAC address) of RAC machine","type":"string"},"tags":{"additionalProperties":{"type":"object"},"type":"object"}},"type":"object"},"models.NodeStatus":{"enum":["online","offline","warning","error","unknown","disconnected"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## DELETE /api/nodes/{network}/{nodeid}

> Delete an individual node

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/nodes/{network}/{nodeid}":{"delete":{"parameters":[{"schema":{"type":"string"},"description":"Network ID","in":"path","name":"network","required":true},{"schema":{"type":"string"},"description":"Node ID","in":"path","name":"nodeid","required":true},{"schema":{"type":"string"},"description":"Force delete","in":"query","name":"force"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Delete an individual node","tags":["Nodes"]}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## POST /api/nodes/{network}/{nodeid}/creategateway

> Create an egress gateway

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/nodes/{network}/{nodeid}/creategateway":{"post":{"parameters":[{"schema":{"type":"string"},"description":"Network ID","in":"path","name":"network","required":true},{"schema":{"type":"string"},"description":"Node ID","in":"path","name":"nodeid","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ApiNode"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Create an egress gateway","tags":["Nodes"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.EgressGatewayRequest"}}},"description":"Egress gateway request","required":true}}}},"components":{"schemas":{"models.ApiNode":{"properties":{"additional_rag_ips":{"items":{"type":"string"},"type":"array"},"address":{"type":"string"},"address6":{"type":"string"},"allowedips":{"items":{"type":"string"},"type":"array"},"auto_assign_gw":{"type":"boolean"},"auto_relayed_peers":{"additionalProperties":{"type":"string"},"type":"object"},"connected":{"type":"boolean"},"country":{"type":"string"},"defaultacl":{"description":"== PRO ==","type":"string"},"dnson":{"type":"boolean"},"egressgatewaynatenabled":{"type":"boolean"},"egressgatewayranges":{"items":{"type":"string"},"type":"array"},"egressgatewayranges_with_metric":{"items":{"$ref":"#/components/schemas/models.EgressRangeMetric"},"type":"array"},"expdatetime":{"format":"int64","type":"integer"},"fail_over_peers":{"additionalProperties":{"type":"object"},"type":"object"},"failed_over_by":{"type":"string"},"hostid":{"minLength":5,"type":"string"},"id":{"minLength":5,"type":"string"},"inet_node_req":{"$ref":"#/components/schemas/models.InetNodeReq"},"ingressdns":{"type":"string"},"ingressmtu":{"type":"integer"},"ingresspersistentkeepalive":{"type":"integer"},"internetgw_node_id":{"type":"string"},"is_auto_relay":{"type":"boolean"},"is_fail_over":{"type":"boolean"},"is_gw":{"type":"boolean"},"is_static":{"type":"boolean"},"is_user_node":{"type":"boolean"},"isegressgateway":{"type":"boolean"},"isingressgateway":{"type":"boolean"},"isinternetgateway":{"type":"boolean"},"isrelay":{"type":"boolean"},"isrelayed":{"type":"boolean"},"last_evaluated_at":{"type":"string"},"lastcheckin":{"format":"int64","type":"integer"},"lastmodified":{"format":"int64","type":"integer"},"lastpeerupdate":{"format":"int64","type":"integer"},"localaddress":{"type":"string"},"location":{"type":"string"},"metadata":{"type":"string"},"network":{"type":"string"},"networkrange":{"type":"string"},"networkrange6":{"type":"string"},"pendingdelete":{"type":"boolean"},"posture_check_violation_severity_level":{"$ref":"#/components/schemas/models.Severity"},"posture_check_violations":{"items":{"$ref":"#/components/schemas/models.Violation"},"type":"array"},"relayedby":{"description":"AutoRelayedBy                 uuid.UUID           `json:\"auto_relayed_by\"`","type":"string"},"relaynodes":{"items":{"type":"string"},"type":"array"},"server":{"type":"string"},"static_node":{"$ref":"#/components/schemas/models.ExtClient"},"status":{"$ref":"#/components/schemas/models.NodeStatus"},"tags":{"additionalProperties":{"type":"object"},"type":"object"}},"required":["hostid","id"],"type":"object"},"models.EgressRangeMetric":{"properties":{"nat":{"type":"boolean"},"nat_mode":{"$ref":"#/components/schemas/models.EgressNATMode"},"network":{"type":"string"},"route_metric":{"description":"preffered range 1-999","type":"integer"},"virtual_network":{"type":"string"}},"type":"object"},"models.EgressNATMode":{"enum":["virtual_nat","direct_nat"],"type":"string"},"models.InetNodeReq":{"properties":{"inet_node_client_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"},"models.Severity":{"enum":[0,1,2,3,4],"type":"integer"},"models.Violation":{"properties":{"attribute":{"type":"string"},"check_id":{"type":"string"},"message":{"type":"string"},"name":{"type":"string"},"severity":{"$ref":"#/components/schemas/models.Severity"}},"type":"object"},"models.ExtClient":{"properties":{"address":{"type":"string"},"address6":{"type":"string"},"allowed_ips":{"items":{"type":"string"},"type":"array"},"client_version":{"type":"string"},"clientid":{"type":"string"},"country":{"type":"string"},"deniednodeacls":{"additionalProperties":{"type":"object"},"type":"object"},"device_id":{"type":"string"},"device_name":{"type":"string"},"dns":{"type":"string"},"enabled":{"type":"boolean"},"extraallowedips":{"items":{"type":"string"},"type":"array"},"ingressgatewayendpoint":{"type":"string"},"ingressgatewayid":{"type":"string"},"jit_expires_at":{"description":"JIT grant expiry time (nil if JIT not enabled or user is admin)","type":"string"},"kernel_version":{"type":"string"},"last_evaluated_at":{"type":"string"},"lastmodified":{"format":"int64","type":"integer"},"location":{"description":"format: lat,long","type":"string"},"network":{"type":"string"},"os":{"type":"string"},"os_family":{"type":"string"},"os_version":{"type":"string"},"ownerid":{"type":"string"},"postdown":{"type":"string"},"postup":{"type":"string"},"posture_check_violation_severity_level":{"$ref":"#/components/schemas/models.Severity"},"posture_check_violations":{"items":{"$ref":"#/components/schemas/models.Violation"},"type":"array"},"privatekey":{"type":"string"},"public_endpoint":{"type":"string"},"publickey":{"type":"string"},"remote_access_client_id":{"description":"unique ID (MAC address) of RAC machine","type":"string"},"tags":{"additionalProperties":{"type":"object"},"type":"object"}},"type":"object"},"models.NodeStatus":{"enum":["online","offline","warning","error","unknown","disconnected"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.EgressGatewayRequest":{"properties":{"natenabled":{"type":"string"},"netid":{"type":"string"},"nodeid":{"type":"string"},"ranges":{"items":{"type":"string"},"type":"array"},"ranges_with_metric":{"items":{"$ref":"#/components/schemas/models.EgressRangeMetric"},"type":"array"}},"type":"object"}}}}
```

## DELETE /api/nodes/{network}/{nodeid}/deletegateway

> Delete an egress gateway

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/nodes/{network}/{nodeid}/deletegateway":{"delete":{"parameters":[{"schema":{"type":"string"},"description":"Network ID","in":"path","name":"network","required":true},{"schema":{"type":"string"},"description":"Node ID","in":"path","name":"nodeid","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ApiNode"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Delete an egress gateway","tags":["Nodes"]}}},"components":{"schemas":{"models.ApiNode":{"properties":{"additional_rag_ips":{"items":{"type":"string"},"type":"array"},"address":{"type":"string"},"address6":{"type":"string"},"allowedips":{"items":{"type":"string"},"type":"array"},"auto_assign_gw":{"type":"boolean"},"auto_relayed_peers":{"additionalProperties":{"type":"string"},"type":"object"},"connected":{"type":"boolean"},"country":{"type":"string"},"defaultacl":{"description":"== PRO ==","type":"string"},"dnson":{"type":"boolean"},"egressgatewaynatenabled":{"type":"boolean"},"egressgatewayranges":{"items":{"type":"string"},"type":"array"},"egressgatewayranges_with_metric":{"items":{"$ref":"#/components/schemas/models.EgressRangeMetric"},"type":"array"},"expdatetime":{"format":"int64","type":"integer"},"fail_over_peers":{"additionalProperties":{"type":"object"},"type":"object"},"failed_over_by":{"type":"string"},"hostid":{"minLength":5,"type":"string"},"id":{"minLength":5,"type":"string"},"inet_node_req":{"$ref":"#/components/schemas/models.InetNodeReq"},"ingressdns":{"type":"string"},"ingressmtu":{"type":"integer"},"ingresspersistentkeepalive":{"type":"integer"},"internetgw_node_id":{"type":"string"},"is_auto_relay":{"type":"boolean"},"is_fail_over":{"type":"boolean"},"is_gw":{"type":"boolean"},"is_static":{"type":"boolean"},"is_user_node":{"type":"boolean"},"isegressgateway":{"type":"boolean"},"isingressgateway":{"type":"boolean"},"isinternetgateway":{"type":"boolean"},"isrelay":{"type":"boolean"},"isrelayed":{"type":"boolean"},"last_evaluated_at":{"type":"string"},"lastcheckin":{"format":"int64","type":"integer"},"lastmodified":{"format":"int64","type":"integer"},"lastpeerupdate":{"format":"int64","type":"integer"},"localaddress":{"type":"string"},"location":{"type":"string"},"metadata":{"type":"string"},"network":{"type":"string"},"networkrange":{"type":"string"},"networkrange6":{"type":"string"},"pendingdelete":{"type":"boolean"},"posture_check_violation_severity_level":{"$ref":"#/components/schemas/models.Severity"},"posture_check_violations":{"items":{"$ref":"#/components/schemas/models.Violation"},"type":"array"},"relayedby":{"description":"AutoRelayedBy                 uuid.UUID           `json:\"auto_relayed_by\"`","type":"string"},"relaynodes":{"items":{"type":"string"},"type":"array"},"server":{"type":"string"},"static_node":{"$ref":"#/components/schemas/models.ExtClient"},"status":{"$ref":"#/components/schemas/models.NodeStatus"},"tags":{"additionalProperties":{"type":"object"},"type":"object"}},"required":["hostid","id"],"type":"object"},"models.EgressRangeMetric":{"properties":{"nat":{"type":"boolean"},"nat_mode":{"$ref":"#/components/schemas/models.EgressNATMode"},"network":{"type":"string"},"route_metric":{"description":"preffered range 1-999","type":"integer"},"virtual_network":{"type":"string"}},"type":"object"},"models.EgressNATMode":{"enum":["virtual_nat","direct_nat"],"type":"string"},"models.InetNodeReq":{"properties":{"inet_node_client_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"},"models.Severity":{"enum":[0,1,2,3,4],"type":"integer"},"models.Violation":{"properties":{"attribute":{"type":"string"},"check_id":{"type":"string"},"message":{"type":"string"},"name":{"type":"string"},"severity":{"$ref":"#/components/schemas/models.Severity"}},"type":"object"},"models.ExtClient":{"properties":{"address":{"type":"string"},"address6":{"type":"string"},"allowed_ips":{"items":{"type":"string"},"type":"array"},"client_version":{"type":"string"},"clientid":{"type":"string"},"country":{"type":"string"},"deniednodeacls":{"additionalProperties":{"type":"object"},"type":"object"},"device_id":{"type":"string"},"device_name":{"type":"string"},"dns":{"type":"string"},"enabled":{"type":"boolean"},"extraallowedips":{"items":{"type":"string"},"type":"array"},"ingressgatewayendpoint":{"type":"string"},"ingressgatewayid":{"type":"string"},"jit_expires_at":{"description":"JIT grant expiry time (nil if JIT not enabled or user is admin)","type":"string"},"kernel_version":{"type":"string"},"last_evaluated_at":{"type":"string"},"lastmodified":{"format":"int64","type":"integer"},"location":{"description":"format: lat,long","type":"string"},"network":{"type":"string"},"os":{"type":"string"},"os_family":{"type":"string"},"os_version":{"type":"string"},"ownerid":{"type":"string"},"postdown":{"type":"string"},"postup":{"type":"string"},"posture_check_violation_severity_level":{"$ref":"#/components/schemas/models.Severity"},"posture_check_violations":{"items":{"$ref":"#/components/schemas/models.Violation"},"type":"array"},"privatekey":{"type":"string"},"public_endpoint":{"type":"string"},"publickey":{"type":"string"},"remote_access_client_id":{"description":"unique ID (MAC address) of RAC machine","type":"string"},"tags":{"additionalProperties":{"type":"object"},"type":"object"}},"type":"object"},"models.NodeStatus":{"enum":["online","offline","warning","error","unknown","disconnected"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## DELETE /api/v1/legacy/nodes

> Delete all legacy nodes from DB.

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/legacy/nodes":{"delete":{"responses":{"200":{"description":"Wiped all legacy nodes.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Delete all legacy nodes from DB.","tags":["Nodes"]}}},"components":{"schemas":{"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/v1/nodes/{network}/status

> Get all nodes status on the network

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/nodes/{network}/status":{"get":{"parameters":[{"schema":{"type":"string"},"description":"Network ID","in":"path","name":"network","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"additionalProperties":{"$ref":"#/components/schemas/models.NodeStatus"},"type":"object"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Get all nodes status on the network","tags":["Nodes"]}}},"components":{"schemas":{"models.NodeStatus":{"enum":["online","offline","warning","error","unknown","disconnected"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## PUT /api/v1/nodes/migrate

> Used to migrate a legacy node.

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/nodes/migrate":{"put":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.HostPull"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Used to migrate a legacy node.","tags":["Nodes"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.MigrationData"}}},"description":"Migration data","required":true}}}},"components":{"schemas":{"models.HostPull":{"properties":{"address_identity_map":{"additionalProperties":{"$ref":"#/components/schemas/models.PeerIdentity"},"type":"object"},"auto_relay_nodes":{"additionalProperties":{"items":{"$ref":"#/components/schemas/models.Node"},"type":"array"},"type":"object"},"change_default_gw":{"type":"boolean"},"default_gw_ip":{"items":{"type":"integer"},"type":"array"},"dns_nameservers":{"items":{"$ref":"#/components/schemas/models.Nameserver"},"type":"array"},"egress_network_routes":{"items":{"$ref":"#/components/schemas/models.EgressNetworkRoutes"},"type":"array"},"egress_with_domains":{"items":{"$ref":"#/components/schemas/models.EgressDomain"},"type":"array"},"endpoint_detection":{"type":"boolean"},"fw_update":{"$ref":"#/components/schemas/models.FwUpdate"},"gw_nodes":{"additionalProperties":{"items":{"$ref":"#/components/schemas/models.Node"},"type":"array"},"type":"object"},"host":{"$ref":"#/components/schemas/models.Host"},"host_network_info":{"$ref":"#/components/schemas/models.HostInfoMap"},"is_inet_gw":{"type":"boolean"},"name_servers":{"items":{"type":"string"},"type":"array"},"nodes":{"items":{"$ref":"#/components/schemas/models.Node"},"type":"array"},"peer_ids":{"$ref":"#/components/schemas/models.PeerMap"},"peers":{"items":{"$ref":"#/components/schemas/wgtypes.PeerConfig"},"type":"array"},"replace_peers":{"type":"boolean"},"server_config":{"$ref":"#/components/schemas/models.ServerConfig"}},"type":"object"},"models.PeerIdentity":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/models.PeerType"}},"type":"object"},"models.PeerType":{"enum":[0,1,2,3],"type":"integer"},"models.Node":{"properties":{"action":{"type":"string"},"additional_rag_ips":{"items":{"type":"number"},"type":"array"},"address":{"$ref":"#/components/schemas/net.IPNet"},"address6":{"$ref":"#/components/schemas/net.IPNet"},"auto_assign_gw":{"type":"boolean"},"auto_relayed_peers_v1":{"additionalProperties":{"type":"string"},"description":"AutoRelayedPeers   map[string]struct{} `json:\"auto_relayed_peers\"`","type":"object"},"connected":{"type":"boolean"},"country_code":{"type":"string"},"defaultacl":{"description":"== PRO ==","type":"string"},"egressgatewaynatenabled":{"type":"boolean"},"egressgatewayranges":{"items":{"type":"string"},"type":"array"},"egressgatewayrequest":{"$ref":"#/components/schemas/models.EgressGatewayRequest"},"expdatetime":{"type":"string"},"fail_over_peers":{"additionalProperties":{"type":"object"},"description":"AutoRelayedBy     uuid.UUID           `json:\"auto_relayed_by\"`","type":"object"},"failed_over_by":{"type":"string"},"hostid":{"type":"string"},"id":{"type":"string"},"inet_node_req":{"$ref":"#/components/schemas/models.InetNodeReq"},"ingressdns":{"type":"string"},"ingressgatewayrange":{"type":"string"},"ingressgatewayrange6":{"type":"string"},"ingressmtu":{"type":"integer"},"ingresspersistentkeepalive":{"type":"integer"},"internetgw_node_id":{"type":"string"},"is_auto_relay":{"type":"boolean"},"is_fail_over":{"type":"boolean"},"is_gw":{"type":"boolean"},"is_static":{"type":"boolean"},"is_user_node":{"type":"boolean"},"isegressgateway":{"type":"boolean"},"isingressgateway":{"type":"boolean"},"isinternetgateway":{"type":"boolean"},"isrelay":{"type":"boolean"},"isrelayed":{"type":"boolean"},"last_evaluated_at":{"type":"string"},"lastcheckin":{"type":"string"},"lastmodified":{"type":"string"},"lastpeerupdate":{"type":"string"},"localaddress":{"$ref":"#/components/schemas/net.IPNet"},"location":{"description":"Format: \"lat,lon\"","type":"string"},"metadata":{"type":"string"},"network":{"type":"string"},"networkrange":{"type":"integer"},"networkrange6":{"type":"number"},"node_status":{"$ref":"#/components/schemas/models.NodeStatus"},"ownerid":{"type":"string"},"pendingdelete":{"type":"boolean"},"posture_check_violation_severity_level":{"$ref":"#/components/schemas/models.Severity"},"posture_check_violations":{"items":{"$ref":"#/components/schemas/models.Violation"},"type":"array"},"relayedby":{"type":"string"},"relaynodes":{"items":{"type":"string"},"type":"array"},"server":{"type":"string"},"static_node":{"$ref":"#/components/schemas/models.ExtClient"},"tags":{"additionalProperties":{"type":"object"},"type":"object"}},"type":"object"},"net.IPNet":{"properties":{"ip":{"description":"network number","items":{"type":"integer"},"type":"array"},"mask":{"description":"network mask","items":{"format":"int32","type":"integer"},"type":"array"}},"type":"object"},"models.EgressGatewayRequest":{"properties":{"natenabled":{"type":"string"},"netid":{"type":"string"},"nodeid":{"type":"string"},"ranges":{"items":{"type":"string"},"type":"array"},"ranges_with_metric":{"items":{"$ref":"#/components/schemas/models.EgressRangeMetric"},"type":"array"}},"type":"object"},"models.EgressRangeMetric":{"properties":{"nat":{"type":"boolean"},"nat_mode":{"$ref":"#/components/schemas/models.EgressNATMode"},"network":{"type":"string"},"route_metric":{"description":"preffered range 1-999","type":"integer"},"virtual_network":{"type":"string"}},"type":"object"},"models.EgressNATMode":{"enum":["virtual_nat","direct_nat"],"type":"string"},"models.InetNodeReq":{"properties":{"inet_node_client_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"},"models.NodeStatus":{"enum":["online","offline","warning","error","unknown","disconnected"],"type":"string"},"models.Severity":{"enum":[0,1,2,3,4],"type":"integer"},"models.Violation":{"properties":{"attribute":{"type":"string"},"check_id":{"type":"string"},"message":{"type":"string"},"name":{"type":"string"},"severity":{"$ref":"#/components/schemas/models.Severity"}},"type":"object"},"models.ExtClient":{"properties":{"address":{"type":"string"},"address6":{"type":"string"},"allowed_ips":{"items":{"type":"string"},"type":"array"},"client_version":{"type":"string"},"clientid":{"type":"string"},"country":{"type":"string"},"deniednodeacls":{"additionalProperties":{"type":"object"},"type":"object"},"device_id":{"type":"string"},"device_name":{"type":"string"},"dns":{"type":"string"},"enabled":{"type":"boolean"},"extraallowedips":{"items":{"type":"string"},"type":"array"},"ingressgatewayendpoint":{"type":"string"},"ingressgatewayid":{"type":"string"},"jit_expires_at":{"description":"JIT grant expiry time (nil if JIT not enabled or user is admin)","type":"string"},"kernel_version":{"type":"string"},"last_evaluated_at":{"type":"string"},"lastmodified":{"format":"int64","type":"integer"},"location":{"description":"format: lat,long","type":"string"},"network":{"type":"string"},"os":{"type":"string"},"os_family":{"type":"string"},"os_version":{"type":"string"},"ownerid":{"type":"string"},"postdown":{"type":"string"},"postup":{"type":"string"},"posture_check_violation_severity_level":{"$ref":"#/components/schemas/models.Severity"},"posture_check_violations":{"items":{"$ref":"#/components/schemas/models.Violation"},"type":"array"},"privatekey":{"type":"string"},"public_endpoint":{"type":"string"},"publickey":{"type":"string"},"remote_access_client_id":{"description":"unique ID (MAC address) of RAC machine","type":"string"},"tags":{"additionalProperties":{"type":"object"},"type":"object"}},"type":"object"},"models.Nameserver":{"properties":{"ips":{"items":{"type":"string"},"type":"array"},"is_fallback":{"type":"boolean"},"is_search_domain":{"type":"boolean"},"match_domain":{"type":"string"}},"type":"object"},"models.EgressNetworkRoutes":{"properties":{"egress_gw_addr":{"$ref":"#/components/schemas/net.IPNet"},"egress_gw_addr6":{"$ref":"#/components/schemas/net.IPNet"},"egress_ranges":{"items":{"type":"string"},"type":"array"},"egress_ranges_metric":{"items":{"$ref":"#/components/schemas/models.EgressRangeMetric"},"type":"array"},"network":{"type":"string"},"node_addr":{"$ref":"#/components/schemas/net.IPNet"},"node_addr6":{"$ref":"#/components/schemas/net.IPNet"},"peer_key":{"type":"string"}},"type":"object"},"models.EgressDomain":{"properties":{"domain":{"type":"string"},"host":{"$ref":"#/components/schemas/models.Host"},"id":{"type":"string"},"node":{"$ref":"#/components/schemas/models.Node"}},"type":"object"},"models.Host":{"properties":{"autoupdate":{"type":"boolean"},"country_code":{"type":"string"},"daemoninstalled":{"type":"boolean"},"debug":{"type":"boolean"},"defaultinterface":{"type":"string"},"dns_status":{"type":"string"},"enable_flow_logs":{"type":"boolean"},"endpointip":{"items":{"type":"integer"},"type":"array"},"endpointipv6":{"items":{"type":"integer"},"type":"array"},"firewallinuse":{"type":"string"},"hostpass":{"type":"string"},"id":{"type":"string"},"interface":{"type":"string"},"interfaces":{"items":{"$ref":"#/components/schemas/models.Iface"},"type":"array"},"ipforwarding":{"type":"boolean"},"isdefault":{"type":"boolean"},"isdocker":{"type":"boolean"},"isk8s":{"type":"boolean"},"isstatic":{"type":"boolean"},"isstaticport":{"type":"boolean"},"kernel_version":{"type":"string"},"listenport":{"type":"integer"},"location":{"description":"Format: \"lat,lon\"","type":"string"},"macaddress":{"items":{"type":"integer"},"type":"array"},"mtu":{"type":"integer"},"name":{"type":"string"},"nat_type":{"type":"string"},"nodes":{"items":{"type":"string"},"type":"array"},"os":{"type":"string"},"os_family":{"type":"string"},"os_version":{"type":"string"},"persistentkeepalive":{"format":"int64","type":"integer"},"publickey":{"items":{"type":"integer"},"type":"array"},"traffickeypublic":{"items":{"type":"integer"},"type":"array"},"turn_endpoint":{"$ref":"#/components/schemas/netip.AddrPort"},"verbosity":{"type":"integer"},"version":{"type":"string"},"wg_public_listen_port":{"type":"integer"}},"type":"object"},"models.Iface":{"properties":{"address":{"$ref":"#/components/schemas/net.IPNet"},"addressString":{"type":"string"},"name":{"type":"string"}},"type":"object"},"netip.AddrPort":{"type":"object"},"models.FwUpdate":{"properties":{"acl_rules":{"additionalProperties":{"$ref":"#/components/schemas/models.AclRule"},"type":"object"},"allow_all":{"type":"boolean"},"egress_info":{"additionalProperties":{"$ref":"#/components/schemas/models.EgressInfo"},"type":"object"},"ingress_info":{"additionalProperties":{"$ref":"#/components/schemas/models.IngressInfo"},"type":"object"},"is_egress_gw":{"type":"boolean"},"is_ingress_gw":{"type":"boolean"},"networks":{"items":{"$ref":"#/components/schemas/models.AclRule"},"type":"array"}},"type":"object"},"models.AclRule":{"properties":{"allowed":{"type":"boolean"},"allowed_ports":{"items":{"type":"string"},"type":"array"},"allowed_protocols":{"allOf":[{"$ref":"#/components/schemas/models.Protocol"}],"description":"tcp, udp, etc."},"direction":{"allOf":[{"$ref":"#/components/schemas/models.AllowedTrafficDirection"}],"description":"single or two-way"},"dst":{"items":{"$ref":"#/components/schemas/net.IPNet"},"type":"array"},"dst6":{"items":{"$ref":"#/components/schemas/net.IPNet"},"type":"array"},"id":{"type":"string"},"ip_list":{"items":{"$ref":"#/components/schemas/net.IPNet"},"type":"array"},"ip6_list":{"items":{"$ref":"#/components/schemas/net.IPNet"},"type":"array"}},"type":"object"},"models.Protocol":{"enum":["all","udp","tcp","icmp"],"type":"string"},"models.AllowedTrafficDirection":{"enum":[0,1],"type":"integer"},"models.EgressInfo":{"properties":{"egress_fw_rules":{"additionalProperties":{"$ref":"#/components/schemas/models.AclRule"},"type":"object"},"egress_gateway_cfg":{"$ref":"#/components/schemas/models.EgressGatewayRequest"},"egress_gw_addr":{"$ref":"#/components/schemas/net.IPNet"},"egress_gw_addr6":{"$ref":"#/components/schemas/net.IPNet"},"egress_id":{"type":"string"},"network":{"$ref":"#/components/schemas/net.IPNet"},"network6":{"$ref":"#/components/schemas/net.IPNet"}},"type":"object"},"models.IngressInfo":{"properties":{"egress_ranges":{"items":{"$ref":"#/components/schemas/net.IPNet"},"type":"array"},"egress_ranges6":{"items":{"$ref":"#/components/schemas/net.IPNet"},"type":"array"},"ingress_id":{"type":"string"},"network":{"$ref":"#/components/schemas/net.IPNet"},"network6":{"$ref":"#/components/schemas/net.IPNet"},"rules":{"items":{"$ref":"#/components/schemas/models.FwRule"},"type":"array"},"static_node_ips":{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"}},"type":"object"},"models.FwRule":{"properties":{"allow":{"type":"boolean"},"allowed_ports":{"items":{"type":"string"},"type":"array"},"allowed_protocols":{"allOf":[{"$ref":"#/components/schemas/models.Protocol"}],"description":"tcp, udp, etc."},"dst_ip":{"$ref":"#/components/schemas/net.IPNet"},"src_ip":{"$ref":"#/components/schemas/net.IPNet"}},"type":"object"},"models.HostInfoMap":{"additionalProperties":{"$ref":"#/components/schemas/models.HostNetworkInfo"},"type":"object"},"models.HostNetworkInfo":{"properties":{"interfaces":{"items":{"$ref":"#/components/schemas/models.Iface"},"type":"array"},"is_static":{"type":"boolean"},"is_static_port":{"type":"boolean"},"listen_port":{"type":"integer"},"version":{"type":"string"}},"type":"object"},"models.PeerMap":{"additionalProperties":{"$ref":"#/components/schemas/models.IDandAddr"},"type":"object"},"models.IDandAddr":{"properties":{"address":{"type":"string"},"address4":{"type":"string"},"address6":{"type":"string"},"host_id":{"type":"string"},"id":{"type":"string"},"is_extclient":{"type":"boolean"},"isserver":{"type":"string"},"listen_port":{"type":"integer"},"name":{"type":"string"},"network":{"type":"string"},"username":{"type":"string"}},"type":"object"},"wgtypes.PeerConfig":{"properties":{"allowedIPs":{"description":"AllowedIPs specifies a list of allowed IP addresses in CIDR notation\nfor this peer.","items":{"$ref":"#/components/schemas/net.IPNet"},"type":"array"},"endpoint":{"allOf":[{"$ref":"#/components/schemas/net.UDPAddr"}],"description":"Endpoint specifies the endpoint of this peer entry, if not nil."},"persistentKeepaliveInterval":{"description":"PersistentKeepaliveInterval specifies the persistent keepalive interval\nfor this peer, if not nil.\n\nA non-nil value of 0 will clear the persistent keepalive interval.","format":"int64","type":"integer"},"presharedKey":{"description":"PresharedKey specifies a peer's preshared key configuration, if not nil.\n\nA non-nil, zero-value Key will clear the preshared key.","items":{"type":"integer"},"type":"array"},"publicKey":{"description":"PublicKey specifies the public key of this peer.  PublicKey is a\nmandatory field for all PeerConfigs.","items":{"type":"integer"},"type":"array"},"remove":{"description":"Remove specifies if the peer with this public key should be removed\nfrom a device's peer list.","type":"boolean"},"replaceAllowedIPs":{"description":"ReplaceAllowedIPs specifies if the allowed IPs specified in this peer\nconfiguration should replace any existing ones, instead of appending them\nto the allowed IPs list.","type":"boolean"},"updateOnly":{"description":"UpdateOnly specifies that an operation will only occur on this peer\nif the peer already exists as part of the interface.","type":"boolean"}},"type":"object"},"net.UDPAddr":{"properties":{"ip":{"items":{"type":"integer"},"type":"array"},"port":{"type":"integer"},"zone":{"description":"IPv6 scoped addressing zone","type":"string"}},"type":"object"},"models.ServerConfig":{"properties":{"Is_EE":{"type":"boolean"},"api":{"type":"string"},"apihost":{"type":"string"},"apiport":{"type":"string"},"broker":{"type":"string"},"brokerType":{"type":"string"},"coreDNSAddr":{"type":"string"},"defaultDomain":{"type":"string"},"dnsmode":{"type":"string"},"endpointDetection":{"type":"boolean"},"grpc":{"type":"string"},"ipdetectionInterval":{"type":"integer"},"manageDNS":{"type":"boolean"},"metricInterval":{"type":"string"},"metricsPort":{"type":"integer"},"mqpassword":{"type":"string"},"mqport":{"type":"string"},"mquserName":{"type":"string"},"peerConnectionCheckInterval":{"type":"string"},"server":{"type":"string"},"stun":{"type":"boolean"},"stunServers":{"type":"string"},"trafficKey":{"items":{"type":"integer"},"type":"array"},"version":{"type":"string"}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.MigrationData":{"properties":{"hostName":{"type":"string"},"legacyNodes":{"items":{"$ref":"#/components/schemas/models.LegacyNode"},"type":"array"},"os":{"type":"string"},"password":{"type":"string"}},"type":"object"},"models.LegacyNode":{"properties":{"accesskey":{"type":"string"},"action":{"type":"string"},"address":{"type":"string"},"address6":{"type":"string"},"allowedips":{"items":{"type":"string"},"type":"array"},"connected":{"type":"string"},"defaultacl":{"description":"== PRO ==","type":"string"},"dnson":{"type":"string"},"egressgatewaynatenabled":{"type":"string"},"egressgatewayranges":{"items":{"type":"string"},"type":"array"},"egressgatewayrequest":{"$ref":"#/components/schemas/models.EgressGatewayRequest"},"endpoint":{"type":"string"},"expdatetime":{"format":"int64","type":"integer"},"failover":{"type":"string"},"failovernode":{"type":"string"},"firewallinuse":{"type":"string"},"id":{"minLength":5,"type":"string"},"ingressgatewayrange":{"type":"string"},"ingressgatewayrange6":{"type":"string"},"interface":{"type":"string"},"interfaces":{"items":{"$ref":"#/components/schemas/models.Iface"},"type":"array"},"internetgateway":{"type":"string"},"ipforwarding":{"type":"string"},"isdocker":{"type":"string"},"isegressgateway":{"type":"string"},"ishub":{"type":"string"},"isingressgateway":{"type":"string"},"isk8s":{"type":"string"},"ispending":{"type":"string"},"isrelay":{"type":"string"},"isrelayed":{"type":"string"},"isserver":{"type":"string"},"isstatic":{"description":"IsStatic - refers to if the Endpoint is set manually or dynamically","type":"string"},"lastcheckin":{"format":"int64","type":"integer"},"lastmodified":{"format":"int64","type":"integer"},"lastpeerupdate":{"format":"int64","type":"integer"},"listenport":{"maximum":65535,"minimum":1024,"type":"integer"},"localaddress":{"type":"string"},"locallistenport":{"maximum":65535,"minimum":0,"type":"integer"},"macaddress":{"type":"string"},"mtu":{"type":"integer"},"name":{"maxLength":62,"type":"string"},"network":{"type":"string"},"networksettings":{"$ref":"#/components/schemas/models.Network"},"os":{"type":"string"},"ownerid":{"type":"string"},"password":{"minLength":6,"type":"string"},"persistentkeepalive":{"maximum":1000,"type":"integer"},"publickey":{"type":"string"},"relayaddrs":{"items":{"type":"string"},"type":"array"},"server":{"type":"string"},"traffickeys":{"$ref":"#/components/schemas/models.TrafficKeys"},"udpholepunch":{"type":"string"},"version":{"type":"string"}},"required":["endpoint","id","password","publickey"],"type":"object"},"models.Network":{"properties":{"addressrange":{"type":"string"},"addressrange6":{"type":"string"},"allowmanualsignup":{"type":"string"},"auto_join":{"type":"string"},"auto_remove":{"type":"string"},"auto_remove_tags":{"items":{"type":"string"},"type":"array"},"auto_remove_threshold_mins":{"type":"integer"},"defaultacl":{"type":"string"},"defaultinterface":{"maxLength":35,"minLength":1,"type":"string"},"defaultkeepalive":{"maximum":1000,"type":"integer"},"defaultlistenport":{"maximum":65535,"minimum":1024,"type":"integer"},"defaultmtu":{"type":"integer"},"defaultpostdown":{"type":"string"},"defaultudpholepunch":{"type":"string"},"dns_nameservers":{"items":{"type":"string"},"type":"array"},"isipv4":{"type":"string"},"isipv6":{"type":"string"},"jit_enabled":{"type":"string"},"netid":{"maxLength":32,"minLength":1,"type":"string"},"networklastmodified":{"format":"int64","type":"integer"},"nodelimit":{"type":"integer"},"nodeslastmodified":{"format":"int64","type":"integer"},"virtual_nat_pool_ipv4":{"description":"VirtualNATPoolIPv4 is the IPv4 CIDR pool from which virtual NAT ranges are allocated for egress gateways","type":"string"},"virtual_nat_site_prefixlen_ipv4":{"description":"VirtualNATSitePrefixLenIPv4 is the prefix length (e.g., 24) for individual site allocations from the IPv4 virtual NAT pool","type":"integer"}},"required":["netid"],"type":"object"},"models.TrafficKeys":{"properties":{"mine":{"items":{"type":"integer"},"type":"array"},"server":{"items":{"type":"integer"},"type":"array"}},"type":"object"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://learn.netmaker.io/api-spec/nodes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
