Hс_agent_clean

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

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

/domain/<DOMAIN>/cc/agent/clean

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

POST

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

http://host:port/commands/agent_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:include schemaLocation="error.xsd"/>

  <!--Property name-->
  <xs:complexType name="propertyNameType">
    <xs:attribute name="name" type="xs:string" use="required"/>
  </xs:complexType>
 <!--warningReasonType-->
  <xs:simpleType name="warningReasonType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="not_exists"/>
    </xs:restriction>
  </xs:simpleType>
  <!--warningsType-->
  <xs:complexType name="warningsType">
    <xs:sequence>
      <xs:element name="warning" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:attribute name="agent" type="xs:string"/>
          <xs:attribute name="reason" type="warningReasonType"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <!--propertyType-->
  <xs:complexType name="propertyType">
    <xs:attribute name="name" type="xs:string" use="required"/>
  </xs:complexType>
  <!--cleanAgentType-->
  <xs:complexType name="cleanAgentType">
    <xs:sequence>
      <xs:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required"/>
  </xs:complexType>
  <!--agentsType-->
  <xs:complexType name="agentsType">
    <xs:sequence>
      <xs:element name="agent" type="cleanAgentType" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  <!--in-->
  <xs:element name="in">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="request">
          <xs:complexType>
            <xs:sequence>
              <!--request body-->
              <xs:element name="agents" type="agentsType"/>
              <!--end-->
            </xs:sequence>
            <!--request attributes-->
            <xs:attribute name="domain" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <!--out-->
  <xs:element name="out">
    <xs:complexType>
      <xs:choice>
        <xs:element name="response">
          <xs:complexType>
            <xs:choice>
              <!--all ok-->
              <xs:element name="ok"/>
              <!--not very bad. command works fine but some agents not exists-->
              <xs:element name="warnings" type="warningsType"/>
            </xs:choice>
          </xs:complexType>
        </xs:element>
        <!--bad. command failed:-->
        <xs:element name="error" type="errorType"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>
XML

Пример 1

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

<?xml version="1.0" encoding="UTF-8"?>
<in>
  <request domain="biysk.local">
    <agents>
      <agent name="516">
        <property name="description"/>
        <property name="custom\key\unicode2"/>
      </agent>
      <agent name="515"/>
    </agents>
  </request>
</in>
XML

Ответ 200:

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

Пример 2

Ответ 200 на предыдущий запрос если часть агентов не существует:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_agent_clean.xsd">
    <response>
        <warnings>
            <warning agent="555" reason="not_exists"/>
        </warnings>
    </response>
</out>
XML

Пример 3

Ответ 434 на тот же самый запрос, если нет такого домена:

<?xml version="1.0" encoding="UTF-8"?>
<out
	xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_agent_clean.xsd">
	<error cmd="agent_clean" reason="nocommand" body="Command not found by path /domain/d.test/cc/agent/clean"/>
</out>
XML

Hс_agent_declare

Команда позволяет создать агентов виртуального call-центра.

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

domain/<DOMAIN>/cc/agent/declare

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

POST

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

http://host:port/commands/agent_declare

Код 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="hc_agent_common.xsd"/>
  <xs:include schemaLocation="error.xsd"/>
  <!--agentsType-->
  <xs:complexType name="agentsType">
    <xs:sequence>
      <xs:element name="agent" type="agentConfigurationType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  <!--warningReasonType-->
  <xs:simpleType name="warningReasonType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="already_declared"/>
    </xs:restriction>
  </xs:simpleType>
  <!--warningsType-->
  <xs:complexType name="warningsType">
    <xs:sequence>
      <xs:element name="warning" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:attribute name="agent" type="xs:string"/>
          <xs:attribute name="reason" type="warningReasonType"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <!--in-->
  <xs:element name = "in">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="request">
          <xs:complexType>
            <xs:sequence>
              <!--request body-->
              <xs:element name="agents" type="agentsType"/>
            </xs:sequence>
            <xs:attribute name="domain" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <!--out-->
  <xs:element name = "out">
    <xs:complexType>
      <xs:choice>
        <xs:element name="response">
          <xs:complexType>
            <xs:choice>
              <!--all agents was declared-->
              <xs:element name="ok"/>
              <!--not very bad. command works fine but some agents are already declared-->
              <xs:element name="warnings" type="warningsType"/>
            </xs:choice>
          </xs:complexType>
        </xs:element>
        <!--bad. command failed:-->
        <xs:element name="error" type="errorType"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>

