Hc_domain_properties_info

Команда для просмотра глобальных доменных свойств и свойств, установленных на определенном домене.

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

domain/<DOMAIN>/properties/info

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

POST

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

http://host:port/commands/domain_properties_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 domain properties.
            Usage: http://server:9999/commands/domain_propterties_info.
            Implementation: hc_domain_properties_info.erl.
            Git: git@git.eltex.loc:httpTerminal.git.
            Copyright (c) 2014, Eltex. All rights reserved.
        </xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>
    <!-- replicaTypeType -->
    <xs:simpleType name="replicaTypeType">
        <xs:restriction base="unionType">
            <xs:enumeration value="master"/>
            <xs:enumeration value="backup"/>
            <xs:enumeration value="none"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- vatsTypeType -->
    <xs:simpleType name="vatsTypeType">
        <xs:restriction base="unionType">
            <xs:enumeration value="private"/>
            <xs:enumeration value="local"/>
            <xs:enumeration value="international"/>
            <xs:enumeration value="transit"/>
            <xs:enumeration value="transit_offroad"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- defaultCallPolicyType -->
    <xs:simpleType name="defaultCallPolicyType">
        <xs:restriction base="unionType">
            <xs:enumeration value="allow"/>
            <xs:enumeration value="deny"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- redirectingNumberModeType -->
    <xs:simpleType name="redirectingNumberModeType">
        <xs:restriction base="unionType">
            <xs:enumeration value="origin_b"/>
            <xs:enumeration value="modified_b"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- domainPropertiesOptionsType -->
    <xs:complexType name="domainPropertiesOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="ss_codes_report_template" type="stringType" use="optional"/>
                <xs:attribute name="vats_type" type="vatsTypeType" use="optional"/>
                <xs:attribute name="trunk_control_in" type="booleanType" use="optional"/>
                <xs:attribute name="trunk_control_out" type="booleanType" use="optional"/>
                <xs:attribute name="abonent_control_out" type="booleanType" use="optional"/>
                <xs:attribute name="cw_play_voice_message" type="booleanType" use="optional"/>
                <xs:attribute name="call_recording_announcement_local" type="booleanType" use="optional"/>
                <xs:attribute name="call_recording_announcement_external" type="booleanType" use="optional"/>
                <xs:attribute name="default_call_policy" type="defaultCallPolicyType" use="optional"/>
                <xs:attribute name="redirecting_number_mode" type="redirectingNumberModeType" use="optional"/>
                <xs:attribute name="connected_number_mode" type="redirectingNumberModeType" use="optional"/>
                <xs:attribute name="tc_display_name" type="stringType" use="optional"/>
                <xs:attribute name="site" type="stringType" use="optional"/>
                <xs:attribute name="replica_type" type="replicaTypeType" use="optional"/>
                <xs:attribute name="tc_notification_ban_timeout" type="positiveIntegerType" use="optional"/>
                <xs:attribute name="teleconference_notification_ban_timeout" type="positiveIntegerType" use="optional"/>
                <xs:attribute name="public_names" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The list of domain's public names splitted by comma.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="alternate_route_acp_causes" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The list of release ACP causes for try make call at alternate trunk/direction splitted by comma.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="alternate_route_isup_causes" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The list of release ISUP causes for try make call at alternate trunk/direction splitted by comma.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="alternate_route_sip_causes" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The list of release SIP causes for try make call at alternate trunk/direction splitted by comma.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="dialer_repeat_acp_causes" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The list of release ACP causes for repeat call attempt for this causes splitted by comma.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="call_record_server_peer" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            RestFS server peer for Call Record service.
                            Format: system | URI
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="call_forwarding_isup_causes" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The list of release ISUP causes for continue original call splitted by comma.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="voicemail_server_peer" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            RestFS server peer for Voicemail service.
                            Format: system | URI
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="fax_server_peer" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            RestFS server peer for Fax receiver.
                            Format: system | URI
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="sounds_server_peer" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            RestFS server peer for sounds.
                            Format: system | URI
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="speech_recognition_server_peer" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            RestFS server peer for speech recognition.
                            Format: system | URI
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="speech_synthesis_server_peer" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            RestFS server peer for speech synthesis.
                            Format: system | URI
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="pictures_server_peer" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            RestFS server peer for pictures.
                            Format: system | URI
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </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>


CODE

Пример 1:

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

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

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_properties_info.xsd">
    <result>
        <domain_options>
            <system>
                <options xs:type="domainPropertiesOptionsType"/>
            </system>
            <domain name="biysk.local">
                <options xs:type="domainPropertiesOptionsType" voicemail_server_peer="system" vats_type="private" trunk_control_out="true" trunk_control_in="true" teleconference_notification_ban_timeout="1000" tc_notification_ban_timeout="1000" tc_display_name="Teleconference" ss_codes_report_template="default" speech_synthesis_server_peer="system" speech_recognition_server_peer="system" sounds_server_peer="system" site="ecss10" replica_type="none" redirecting_number_mode="modified_b" public_names="biysk.local" pictures_server_peer="system" fax_server_peer="system" dialer_repeat_acp_causes="calledPartyRejected,noCircuitAvailable,noRequestedCircuitAvailable" default_call_policy="allow" cw_play_voice_message="true" connected_number_mode="origin_b" call_recording_announcement_local="true" call_recording_announcement_external="true" call_record_server_peer="system" call_forwarding_isup_causes="21,25" alternate_route_sip_causes="" alternate_route_isup_causes="" alternate_route_acp_causes="routeFailure1,routeFailure2,routeSelectFailure,noCircuitAvailable,noRequestedCircuitAvailable,terminationDenied,notReachable" abonent_control_out="true"/>
            </domain>
        </domain_options>
    </result>
