Skip to main content

ZeroTierOne Service (1.1.1)

Download OpenAPI specification:Download

License: Apache 2.0

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

Node Status

Node Status

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "address": "string",
  • "clock": 0,
  • "config": {
    },
  • "online": true,
  • "planetWorldId": 0,
  • "planetWorldTimestamp": 0,
  • "publicIdentity": "string",
  • "tcpFallbackActive": true,
  • "version": "string",
  • "versionBuild": 0,
  • "versionMajor": 0,
  • "versionMinor": 0,
  • "versionRev": 0
}

Joined Networks

List Joined Networks

All the networks that this node is joined to

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Joined Network by ID

Joined Network by ID

Authorizations:
ApiKeyAuth
path Parameters
network_id
required
string (ZTNetworkID) [a-f0-9]{16}

Responses

Response samples

Content type
application/json
{
  • "allowDNS": true,
  • "allowDefault": true,
  • "allowManaged": true,
  • "allowGlobal": true,
  • "assignedAddresses": [
    ],
  • "bridge": true,
  • "broadcastEnabled": true,
  • "dns": {
    },
  • "id": "string",
  • "mac": "string",
  • "mtu": 1280,
  • "multicastSubscriptions": [
    ],
  • "authenticationURL": "http://example.com",
  • "authenticationExpiryTime": 0,
  • "name": "string",
  • "netconfRevision": 0,
  • "portDeviceName": "string",
  • "portError": 0,
  • "routes": [
    ],
  • "status": "REQUESTING_CONFIGURATION",
  • "type": "PUBLIC",
  • "property1": null,
  • "property2": null
}

Join or Update Network Settings

Authorizations:
ApiKeyAuth
path Parameters
network_id
required
string (ZTNetworkID) [a-f0-9]{16}
Request Body schema: application/json
required
allowDNS
boolean
allowDefault
boolean
allowManaged
boolean
allowGlobal
boolean

Responses

Request samples

Content type
application/json
{
  • "allowDNS": true,
  • "allowDefault": true,
  • "allowManaged": true,
  • "allowGlobal": true
}

Response samples

Content type
application/json
{
  • "allowDNS": true,
  • "allowDefault": true,
  • "allowManaged": true,
  • "allowGlobal": true,
  • "assignedAddresses": [
    ],
  • "bridge": true,
  • "broadcastEnabled": true,
  • "dns": {
    },
  • "id": "string",
  • "mac": "string",
  • "mtu": 1280,
  • "multicastSubscriptions": [
    ],
  • "authenticationURL": "http://example.com",
  • "authenticationExpiryTime": 0,
  • "name": "string",
  • "netconfRevision": 0,
  • "portDeviceName": "string",
  • "portError": 0,
  • "routes": [
    ],
  • "status": "REQUESTING_CONFIGURATION",
  • "type": "PUBLIC",
  • "property1": null,
  • "property2": null
}

Leave Network

Authorizations:
ApiKeyAuth
path Parameters
network_id
required
string (ZTNetworkID) [a-f0-9]{16}

Responses

Response samples

Content type
application/json
{
  • "result": true
}

Peers

List Peers

All the nodes your node knows about

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Joined Network by ID

Get Peer by ID

Authorizations:
ApiKeyAuth
path Parameters
network_id
required
string (ZTNetworkID) [a-f0-9]{16}

Responses

Response samples

Content type
application/json
{
  • "address": "string",
  • "isBonded": true,
  • "latency": 0,
  • "paths": [
    ],
  • "role": "LEAF",
  • "version": "string",
  • "versionMajor": 0,
  • "versionMinor": 0,
  • "versionRev": 0,
  • "tunneled": true
}

Controller

Controller Status

Controller healthcheck

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "controller": true,
  • "apiVersion": 0,
  • "clock": 0,
  • "databaseReady": true
}

List Network IDs

List IDs of all networks hosted by this controller

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • "string"
]

Generate Random Network ID

Create a new network with a random ID.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

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

Content type
application/json
{
  • "name": "string",
  • "enableBroadcast": true,
  • "mtu": 1280,
  • "dns": {
    },
  • "private": true,
  • "ipAssignmentPools": [
    ],
  • "v4AssignMode": {
    },
  • "v6AssignMode": {
    },
  • "multicastLimit": 0,
  • "routes": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "enableBroadcast": true,
  • "mtu": 1280,
  • "dns": {
    },
  • "private": true,
  • "ipAssignmentPools": [
    ],
  • "v4AssignMode": {
    },
  • "v6AssignMode": {
    },
  • "multicastLimit": 0,
  • "routes": [
    ],
  • "id": "string",
  • "nwid": "string",
  • "creationTime": 0,
  • "objtype": "network",
  • "revision": 0,
  • "capabilities": [
    ],
  • "rules": [
    ],
  • "tags": [
    ]
}

Get Network by ID

Get details for a network by its ID.

Authorizations:
ApiKeyAuth
path Parameters
network_id
required
string (ZTNetworkID) [a-f0-9]{16}

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "enableBroadcast": true,
  • "mtu": 1280,
  • "dns": {
    },
  • "private": true,
  • "ipAssignmentPools": [
    ],
  • "v4AssignMode": {
    },
  • "v6AssignMode": {
    },
  • "multicastLimit": 0,
  • "routes": [
    ],
  • "id": "string",
  • "nwid": "string",
  • "creationTime": 0,
  • "objtype": "network",
  • "revision": 0,
  • "capabilities": [
    ],
  • "rules": [
    ],
  • "tags": [
    ]
}

Create or Update Network

Authorizations:
ApiKeyAuth
path Parameters
network_id
required
string (ZTNetworkID) [a-f0-9]{16}
Request Body schema: application/json
required
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

Content type
application/json
{
  • "name": "string",
  • "enableBroadcast": true,
  • "mtu": 1280,
  • "dns": {
    },
  • "private": true,
  • "ipAssignmentPools": [
    ],
  • "v4AssignMode": {
    },
  • "v6AssignMode": {
    },
  • "multicastLimit": 0,
  • "routes": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "enableBroadcast": true,
  • "mtu": 1280,
  • "dns": {
    },
  • "private": true,
  • "ipAssignmentPools": [
    ],
  • "v4AssignMode": {
    },
  • "v6AssignMode": {
    },
  • "multicastLimit": 0,
  • "routes": [
    ],
  • "id": "string",
  • "nwid": "string",
  • "creationTime": 0,
  • "objtype": "network",
  • "revision": 0,
  • "capabilities": [
    ],
  • "rules": [
    ],
  • "tags": [
    ]
}

Delete Network

Authorizations:
ApiKeyAuth
path Parameters
network_id
required
string (ZTNetworkID) [a-f0-9]{16}

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "enableBroadcast": true,
  • "mtu": 1280,
  • "dns": {
    },
  • "private": true,
  • "ipAssignmentPools": [
    ],
  • "v4AssignMode": {
    },
  • "v6AssignMode": {
    },
  • "multicastLimit": 0,
  • "routes": [
    ],
  • "id": "string",
  • "nwid": "string",
  • "creationTime": 0,
  • "objtype": "network",
  • "revision": 0,
  • "capabilities": [
    ],
  • "rules": [
    ],
  • "tags": [
    ]
}

List Network Member IDs

Object containing all member IDs as keys and their memberRevisionCounter values as values

Authorizations:
ApiKeyAuth
path Parameters
network_id
required
string (ZTNetworkID) [a-f0-9]{16}

Network ID of the Network

Responses

Response samples

Content type
application/json
{
  • "property1": 0,
  • "property2": 0
}

Get Network Member by ID

Authorizations:
ApiKeyAuth
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

Content type
application/json
{
  • "id": "string",
  • "authorized": true,
  • "activeBridge": true,
  • "ipAssignments": [
    ],
  • "name": "string",
  • "noAutoAssignIps": true,
  • "ssoExempt": true,
  • "address": "string",
  • "authenticationExpiryTime": 0,
  • "capabilities": [
    ],
  • "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:
ApiKeyAuth
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/json
required
authorized
boolean
activeBridge
boolean
Array of IPv4 (string) or IPv6 (string)
name
string
noAutoAssignIps
boolean
ssoExempt
boolean

Responses

Request samples

Content type
application/json
{
  • "authorized": true,
  • "activeBridge": true,
  • "ipAssignments": [
    ],
  • "name": "string",
  • "noAutoAssignIps": true,
  • "ssoExempt": true
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "authorized": true,
  • "activeBridge": true,
  • "ipAssignments": [
    ],
  • "name": "string",
  • "noAutoAssignIps": true,
  • "ssoExempt": true,
  • "address": "string",
  • "authenticationExpiryTime": 0,
  • "capabilities": [
    ],
  • "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:
ApiKeyAuth
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

Content type
application/json
{
  • "id": "string",
  • "authorized": true,
  • "activeBridge": true,
  • "ipAssignments": [
    ],
  • "name": "string",
  • "noAutoAssignIps": true,
  • "ssoExempt": true,
  • "address": "string",
  • "authenticationExpiryTime": 0,
  • "capabilities": [
    ],
  • "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
}

Unstable

List all networks

List all networks

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

List all Network Members

List all Network Members

Authorizations:
ApiKeyAuth
path Parameters
network_id
required
string (ZTNetworkID) [a-f0-9]{16}

Network ID of the Network

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}