Hc_dialer_db_cluster_options_clean

Команда сброса параметров подключения к БД подсистемы автообзвонщика.

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

cluster/core/<CORE>/dialer/db/clean

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

POST

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

http://host:port/commands/dialer_db_cluster_options_clean

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

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

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

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:annotation>
    <xs:documentation xml:lang="en">
      Clean dialer cluster options.
      Usage: http://server:9999/commands/dialer_db_cluster_options_clean
    </xs:documentation>
  </xs:annotation>

  <xs:include schemaLocation="error.xsd" />
  <xs:include schemaLocation="ecm_common.xsd" />
   <!-- in -->
  <xs:element name="in">
    <xs:complexType>
      <xs:all minOccurs="1" maxOccurs="1">
        <xs:element name="request" minOccurs="1" maxOccurs="1">
          <xs:complexType>
            <xs:all minOccurs="1" maxOccurs="1">
              <xs:element name="cluster_options" type="clusterCleanInType"/>
            </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" minOccurs="1" maxOccurs="1">
          <xs:complexType>
            <xs:all minOccurs="1" maxOccurs="1">
              <xs:element name="cluster_options" type="clusterCleanOutType"/>
            </xs:all>
          </xs:complexType>
        </xs:element>
        <xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" />
      </xs:choice>
    </xs:complexType>
  </xs:element>

</xs:schema>
CODE

Пример:

Запрос:
http://192.168.1.21:9999/commands/dialer_db_cluster_options_clean

<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="dialer_db_cluster_options_clean.xsd">
    <request>
        <cluster_options>
            <cluster name="core1">
                <option name="mysql_host"/>
                <option name="mysql_port"/>
            </cluster>
        </cluster_options>
    </request>
</in>
CODE

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
	xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="dialer_db_cluster_options_clean.xsd">
	<result>
		<cluster_options>
			<cluster name="core1">
				<success option="mysql_port"/>
				<success option="mysql_host"/>
			</cluster>
		</cluster_options>
	</result>
</out>
CODE

Hc_dialer_db_cluster_options_info

Команда просмотра параметров подключения к БД подсистемы автообзвонщика.

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

cluster/core/<CORE>/dialer/db/info

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

POST

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

http://host:port/commands/dialer_db_cluster_options_info

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

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

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

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:annotation>
    <xs:documentation xml:lang="en">
      Get options of dialer node.
      Usage: http://server:9999/commands/dialer_db_cluster_options_info
    </xs:documentation>
  </xs:annotation>

  <xs:include schemaLocation="error.xsd" />
  <xs:include schemaLocation="ecm_common.xsd" />
  <!-- dialerDbClusterOptionsType -->
    <xs:complexType name="dialerDbClusterOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="mysql_database" type="nonEmptyNormalizedStringType" use="optional" />
                <xs:attribute name="mysql_enabled" type="booleanType" use="optional" />
                <xs:attribute name="mysql_host" type="nonEmptyNormalizedStringType" use="optional" />
                <xs:attribute name="mysql_password" type="nonEmptyNormalizedStringType">
                    <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="mysql_port" type="inetPortType" use="optional" />
                <xs:attribute name="mysql_user" type="nonEmptyNormalizedStringType" use="optional" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

  <!-- in -->
  <xs:element name="in">
    <xs:complexType>
      <xs:all minOccurs="1" maxOccurs="1">
        <xs:element name="request" minOccurs="1" maxOccurs="1">
          <xs:complexType>
            <xs:all minOccurs="1" maxOccurs="1">
              <xs:element name="cluster_options" type="clusterInfoInType"/>
            </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" minOccurs="1" maxOccurs="1">
          <xs:complexType>
            <xs:all minOccurs="1" maxOccurs="1">
              <xs:element name="cluster_options" type="clusterInfoOutType"/>
            </xs:all>
          </xs:complexType>
        </xs:element>
        <xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" />
      </xs:choice>
    </xs:complexType>
  </xs:element>

</xs:schema>

XML

Пример:

Запрос:
http://192.168.1.21:9999/commands/dialer_db_cluster_options_info

<?xml version="1.0" encoding="UTF-8"?>
<in>
    <request>
        <cluster_options cluster="core1"/>
    </request>
</in>
CODE

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="dialer_db_cluster_options_info.xsd">
    <result>
        <cluster_options>
            <cluster name="core1">
                <options xs:type="dialerDbClusterOptionsType" mysql_database="ecss_dialer_db" mysql_enabled="true" mysql_host="dialer.mysql.ecss" mysql_password="********" mysql_port="3306" mysql_user="dialer_db"/>
            </cluster>
        </cluster_options>
    </result>
</out>
CODE

Hc_dialer_db_cluster_options_set

Изменение параметров подключения к БД подсистемы автообзвонщика.

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

cluster/core/<CORE>/dialer/db/set

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

POST

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

http://host:port/commands/dialer_db_cluster_options_set

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

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

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

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:annotation>
        <xs:documentation xml:lang="en">
            Set dialer cluster options.
            Usage: http://server:9999/commands/dialer_db_cluster_options_set
        </xs:documentation>
    </xs:annotation>

    <xs:include schemaLocation="error.xsd" />
    <xs:include schemaLocation="ecm_common.xsd" />

    <xs:complexType name="dialerDbClusterOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="mysql_database" type="nonEmptyNormalizedStringType" use="optional" />
                <xs:attribute name="mysql_enabled" type="booleanType" use="optional" />
                <xs:attribute name="mysql_host" type="nonEmptyNormalizedStringType" use="optional" />
                <xs:attribute name="mysql_password" type="nonEmptyNormalizedStringType" use="optional" />
                <xs:attribute name="mysql_port" type="inetPortType" use="optional" />
                <xs:attribute name="mysql_user" type="nonEmptyNormalizedStringType" use="optional" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:all minOccurs="1" maxOccurs="1">
                <xs:element name="request" minOccurs="1" maxOccurs="1">
                    <xs:complexType>
                        <xs:all minOccurs="1" maxOccurs="1">
                            <xs:element name="cluster_options" type="clusterSetInType"/>
                        </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" minOccurs="1" maxOccurs="1">
                    <xs:complexType>
                        <xs:all minOccurs="1" maxOccurs="1">
                            <xs:element name="cluster_options" type="clusterSetOutType"/>
                        </xs:all>
                    </xs:complexType>
                </xs:element>
                <xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" />
            </xs:choice>
        </xs:complexType>
    </xs:element>

</xs:schema>

CODE

Пример:

Запрос:
http://192.168.1.21:9999/commands/dialer_db_cluster_options_set

<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="dialer_db_cluster_options_set.xsd">
    <request>
        <cluster_options>
            <cluster name="core1">
                <options mysql_host="192.168.1.71" mysql_port="3306" xs:type="dialerDbClusterOptionsType"/>
            </cluster>
        </cluster_options>
    </request>
</in>
CODE

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="dialer_db_cluster_options_set.xsd">
    <result>
        <cluster_options>
            <cluster name="core1">
                <success option="mysql_host"/>
                <success option="mysql_port"/>
            </cluster>
        </cluster_options>
    </result>
</out>
CODE