Read and write server settings

TRASSIR object settings are given as a tree with nested folders. Upon receiving the /settings/ command, the server will respond with a tree of subfolders that describes all of the server settings. Note the "/" at the end.

Example of a request:

        https://192.168.1.200:8080/settings/?sid=e03qD0eg  

Example of a server response:

{
    "name" : "CyPy6vF5",
    "type" : "LocalServer",
    "subdirs" : [
        "ad",
        "archive",
        "audit",
        "auto_trassir",
        "boards",
        "channels",
        "cloud",
        "eskuel",
        "fortnet-k0DMhmOb",
        "gate-EHukOXSy",
        "health",
        "ip_cameras",
        "map",
        "netrec",
        "network",
        "orion",
        "pos_folder2",
        "reports",
        "screenshots",
        "scripts",
        "serialports",
        "sphinx-LrzsfxDr",
        "system_wide_options",
        "templates",
        "users",
        "webserver"
    ],
    "values" : [
        "name",
        "folder",
        "icon",
        "media_route"
    ]
} 

Warning

Be careful - some folder names use a unique identifier. These are generally the folders connected to the TRASSIR ACS.

In order to change any particular server setting, you must know the exact path to the desired setting. It is easy to find out by consecutively executing commands and switching to the required subfolder. For example, find out the bit rate specified in the settings for a camera's mainstream, send a request like this:

  https://192.168.1.200:8080/settings/ip_cameras/shMa536E/channel00_video_bitrate?sid=e03qD0eg  

In the request:

  • ip_cameras - the folder containing the settings for all of the system's IP devices;
  • shMa536E - the device's guid;
  • channel00_video_bitrate - the parameter of the ultimately-required setting.

Example of a server response:

{
        "directory" : "ip_cameras/shMa536E/",
        "name" : "channel00_video_bitrate",
        "type" : "integer",
        "value" : "2048"
}  

To change a stream's bit rate, assign a new value to the parameter using the "=" sign:

        https://192.168.1.200:8080/settings/ip_cameras/shMa536E/channel00_video_bitrate=8192?sid=e03qD0eg  

Example of a server response:

{
        "success" : "1"
}  

The new value has been applied. This can be verified by sending the command again:

        https://192.168.1.200:8080/settings/ip_cameras/shMa536E/channel00_video_bitrate?sid=e03qD0eg