</out>
CODE

Пример 2:

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

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

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_properties_info.xsd">
    <result>
        <domain_options>
            <system>
                <options xs:type="domainPropertiesOptionsType" voicemail_server_peer="system" vats_type="private" trunk_control_out="true" trunk_control_in="true" teleconference_notification_ban_timeout="1000" tc_notification_ban_timeout="1000" tc_display_name="Teleconference" ss_codes_report_template="default" speech_synthesis_server_peer="system" speech_recognition_server_peer="system" sounds_server_peer="system" site="ecss10" replica_type="none" redirecting_number_mode="modified_b" public_names="" pictures_server_peer="system" fax_server_peer="system" dialer_repeat_acp_causes="calledPartyRejected,noCircuitAvailable,noRequestedCircuitAvailable" default_call_policy="allow" cw_play_voice_message="true" connected_number_mode="origin_b" call_recording_announcement_local="false" call_recording_announcement_external="false" call_record_server_peer="system" call_forwarding_isup_causes="21,25" alternate_route_sip_causes="" alternate_route_isup_causes="" alternate_route_acp_causes="routeFailure1,routeFailure2,routeSelectFailure,noCircuitAvailable,noRequestedCircuitAvailable,terminationDenied,notReachable" abonent_control_out="true"/>
            </system>
            <domain name="test.domain">
                <options xs:type="domainPropertiesOptionsType" site="ecss10"/>
            </domain>
            <domain name="ct.office">
                <options xs:type="domainPropertiesOptionsType" site="ecss10"/>
            </domain>
            <domain name="biysk.local">
                <options xs:type="domainPropertiesOptionsType" site="ecss10" public_names="biysk.local" call_recording_announcement_local="true" call_recording_announcement_external="true"/>
            </domain>
            <domain name="autotest">
                <options xs:type="domainPropertiesOptionsType" site="ecss10"/>
            </domain>
        </domain_options>
    </result>
</out>
CODE

Hc_domain_properties_set

Команда для редактирования глобальных доменных свойств и свойств, установленных на определенном домене.

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

domain/<DOMAIN>/properties/set

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

POST

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

http://host:port/commands/domain_properties_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 domain properties.
            Usage: http://server:9999/commands/domain_properties_set.
            Implementation: hc_domain_properties_set.erl.
            Git: git@git.eltex.loc:httpTerminal.git.
            Copyright (c) 2014, Eltex. All rights reserved.
        </xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>
    <!-- replicaTypeType -->
    <xs:simpleType name="replicaTypeType">
        <xs:restriction base="unionType">
            <xs:enumeration value="master"/>
            <xs:enumeration value="backup"/>
            <xs:enumeration value="none"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- vatsTypeType -->
    <xs:simpleType name="vatsTypeType">
        <xs:restriction base="unionType">
            <xs:enumeration value="private"/>
            <xs:enumeration value="local"/>
            <xs:enumeration value="international"/>
            <xs:enumeration value="transit"/>
            <xs:enumeration value="transit_offroad"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- defaultCallPolicyType -->
    <xs:simpleType name="defaultCallPolicyType">
        <xs:restriction base="unionType">
            <xs:enumeration value="allow"/>
            <xs:enumeration value="deny"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- redirectingNumberModeType -->
    <xs:simpleType name="redirectingNumberModeType">
        <xs:restriction base="unionType">
            <xs:enumeration value="origin_b"/>
            <xs:enumeration value="modified_b"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- domainPropertiesOptionsType -->
    <xs:complexType name="domainPropertiesOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="ss_codes_report_template" type="stringType" use="optional"/>
                <xs:attribute name="vats_type" type="vatsTypeType" use="optional"/>
                <xs:attribute name="trunk_control_in" type="booleanType" use="optional"/>
                <xs:attribute name="trunk_control_out" type="booleanType" use="optional"/>
                <xs:attribute name="abonent_control_out" type="booleanType" use="optional"/>
                <xs:attribute name="cw_play_voice_message" type="booleanType" use="optional"/>
                <xs:attribute name="call_recording_announcement_local" type="booleanType" use="optional"/>
                <xs:attribute name="call_recording_announcement_external" type="booleanType" use="optional"/>
                <xs:attribute name="default_call_policy" type="defaultCallPolicyType" use="optional"/>
                <xs:attribute name="redirecting_number_mode" type="redirectingNumberModeType" use="optional"/>
                <xs:attribute name="connected_number_mode" type="redirectingNumberModeType" use="optional"/>
                <xs:attribute name="tc_display_name" type="stringType" use="optional"/>
                <xs:attribute name="site" type="stringType" use="optional"/>
                <xs:attribute name="replica_type" type="replicaTypeType" use="optional"/>
                <xs:attribute name="tc_notification_ban_timeout" type="positiveIntegerType" use="optional"/>
                <xs:attribute name="teleconference_notification_ban_timeout" type="positiveIntegerType" use="optional"/>
                <xs:attribute name="public_names" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The list of domain's public names splitted by comma.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="alternate_route_acp_causes" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The list of release ACP causes for try make call at alternate trunk/direction splitted by comma.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="alternate_route_isup_causes" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The list of release ISUP causes for try make call at alternate trunk/direction splitted by comma.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="alternate_route_sip_causes" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The list of release SIP causes for try make call at alternate trunk/direction splitted by comma.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="dialer_repeat_acp_causes" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The list of release ACP causes for repeat call attempt for this causes splitted by comma.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="call_forwarding_isup_causes" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The list of release ISUP causes for continue original call splitted by comma.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="call_record_server_peer" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            RestFS server peer for Call Record service.
                            Format: system | URI
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="voicemail_server_peer" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            RestFS server peer for Voicemail service.
                            Format: system | URI
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="fax_server_peer" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            RestFS server peer for Fax receiver.
                            Format: system | URI
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="sounds_server_peer" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            RestFS server peer for sounds.
                            Format: system | URI
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="speech_recognition_server_peer" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            RestFS server peer for speech recognition.
                            Format: system | URI
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="speech_synthesis_server_peer" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            RestFS server peer for speech synthesis.
                            Format: system | URI
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="pictures_server_peer" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            RestFS server peer for pictures.
                            Format: system | URI
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </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"/>
                <xs:element name="error" type="errorType"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
