Good for backward compatibility with any devices, as all API functions can be
called using GET and POST. When POST is used, the parameters can be passed to
functions either as multipart/form-data or as JSON.

API key can be sent in request parameters, session (if enabled and user is
logged in) or in HTTP X-Auth-Key header.

Standard responses in status/body:

200 OK{ “result”: “OK” } API call completed successfully.

Standard error responses in status:

400 Bad Request Invalid request params

403 Forbidden the API key has no access to this function or resource

404 Not Found method or resource/object doesn’t exist

405 Method Not Allowed API function/method not found or HTTP method is
not either GET or POST

Obtains authentication token which can be used in API calls instead of API key.

If both k and u args are absent, but API method is called with HTTP request, which contain HTTP header for basic authorization, the function will try to parse it and log in user with credentials provided.

Sends a server restart event to all connected clients asking them to prepare for server restart.

All the connected clients receive the event with subject=”server” and data=”restart”. If the clients use SFA Framework, they can define restart handler function.

Server restart notification is sent automatically to all connected clients when the server is restarting. This API function allows to send server restart notification without actual server restart, which may be useful e.g. for testing, handling frontend restart etc.