Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If the site uses HTTPS, the API must be accessed via HTTPS as well.

Request Methods

TypeDetailsExample
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&param_2=4

All field names and values should be encoded in UTF-8. Responses are also returned in UTF-8 encoding.

...

Responses are always in JSON format and include the following fields:

FieldMeaningDescription
statusIndicates the status of the request

Possible values:

  • "OK" (success),
  • "UNAUTHORIZED" (authorization required or token not provided),
  • "AUTHORIZATION_ERROR" (authorization error),
  • "EXCEPTION" (server error),
  • "ERROR" (general error, with details in response.message),
  • "EMPTY" (no results),
  • "UNDEFINED_FUNCTION" (nonexistent function called),
  • "HTTP_ERROR" (HTTP error, with response.code and response.message explaining the error).
responseContains the server's response, dependent on the status and function called.


JSON POST request example

...

Code Block
languagejs
titleПример ответаResponse example
{
	"status": "OK",
	"response": {"foo": "bar"}
}

...

Logs of requests and server responses are available at http://<DOMAIN>/api/logs/. To access logs, authenticate in the admin panel at http://<DOMAIN>/edit/login.php using the API login and password.


...


ФункцииOptions:

Page Tree
root@self
startDepth3

...