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

Hc_ivr_undeclared_variables_get

Команда предназначена для просмотра списка переменных IVR-скрипта.

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

domain/<DOMAIN>/ivr/script/get_variables

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

POST

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

http://server:9999/commands/ivr_undeclared_variables_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"/>
    <!-- variableType -->
    <xs:complexType name="variableType">
        <xs:attribute name="name" type="xs:string" use="required"/>
    </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">
                <xs:element name="variable" type="variableType"/>
            </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>

Примеры:

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

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

Ответ, если переменных нет:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ivr_undeclared_variables_get.xsd">
    <response/>
</out>

Ответ:

<?xml version="1.0"?>
<out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_ivr_undeclared_variables_get.xsd">
    <response>
        <variable name="Variable1"/>
        <variable name="Variable2"/>
    </response>
</out>
  • Нет меток