XML

XSD-схема hc_agent_common.xsd:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">

  <xs:include schemaLocation="common_types.xsd"/>

  <!--autoCompleteTimeoutType-->
  <xs:simpleType name="autoCompleteTimeoutType">
    <xs:restriction base="xs:nonNegativeInteger">
      <xs:minInclusive value="0"/>
        <xs:maxInclusive value="3600"/>
    </xs:restriction>
  </xs:simpleType>

  <!--autoLogoutTimeoutType-->
  <xs:simpleType name="autoLogoutTimeoutType">
    <xs:restriction base="xs:nonNegativeInteger">
      <xs:minInclusive value="5"/>
        <xs:maxInclusive value="720"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="workingTimeoutType">
      <xs:restriction base="xs:nonNegativeInteger">
          <xs:minInclusive value="1"/>
          <xs:maxInclusive value="1440"/>
      </xs:restriction>
  </xs:simpleType>

    <!--Skills-->
  <xs:complexType name="skillType">
    <xs:attribute name="type" type="xs:string" use="required"/>
    <xs:attribute name="subtype" type="xs:string" use="optional"/>
    <xs:attribute name="level" type="xs:integer" use="required"/>
  </xs:complexType>
  <xs:complexType name="skillsType">
      <xs:sequence>
      <xs:element name="skill" type="skillType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  <!--Custom properties-->
  <xs:complexType name="customPropertyType">
    <xs:attribute name="name" type="xs:string"/>
    <xs:attribute name="value" type="xs:string"/>
  </xs:complexType>
  <xs:complexType name="customPropertiesType">
    <xs:sequence>
      <xs:element name="property" type="customPropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  <!--Agent configuration-->
  <xs:complexType name="agentConfigurationType">
      <xs:all>
          <xs:element name="skills" type="skillsType" minOccurs="0"/>
          <xs:element name="properties" type="customPropertiesType" minOccurs="0"/>
      </xs:all>
      <xs:attribute name="id" type="xs:string" use="required"/>
      <xs:attribute name="password" type="xs:string" use="optional"/>
      <xs:attribute name="group" type="xs:string" use="optional"/>
      <xs:attribute name="description" type="xs:string" use="optional"/>
      <xs:attribute name="display_name" type="xs:string" use="optional"/>
      <xs:attribute name="supervisor" type="xs:boolean" use="optional"/>
      <xs:attribute name="auto_complete" type="xs:boolean" use="optional"/>
      <xs:attribute name="auto_complete_timeout" type="autoCompleteTimeoutType" use="optional"/>
      <xs:attribute name="call_recording" type="xs:boolean" use="optional"/>
      <xs:attribute name="pickup" type="xs:boolean" use="optional"/>
      <xs:attribute name="load" type="xs:positiveInteger" use="optional"/>
      <xs:attribute name="working_timeout" type="workingTimeoutType" use="optional"/>
      <xs:attribute name="auto_logout_timeout" type="autoLogoutTimeoutType" use="optional"/>
  </xs:complexType>
  <!--Agent-->
  <xs:complexType name="agentType">
    <xs:attribute name="name" type="xs:string" use="required"/>
  </xs:complexType>
</xs:schema>

XML

Пример 1

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

<?xml version="1.0" encoding="UTF-8"?>
<in>
  <request domain="biysk.local">
    <agents>
        <agent id="ag010" password="1111" group="group1" auto_complete="false" load="1" description="" supervisor="true" display_name="Фёдор" call_recording="true">
            <skills>
                <skill type="language" subtype="english" level="14234"/>
                <skill type="fire" level="2"/>
            </skills>
            <properties>
                <property name="custom\key\term" value="{value}"/>
                <property name="custom\key\unicode" value="&quot;Значение1&quot;"/>
            </properties>
        </agent>
        <agent id="ag020" password="1234" group="group2" auto_complete="false" load="1" description="" supervisor="true" display_name="Vasya" call_recording="true">
            <skills>
                <skill type="language" subtype="russian" level="2"/>
                <skill type="fire" level="21"/>
            </skills>
        </agent>
    </agents>
  </request>
