Hc_ivr_blocks_outputs_get
Команда предназначена для просмотра блоков IVR-скрипта.
Аналог команды в CoCon:
domain/<DOMAIN>/ivr/script/get_outputs
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://server:9999/commands/ivr_blocks_outputs_get
Код 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:include schemaLocation="error.xsd"/>
<!-- scriptType -->
<xs:complexType name="scriptType">
<xs:sequence>
<xs:element name="block" type="blockType" maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required"/>
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<!-- scriptType -->
<xs:complexType name="blockType">
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="output" type="xs:string"/>
</xs:complexType>
<!-- requestType -->
<xs:complexType name="requestType">
<xs:attribute name="domain" type="xs:string" use="required"/>
<xs:attribute name="script_id" type="xs:string" use="required"/>
</xs:complexType>
<!-- responseType -->
<xs:complexType name="responseType">
<xs:choice>
<xs:sequence maxOccurs="unbounded" minOccurs="0">
<xs:element name="script" type="scriptType"/>
</xs:sequence>
<xs:element name="error" maxOccurs="1" type="errorType"/>
</xs:choice>
</xs:complexType>
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:all>
<xs:element name="request" type="requestType"/>
</xs:all>
</xs:complexType>
</xs:element>
<!-- out -->
<xs:element name="out">
<xs:complexType>
<xs:all>
<xs:element name="response" type="responseType"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
XML
Пример:
Запрос:
http://192.168.1.21:9999/commands/ivr_blocks_outputs_get
<?xml version="1.0"?>
<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_ivr_blocks_outputs_get.xsd">
<request domain="biysk.local" script_id="062029e4e7ca8ffe"/>
</in>
XML
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ivr_blocks_outputs_get.xsd">
<response>
<script id="062029e4e7ca8ffe" name="dial_to_cc">
<block name="begin_1" output="true"/>
<block name="queue-cc_2" output="Full"/>
<block name="queue-cc_2" output="Error"/>
<block name="queue-cc_2" output="Ok"/>
</script>
</response>
</out>
XML