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

Hc_modificators_context_delete

Команда предназначена для удаления контекста модификации номеров по имени из определенного домена.

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

cluster/storage/<STORAGE>/modificators/delete

domain/<DOMAIN>/modificators/delete

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

POST

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

http://host:port/commands/modificators_context_delete

Код 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"/>
    <!-- in-->
    <xs:element name="in">
        <xs:complexType>
            <xs:all>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:attribute name="domain" type="xs:string" use="required"/>
                        <xs:attribute name="context" type="xs:string" use="required"/>
                    </xs:complexType>
                </xs:element>
            </xs:all>
        </xs:complexType>
    </xs:element>
    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:all>
                <xs:element name="error" type="errorType"/>
            </xs:all>
        </xs:complexType>
    </xs:element>
</xs:schema>

Пример 1:

Удаление существующего контекста

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

<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="hc_modificators_context_delete.xsd">
        <request domain="biysk.local" context="mod_1"/>
</in>

Ответ:

204

Пример 2:

Удаление несуществующего конекста

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

<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="hc_modificators_context_delete.xsd">
        <request domain="biysk.local" context="mod2"/>
</in>
<?xml version="1.0" encoding="UTF-8"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_modificators_context_delete.xsd">
    <error cmd="modificators_context_delete" reason="not_exists" body="not_found" entity="mod2"/>
</out>

Ответ:

404

Hc_modificators_context_import

Команда предназначена для импорта контекста модификации номеров в определенный домен. Если контекст в указанным именем уже существует - контекст будет обновлен.

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

cluster/storage/<STORAGE>/modificators/import

domain/<DOMAIN>/modificators/import

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

POST

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

http://host:port/commands/modificators_context_import

Код 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" />
    <xs:complexType name="valueType">
        <xs:attribute name="value" type="xs:string" use="required"/>
    </xs:complexType>
    <!-- progressType -->
    <xs:complexType name="progressType">
        <xs:sequence>
            <xs:element name="ref" minOccurs="1" maxOccurs="1" type="valueType" />
            <xs:element name="text" minOccurs="1" maxOccurs="1" type="valueType" />
        </xs:sequence>
    </xs:complexType>
    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="context" type="xs:base64Binary" />
                        </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:sequence>
                <xs:element name="error" type="errorType" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <!-- progress -->
    <xs:element name="progress" type="progressType"/>
</xs:schema>

Пример 1:

Импорт валидного контекста

Запрос:
http://192.168.23.34:9999/commands/modificators_context_import

<in>
  <request domain="p.city">

<context>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCiAgPG1vZGlmaWNhdG9ycyB4bWxuczp4cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdG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iAgICAgICAgICA8Y2RwbiBkaWdpdHM9IiUiIG5pPSJwcml2YXRlIi8+DQogICAgICAgIDwvY29uZGl0aW9ucz4NCiAgICAgICAgPGFjdGlvbnM+DQogICAgICAgICAgPGNncG4gZGlnaXRzPSI4ODAwezIsMyw0fSIvPg0KICAgICAgICAgIDxjZHBuIGRpZ2l0cz0iODgwMHslfSIvPg0KICAgICAgICAgIDxvY2RwbiBkaWdpdHM9IjEyMyIvPg0KICAgICAgICA8L2FjdGlvbnM+DQogICAgICAgIDxyZXN1bHQ+DQogICAgICAgICAgPGZpbmlzaC8+DQogICAgICAgIDwvcmVzdWx0Pg0KICAgICAgPC9ydWxlPg0KICAgICAgPHJ1bGUgbmFtZT0ibG9jYWxfY2FsbHMiPg0KICAgICAgICA8Y29uZGl0aW9ucz4NCiAgICAgICAgICA8Y2dwbiBkaWdpdHM9IiUiLz4NCiAgICAgICAgICA8Y2RwbiBkaWdpdHM9IiUiLz4NCiAgICAgICAgPC9jb25kaXRpb25zPg0KICAgICAgICA8cmVzdWx0Pg0KICAgICAgICAgIDxmaW5pc2gvPg0KICAgICAgICA8L3Jlc3VsdD4NCiAgICAgIDwvcnVsZT4NCiAgICA8L291dD4NCiAgPC9tb2RpZmljYXRvcnM+</context>
    </request>
  </in>

