Curl examples
Linux
Get access token
curl -X POST https://ftc.fortinet.com:9696/api/v1/login -H "Content-Type: application/json" -d "{\"client_id\": \"c8585630**************81b7485\", \"client_secret\": \"************************************Wl3w==\"}" --insecure
Create user with access token
curl -X POST https://ftc.fortinet.com:9696/api/v1/user -H "Content-Type: application/json" -H "Authorization: Bearer eyJ0eXAi**********************************************************01Q6to" -d "{\"username\": \"ftc_webapp_user_1\", \"email\": \"***@gmail.com\"}" –insecure
Windows Command Prompt
Get access token
curl -X POST https://ftc.fortinet.com:9696/api/v1/login -H "Content-Type: application/json" -d "{\"client_id\": \"c8585630-*************81b7485\", \"client_secret\": \"************************************Wl3w==\"}" --insecure
Create user with access token
curl -X POST https://ftc.fortinet.com:9696/api/v1/user -H "Content-Type: application/json" -H "Authorization: Bearer eyJ0e************************************1YF1kQ" -d "{\"username\": \"ftc_webapp_user_2\", \"email\": \"***@gmail.com\"}" --insecure