api:zerotier:networkget
Table of Contents
API : ZeroTier : Get network
Introduction
This API will return a single network.
Request
| URL | https://api.telecomx.dk/zerotier/network/NETWORK_ID | |
|---|---|---|
| Method | GET | |
| Access level | VIEWER, MAMAGER or OWNER that belongs to the customer RESELLER, RESELLER_ADMIN for the customer or ADMIN |
|
| Params | NETWORK_ID | Id of the network to return. |
Query example
https://api.telecomx.dk/zerotier/network/1578989895986895
Response
| Field | Type | Description |
|---|---|---|
| _id | String | Id of the network. |
| customer | Id | Id of customer. |
| notes | String | Optional notes about the network. |
| rawRules | string | Firewall rules in uncompiled format. |
| creationTime | Date | When the network was created. |
| dns | Object | DNS settings. |
| dns.domain | String | Search domain for DNS. |
| dns.servers | Array | List of IP addresses of DNS servers to use. |
| enableBroadcast | Boolean | True to enable broadcast traffic. |
| ipAssignmentPools | Array | IP address ranges to assign from. |
| ipAssignmentPools[].ipRangeStart | String | First IP address to assign from. |
| ipAssignmentPools[].ipRangeEnd | String | Last IP address to assign from. |
| mtu | Number | MTU size, default 2800. |
| multicastLimit | Number | Multicast limit, default 32. |
| name | String | Name of network. |
| routes | Array | List of routes and their gateway. |
| routes[].target | String | IP/subnet that is reachable via the network. |
| routes[].via | String | Default gateway IP address to reach the network. |
| rules | Array | List of firewall rules. |
| rules[].ip | String | IP or IP/subnet to match against. |
| rules[].etherType | String | Ethernet type to match. |
| rules[].not | Boolean | True if this shall not match. |
| rules[].or | Boolean | True if this is an or to the previous rule. |
| rules[].type | String | Type of match or action to execute. |
| v4AssignMode | Object | IPv4 assignment mode. |
| v4AssignMode.zt | Boolean | True if ZeroTier shall assign an IPv4 address. |
| v6AssignMode | Object | IPv6 assignment mode. |
| v6AssignMode.6plane | Boolean | Assign IP according to 6-plane. |
| v6AssignMode.rfc4193 | Boolean | Assign IP according to RFC4193. |
| v6AssignMode.zt | Boolean | True if ZeroTier shall assign an IPv6 address. |
Example
{ _id: '1354878985858956', customer: '12345678901234567890ABCD', notes: 'Our primary net', rawRules: 'drop not ethertype ipv4 and not ethertype arp and not ethertype ipv6;\naccept;\n', creationTime: '2022-01-01T00:00:00.000Z', dns: { domain: 'ourdomain.com', servers: [ '8.8.8.8', '8.8.4.4' ] }, enableBroadcast: true, ipAssignmentPools: [ { ipRangeStart: '192.168.100.1', ipRangeEnd: '192.168.100.254' } ], mtu: 2800, multicastLimit: 32, name: 'Server network', routes: [ { target: '192.168.100.0/24', via: null }, { target: '192.168.90.0/24', via: '192.168.100.1' } ], rules: [ { etherType: 2048, not: true, or: false, type: 'MATCH_ETHERTYPE' }, { etherType: 2054, not: true, or: false, type: 'MATCH_ETHERTYPE' }, { etherType: 34525, not: true, or: false, type: 'MATCH_ETHERTYPE' }, { type: 'ACTION_DROP' }, { type: 'ACTION_ACCEPT' } ], v4AssignMode: { zt: true }, v6AssignMode: { zt: false, rfc4193: false, 6plane: false } }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | id | Network not found |
| 403 | access_denied | Access denied |
| 500 | internal_error | <Unspecified> |
api/zerotier/networkget.txt · Last modified: 2022/10/29 06:08 by Per Møller