ZeroTierOne Service (1.1.1)
Download OpenAPI specification:Download
This API controls the ZeroTier service that runs in the background on your computer. This is how zerotier-cli, and the macOS and Windows apps control the service.
API requests must be authenticated via an authentication token. ZeroTier One saves this token in the authtoken.secret file in its working directory. This token may be supplied via the X-ZT1-Auth HTTP request header.
For example: curl -H "X-ZT1-Auth: $TOKEN" http://localhost:9993/status
The token can be found in:
- Mac :: ~/Library/Application Support/ZeroTier/authtoken.secret
- Windows :: \ProgramData\ZeroTier\One
- Linux :: /var/lib/zerotier-one
Learn more about the spec at github
Response samples
- 200
- 401
{- "address": "string",
- "clock": 0,
- "config": {
- "settings": {
- "allowManagementFrom": [
- "string"
], - "allowTcpFallbackRelay": true,
- "forceTcpRelay": true,
- "listeningOn": [
- "string"
], - "portMappingEnabled": true,
- "primaryPort": 0,
- "secondaryPort": 0,
- "softwareUpdate": "string",
- "softwareUpdateChannel": "string",
- "surfaceAddresses": [
- "string"
], - "tertiaryPort": 0
}
}, - "online": true,
- "planetWorldId": 0,
- "planetWorldTimestamp": 0,
- "publicIdentity": "string",
- "tcpFallbackActive": true,
- "version": "string",
- "versionBuild": 0,
- "versionMajor": 0,
- "versionMinor": 0,
- "versionRev": 0
}
List Joined Networks
All the networks that this node is joined to
Authorizations:
Responses
Response samples
- 200
- 401
[- {
- "allowDNS": true,
- "allowDefault": true,
- "allowManaged": true,
- "allowGlobal": true,
- "assignedAddresses": [
- "string"
], - "bridge": true,
- "broadcastEnabled": true,
- "dns": {
- "domain": "example.com",
- "servers": [
- "192.168.0.1"
]
}, - "id": "string",
- "mac": "string",
- "mtu": 1280,
- "multicastSubscriptions": [
- {
- "adi": 0,
- "mac": "string"
}
], - "authenticationExpiryTime": 0,
- "name": "string",
- "netconfRevision": 0,
- "portDeviceName": "string",
- "portError": 0,
- "routes": [
- {
- "flags": 0,
- "metric": 0,
- "target": "string",
- "via": "192.168.0.1"
}
], - "status": "REQUESTING_CONFIGURATION",
- "type": "PUBLIC",
- "property1": null,
- "property2": null
}
]
Get Joined Network by ID
Joined Network by ID
Authorizations:
path Parameters
network_id required | string (ZTNetworkID) [a-f0-9]{16} |
Responses
Response samples
- 200
- 401
- 404
{- "allowDNS": true,
- "allowDefault": true,
- "allowManaged": true,
- "allowGlobal": true,
- "assignedAddresses": [
- "string"
], - "bridge": true,
- "broadcastEnabled": true,
- "dns": {
- "domain": "example.com",
- "servers": [
- "192.168.0.1"
]
}, - "id": "string",
- "mac": "string",
- "mtu": 1280,
- "multicastSubscriptions": [
- {
- "adi": 0,
- "mac": "string"
}
], - "authenticationExpiryTime": 0,
- "name": "string",
- "netconfRevision": 0,
- "portDeviceName": "string",
- "portError": 0,
- "routes": [
- {
- "flags": 0,
- "metric": 0,
- "target": "string",
- "via": "192.168.0.1"
}
], - "status": "REQUESTING_CONFIGURATION",
- "type": "PUBLIC",
- "property1": null,
- "property2": null
}
Join or Update Network Settings
Authorizations:
path Parameters
network_id required | string (ZTNetworkID) [a-f0-9]{16} |
Request Body schema: application/jsonrequired
allowDNS | boolean |
allowDefault | boolean |
allowManaged | boolean |
allowGlobal | boolean |
Responses
Request samples
- Payload
{- "allowDNS": true,
- "allowDefault": true,
- "allowManaged": true,
- "allowGlobal": true
}
Response samples
- 200
- 401
- 404
{- "allowDNS": true,
- "allowDefault": true,
- "allowManaged": true,
- "allowGlobal": true,
- "assignedAddresses": [
- "string"
], - "bridge": true,
- "broadcastEnabled": true,
- "dns": {
- "domain": "example.com",
- "servers": [
- "192.168.0.1"
]
}, - "id": "string",
- "mac": "string",
- "mtu": 1280,
- "multicastSubscriptions": [
- {
- "adi": 0,
- "mac": "string"
}
], - "authenticationExpiryTime": 0,
- "name": "string",
- "netconfRevision": 0,
- "portDeviceName": "string",
- "portError": 0,
- "routes": [
- {
- "flags": 0,
- "metric": 0,
- "target": "string",
- "via": "192.168.0.1"
}
], - "status": "REQUESTING_CONFIGURATION",
- "type": "PUBLIC",
- "property1": null,
- "property2": null
}
Response samples
- 200
- 401
[- {
- "address": "string",
- "isBonded": true,
- "latency": 0,
- "paths": [
- {
- "active": true,
- "address": "string",
- "expired": true,
- "lastReceive": 0,
- "lastSend": 0,
- "localSocket": 0,
- "preferred": true,
- "trustedPathId": 0
}
], - "role": "LEAF",
- "version": "string",
- "versionMajor": 0,
- "versionMinor": 0,
- "versionRev": 0,
- "tunneled": true
}
]
Get Joined Network by ID
Get Peer by ID
Authorizations:
path Parameters
network_id required | string (ZTNetworkID) [a-f0-9]{16} |
Responses
Response samples
- 200
- 401
- 404
{- "address": "string",
- "isBonded": true,
- "latency": 0,
- "paths": [
- {
- "active": true,
- "address": "string",
- "expired": true,
- "lastReceive": 0,
- "lastSend": 0,
- "localSocket": 0,
- "preferred": true,
- "trustedPathId": 0
}
], - "role": "LEAF",
- "version": "string",
- "versionMajor": 0,
- "versionMinor": 0,
- "versionRev": 0,
- "tunneled": true
}
Generate Random Network ID
Create a new network with a random ID.
Authorizations:
Request Body schema: application/jsonrequired
Node ID of the controller
name | string |
enableBroadcast | boolean |
mtu | integer <uint32> (MTU) >= 1280 |
NetworkDNS (object) or Array of EmptyArrayItem (any) | |
private | boolean |
Array of objects | |
object | |
object | |
multicastLimit | integer <int64> (uSafeint) >= 0 |
Array of objects |
Responses
Request samples
- Payload
{- "name": "string",
- "enableBroadcast": true,
- "mtu": 1280,
- "dns": {
- "domain": "example.com",
- "servers": [
- "192.168.0.1"
]
}, - "private": true,
- "ipAssignmentPools": [
- {
- "ipRangeStart": "192.168.0.1",
- "ipRangeEnd": "192.168.0.1"
}
], - "v4AssignMode": {
- "zt": true
}, - "v6AssignMode": {
- "6plane": true,
- "rfc4193": true,
- "zt": true
}, - "multicastLimit": 0,
- "routes": [
- {
- "target": "192.168.0.1",
- "via": "192.168.0.1"
}
]
}
Response samples
- 200
- 401
- 404
{- "name": "string",
- "enableBroadcast": true,
- "mtu": 1280,
- "dns": {
- "domain": "example.com",
- "servers": [
- "192.168.0.1"
]
}, - "private": true,
- "ipAssignmentPools": [
- {
- "ipRangeStart": "192.168.0.1",
- "ipRangeEnd": "192.168.0.1"
}
], - "v4AssignMode": {
- "zt": true
}, - "v6AssignMode": {
- "6plane": true,
- "rfc4193": true,
- "zt": true
}, - "multicastLimit": 0,
- "routes": [
- {
- "target": "192.168.0.1",
- "via": "192.168.0.1"
}
], - "id": "string",
- "nwid": "string",
- "creationTime": 0,
- "objtype": "network",
- "revision": 0,
- "capabilities": [
- [
- 0,
- 0
]
], - "rules": [
- {
- "not": true,
- "or": true,
- "type": "string",
- "property1": null,
- "property2": null
}
], - "tags": [
- [
- 0,
- 0
]
]
}
Get Network by ID
Get details for a network by its ID.
Authorizations:
path Parameters
network_id required | string (ZTNetworkID) [a-f0-9]{16} |
Responses
Response samples
- 200
- 401
- 404
{- "name": "string",
- "enableBroadcast": true,
- "mtu": 1280,
- "dns": {
- "domain": "example.com",
- "servers": [
- "192.168.0.1"
]
}, - "private": true,
- "ipAssignmentPools": [
- {
- "ipRangeStart": "192.168.0.1",
- "ipRangeEnd": "192.168.0.1"
}
], - "v4AssignMode": {
- "zt": true
}, - "v6AssignMode": {
- "6plane": true,
- "rfc4193": true,
- "zt": true
}, - "multicastLimit": 0,
- "routes": [
- {
- "target": "192.168.0.1",
- "via": "192.168.0.1"
}
], - "id": "string",
- "nwid": "string",
- "creationTime": 0,
- "objtype": "network",
- "revision": 0,
- "capabilities": [
- [
- 0,
- 0
]
], - "rules": [
- {
- "not": true,
- "or": true,
- "type": "string",
- "property1": null,
- "property2": null
}
], - "tags": [
- [
- 0,
- 0
]
]
}
Create or Update Network
Authorizations:
path Parameters
network_id required | string (ZTNetworkID) [a-f0-9]{16} |
Request Body schema: application/jsonrequired
name | string |
enableBroadcast | boolean |
mtu | integer <uint32> (MTU) >= 1280 |
NetworkDNS (object) or Array of EmptyArrayItem (any) | |
private | boolean |
Array of objects | |
object | |
object | |
multicastLimit | integer <int64> (uSafeint) >= 0 |
Array of objects |
Responses
Request samples
- Payload
{- "name": "string",
- "enableBroadcast": true,
- "mtu": 1280,
- "dns": {
- "domain": "example.com",
- "servers": [
- "192.168.0.1"
]
}, - "private": true,
- "ipAssignmentPools": [
- {
- "ipRangeStart": "192.168.0.1",
- "ipRangeEnd": "192.168.0.1"
}
], - "v4AssignMode": {
- "zt": true
}, - "v6AssignMode": {
- "6plane": true,
- "rfc4193": true,
- "zt": true
}, - "multicastLimit": 0,
- "routes": [
- {
- "target": "192.168.0.1",
- "via": "192.168.0.1"
}
]
}
Response samples
- 200
- 401
- 404
{- "name": "string",
- "enableBroadcast": true,
- "mtu": 1280,
- "dns": {
- "domain": "example.com",
- "servers": [
- "192.168.0.1"
]
}, - "private": true,
- "ipAssignmentPools": [
- {
- "ipRangeStart": "192.168.0.1",
- "ipRangeEnd": "192.168.0.1"
}
], - "v4AssignMode": {
- "zt": true
}, - "v6AssignMode": {
- "6plane": true,
- "rfc4193": true,
- "zt": true
}, - "multicastLimit": 0,
- "routes": [
- {
- "target": "192.168.0.1",
- "via": "192.168.0.1"
}
], - "id": "string",
- "nwid": "string",
- "creationTime": 0,
- "objtype": "network",
- "revision": 0,
- "capabilities": [
- [
- 0,
- 0
]
], - "rules": [
- {
- "not": true,
- "or": true,
- "type": "string",
- "property1": null,
- "property2": null
}
], - "tags": [
- [
- 0,
- 0
]
]
}
Delete Network
Authorizations:
path Parameters
network_id required | string (ZTNetworkID) [a-f0-9]{16} |
Responses
Response samples
- 200
- 401
- 404
{- "name": "string",
- "enableBroadcast": true,
- "mtu": 1280,
- "dns": {
- "domain": "example.com",
- "servers": [
- "192.168.0.1"
]
}, - "private": true,
- "ipAssignmentPools": [
- {
- "ipRangeStart": "192.168.0.1",
- "ipRangeEnd": "192.168.0.1"
}
], - "v4AssignMode": {
- "zt": true
}, - "v6AssignMode": {
- "6plane": true,
- "rfc4193": true,
- "zt": true
}, - "multicastLimit": 0,
- "routes": [
- {
- "target": "192.168.0.1",
- "via": "192.168.0.1"
}
], - "id": "string",
- "nwid": "string",
- "creationTime": 0,
- "objtype": "network",
- "revision": 0,
- "capabilities": [
- [
- 0,
- 0
]
], - "rules": [
- {
- "not": true,
- "or": true,
- "type": "string",
- "property1": null,
- "property2": null
}
], - "tags": [
- [
- 0,
- 0
]
]
}
List Network Member IDs
Object containing all member IDs as keys and their memberRevisionCounter values as values
Authorizations:
path Parameters
network_id required | string (ZTNetworkID) [a-f0-9]{16} Network ID of the Network |
Responses
Response samples
- 200
- 401
- 404
{- "property1": 0,
- "property2": 0
}
Get Network Member by ID
Authorizations:
path Parameters
node_id required | string (ZTAddress) [a-f0-9]{10} Node ID of the Network Member |
network_id required | string (ZTNetworkID) [a-f0-9]{16} Network ID of the Network |
Responses
Response samples
- 200
- 401
- 404
{- "id": "string",
- "authorized": true,
- "activeBridge": true,
- "ipAssignments": [
- "192.168.0.1"
], - "name": "string",
- "noAutoAssignIps": true,
- "ssoExempt": true,
- "address": "string",
- "authenticationExpiryTime": 0,
- "capabilities": [
- 0
], - "creationTime": 0,
- "identity": "string",
- "lastAuthorizedCredential": "string",
- "lastAuthorizedCredentialType": "string",
- "lastAuthorizedTime": 0,
- "lastDeauthorizedTime": 0,
- "nwid": "string",
- "objtype": "member",
- "remoteTraceLevel": 0,
- "remoteTraceTarget": "string",
- "revision": 0,
- "tags": null,
- "vMajor": 0,
- "vMinor": 0,
- "vProto": 0,
- "vRev": 0
}
Create or Update Network Member
Authorizations:
path Parameters
node_id required | string (ZTAddress) [a-f0-9]{10} Node ID of the Network Member |
network_id required | string (ZTNetworkID) [a-f0-9]{16} Network ID of the Network |
Request Body schema: application/jsonrequired
authorized | boolean |
activeBridge | boolean |
Array of IPv4 (string) or IPv6 (string) | |
name | string |
noAutoAssignIps | boolean |
ssoExempt | boolean |
Responses
Request samples
- Payload
{- "authorized": true,
- "activeBridge": true,
- "ipAssignments": [
- "192.168.0.1"
], - "name": "string",
- "noAutoAssignIps": true,
- "ssoExempt": true
}
Response samples
- 200
- 401
- 404
{- "id": "string",
- "authorized": true,
- "activeBridge": true,
- "ipAssignments": [
- "192.168.0.1"
], - "name": "string",
- "noAutoAssignIps": true,
- "ssoExempt": true,
- "address": "string",
- "authenticationExpiryTime": 0,
- "capabilities": [
- 0
], - "creationTime": 0,
- "identity": "string",
- "lastAuthorizedCredential": "string",
- "lastAuthorizedCredentialType": "string",
- "lastAuthorizedTime": 0,
- "lastDeauthorizedTime": 0,
- "nwid": "string",
- "objtype": "member",
- "remoteTraceLevel": 0,
- "remoteTraceTarget": "string",
- "revision": 0,
- "tags": null,
- "vMajor": 0,
- "vMinor": 0,
- "vProto": 0,
- "vRev": 0
}
Delete Network Member
Authorizations:
path Parameters
node_id required | string (ZTAddress) [a-f0-9]{10} Node ID of the Network Member |
network_id required | string (ZTNetworkID) [a-f0-9]{16} Network ID of the Network |
Responses
Response samples
- 200
- 401
- 404
{- "id": "string",
- "authorized": true,
- "activeBridge": true,
- "ipAssignments": [
- "192.168.0.1"
], - "name": "string",
- "noAutoAssignIps": true,
- "ssoExempt": true,
- "address": "string",
- "authenticationExpiryTime": 0,
- "capabilities": [
- 0
], - "creationTime": 0,
- "identity": "string",
- "lastAuthorizedCredential": "string",
- "lastAuthorizedCredentialType": "string",
- "lastAuthorizedTime": 0,
- "lastDeauthorizedTime": 0,
- "nwid": "string",
- "objtype": "member",
- "remoteTraceLevel": 0,
- "remoteTraceTarget": "string",
- "revision": 0,
- "tags": null,
- "vMajor": 0,
- "vMinor": 0,
- "vProto": 0,
- "vRev": 0
}
Response samples
- 200
- 401
{- "data": [
- {
- "name": "string",
- "enableBroadcast": true,
- "mtu": 1280,
- "dns": {
- "domain": "example.com",
- "servers": [
- "192.168.0.1"
]
}, - "private": true,
- "ipAssignmentPools": [
- {
- "ipRangeStart": "192.168.0.1",
- "ipRangeEnd": "192.168.0.1"
}
], - "v4AssignMode": {
- "zt": true
}, - "v6AssignMode": {
- "6plane": true,
- "rfc4193": true,
- "zt": true
}, - "multicastLimit": 0,
- "routes": [
- {
- "target": "192.168.0.1",
- "via": "192.168.0.1"
}
], - "id": "string",
- "nwid": "string",
- "creationTime": 0,
- "objtype": "network",
- "revision": 0,
- "capabilities": [
- [
- 0,
- 0
]
], - "rules": [
- {
- "not": true,
- "or": true,
- "type": "string",
- "property1": null,
- "property2": null
}
], - "tags": [
- [
- 0,
- 0
]
]
}
], - "meta": {
- "networkCount": 0
}
}
List all Network Members
List all Network Members
Authorizations:
path Parameters
network_id required | string (ZTNetworkID) [a-f0-9]{16} Network ID of the Network |
Responses
Response samples
- 200
- 401
- 404
{- "data": [
- {
- "id": "string",
- "authorized": true,
- "activeBridge": true,
- "ipAssignments": [
- "192.168.0.1"
], - "name": "string",
- "noAutoAssignIps": true,
- "ssoExempt": true,
- "address": "string",
- "authenticationExpiryTime": 0,
- "capabilities": [
- 0
], - "creationTime": 0,
- "identity": "string",
- "lastAuthorizedCredential": "string",
- "lastAuthorizedCredentialType": "string",
- "lastAuthorizedTime": 0,
- "lastDeauthorizedTime": 0,
- "nwid": "string",
- "objtype": "member",
- "remoteTraceLevel": 0,
- "remoteTraceTarget": "string",
- "revision": 0,
- "tags": null,
- "vMajor": 0,
- "vMinor": 0,
- "vProto": 0,
- "vRev": 0
}
], - "meta": {
- "totalCount": 0,
- "authorizedCount": 0
}
}