</xs:schema>

CODE

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

<?xml version="1.0"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_domain_properties_set.xsd">
    <request>
        <domain_options>
            <system>
                <options xs:type="domainPropertiesOptionsType" vats_type="private" />
            </system>
        </domain_options>
    </request>
</in>
CODE

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_properties_set.xsd">
    <result>
        <domain_options>
            <system>
                <success option="vats_type"/>
            </system>
        </domain_options>
    </result>
</out>
CODE

Пример 2:

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

<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_properties_set.xsd">
    <request>
        <domain_options>
            <system>
                <options xs:type="domainPropertiesOptionsType" vats_type="international" />
            </system>
            <domain name="ct.office">
                <options xs:type="domainPropertiesOptionsType" vats_type="transit" />
            </domain>
        </domain_options>
    </request>
</in>
CODE

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_properties_set.xsd">
    <result>
        <domain_options>
            <system>
                <success option="vats_type"/>
            </system>
            <domain name="ct.office">
                <success option="vats_type"/>
            </domain>
        </domain_options>
    </result>
</out>
CODE

Пример 3:

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

<?xml version='1.0' encoding='latin1'?>
<in
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
    <request>
        <domain_options>
            <system>
                <options xs:type="domainPropertiesOptionsType"/>
            </system>
            <domain name="biysk.local">
                <options alternate_route_acp_causes="routeFailure1,routeFailure2,routeSelectFailure,noCircuitAvailable,noRequestedCircuitAvailable,terminationDenied,notReachable/system,conversationTimeout,ss7Failure" xs:type="domainPropertiesOptionsType"/>
            </domain>
        </domain_options>
    </request>
</in>
CODE

Ответ:

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


Hc_domain_properties_clean

Команда для сброса в значение по умолчанию глобальных доменных свойств и свойств, установленных на определенном домене.

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

domain/<DOMAIN>/properties/clean

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

POST

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

http://host:port/commands/domain_properties_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 domain properties.
            Usage: http://server:9999/commands/domain_properties_clean.
            Implementation: hc_domain_properties_clean.erl.
            Git: git@git.eltex.loc:httpTerminal.git.
            Copyright (c) 2014, 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>
CODE

Пример 1:

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

<?xml version="1.0"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_properties_clean.xsd">
    <request>
        <domain_options>
            <system>
                <option name="vats_type"/>
            </system>
        </domain_options>
    </request>
</in>
CODE

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_properties_clean.xsd">
    <result>
        <domain_options>
            <system>
                <success option="vats_type"/>
            </system>
        </domain_options>
    </result>
</out>
CODE

Пример 2:

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

<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_properties_clean.xsd">
    <request>
        <domain_options>
            <system>
                <option name="vats_type" />
            </system>
            <domain name="ct.office">
                <option name="vats_type" />
            </domain>
        </domain_options>
    </request>
</in>
CODE

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_properties_clean.xsd">
    <result>
        <domain_options>
            <system>
                <success option="vats_type"/>
            </system>
            <domain name="ct.office">
                <success option="vats_type"/>
            </domain>
        </domain_options>
    </result>
</out>
CODE

Пример 4: