Webserver APIs

Welcome to the Mugnsoft user guide

How to access the API?

You need to get a JWT token first. This token is valid for 15min. To refresh the token, you need to reach the /refresh_token endPoint.

  • Retrieve a token

    
    curl -Ss --cacert /<webserver_folder>/ssl/webserver.crt -X POST  'https://<webserver_fqdn>:<port>/login' -d "username=admin&password=admin"
    {"code":200,"expire":"2019-12-17T11:58:21+01:00","token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFkbWluQGFtaS5mciIsImV4cCI6MTU3ODE2MTI2NiwiZnVsbE5hbWUiOiJhZG1pbiBhbWkiLCJncm91cCI6ImFkbWluIiwiaWQiOiJhZG1pbiIsIm9yaWdfaWF0IjoxNTc4MDc0ODY2fQ.cdamtfgp_fCuHynl04tqnlNfI2BD_1i9s8cDiWlibNPRzFIObPW7R8k8iXDrKG565A-7RB8vjUxUDp28tQHyqA-8TzL4v8zaTKGZin1BVC5rqIozvU-hfiA8fche6I77_dq14GZM-iLd3-kl2SwGzQAU4ZTRG77dONRWZZYvesjs8_2HASECBSvON-fsPx5rXSxliYczct_-NavrAAkTGzwfIcoHbGhwgcCAY_DrV2nUGHDaAGusWeh1BWl5zdVRzOu0Kla3BaOVX5J2-Ty-uzXWIB9hfSlVJw25HoNz2mjeCQ0tWT93AuePStgNxbZDtcbStHq_NOmMVMbzK1jDUA"}
    
    

  • refresh token (the current not expired token of the Mugnsoft component should be used)

    
    curl -Ss --cacert /<webserver_folder>/ssl/webserver.crt -X GET -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFkbWluQE11Z05Tb2Z0LmZyIiwiZXhwIjoxNTk3Nzg0OTE5LCJmdWxsTmFtZSI6Ik11Z05Tb2Z0IGFkbWluIGxpY2Vuc2VkIHRlc3QiLCJncm91cCI6ImFkbWluIiwiaWQiOiJhZG1pbiIsImxpY2Vuc2VBbGxvd2VkIjoiMzAiLCJvcmlnX2lhdCI6MTU5Nzc3MjkxOSwidGFncyI6IiJ9.r17qUS-AqIeiV-TDcQ5U-5E17YLy6PvhjeDARYtVsEX4R3BW21qJ0ocwb5KatLXZcORnoHEtaXYcOLXdG0F30KMI9AEQdluX8AmlD1dvHmjB2O7LMN7WPRFJYDQtezzKqBcPDSDcNGlXzVx9RwuecTU25pYebnjkyi8UL9NwheF1Mlr-xpn8YwzynlVKw71V3cxuCMw-cam4hoVFnCEEb9Nq1owTrjTa4CMzSVpkVwqpqMsQ68u5n_f0UQDvZxPVHjrHCjc7P6h-z2RnqyZDKALXF-7gpVPKYxACzBHH_ETWAe3cqLmYOIec1qVXteZMkZK_cWB-6kSDwPFhXmXZMg" 'https://<webserver_fqdn>:<port>/refresh_token'
    
    

  • refresh all Mugnsoft components token (the current not expired token of the webserver should be used)

    
    curl -Ss --cacert /<webserver_folder>/ssl/webserver.crt -X GET -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFkbWluQE11Z05Tb2Z0LmZyIiwiZXhwIjoxNTk3Nzg4OTQyLCJmdWxsTmFtZSI6Ik11Z05Tb2Z0IGFkbWluIGxpY2Vuc2VkIHRlc3QiLCJncm91cCI6ImFkbWluIiwiaWQiOiJhZG1pbiIsImxpY2Vuc2VBbGxvd2VkIjoiMzAiLCJvcmlnX2lhdCI6MTU5Nzc4ODA0MiwidGFncyI6IiJ9.dTk0mnAArX2k6JsWd3TIp356-wjUqL3Xj4xHEOtZ8qvs8n37vnjkdAsyUX_lGR4HqM3MpE7l5S5G1AS7cVA9ZKjBv0ENCN7PNe6UmwV_K-mxfKoMRquPDWCYaBiYVHsPofe6cqbi1CyqhrYQpa2rVdG4ed4juB8QfQQM_k14VmatdYfPSfdTzIN4Gq-3z_Vz7Cd_MTmpnpFZ930TfomNxXGqAv7Db1fu2__88IYI2aRTQB8GJ-jrfy6Y5iG-LLzz8kfDQisCji_OmW5gQogiuQmvZOJUD679buwrPIGAiVN12aOIxMrsNNUyvOqx3uA5Kdp22frD-d-3x9uO20Bj6A" 'https://<webserver_fqdn>:<port>/refreshTokens'
    
    

API actions

  • scalability: Add new probes components in a matter of minutes.
  • api: RESTful API to communicate with Mug’N Soft components.
  • single binary, no database: Each components comes as a single binary which make it easy to deploy. No external database required. Values are stored in an embedded KV store.
  • tagging: Organize your data easily with tags.
  • advance alerting: Avoid fake alert by setting timeout or/and “number of retries and retry interval”.
  • live view: See in real-time the scenario log as it is being run automatically or on-demand.
  • security: inter-process SSL communication, HTTPS navigation, password encryption.

Already itching to install it? Jump ahead to Installing Mugnsoft