The REST API allows developers to work with Roxy-WI: to start, stop and restart the services; to add, to edit and to delete ACLs, etc. The API uses JSON requests and JSON responses. All request to the API require you to pass an access token in the header. The instructions on generating the token can be found below.
To get the list of all available endpoints perform the following command:
You need an authorization token in order to use the API. To get a token, make the following request:
The validity period of the token depends on the settings of the group.
To stop a HAProxy service make the following request:
You should get the following response
To start or restart the service just change the word "stop" in the URI above to the name of the necessary action (start or restart)
To add an ACL to a section: make the following request:
The possible values of the "if" parameter include:
The possible values of the "then" parameter include:
AThe possible values of the "action" parameter:
To delete an ACL from a section make the following request:
All parameters except "action" must be the same as in the request for adding an ACL.
The possible values of the "action" parameter are: