REST API overview
The Accolades platform allows external applications to send commands to the server using HTTP requests. This API uses the REST architecture, with some small exceptions due to the nature of the platform.
Issuing a request
An API command starts with an HTTPS request to the Accolades server, using the standard HTTPS port: 443.
The entire URL for the request looks like:
https://client.voipit.ro/<accountNumber>/<requestPath>/
where:
- accountNumber
- the account number of the account targeted by the request (see the Identity tab of the account info page).
- requestPath
- The path for the request, as it is defined in this document.
Parameters
All the parameters for a request are send using the POST method. Any value send using the GET method will be ignored. The values will be encoded using the URL encoding standard (percent-encoding).
All requests will contain the account API password, using a post parameter named password. The password is defined inside the account info page, using the API tab.
Server response
When the server response is received, you must first check the http status for the response. Based on the processing result, the Accolades server will send a 200 OK status for valid requests of another value if an error has occurred. A list with the error codes is available inside the "Error codes" section.
If the request was successful, then Accolades will always send back a response formatted as a JSON object. A JSON content type header is also send: "content-type: application/json".
Error log
When an error occurs in processing a request, Accolades will append an error description to the account log, available in the Log tab, inside the account info page.
Testing
Before any real request is send, you can send test requests, using PING packages (check this type of request in this document).
IP blocking
Accolades server allows a single IP to send a limited number of invalid requests (failed authentications or invalid paths). If your IP sends more requests, then the allowed threshold then Accolades will reject, for a limited amount of time any new requests with a 403 - Forbidden status.
The IP can be deleted from the temporary blacklist from the main menu, using the Server module, the Monitored IP section. Because Accolades is a cloud-based service, if you need to unlock your IP, before the ban expires automatically then you need to contact VoIPIT.