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:
You can get the OpenAPI spec here as well: https://docs.zerotier.com/openapi/servicev1.json
This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.
org.openapitools.codegen.languages.RustClientCodegen
Put the package under your project folder in a directory named zerotier-one-api
and add the following to Cargo.toml
under [dependencies]
:
zerotier-one-api = { path = "./zerotier-one-api" }
All URIs are relative to http://localhost:9993
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- ControllerApi | generatecontrollernetwork | POST /controller/network/{controllerID}_ | Generate Random Network ID. *ControllerApi* | getcontrollernetwork | GET /controller/network/{networkID} | Get Network by ID. *ControllerApi* | getcontrollernetworkmember | GET /controller/network/{networkID}/member{nodeID} | Get Network Member Details by ID. ControllerApi | getcontrollernetworkmembers | GET /controller/network/{networkID}/member | List Network Members. *ControllerApi* | getcontrollernetworks | GET /controller/network | List Networks. *ControllerApi* | getcontrollerstatus | GET /controller | Get Controller Status. *ControllerApi* | setcontrollernetwork | POST /controller/network/{networkID} | Create or Update a Network. *NetworkApi* | deletenetwork | DELETE /network/{networkID} | Leave a network. NetworkApi | getnetwork | GET /network/{networkID} | Get a joined Network membership configuration by Network ID. *NetworkApi* | getnetworks | GET /network | Get all network memberships. NetworkApi | updatenetwork | POST /network/{networkID} | Join a network or update it's configuration by Network ID. *PeerApi* | getpeer | GET /peer/{address} | Get information about a specific peer by Node ID. PeerApi | getpeers | GET /peer | Get all peers. *StatusApi* | getstatus | GET /status | Node status and addressing info.
To get access to the crate's generated documentation, use:
cargo doc --open