Hc_address_book_options_clean

Команда сброса настроек подключения к БД "Адресная книга".

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

system/address-book/properties/clean

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

POST

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

http://host:port/commands/address_book_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:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>

    <!-- 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/address_book_options_clean

<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="address_book_options_clean.xsd">
  <request>
    <system_options>
            <system>
                <option name="username"/>
                <option name="port"/>
                <option name="password"/>
                <option name="host"/>
                <option name="database"/>
                <option name="auto_delete_account"/>
                <option name="auto_create_account"/>
            </system>
        </system_options>
  </request>
</in>
CODE

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
	xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="address_book_options_clean.xsd">
	<result>
		<system_options>
			<system>
				<success option="auto_create_account"/>
				<success option="auto_delete_account"/>
				<success option="database"/>
				<success option="host"/>
				<success option="password"/>
				<success option="port"/>
				<success option="username"/>
			</system>
		</system_options>
	</result>
</out>
CODE

Hc_address_book_options_info

Команда просмотра настроек подключения к БД "Адресная книга".

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

system/address-book/properties/info

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

POST

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

http://host:port/commands/address_book_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:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>

    <!-- addressBookOptionsType -->
    <xs:complexType name="addressBookOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="auto_delete_account" type="booleanType"/>
                <xs:attribute name="auto_create_account" type="booleanType"/>
                <xs:attribute name="database" type="stringType"/>
                <xs:attribute name="host" type="stringType"/>
                <xs:attribute name="password" type="stringType">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            In case of strong security restrictions password may be shown as ********
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            <xs:attribute name="port" type="inetPortType"/>
            <xs:attribute name="username" type="stringType"/>
            </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/address_book_options_info

<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="address_book_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="address_book_options_info.xsd">
    <result>
        <system_options>
            <system>
                <options xs:type="addressBookOptionsType" auto_create_account="true" auto_delete_account="true" database="ecss_address_book" host="address-book.mysql.ecss" password="********" port="3306" username="address_book"/>
            </system>
        </system_options>
    </result>
</out>
CODE

Hc_address_book_options_set

Команда изменения настроек настроек подключения к БД "Адресная книга".

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

system/address-book/properties/set

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

POST

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

http://host:port/commands/address_book_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:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>

    <!-- addressBookOptionsType -->
    <xs:complexType name="addressBookOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="auto_delete_account" type="booleanType"/>
                <xs:attribute name="auto_create_account" type="booleanType"/>
                <xs:attribute name="database" type="stringType"/>
                <xs:attribute name="host" type="stringType"/>
                <xs:attribute name="password" type="stringType"/>
                <xs:attribute name="port" type="inetPortType"/>
                <xs:attribute name="username" type="stringType"/>
            </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/address_book_options_set

<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="address_book_options_set.xsd">
  <request>
    <system_options>
      <system>
        <options auto_create_account="true" auto_delete_account="true" database="ecss_address_book" host="address-book.mysql.ecss" password="address_book" port="3306" username="address_book" xs:type="addressBookOptionsType"/>
      </system>
    </system_options>
  </request>
</in>
CODE

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
	xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="address_book_options_set.xsd">
	<result>
		<system_options>
			<system>
				<success option="username"/>
				<success option="port"/>
				<success option="password"/>
				<success option="host"/>
				<success option="database"/>
				<success option="auto_delete_account"/>
				<success option="auto_create_account"/>
			</system>
		</system_options>
	</result>
</out>
CODE