diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-11-23 10:46:52 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-11-23 10:46:52 -0800 |
commit | a18336fa1899a9f53b161a60e766695007c49a7b (patch) | |
tree | f464c0475ea49e3714df86d69508644adcf2e98a /examples/api/README.md | |
parent | 1e4a40e77205b028d799f7112127f3f2f107117e (diff) | |
parent | 764dd1c3d94527c0870a913ac314b3b17eaea282 (diff) | |
download | infinitytier-a18336fa1899a9f53b161a60e766695007c49a7b.tar.gz infinitytier-a18336fa1899a9f53b161a60e766695007c49a7b.zip |
MERGE current "dev" into "netcon" -- should not affect netcon itself but will retest -- brings ZeroTier core up to 1.1.0
Diffstat (limited to 'examples/api/README.md')
-rw-r--r-- | examples/api/README.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/api/README.md b/examples/api/README.md new file mode 100644 index 00000000..50b1b65e --- /dev/null +++ b/examples/api/README.md @@ -0,0 +1,26 @@ +API Examples +====== + +This folder contains examples that can be posted with curl or another http query utility to a local instance. + +To test querying with curl: + + curl -H 'X-ZT1-Auth:AUTHTOKEN' http://127.0.0.1:9993/status + +To create a public network on a local controller (service must be built with "make ZT\_ENABLE\_NETWORK\_CONTROLLER=1"): + + curl -H 'X-ZT1-Auth:AUTHTOKEN' -X POST -d @public.json http://127.0.0.1:9993/controller/network/################ + +Replace AUTHTOKEN with the contents of this instance's authtoken.secret file and ################ with a valid network ID. Its first 10 hex digits must be the ZeroTier address of the controller itself, while the last 6 hex digits can be anything. Also be sure to change the port if you have this instance listening somewhere other than 9993. + +After POSTing you can double check the network config with: + + curl -H 'X-ZT1-Auth:AUTHTOKEN' http://127.0.0.1:9993/controller/network/################ + +Once this network is created (and if your controller is online, etc.) you can then join this network from any device anywhere in the world and it will receive a valid network configuration. + +--- + +**public.json**: A valid configuration for a public network that allows IPv4 and IPv6 traffic. + +**circuit-test-pingpong.json**: An example circuit test that can be posted to /controller/network/################/test to order a test -- you will have to edit this to insert the hops you want since the two hard coded device IDs are from our own test instances. |