Hc_ds_general_options_info
Команда просмотра свойств DS.
Аналог команды в CoCon:
system/info
Шаблон HTTP-запроса:
http://host:port/commands/ds_general_options_info
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="ds_general_option_info"> <xs:annotation> <xs:documentation xml:lang="en"> Get options of TTS node. Usage: http://server:9999/commands/ds_general_options_info Copyright (c) 2014, Eltex. All rights reserved. </xs:documentation> </xs:annotation> <xs:include schemaLocation="error.xsd" /> <xs:include schemaLocation="ecm_common.xsd" /> <xs:include schemaLocation="hc_ds_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="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" minOccurs="1" maxOccurs="1"> <xs:complexType> <xs:all minOccurs="1" maxOccurs="1"> <xs:element name="system_options" type="systemInfoOutType"/> </xs:all> </xs:complexType> </xs:element> <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/ds_general_options_info
<?xml version="1.0" encoding="UTF-8"?> <in> <request> <system_options/> </request> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ds_general_options_info.xsd"> <result> <system_options> <system> <options xs:type="DSOptionsType" call_limit="infinity" callcenter_active_agents="infinity" system_jabber_id="ecss-10@jabber.eltex.loc" system_jabber_password="ylperon" system_jabber_port="5222" system_restfs_host="system.restfs.ecss" system_restfs_port="9990" time_difference_threshold="500"/> </system> </system_options> </result> </out>
Hc_ds_general_options_set
Команда для установки свойств DS.
Аналог команды в CoCon:
system/set
Шаблон HTTP-запроса:
http://host:port/commands/ds_general_options_set
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="ds_general_options_set"> <xs:annotation> <xs:documentation xml:lang="en"> Get options of TTS node. Usage: http://server:9999/commands/ds_general_options_set Copyright (c) 2014, Eltex. All rights reserved. </xs:documentation> </xs:annotation> <xs:include schemaLocation="error.xsd" /> <xs:include schemaLocation="ecm_common.xsd" /> <xs:include schemaLocation="hc_ds_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="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" minOccurs="1" maxOccurs="1"> <xs:complexType> <xs:all minOccurs="1" maxOccurs="1"> <xs:element name="system_options" type="systemSetOutType"/> </xs:all> </xs:complexType> </xs:element> <xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" /> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
hc_ds_common.xsd
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <!-- callPolicyType --> <xs:simpleType name="callPolicyType"> <xs:restriction base="unionType"> <xs:enumeration value="allow"/> <xs:enumeration value="deny"/> </xs:restriction> </xs:simpleType> <!-- systemDSOptionsType --> <xs:complexType name="DSOptionsType"> <xs:complexContent> <xs:extension base="baseOptionsType"> <xs:attribute name="call_limit" type="stringType" use="optional" /> <xs:attribute name="system_jabber_id" type="stringType" use="optional" /> <xs:attribute name="system_restfs_host" type="stringType" use="optional" /> <xs:attribute name="system_jabber_port" type="inetPortType" use="optional" /> <xs:attribute name="system_restfs_port" type="inetPortType" use="optional" /> <xs:attribute name="notification_services" type="stringType" use="optional" /> <xs:attribute name="system_jabber_password" type="stringType" use="optional" /> <xs:attribute name="callcenter_active_agents" type="stringType" use="optional" /> <xs:attribute name="time_difference_threshold" type="positiveIntegerType" use="optional" /> </xs:extension> </xs:complexContent> </xs:complexType> </xs:schema>
Пример:
Запрос:
http://192.168.1.21:9999/commands/ds_general_options_set
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ds_general_options_set.xsd"> <request> <system_options> <system> <options xs:type="DSOptionsType" call_limit="50"/> </system> </system_options> </request> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ds_general_options_set.xsd"> <result> <system_options> <system> <success option="call_limit"/> </system> </system_options> </result> </out>
Hc_ds_general_options_clean
Команда очистки свойств DS.
Аналог команды в CoCon:
system/clean
Шаблон HTTP-запроса:
http://host:port/commands/ds_general_options_clean
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="ds_general_options_clean"> <xs:annotation> <xs:documentation xml:lang="en"> Get options of TTS node. Usage: http://server:9999/commands/ds_general_options_clean Copyright (c) 2014, Eltex. All rights reserved. </xs:documentation> </xs:annotation> <xs:include schemaLocation="error.xsd" /> <xs:include schemaLocation="ecm_common.xsd" /> <xs:include schemaLocation="hc_ds_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="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" minOccurs="1" maxOccurs="1"> <xs:complexType> <xs:all minOccurs="1" maxOccurs="1"> <xs:element name="system_options" type="systemCleanOutType"/> </xs:all> </xs:complexType> </xs:element> <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/ds_general_options_clean
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_tts_general_options_clean.xsd"> <request> <system_options> <system> <option name="time_difference_threshold"/> </system> </system_options> </request> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ds_general_options_clean.xsd"> <result> <system_options> <system> <success option="time_difference_threshold"/> </system> </system_options> </result> </out>