Дерево страниц
Перейти к концу метаданных
Переход к началу метаданных

Hc_notifier_options_clean

Команда установки параметров по умолчанию для параметров службы уведомлений.

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

/cluster/mediator/<CLUSTER>/notifier/clean

/domain/<DOMAIN>/notifier/clean

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

POST

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

http://host:port/commands/notifier_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 properties of notifier service.
      Usage: http://server:9999/commands/notifier_options_clean.
      Implementation: hc_notifier_options_clean.erl.
      Git: git@git.eltex.loc:httpTerminal.git.
      Copyright (c) 2015, Eltex. All rights reserved.
    </xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>
    <!-- resultType-->
    <xs:complexType name="resultType">
      <xs:all>
        <xs:element name="domain_options" type="domainCleanOutType" minOccurs="1"/>
      </xs:all>
    </xs:complexType>
    <!-- in-->
    <xs:element name="in">
      <xs:complexType>
        <xs:sequence>
          <xs:element name="request">
        <xs:complexType>
          <xs:all>
            <xs:element name="domain_options" type="domainCleanInType"/>
          </xs:all>
        </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    <!-- out -->
    <xs:element name="out">
      <xs:complexType>
        <xs:choice>
          <xs:element name="result" type="resultType"/>
          <xs:element name="error" type="errorType"/>
        </xs:choice>
      </xs:complexType>
    </xs:element>
</xs:schema>

Пример:

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

<?xml version="1.0"?>
<in
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_notifier_options_clean.xsd">
    <request>
        <domain_options>
            <system />
            <domain name="biysk.local">
                <option name="jabber_port"/>
                <option name="email_port"/>
                <option name="email"/>
            </domain>
        </domain_options>
    </request>
</in>

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_notifier_options_clean.xsd">
    <result>
        <domain_options>
            <system/>
            <domain name="biysk.local">
                <success option="email"/>
                <success option="email_port"/>
                <success option="jabber_port"/>
            </domain>
        </domain_options>
    </result>
</out>

Hc_notifier_options_info

Команда просмотра информации о службе уведомлений.

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

/cluster/mediator/<CLUSTER>/notifier/info

/domain/<DOMAIN>/notifier/info

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

POST

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

