Hc_sorm_system_options_clean

Команда сброса системных настроек СОРМ.

Аналог команды в CoCon:

sorm/clean

Метод HTTP-запроса:

POST

Шаблон HTTP-запроса:

http://host:port/commands/sorm_system_options_clean

Код HTTP-ответа:

  • 200 – в случае успеха;
  • 404 – в случае ошибки.

XSD-схема XML-запроса/ответа:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:annotation>
        <xs:documentation xml:lang="en">
            Clean system sorm options.
            Usage: http://server:9999/commands/sorm_system_options_clean.
        </xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>

    <!-- sormSystemOptionsType -->
    <xs:complexType name="sormSystemOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="aggregate_sorm_settings" type="stringType">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            usage:
                                Name:Password:Domain1,Domain2;Name2:Password2:Domain12,Domain22
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="ssh_dir" type="stringType"/>
                <xs:attribute name="ssh_listen_interface" type="stringType"/>
                <xs:attribute name="ssh_port" type="inetPortType"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:all>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="system_options" type="systemCleanInType"/>
                        </xs:all>
                    </xs:complexType>
                </xs:element>
            </xs:all>
        </xs:complexType>
    </xs:element>
    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:choice>
                <xs:element name="result">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="system_options" type="systemCleanOutType"/>
                        </xs:all>
                    </xs:complexType>
                </xs:element>
                <xs:element name="error" type="errorType" />
            </xs:choice>
        </xs:complexType>
    </xs:element>
</xs:schema>
CODE

Пример:

Запрос:

http://192.168.1.21:9999/commands/sorm_system_options_clean

<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sorm_system_options_clean.xsd">
    <request>
        <system_options>
            <system>
                <option name="aggregate_sorm_settings"/>
                <option name="ssh_dir"/>
                <option name="ssh_listen_interface"/>
                <option name="ssh_port"/>
            </system>
        </system_options>
    </request>
</in>
CODE

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sorm_system_options_clean.xsd">
    <result>
        <system_options>
            <system>
                <success option="ssh_port"/>
                <success option="ssh_listen_interface"/>
                <success option="ssh_dir"/>
                <success option="aggregate_sorm_settings"/>
            </system>
        </system_options>
    </result>
</out>
CODE

Hc_sorm_system_options_info

Команда просмотра информации о системных настройках СОРМ.

Аналог команды в CoCon:

sorm/info

Метод HTTP-запроса:

POST

Шаблон HTTP-запроса:

http://host:port/commands/sorm_system_options_info

Код HTTP-ответа:

  • 200 – в случае успеха;
  • 404 – в случае ошибки.

XSD-схема XML-запроса/ответа:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:annotation>
        <xs:documentation xml:lang="en">
            Show system sorm options.
            Usage: http://server:9999/commands/sorm_system_options_info.
        </xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>

    <!-- sormSystemOptionsType -->
    <xs:complexType name="sormSystemOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="aggregate_sorm_settings" type="stringType">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            usage:
                                Name:Password:Domain1,Domain2;Name2:Password2:Domain12,Domain22
                            In case of strong security restrictions password may be shown as ********
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="ssh_dir" type="stringType"/>
                <xs:attribute name="ssh_listen_interface" type="stringType"/>
                <xs:attribute name="ssh_port" type="inetPortType"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:all>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="system_options" type="systemInfoInType"/>
                        </xs:all>
                    </xs:complexType>
                </xs:element>
            </xs:all>
        </xs:complexType>
    </xs:element>
    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:choice>
                <xs:element name="result">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="system_options" type="systemInfoOutType"/>
                        </xs:all>
                    </xs:complexType>
                </xs:element>
                <xs:element name="error" type="errorType"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
</xs:schema>
XML

Пример:

Запрос:

http://192.168.1.21:9999/commands/sorm_system_options_info

<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="sorm_system_options_info.xsd">
         <request>
            <system_options/>
         </request>
</in>
CODE

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sorm_system_options_info.xsd">
    <result>
        <system_options>
            <system>
                <options xs:type="sormSystemOptionsType" aggregate_sorm_settings="user:********:ct.office" ssh_dir="/etc/ecss/ssh" ssh_listen_interface="0.0.0.0" ssh_port="7777"/>
            </system>
        </system_options>
    </result>
</out>
CODE

Hc_sorm_system_options_set

Команда изменения системных настроек СОРМ.

Аналог команды в CoCon:

sorm/set

Метод HTTP-запроса:

POST

Шаблон HTTP-запроса:

http://host:port/commands/sorm_system_options_set

Код HTTP-ответа:

  • 200 – в случае успеха;
  • 404 – в случае ошибки.

XSD-схема XML-запроса/ответа:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:annotation>
        <xs:documentation xml:lang="en">
            Set system sorm options.
            Usage: http://server:9999/commands/sorm_system_options_set.
        </xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>

    <!-- sormSystemOptionsType -->
    <xs:complexType name="sormSystemOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="aggregate_sorm_settings" type="stringType">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            usage:
                                Name:Password:Domain1,Domain2;Name2:Password2:Domain12,Domain22
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="ssh_dir" type="stringType"/>
                <xs:attribute name="ssh_listen_interface" type="stringType"/>
                <xs:attribute name="ssh_port" type="inetPortType"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:all>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="system_options" type="systemSetInType"/>
                        </xs:all>
                    </xs:complexType>
                </xs:element>
            </xs:all>
        </xs:complexType>
    </xs:element>
    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:choice>
                <xs:element name="result">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="system_options" type="systemSetOutType"/>
                        </xs:all>
                    </xs:complexType>
                </xs:element>
                <xs:element name="error" type="errorType" />
            </xs:choice>
        </xs:complexType>
    </xs:element>
</xs:schema>
CODE

Запрос:

http://192.168.1.21:9999/commands/sorm_system_options_set

<?xml version="1.0"?>
<in
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sorm_system_options_set.xsd">
    <request>
        <system_options>
            <system>
                <options xs:type="sormSystemOptionsType" aggregate_sorm_settings="user:password:test.ats;user2:password:biysk.local,domain.second" ssh_dir="/etc/ecss/ssh" ssh_listen_interface="::1" ssh_port="7777"/>
            </system>
        </system_options>
    </request>
</in>
CODE

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sorm_system_options_set.xsd">
    <result>
        <system_options>
            <system>
                <success option="ssh_port"/>
                <success option="ssh_listen_interface"/>
                <success option="ssh_dir"/>
                <success option="aggregate_sorm_settings"/>
            </system>
        </system_options>
    </result>
</out>
CODE