</in>
XML

Ответ 200:

<?xml version="1.0" encoding="UTF-8"?>
<out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_agent_declare.xsd">
   <response>
      <ok />
   </response>
</out>
XML

Пример 2

Ответ на предыдущий запрос если некоторые агенты уже существуют:

<?xml version="1.0" encoding="UTF-8"?>
<out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_agent_declare.xsd">
   <response>
      <warnings>
         <warning agent="ag010" reason="already_declared" />
         <warning agent="ag020" reason="already_declared" />
      </warnings>
   </response>
</out>
XML

Пример 3

Ответ 434 на предыдущий запрос, если нет такого домена:

<?xml version="1.0" encoding="UTF-8"?>
<out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_agent_declare.xsd">
   <error cmd="agent_declare" reason="nocommand" body="Command not found by path /domain/d.test/cc/agent/declare" />
</out>
XML

Hс_agent_info

Команда позволяет вывести информацию об агентах виртуального call-центра в режиме реального времени.

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

domain/<DOMAIN>/cc/agent/info

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

POST

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

http://host:port/commands/agent_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:include schemaLocation="hc_agent_common.xsd"/>
  <xs:include schemaLocation="error.xsd"/>
  <!--agentsType-->
  <xs:complexType name="agentsType">
    <xs:sequence>
      <xs:element name="agent" type="agentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  <!--in-->
  <xs:element name = "in">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="request">
          <xs:complexType>
            <xs:sequence>
              <!--request body-->
              <xs:element name="agents" type="agentsType"/>
              <!--end-->
            </xs:sequence>
            <xs:attribute name="domain" type="xs:string" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <!--out-->
  <xs:element name = "out">
    <xs:complexType>
      <xs:choice>
        <xs:element name="response">
          <xs:complexType>
            <xs:all>
              <!-- response body -->
              <xs:element name="agents" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="agent" type="agentConfigurationType" minOccurs="0" maxOccurs="unbounded"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="warnings" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="warning" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:attribute name="agent" type="xs:string"/>
                        <xs:attribute name="reason" type="xs:string"/>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <!-- response end -->
            </xs:all>
          </xs:complexType>
        </xs:element>
        <!--Or error-->
        <xs:element name="error" type="errorType"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>
XML

Пример

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

<?xml version="1.0" encoding="utf-8"?>
<in>
    <request domain="biysk.local">
        <agents>
            <agent name="500"/>
            <agent name="502"/>
            <agent name="514"/>
            <agent name="517"/>
        </agents>
    </request>
</in>
XML

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_agent_info.xsd">
    <response>
        <agents>
            <agent id="500" password="500500" group="ltp1" auto_complete="true" load="1" description="" supervisor="true" display_name="" call_recording="false" pickup="false" auto_complete_timeout="5" working_timeout="120">
                <properties>
                    <property name="occupied_phone_number" value=""240101""/>
                </properties>
            </agent>
            <agent id="502" password="500500" group="ltp1" auto_complete="true" load="1" description="" supervisor="false" display_name="" call_recording="false" pickup="false" auto_complete_timeout="5" working_timeout="120"/>
            <agent id="514" password="500500" group="ltp2" auto_complete="true" load="1" description="" supervisor="false" display_name="" call_recording="false" pickup="false" auto_complete_timeout="5" working_timeout="120"/>
            <agent id="517" password="500500" group="ltp2" auto_complete="true" load="1" description="" supervisor="false" display_name="" call_recording="false" pickup="false" auto_complete_timeout="5" working_timeout="120"/>
        </agents>
    </response>
</out>
XML

Hс_agent_list

Команда позволяет вывести список агентов виртуального call-центра.

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