http://host:port/commands/notifier_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 properties of notifier service.
      Usage: http://server:9999/commands/notifier_options_info.
      Implementation: hc_notifier_options_info.erl.
      Git: git@git.eltex.loc:httpTerminal.git.
      Copyright (c) 2015, Eltex. All rights reserved.
    </xs:documentation>
  </xs:annotation>

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

          
    <!-- Types -->
    <xs:simpleType name="jabberPortType">
      <xs:restriction base="integerRangeType">
        <xs:minInclusive value="1024"/>
        <xs:maxInclusive value="65535"/>
      </xs:restriction>
    </xs:simpleType>

          
    <xs:simpleType name="resendCntMaxType">
      <xs:restriction base="integerRangeType">
        <xs:minInclusive value="0"/>
        <xs:maxInclusive value="10000"/>
      </xs:restriction>
    </xs:simpleType>

          
    <xs:simpleType name="bufferLimitType">
      <xs:restriction base="integerRangeType">
        <xs:minInclusive value="0"/>
        <xs:maxInclusive value="1000"/>
      </xs:restriction>
    </xs:simpleType>

          
    <xs:simpleType name="reconnectTimerType">
      <xs:restriction base="integerRangeType">
        <xs:minInclusive value="0"/>
        <xs:maxInclusive value="1000000"/>
      </xs:restriction>
    </xs:simpleType>

          
    <xs:simpleType name="jabberVersionType">
      <xs:restriction base="xs:string">
          <xs:enumeration value="0.0"/>
          <xs:enumeration value="1.0"/>
      </xs:restriction>
    </xs:simpleType>

          
    <xs:complexType name="NotifierOptionsType">
      <xs:complexContent>
        <xs:extension base="baseOptionsType">
          <xs:attribute name="jid" type="xs:string" use="optional"/>
          <xs:attribute name="jabber_password" type="xs:string" use="optional"/>
          <xs:attribute name="jabber_port" type="jabberPortType" use="optional"/>
          <xs:attribute name="jabber_enable" type="booleanType" use="optional"/>
          <xs:attribute name="jabber_buffer_limit" type="bufferLimitType" use="optional"/>
          <xs:attribute name="jabber_reconnect_timer" type="reconnectTimerType" use="optional"/>
          <xs:attribute name="jabber_version" type="jabberVersionType" use="optional"/>
          <xs:attribute name="email" type="xs:string" use="optional"/>
          <xs:attribute name="email_server" type="xs:string" use="optional"/>
          <xs:attribute name="email_port" type="xs:string" use="optional"/>
          <xs:attribute name="email_username" type="xs:string" use="optional"/>
          <xs:attribute name="email_password" type="xs:string" use="optional"/>
          <xs:attribute name="email_enable" type="booleanType" use="optional"/>
          <xs:attribute name="email_buffer_limit" type="bufferLimitType" use="optional"/>
          <xs:attribute name="email_resend_timer" type="reconnectTimerType" use="optional"/>
          <xs:attribute name="email_protection_connection" type="xs:string" use="optional"/>
          <xs:attribute name="email_resend_count_max" type="resendCntMaxType" use="optional"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
    <!-- resultType-->
    <xs:complexType name="resultType">
      <xs:all>
        <xs:element name="domain_options" type="domainInfoOutType" minOccurs="1"/>
      </xs:all>
    </xs:complexType>
    <!-- in-->
    <xs:element name="in">
      <xs:complexType>
        <xs:sequence>
          <xs:element name="request">
        <xs:complexType>
          <xs:all>
            <xs:element name="domain_options" type="domainInfoInType" minOccurs="1"/>
          </xs:all>
        </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    <!-- out -->
    <xs:element name="out">
      <xs:complexType>
        <xs:choice>
          <xs:element name="result" type="resultType"/>
          <xs:element name="error" type="errorType"/>
        </xs:choice>
      </xs:complexType>
    </xs:element>
</xs:schema>

Пример:

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

<?xml version="1.0"?>
<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_notifier_options_info.xsd">
<request>
    <domain_options domain="biysk.local"/>
</request>
</in>

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_notifier_options_info.xsd">
    <result>
        <domain_options>
            <system>
                <options xs:type="NotifierOptionsType"/>
            </system>
            <domain name="biysk.local">
                <options xs:type="NotifierOptionsType" jid="ecss-10@jabber.eltex.loc" jabber_version="0.0" jabber_reconnect_timer="10" jabber_port="5222" jabber_password="ylperon" jabber_enable="false" jabber_buffer_limit="50" email_username="ecss10biysk@mail.ru" email_server="smtp.mail.ru" email_resend_timer="30" email_resend_count_max="5" email_protection_connection="ssl_tls" email_port="465" email_password="smptp_password" email_enable="true" email_buffer_limit="50" email="ecss10biysk@mail.ru"/>
            </domain>
        </domain_options>
    </result>
</out>

Hc_notifier_options_set

Команда настройки параметров службы уведомлений.

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

/cluster/mediator/<CLUSTER>/notifier/set

/domain/<DOMAIN>/notifier/set

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

POST

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

