VergMesh
VergMesh API
See API basics for keys and conventions. Replace prod with your network's name as it appears in its address.
Read a network
curl -s https://api.cloudverg.com/v1/mesh/networks/prod -H "Authorization: Bearer $VERG_API_KEY"Returns the network, its nodes with their state, its routes, every link with its health, and any warnings.
Add a node and get its install command
curl -s -X POST https://api.cloudverg.com/v1/mesh/networks/prod/nodes \
-H "Authorization: Bearer $VERG_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"aws-east-gw","kind":"cloud","provider":"aws","accepts_connections":true,"routes":["10.20.0.0/16"]}'The answer carries enrollment_token and install_command. The token works once, for three days. Routes given here start approved, because the caller chose them.
Remove a node
curl -s -X DELETE https://api.cloudverg.com/v1/mesh/networks/prod/nodes/aws-east-gw -H "Authorization: Bearer $VERG_API_KEY"Approve or reject a route
curl -s -X POST https://api.cloudverg.com/v1/mesh/networks/prod/routes/rt_1a2b3c/approve -H "Authorization: Bearer $VERG_API_KEY"| Method and path | Key | Does |
|---|---|---|
GET /v1/workspace | read | Plan, limits and current usage |
GET /v1/mesh/networks | read | Every network with node counts |
GET /v1/mesh/networks/{name} | read | One network in full |
POST /v1/mesh/networks/{name}/nodes | write | Add a node, returns its token |
DELETE /v1/mesh/networks/{name}/nodes/{node} | write | Remove a node |
POST /v1/mesh/networks/{name}/routes/{id}/approve or /reject | write | Decide a route |