Команда возвращает список последних ошибок  узла (количество по умолчанию: 50).

Метод http запроса

POST

Шаблон http запроса

http://host:port/commands/node_last_errors

Код http ответа

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

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

<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="nodeType">
        <xs:attribute  name="name" type="xs:string" use="required"/>
        <xs:attribute name="count" type="xs:integer" use="optional" default="50"/>
    </xs:complexType>

    <xs:complexType name="logType">
        <xs:attribute name="id" type="xs:string" use="required"/>
        <xs:attribute name="time" type="xs:string" use="required"/>
        <xs:attribute name="module" type="xs:string" use="required"/>
        <xs:attribute name="line" type="xs:string" use="required"/>
        <xs:attribute name="msg" type="xs:string" use="required"/>
    </xs:complexType>

    <xs:element name="in">
        <xs:complexType>
            <xs:all>
                <xs:element name="node" type="nodeType" minOccurs="1" maxOccurs="1"/>
            </xs:all>
        </xs:complexType>
    </xs:element>

    <xs:element name="out">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="log"  type="logType" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
CODE

Пример 1:

Вывод всех ошибок на core1@ecss1

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

<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_node_last_errors.xsd">
    <node name="core1@ecss1" />
</in>
CODE

Ответ: 200;

<?xml version="1.0"?>
<out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_node_last_errors.xsd">
    <log id="0" module="oct_ss_versioner" line="54" 
         msg="Supplementary service zone_page release 12 version, but installed 10 version." 
         time="07.04.2020 15:54:24"/>
    <log id="1" module="oct_ss_versioner" line="54" 
         msg="Supplementary service voicemail release 14 version, but installed 13 version." 
         time="07.04.2020 15:54:24"/>
    <log id="2" module="oct_ss_versioner" line="54" 
         msg="Supplementary service auto_redial release 3 version, but installed 2 version." 
         time="07.04.2020 15:54:24"/>
    <log id="3" module="oct_ss_versioner" line="54" 
         msg="Supplementary service blf release 4 version, but installed 3 version." time="07.04.2020 15:54:24"/>
    <log id="4" module="oct_ss_versioner" line="54" 
         msg="Supplementary service presence release 3 version, but installed 2 version." time="07.04.2020 15:54:24"/>
    <log id="5" module="oct_ss_versioner" line="54" 
         msg="Supplementary service message release 3 version, but installed 2 version." time="07.04.2020 15:54:24"/>
    <log id="6" module="oct_ss_versioner" line="54" 
         msg="Supplementary service voice_page release 10 version, but installed 9 version." 
         time="07.04.2020 15:54:24"/>
    <log id="7" module="oct_ss_versioner" line="54" 
         msg="Supplementary service cf_aon release 10 version, but installed 9 version." time="07.04.2020 15:54:24"/>
    <log id="8" module="oct_ss_versioner" line="54" 
         msg="Supplementary service direct_call release 3 version, but installed 2 version." 
         time="07.04.2020 15:54:24"/>
    <log id="9" module="oct_ss_versioner" line="54" 
         msg="Supplementary service conference release 10 version, but installed 9 version." 
         time="07.04.2020 15:54:24"/>
    <log id="10" module="oct_ss_versioner" line="54" 
         msg="Supplementary service cft release 15 version, but installed 14 version." time="07.04.2020 15:54:24"/>
    <log id="11" module="oct_ss_versioner" line="54" 
         msg="Supplementary service chunt release 8 version, but installed 7 version." time="07.04.2020 15:54:24"/>
    <log id="12" module="oct_ss_versioner" line="54" 
         msg="Supplementary service cfnr_type2 release 12 version, but installed 11 version." 
         time="07.04.2020 15:54:24"/>
    <log id="13" module="oct_ss_versioner" line="54" 
         msg="Supplementary service cfnr release 12 version, but installed 11 version." time="07.04.2020 15:54:24"/>
    <log id="14" module="oct_ss_versioner" line="54" 
         msg="Supplementary service alarm release 9 version, but installed 8 version." time="07.04.2020 15:54:24"/>
    <log id="15" module="oct_ss_versioner" line="54" 
         msg="Supplementary service auto_redial_with_callback release 7 version, but installed 6 version." 
         time="07.04.2020 15:54:24"/>
    <log id="16" module="oct_ss_versioner" line="54" 
         msg="Supplementary service callback release 6 version, but installed 5 version." time="07.04.2020 15:54:24"/>
    <log id="17" module="oct_ss_versioner" line="54" 
         msg="Supplementary service follow_me_no_response release 9 version, but installed 8 version." 
         time="07.04.2020 15:54:25"/>
    <log id="18" module="oct_ss_versioner" line="54" 
         msg="Supplementary service find_me_no_response release 7 version, but installed 6 version." 
         time="07.04.2020 15:54:25"/>
    <log id="19" module="oct_ss_versioner" line="54" 
         msg="Supplementary service tsmn_request release 4 version, but installed 3 version." 
         time="07.04.2020 15:54:25"/>
</out>
CODE

Пример 2:

Вывод последней ошибки на core1@ecss1

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

<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_node_last_errors.xsd">
    <node name="core1@ecss1" count="1"/>
</in>
CODE


Ответ 200;

<?xml version="1.0"?>
<out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_node_last_errors.xsd">
    <log id="19" module="oct_ss_versioner" line="54" msg="Supplementary service tsmn_request release 4 version, but installed 3 version." time="07.04.2020 15:54:25"/>
</out>
CODE