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

Hc_domain_data_info

Команда для просмотра информации об определенном домене.

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

domain/<DOMAIN>/info

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

POST

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

http://host:port/commands/domain_data_info

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

При выполнении команды 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 domain.
      Usage: http://server:9999/commands/domain_data_info.
      Implementation: hc_notifier_options_info.erl.
      Git: git@git.eltex.loc:httpTerminal.git.
      Copyright (c) 2016, Eltex. All rights reserved.
    </xs:documentation>
  </xs:annotation>

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

          
    <xs:complexType name="DomainDataType">
      <xs:complexContent>
        <xs:extension base="baseOptionsType">
          <xs:attribute name="pin" type="xs:string" use="optional"/>
          <xs:attribute name="alias_profile_default" type="xs:string" use="optional"/>
          <xs:attribute name="snmp_id" type="xs:string" 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>

Пример 1

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

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

Код ответа: 200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_domain_data_info.xsd">
    <result>
        <domain_options>
            <system>
                <options xs:type="DomainDataType"/>
            </system>
            <domain name="biysk.local">
                <options xs:type="DomainDataType" snmp_id="1" alias_profile_default="user_default"/>
            </domain>
        </domain_options>
    </result>
</out>

Hc_domain_data_set

Команда предназначена для редактирования свойств домена.

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

domain/<DOMAIN>/set

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

POST

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

http://host:port/commands/domain_data_set

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

При выполнении команды 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_data_set.
            Implementation: hc_domain_data_set.erl.
            Git: git@git.eltex.loc:httpTerminal.git.
            Copyright (c) 2016, Eltex. All rights reserved.
        </xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>
    <xs:complexType name="DomainDataType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="pin" type="xs:string" use="optional"/>
                <xs:attribute name="alias_profile_default" type="xs:string" use="optional"/>
                <xs:attribute name="snmp_id" type="xs:string" 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/domain_data_set

<?xml version="1.0"?>
<in
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_domain_data_set.xsd">
    <request>
        <domain_options>
            <system>
                <options xs:type="DomainDataType"/>
            </system>
            <domain name="test.biysk">
                <options xs:type="DomainDataType" pin="291067" alias_profile_default="user_default"/>
            </domain>
        </domain_options>
    </request>
</in>

Код ответа: 200

Ответ:

status: 200
content: 
<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_domain_data_set.xsd">
    <result>
        <domain_options>
            <system/>
            <domain name="test.biysk">
                <success option="alias_profile_default"/>
                <success option="pin"/>
            </domain>
        </domain_options>
    </result>
</out>

Hc_domain_data_clean

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

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

domain/<DOMAIN>/clean

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

POST

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

http://host:port/commands/domain_data_clean

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

При выполнении команды 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 domain
      Usage: http://server:9999/commands/domain_data_clean.
      Implementation: hc_notifier_options_clean.erl.
      Git: git@git.eltex.loc:httpTerminal.git.
      Copyright (c) 2016, 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/domain_data_clean

<?xml version="1.0"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_domain_data_clean.xsd">
<request>
    <domain_options>
        <system />
        <domain name="ct.office">
            <option name="pin"/>
            <option name="alias_profile_default"/>
        </domain>
    </domain_options>
</request>
</in>

Код ответа: 200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_domain_data_clean.xsd">
    <result>
        <domain_options>
            <system/>
            <domain name="ct.office">
                <success option="alias_profile_default"/>
                <success option="pin"/>
            </domain>
        </domain_options>
    </result>
</out>
  • Нет меток