Ответ:

201

Пример 2:

Запрос невалидного контекста

Запрос:
http://192.168.23.34:9999/commands/modificators_context_import

<in>
  <request domain="p.city">
<context>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCiAgPG1vZGlmaWNhdG9ycyB4bWxuczp4cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzOm5vTmFtZXNwYWNlU2NoZW1hTG9jYXRpb249ImVjc3NfbW9kaWZpY2F0b3JzLnhzZCIgbmFtZT0iaXZyX21vZGlmaWNhdG9ycyI+DQogICAgPGluPg0KICAgICAgPHJ1bGUgbmFtZT0ibG9jYWxfY2FsbHNf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0iLz4NCiAgICAgICAgICA8Y2RwbiBkaWdpdHM9Ijg4MDB7JX0iLz4NCiAgICAgICAgICA8b2NkcG4gZGlnaXRzPSIxMjMiLz4NCiAgICAgICAgPC9hY3Rpb25zPg0KICAgICAgICA8cmVzdWx0Pg0KICAgICAgICAgIDxmaW5pc2gvPg0KICAgICAgICA8L3Jlc3VsdD4NCiAgICAgIDwvcnVsZT4NCiAgICAgIDxydWxlIG5hbWU9ImxvY2FsX2NhbGxzIj4NCiAgICAgICAgPGNvbmRpdGlvbnM+DQogICAgICAgICAgPGNncG4gZGlnaXRzPSIlIi8+DQogICAgICAgICAgPGNkcG4gZGlnaXRzPSIlIi8+DQogICAgICAgIDwvY29uZGl0aW9ucz4NCiAgICAgICAgPHJlc3VsdD4NCiAgICAgICAgICA8ZmluaXNoLz4NCiAgICAgICAgPC9yZXN1bHQ+DQogICAgICA8L3J1bGU+DQogICAgPC9vdXQ+DQogIDwvbW9kaWZpY2F0b3JzPg==</context>
  </request>
</in>
<?xml version="1.0" encoding="UTF-8"?>
<out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_modificators_context_import.xsd">
    <error cmd="modificators_context_import" reason="context_validation_error" body="modificators context: ivr_modificators rule: local_calls_by_9xxx_new action: cdpn digits: &quot;{BCDE}&quot; Error: unknown variable &quot;E&quot;" entity="modificators context: ivr_modificators rule: local_calls_by_9xxx_new action: cdpn digits: &quot;{BCDE}&quot; Error: unknown variable &quot;E&quot;"/>
</out>

Ответ:

404

Hc_modificators_context_list

Команда предназначена для просмотра списка контекстов модификации номеров в определенном домене.

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

cluster/storage/<STORAGE>/modificators/list

domain/<DOMAIN>/modificators/list

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

POST

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

http://host:port/commands/modificators_context_list

Код HTTP-ответа:

  • 200 – в случае успеха;
  • 404 – в случае ошибки.

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

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <!-- contextType-->
    <xs:complexType name="contextType">
        <xs:attribute name="name" type="xs:string" use="required"/>
    </xs:complexType>
    <!-- in-->
    <xs:element name="in">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="request">
                    <xs:complexType>
                        <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:all>
                <xs:element name="contexts">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="context" type="contextType" minOccurs="0" maxOccurs="unbounded"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:all>
        </xs:complexType>
    </xs:element>
</xs:schema>

Пример:

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

<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="hc_modificators_context_list.xsd">
        <request domain="biysk.local"/>
</in>

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_modificators_context_list.xsd">
    <contexts>
        <context name="mod_smg"/>
        <context name="default_modificators"/>
        <context name="mod_1"/>
    </contexts>