http://host:port/commands/notifier_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 notifier service properties
            Usage: http://server:9999/commands/notifier_options_set.
            Implementation: hc_notifier_options_set.erl.
            Git: git@git.eltex.loc:httpTerminal.git.
            Copyright (c) 2015, Eltex. All rights reserved.
        </xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>

          
    <!-- Types -->
    <xs:simpleType name="jabberPortType">
      <xs:restriction base="integerRangeType">
    <xs:minInclusive value="1024"/>
    <xs:maxInclusive value="65535"/>
      </xs:restriction>
    </xs:simpleType>

          
    <xs:simpleType name="resendCntMaxType">
      <xs:restriction base="integerRangeType">
    <xs:minInclusive value="0"/>
    <xs:maxInclusive value="10000"/>
      </xs:restriction>
    </xs:simpleType>

          
    <xs:simpleType name="bufferLimitType">
      <xs:restriction base="integerRangeType">
    <xs:minInclusive value="0"/>
    <xs:maxInclusive value="1000"/>
      </xs:restriction>
    </xs:simpleType>

          
    <xs:simpleType name="reconnectTimerType">
      <xs:restriction base="integerRangeType">
    <xs:minInclusive value="0"/>
    <xs:maxInclusive value="1000000"/>
      </xs:restriction>
    </xs:simpleType>

          
    <xs:simpleType name="jabberVersionType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="0.0"/>
            <xs:enumeration value="1.0"/>
        </xs:restriction>
    </xs:simpleType>

          
    <xs:complexType name="NotifierOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
          <xs:attribute name="jid" type="xs:string" use="optional"/>
          <xs:attribute name="jabber_password" type="xs:string" use="optional"/>
          <xs:attribute name="jabber_port" type="jabberPortType" use="optional"/>
          <xs:attribute name="jabber_enable" type="booleanType" use="optional"/>
          <xs:attribute name="jabber_buffer_limit" type="bufferLimitType" use="optional"/>
          <xs:attribute name="jabber_reconnect_timer" type="reconnectTimerType" use="optional"/>
          <xs:attribute name="jabber_version" type="jabberVersionType" use="optional"/>
          <xs:attribute name="email" type="xs:string" use="optional"/>
          <xs:attribute name="email_server" type="xs:string" use="optional"/>
          <xs:attribute name="email_port" type="xs:string" use="optional"/>
          <xs:attribute name="email_username" type="xs:string" use="optional"/>
          <xs:attribute name="email_password" type="xs:string" use="optional"/>
          <xs:attribute name="email_enable" type="booleanType" use="optional"/>
          <xs:attribute name="email_buffer_limit" type="bufferLimitType" use="optional"/>
          <xs:attribute name="email_resend_timer" type="reconnectTimerType" use="optional"/>
          <xs:attribute name="email_protection_connection" type="xs:string" use="optional"/>
          <xs:attribute name="email_resend_count_max" type="resendCntMaxType" use="optional"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- resultType-->
    <xs:complexType name="resultType">
        <xs:all>
            <xs:element name="domain_options" type="domainSetOutType" minOccurs="1"/>
        </xs:all>
    </xs:complexType>
    <!-- in-->
    <xs:element name="in">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:all>
                            <xs:element name="domain_options" type="domainSetInType"/>
                        </xs:all>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:choice>
                <xs:element name="result" type="resultType" minOccurs="1" maxOccurs="1"/>
                <xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
</xs:schema>

Пример:

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

<?xml version="1.0"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_notifier_options_set.xsd">
  <request>
    <domain_options>
      <system>
        <options xs:type="NotifierOptionsType"/>
      </system>
      <domain name="biysk.local">
        <options xs:type="NotifierOptionsType" email_protection_connection="starttls" email_buffer_limit="50" jabber_buffer_limit="0" jabber_enable="true" email_enable="false" email_port="default" email_resend_count_max="5"/>
      </domain>
    </domain_options>
  </request>
</in>

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_notifier_options_set.xsd">
    <result>
        <domain_options>
            <system/>
            <domain name="biysk.local">
                <success option="email_buffer_limit"/>
                <success option="email_enable"/>
                <success option="email_port"/>
                <success option="email_protection_connection"/>
                <success option="email_resend_count_max"/>
                <success option="jabber_buffer_limit"/>
                <success option="jabber_enable"/>
            </domain>
        </domain_options>
    </result>
</out>
  • Нет меток