Generate Config Files using API and NMCTL
Generating Clients via API
1
3
Create a static client via API
curl -X POST -L "https://api.netmaker.example.com/api/extclients/<network name>/<host network id>" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <AuthToken>" \
--data '{"clientid":"SiteC"}'curl -X GET -L "https://api.netmaker.example.com/api/extclients/<network name>" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <AuthToken>"curl -X GET -L "https://api.netmaker.example.com/api/extclients/<network name>/<static client id>/file" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <AuthToken>"Create Clients via NMCTL
Setup NMCTL
1
2
3
nmctl context set <context name> --endpoint=https://api.netmaker.example.com --username=<username> --password=<password>nmctl context use <context name>Create Client
1

2
nmctl ext_client create <network name> <host network id> --id <static client id>3
Get Client
nmctl ext_client config <network name> <static client id>Other Options with NMCTL
Last updated
Was this helpful?