</out>

Hc_modificators_context_show

Команда предназначена для получения контекста модификации номеров по имени из определенного домена.

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

cluster/storage/<STORAGE>/modificators/show

domain/<DOMAIN>/modificators/show

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

POST

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

http://host:port/commands/modificators_context_show

Код 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"/>
    <!-- out-->
    <xs:element name="out">
        <xs:complexType>
            <xs:choice>
                <xs:element name="context" type="xs:base64Binary"/>
                <xs:element name="error" type="errorType"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
    <!-- in-->
    <xs:element name="in">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:attribute name="domain" type="xs:string" use="required"/>
                        <xs:attribute name="context" type="xs:string" use="required"/>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

В поле context в результате в кодировке base64 закодирован контекст модификации (в формате XML). 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="ecss_acp_common.xsd"/>
    <!-- booleanType -->
    <xs:simpleType name="booleanType">
        <xs:restriction base="xs:boolean"/>
    </xs:simpleType>
    <!-- ruleType -->
    <xs:complexType name="ruleType">
        <xs:sequence>
            <xs:element name="conditions" minOccurs="0">
                <xs:complexType>
                    <xs:all>
                        <xs:element name="cgpn" type="cgpnType" minOccurs="0"/>
                        <xs:element name="cdpn" type="cdpnType" minOccurs="0"/>
                        <xs:element name="rgn" type="rgnConditionType" minOccurs="0"/>
                        <xs:element name="ocdpn" type="ocdpnConditionType" minOccurs="0"/>
                        <xs:element name="cn" type="cnConditionType" minOccurs="0"/>
                        <xs:element name="time" type="valueType" minOccurs="0"/>
                        <xs:element name="date" type="valueType" minOccurs="0"/>
                        <xs:element name="weekday" type="valueType" minOccurs="0"/>
                        <xs:element name="tag" type="valueType" minOccurs="0"/>
                    </xs:all>
                </xs:complexType>
            </xs:element>
            <xs:element name="actions" minOccurs="0">
                <xs:complexType>
                    <xs:all>
                        <xs:element name="cgpn" type="cgpnType" minOccurs="0"/>
                        <xs:element name="cdpn" type="cdpnType" minOccurs="0"/>
                        <xs:element name="rgn" type="rgnActionType" minOccurs="0"/>
                        <xs:element name="ocdpn" type="ocdpnActionType" minOccurs="0"/>
                        <xs:element name="cn" type="cnActionType" minOccurs="0"/>
                        <xs:element name="empty_rgn" type="nullType" minOccurs="0">
                            <xs:annotation><xs:documentation xml:lang="en">Remove routing number.</xs:documentation></xs:annotation>
                        </xs:element>
                        <xs:element name="empty_ocdpn" type="nullType" minOccurs="0">
                            <xs:annotation><xs:documentation xml:lang="en">Remove original called number.</xs:documentation></xs:annotation>
                        </xs:element>
                        <xs:element name="empty_cn" type="nullType" minOccurs="0">
                            <xs:annotation><xs:documentation xml:lang="en">Remove connected number.</xs:documentation></xs:annotation>
                        </xs:element>
                    </xs:all>
                </xs:complexType>
            </xs:element>
            <xs:element name="result">
                <xs:complexType>
                    <xs:choice>
                        <xs:element name="finish" type="finishResultType"/>
                        <xs:element name="error" type="errorResultType"/>
                        <xs:element name="continue" type="continueResultType"/>
                    </xs:choice>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="name" type="xs:string" use="required"/>
        <xs:attribute name="description" type="xs:string" use="optional"/>
    </xs:complexType>
    <!-- modificatorsType -->
    <xs:complexType name="modificatorsType">
        <xs:all>
            <xs:element name="in" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="rule" type="ruleType" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="out" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="rule" type="ruleType" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:all>
        <xs:attribute name="name" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation>The name of the current modificators.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="description" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Text description of the current modificators.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <!-- adaptationType -->
    <xs:complexType name="adaptationType">
        <xs:sequence>
            <xs:element name="rule" type="ruleType" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="name" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation>The name of the current adaptation.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="description" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Text description of the current adaptation.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <!-- modificators -->
    <xs:element name="modificators" type="modificatorsType"/>
    <!-- adaptation -->
    <xs:element name="adaptation" type="adaptationType"/>
    <!-- cdpnType -->
    <xs:complexType name="cdpnType">
        <xs:attribute name="digits" type="xs:string"/>
        <xs:attribute name="nai" type="naiType"/>
        <xs:attribute name="incomplete" type="xs:boolean"/>
        <xs:attribute name="inni" type="inniType"/>
        <xs:attribute name="npi" type="npiType"/>
        <xs:attribute name="ni" type="niType"/>
        <xs:attribute name="category" type="categoryType"/>
    </xs:complexType>
    <!-- cgpnType -->
    <xs:complexType name="cgpnType">
        <xs:attribute name="nai" type="naiType"/>
        <xs:attribute name="incomplete" type="xs:boolean"/>
        <xs:attribute name="npi" type="npiType"/>
        <xs:attribute name="apri" type="apriType"/>
        <xs:attribute name="screening" type="screeningType"/>
        <xs:attribute name="digits" type="xs:string"/>
        <xs:attribute name="ni" type="niType"/>
    </xs:complexType>
    <!-- rgnConditionType -->    
    <xs:complexType name="rgnConditionType">
        <xs:attribute name="digits" type="xs:string"/>
        <xs:attribute name="nai" type="naiType"/>
        <xs:attribute name="incomplete" type="xs:boolean"/>
        <xs:attribute name="apri" type="apriType"/>
        <xs:attribute name="npi" type="npiType"/>
        <xs:attribute name="ni" type="niType"/>
        <xs:attribute name="empty" type="booleanType">
            <xs:annotation>
                <xs:documentation>In case of empty attribute set - other attributes MUST NOT be set.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <!-- ocdpnConditionType -->
    <xs:complexType name="ocdpnConditionType">
        <xs:attribute name="digits" type="xs:string"/>
        <xs:attribute name="nai" type="naiType"/>
        <xs:attribute name="ni" type="niType"/>
        <xs:attribute name="npi" type="npiType"/>
        <xs:attribute name="apri" type="apriType"/>
        <xs:attribute name="category" type="categoryType"/>
        <xs:attribute name="incomplete" type="xs:boolean"/>
        <xs:attribute name="empty" type="booleanType">
            <xs:annotation>
                <xs:documentation>In case of empty attribute set - other attributes MUST NOT be set.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <!-- cnConditionType -->
    <xs:complexType name="cnConditionType">
        <xs:attribute name="nai" type="naiType"/>
        <xs:attribute name="npi" type="npiType"/>
        <xs:attribute name="apri" type="apriType"/>
        <xs:attribute name="digits" type="xs:string"/>
        <xs:attribute name="ni" type="niType"/>
        <xs:attribute name="empty" type="booleanType">
            <xs:annotation>
                <xs:documentation>In case of empty attribute set - other attributes MUST NOT be set.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <!-- rgnActionType -->
    <xs:complexType name="rgnActionType">
        <xs:attribute name="digits" type="xs:string"/>
        <xs:attribute name="nai" type="naiType"/>
        <xs:attribute name="incomplete" type="xs:boolean"/>
        <xs:attribute name="apri" type="apriType"/>
        <xs:attribute name="npi" type="npiType"/>
        <xs:attribute name="ni" type="niType"/>
    </xs:complexType>
    <!-- ocdpnActionType -->
    <xs:complexType name="ocdpnActionType">
        <xs:attribute name="digits" type="xs:string"/>
        <xs:attribute name="nai" type="naiType"/>
        <xs:attribute name="ni" type="niType"/>
        <xs:attribute name="npi" type="npiType"/>
        <xs:attribute name="apri" type="apriType"/>
        <xs:attribute name="category" type="categoryType"/>
        <xs:attribute name="incomplete" type="xs:boolean"/>
    </xs:complexType>
    <!-- cnActionType -->
    <xs:complexType name="cnActionType">
        <xs:attribute name="nai" type="naiType"/>
        <xs:attribute name="npi" type="npiType"/>
        <xs:attribute name="apri" type="apriType"/>
        <xs:attribute name="digits" type="xs:string"/>
        <xs:attribute name="ni" type="niType"/>
        <xs:attribute name="empty" type="booleanType">
            <xs:annotation>
                <xs:documentation>In case of empty attribute set - other attributes MUST NOT be set.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <!-- valueType -->
    <xs:complexType name="valueType">
        <xs:attribute name="value" type="xs:string" use="required"/>
    </xs:complexType>
    <!-- nullType -->
    <xs:complexType name="nullType"/>
    <!-- Result types -->
    <!-- finishResultType -->
    <xs:complexType name="finishResultType"/>
    <!-- errorResultType -->
    <xs:complexType name="errorResultType">
        <xs:attribute name="acp_cause" type="xs:string" use="optional"/>
        <xs:attribute name="isup_cause" type="xs:string" use="optional"/>
        <xs:attribute name="description" type="xs:string" use="optional"/>
    </xs:complexType>
    <!-- continueResultTypeType -->
    <xs:simpleType name="continueResultTypeType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="start"/>
            <xs:enumeration value="next"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- continueResultType -->
    <xs:complexType name="continueResultType">
        <xs:attribute name="tag" type="xs:string" use="optional"/>
        <xs:attribute name="type" type="continueResultTypeType" default="start" use="optional"/>
    </xs:complexType>
</xs:schema>

Пример 1:

Запрос существующего контекста

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

<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="hc_modificators_context_show.xsd">
        <request domain="biysk.local" context="default_modificators"/>
</in>
<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_modificators_context_show.xsd">
    <context>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48bW9kaWZpY2F0b3JzIHhtbG5zOnhzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeHM6bm9OYW1lc3BhY2VTY2hlbWFMb2NhdGlvbj0iZWNzc19tb2RpZmljYXRvcnMueHNkIiBuYW1lPSJtb2Rfc21nIj48aW4+PHJ1bGUgbmFtZT0ibW9kX2luX2NhbGxzIj48Y29uZGl0aW9ucy8+PGFjdGlvbnMvPjxyZXN1bHQ+PGZpbmlzaC8+PC9yZXN1bHQ+PC9ydWxlPjxydWxlIG5hbWU9Im90aGVyX2luX2NhbGxzIj48Y29uZGl0aW9ucy8+PGFjdGlvbnMvPjxyZXN1bHQ+PGZpbmlzaC8+PC9yZXN1bHQ+PC9ydWxlPjwvaW4+PG91dD48cnVsZSBuYW1lPSJzbWdfb3V0Ij48Y29uZGl0aW9ucy8+PGFjdGlvbnMvPjxyZXN1bHQ+PGZpbmlzaC8+PC9yZXN1bHQ+PC9ydWxlPjxydWxlIG5hbWU9Im90aGVyX291dF9jYWxscyI+PGNvbmRpdGlvbnMvPjxhY3Rpb25zLz48cmVzdWx0PjxmaW5pc2gvPjwvcmVzdWx0PjwvcnVsZT48L291dD48L21vZGlmaWNhdG9ycz4=</context>
</out>

Ответ:

204

Пример 2:

Запрос несуществующего контекста

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

<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="hc_modificators_context_show.xsd">
        <request domain="biysk.local" context="ctx1"/>
</in>
<?xml version="1.0" encoding="UTF-8"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_modificators_context_show.xsd">
    <error cmd="modificators_context_show" reason="context_not_found" body="{error,{ctx_not_found,{&quot;biysk.local&quot;,ctx1}}}" entity="ctx1"/>
</out>

Ответ:

404

  • Нет меток