Majority EVA ICS API components and items support REST. Parameters
for POST, PUT, PATCH and DELETE requests can be sent in both JSON and
multipart/form-data. For JSON, Content-Type: application/json header must be
specified.

API key can be sent in HTTP X-Auth-Key header (preferred) or in request
parameters (as k).

GET request is used to get information about resource or list of
resources of the specified type.

POST request is used to perform special API calls and create resources in
case when resource id is generated by server. In the last case, response
always contains additional field Location which points to the resource
created.

PUT request is used to create new resources. If resource already exists,
the server could refuse recreating it, responding with 409 Conflict HTTP
error.

PATCH request is used to modify resource parameters.

DELETE request is used to delete resource.

For resource creation and modification, multiple parameters can be specified in
a single request. For majority requests of such purpose, a special parameter
“save” is used to tell server (if “save”: true) to save the resource
configuration immediately after its modification.

For the group-related calls, put trailing slash at the end of the request URL:

201 Created API call completed successfully, Response header
Location contains either uri to the newly created object or resource is
accessible by the effective request uri. For resources created with PUT,
body contains either serialized resource object or resource type and id

All modified items, their status, and configuration will be written to the disk. If exec_before_save command is defined in the controller’s configuration file, it’s called before saving and exec_after_save after (e.g. to switch the partition to write mode and back to read-only).

Enables and disables debugging mode while the controller is running. After the controller is restarted, this parameter is lost and controller switches back to the mode specified in the configuration file.

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.