API Gateway
The API gateway is accessible at http(s)://<DOMAIN>/api/
Authentication
To use the API, you need a login and password, which can be created in the site's admin panel under the Settings - Users tab.
Protocol
The API operates over HTTP/HTTPs. Functions are passed through the URL as http://<DOMAIN>/api/<FUNCTION>/
.
If the site uses HTTPS, the API must be accessed via HTTPS as well.
Request Methods
Type | Details | Example |
---|---|---|
JSON POST (Recommended) | The Content-type: application/json field must be passed in the request header for correct data processing on the server. Parameters should be passed in the body of the request in JSON format | {"param_1":"1","param_2":"4"} |
Standard POST (Deprecated) | It is transmitted as standard according to HTTP 1.1 specifications (in the request body). The Content-type: multipart/form-data or Content-type: application/x-www-form-urlencoded header must be passed. | param_1=2¶m_2=4 |
All field names and values should be encoded in UTF-8. Responses are also returned in UTF-8 encoding.
Important Notes
Content-type:application/json header
.Starting from version 3.8.0, if you send content via JSON POST method in encoding other than UTF-8, it is necessary to specify it explicitly in the header (for example: "Content-type: application/json; charset=windows-1251").