domain/<DOMAIN>/cc/agent/list

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

POST

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

http://host:port/commands/agent_list

Код 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="hc_agent_common.xsd"/>

  <!--agentsType-->
  <xs:complexType name="agentsType">
    <xs:sequence>
      <xs:element name="agent" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:attribute name="id" type="xs:nonNegativeInteger" use="required"/>
          <xs:attribute name="group" type="xs:string" use="optional"/>
          <xs:attribute name="display_name" type="xs:string" use="optional"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:element name = "in">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="request">
          <xs:complexType>
            <xs:attribute name="domain" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name = "out">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="response">
          <xs:complexType>
            <xs:sequence>
              <xs:element name = "agents" type="agentsType"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
XML

Пример

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

<?xml version="1.0" encoding="UTF-8"?>
<in>
  <request domain="biysk.local"/>
</in>
XML

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_agent_list.xsd">
    <response>
        <agents>
            <agent id="504" display_name="" group="ltp1"/>
            <agent id="509" display_name="" group="ltp1"/>
            <agent id="502" display_name="" group="ltp1"/>
            <agent id="506" display_name="" group="ltp1"/>
            <agent id="518" display_name="" group="ltp2"/>
            <agent id="523" display_name="" group="ltp3"/>
            <agent id="501" display_name="" group="ltp1"/>
            <agent id="508" display_name="" group="ltp1"/>
            <agent id="521" display_name="" group="ltp3"/>
            <agent id="510" display_name="" group="ltp2"/>
            <agent id="516" display_name="" group="ltp2"/>
            <agent id="527" display_name="" group="ltp3"/>
            <agent id="514" display_name="" group="ltp2"/>
            <agent id="525" display_name="" group="ltp3"/>
            <agent id="520" display_name="" group="ltp3"/>
            <agent id="513" display_name="" group="ltp2"/>
            <agent id="507" display_name="" group="ltp1"/>
            <agent id="512" display_name="" group="ltp2"/>
            <agent id="517" display_name="" group="ltp2"/>
            <agent id="529" display_name="" group="ltp3"/>
            <agent id="515" display_name="" group="ltp2"/>
            <agent id="528" display_name="" group="ltp3"/>
            <agent id="519" display_name="" group="ltp2"/>
            <agent id="505" display_name="" group="ltp1"/>
            <agent id="526" display_name="" group="ltp3"/>
            <agent id="503" display_name="" group="ltp1"/>
            <agent id="500" display_name="" group="ltp1"/>
            <agent id="511" display_name="" group="ltp2"/>
            <agent id="524" display_name="" group="ltp3"/>
            <agent id="522" display_name="" group="ltp3"/>
        </agents>
    </response>
</out>
XML

Hс_agent_remove

Команда позволяет удалить указанных агентов виртуального call-центра.

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

domain/<DOMAIN>/cc/agent/remove

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

POST

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

http://host:port/commands/agent_remove

Код 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="hc_agent_common.xsd"/>

  <xs:element name = "in">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="request">
          <xs:complexType>
            <xs:sequence>
              <!--request body-->
              <xs:element name="agents">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="agent" type="agentType" maxOccurs="unbounded"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <!--end-->
            </xs:sequence>
            <xs:attribute name="domain" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name = "out">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="response">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ok"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
XML

Пример

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

<?xml version="1.0" encoding="UTF-8"?>
<in>
  <request domain="biysk.local">
    <agents>
      <agent name="519"/>
      <agent name="520"/>
    </agents>
  </request>
</in>
XML

Ответ:

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

Hс_agent_set

Команда позволяет изменить свойства определенных агентов виртуального call-центра.

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

domain/<DOMAIN>/cc/agent/set

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

POST

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

