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

Команда просмотра кастомных свойств пользователя.

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

POST

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

http://host:port/<DOMAIN>/service/cc/arm/read_user_data

Коды ответов:

200 — Ошибки передаются в теле ответа

Ошибки, передаваемые в теле ответа:

  • cannot_perform_cmd

XSD-схема XML-запроса/ответа:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

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

    <xs:complexType name="ReadUserData">
        <xs:attribute name="agent_id" use="required"/>
        <xs:attribute name="application_id" use="required"/>
    </xs:complexType>

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:all>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="read_user_data" type="ReadUserData"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:all>
        </xs:complexType>
    </xs:element>
    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:choice>
                <xs:element name="response">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="user_data">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"  />
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="error" type="errorType"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
</xs:schema>

Пример использует технологию websocket

Пример:
Запрос:

0100000001780049read_user_data
[
  {
    "_name": "in",
    "_content": [
      {
        "_name": "request",
        "_content": [
          {
            "_name": "read_user_data",
            "_attributes": {
              "application_id": "hodor"
            }
          }
        ]
      }
    ]
  }
]

Код ответа:

200

Ответ:

0100000007290049200
[
  {
    "_name": "out",
    "_attributes": {
      "xmlns:xs": "http://www.w3.org/2001/XMLSchema-instance",
      "xs:noNamespaceSchemaLocation": "read_user_data.xsd"
    },
    "_content": [
      {
        "_name": "response",
        "_content": [
          {
            "_name": "user_data",
            "_content": [
              {
                "_name": "user_data",
                "_attributes": {
                  "user_data": "{\"myReports\":[{\"id\":\"1607932267415\",\"name\":\"new_test\",\"plotDef\":[{\"id\":58019194,\"chartType\":\"line\",\"visible\":true,\"name\":\"................ ............\",\"queueIds\":[],\"queueMetricIds\":[],\"operatorIds\":[\"102\"],\"operatorMetricIds\":[\"incomingCallsCount\"]}],\"dateFrom\":\"2020-12-07T00:00:00.000+07:00\",\"dateTo\":\"2020-12-14T23:59:59.000+07:00\",\"dynamicDate\":\"week\",\"intervalType\":\"auto\"}]}"
                }
              }
            ]
          }
        ]
      }
    ]
  }
]




  • Нет меток

0 Комментариев

Вы не можете зарегистрироваться в системе. Любые изменения, которые Вы сделаете, будут помечены как сделанные анонимно. Вы можете Войти, если у Вас есть учётная запись.