http://host:port/commands/agent_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:include schemaLocation="hc_agent_common.xsd"/>
  <xs:include schemaLocation="error.xsd"/>
  <!--agentsType-->
  <xs:complexType name="agentsType">
    <xs:sequence>
      <xs:element name="agent" type="agentConfigurationType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  <!--requestType-->
  <xs:complexType name="requestType">
    <xs:sequence>
      <!--request body-->
      <xs:element name="agents" type="agentsType"/>
    </xs:sequence>
    <xs:attribute name="domain" use="required"/>
  </xs:complexType>
  <!--responseType-->
  <xs:complexType name="responseType">
    <xs:choice>
      <!--all ok-->
      <xs:element name="ok"/>
      <!--not very bad. command works fine but some agents not exists-->
      <xs:element name="warnings" type="warningsType"/>
    </xs:choice>
  </xs:complexType>
  <!--warningReasonType-->
  <xs:simpleType name="warningReasonType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="not_exists"/>
      <xs:enumeration value="badarg"/>
      <xs:enumeration value="unknown_error"/>
    </xs:restriction>
  </xs:simpleType>
  <!--warningsType-->
  <xs:complexType name="warningsType">
    <xs:sequence>
      <xs:element name="warning" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:attribute name="agent" type="xs:string" use="required"/><?xml version="1.0"?>
<out
	xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_agent_list.xsd">
	<response>
		<agents>
			<agent id="504" display_name="" group="ltp1"/>
			<agent id="509" display_name="" group="ltp1"/>
			<agent id="502" display_name="" group="ltp1"/>
			<agent id="506" display_name="" group="ltp1"/>
			<agent id="518" display_name="" group="ltp2"/>
			<agent id="523" display_name="" group="ltp3"/>
			<agent id="501" display_name="" group="ltp1"/>
			<agent id="508" display_name="" group="ltp1"/>
			<agent id="510" display_name="" group="ltp2"/>
			<agent id="521" display_name="" group="ltp3"/>
			<agent id="516" display_name="" group="ltp2"/>
			<agent id="514" display_name="" group="ltp2"/>
			<agent id="527" display_name="" group="ltp3"/>
			<agent id="525" display_name="" group="ltp3"/>
			<agent id="ag020" display_name="Vasya" group="group2"/>
			<agent id="520" display_name="" group="ltp3"/>
			<agent id="513" display_name="" group="ltp2"/>
			<agent id="507" display_name="" group="ltp1"/>
			<agent id="517" display_name="" group="ltp2"/>
			<agent id="512" display_name="" group="ltp2"/>
			<agent id="529" display_name="" group="ltp3"/>
			<agent id="515" display_name="" group="ltp2"/>
			<agent id="528" display_name="" group="ltp3"/>
			<agent id="519" display_name="" group="ltp2"/>
			<agent id="505" display_name="" group="ltp1"/>
			<agent id="ag010" display_name="Фёдор" group="group1"/>
			<agent id="526" display_name="" group="ltp3"/>
			<agent id="500" display_name="" group="ltp1"/>
			<agent id="503" display_name="" group="ltp1"/>
			<agent id="511" display_name="" group="ltp2"/>
			<agent id="524" display_name="" group="ltp3"/>
			<agent id="522" display_name="" group="ltp3"/>
		</agents>
	</response>
</out>
          <xs:attribute name="reason" type="warningReasonType" use="required"/>
          <xs:attribute name="body" type="xs:string" use="optional"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <!--in-->
  <xs:element name="in">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="request" type="requestType"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <!--out-->
  <xs:element name="out">
    <xs:complexType>
      <xs:choice>
        <xs:element name="response" type="responseType"/>
        <!--bad. command failed:-->
        <xs:element name="error" type="errorType"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>
XML

Пример:

Запрос:

http://192.168.1.21:9999/commands/agent_set

<?xml version="1.0" encoding="UTF-8"?>
<in>
    <request domain="biysk.local">
        <agents>
            <agent id="515" password="4321" group="group2" auto_complete="true" load="2" description="New description" supervisor="false" display_name="Фёдор I" call_recording="false">
                <skills>
                    <skill type="language" subtype="english" level="1"/>
                </skills>
                <properties>
                    <property name="custom\key\term" value="{value, 1}"/>
                    <property name="custom\key\unicode2" value="&quot;Значение 2&quot;"/>
                </properties>
            </agent>
            <agent id="516" password="1122"/>
        </agents>
    </request>
</in>
XML

Ответ: 200

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