Hc_restfs_list_clusters

Команда предназначена для получения списка файлов, хранящихся на файловой системе RestFS.

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

restfs/<RESTFS-CLUSTERNAME>/list

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

POST

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

http://host:port/commands/restfs_list_clusters

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

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

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

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

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

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="request" minOccurs="1" maxOccurs="1">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="cluster" minOccurs="1" maxOccurs="unbounded">
                                <xs:complexType>
                                    <xs:attribute name="name" type="xs:string" use="required"/>
                                    <xs:attribute name="path" type="xs:string" use="required"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:complexType name="clusterType">
        <xs:sequence>
            <xs:element name="file" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:attribute name="type" type="xs:string" use="required"/>
                    <xs:attribute name="name" type="xs:string" use="required"/>
                    <xs:attribute name="size" type="xs:string" use="required"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="name" type="xs:string" use="required"/>
    </xs:complexType>

    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="cluster" type="clusterType" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="error" type="errorType" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

</xs:schema>
XML

Пример:

http://host:port/commands/restfs_list_clusters

<in>
    <request>
        <cluster name="default" path="/domain"/>
        <cluster name="default" path="domain"/>
        <cluster name="default" path="system/sounds/"/>
    </request>
</in>
XML

Ответ:

status: 200
content: 
<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_restfs_list_clusters.xsd">
    <cluster name="default">
        <file type="directory" name="curency" size="0"/>
        <file type="directory" name="dow" size="0"/>
        <file type="directory" name="enumeration" size="0"/>
        <file type="directory" name="et" size="0"/>
        <file type="directory" name="numbers" size="0"/>
        <file type="directory" name="prompts" size="0"/>
        <file type="directory" name="push_numbers" size="0"/>
        <file type="directory" name="queue" size="0"/>
        <file type="directory" name="variable" size="0"/>
        <file type="directory" name="voicemail" size="0"/>
        <file type="regular" name="activated.wav" size="9562"/>
        <file type="regular" name="ai_activated.wav" size="28752"/>
        <file type="regular" name="ai_added.wav" size="19270"/>
        <file type="regular" name="ai_agent_already_on.wav" size="214020"/>
        <file type="regular" name="ai_agent_auxwork.wav" size="282310"/>
        <file type="regular" name="ai_agent_busy.wav" size="260292"/>
        <file type="regular" name="ai_agent_logged_out.wav" size="38078"/>
        <file type="regular" name="ai_agent_login_ok.wav" size="31808"/>
        <file type="regular" name="ai_agent_number_occupied.wav" size="264004"/>
        <file type="regular" name="ai_alarm_multi_digits.wav" size="32526"/>
        <file type="regular" name="ai_alarm_off.wav" size="32720"/>
        <file type="regular" name="ai_alarm_off_today.wav" size="40746"/>
        <file type="regular" name="ai_alarm_on.wav" size="31048"/>
        <file type="regular" name="ai_alarm_one_digit.wav" size="24584"/>
        <file type="regular" name="ai_alerting.wav" size="80078"/>
        <file type="regular" name="ai_alerting_nd.wav" size="64298"/>
        <file type="regular" name="ai_already_activated.wav" size="195296"/>
        <file type="regular" name="ai_auth_incorrect.wav" size="28712"/>
        <file type="regular" name="ai_badconnection.wav" size="34096"/>
        <file type="regular" name="ai_badroute.wav" size="43034"/>
        <file type="regular" name="ai_busy.wav" size="11278"/>
        <file type="regular" name="ai_busy_long.wav" size="58638"/>
        <file type="regular" name="ai_busy_overload.wav" size="5678"/>
        <file type="regular" name="ai_call_forwarding.wav" size="31466"/>
        <file type="regular" name="ai_call_recording_announcement.wav" size="184844"/>
        <file type="regular" name="ai_call_recording_notification.wav" size="240926"/>
        <file type="regular" name="ai_changed.wav" size="38948"/>
        <file type="regular" name="ai_check_balance.wav" size="154782"/>
        <file type="regular" name="ai_conference_can_not_be_extended.wav" size="46034"/>
        <file type="regular" name="ai_conference_destroyed.wav" size="42342"/>
        <file type="regular" name="ai_conference_full.wav" size="46034"/>
        <file type="regular" name="ai_conference_has_been_extended.wav" size="35818"/>
        <file type="regular" name="ai_conference_prompt.wav" size="38326"/>
        <file type="regular" name="ai_connection_not_available_now.wav" size="31480"/>
        <file type="regular" name="ai_deactivated.wav" size="33978"/>
        <file type="regular" name="ai_deactivated_all.wav" size="48978"/>
        <file type="regular" name="ai_debt.wav" size="43662"/>
        <file type="regular" name="ai_empty.wav" size="57352"/>
        <file type="regular" name="ai_enter_number_of_conference.wav" size="17270"/>
        <file type="regular" name="ai_enter_number_sharp.wav" size="62990"/>
        <file type="regular" name="ai_enter_password.wav" size="12036"/>
        <file type="regular" name="ai_enter_pin.wav" size="23882"/>
        <file type="regular" name="ai_enter_pin_number_sharp.wav" size="91088"/>
        <file type="regular" name="ai_enter_subscriber_prompt_number.wav" size="43184"/>
        <file type="regular" name="ai_error.wav" size="27572"/>
        <file type="regular" name="ai_every1.wav" size="18928"/>
        <file type="regular" name="ai_every2.wav" size="20600"/>
        <file type="regular" name="ai_every3.wav" size="16628"/>
        <file type="regular" name="ai_every4.wav" size="17238"/>
        <file type="regular" name="ai_exact_time.wav" size="10106"/>
        <file type="regular" name="ai_exit.wav" size="46568"/>
        <file type="regular" name="ai_for_help_at_any_time.wav" size="38772"/>
        <file type="regular" name="ai_from.wav" size="13912"/>
        <file type="regular" name="ai_incomplete.wav" size="27036"/>
        <file type="regular" name="ai_intercom_announce.wav" size="318306"/>
        <file type="regular" name="ai_intercom_end.wav" size="380868"/>
        <file type="regular" name="ai_invalid_number_of_conference.wav" size="24376"/>
        <file type="regular" name="ai_invalidnumber.wav" size="27036"/>
        <file type="regular" name="ai_last_incoming_number.wav" size="51486"/>
        <file type="regular" name="ai_local_hold.wav" size="80078"/>
        <file type="regular" name="ai_mailbox_empty.wav" size="52510"/>
        <file type="regular" name="ai_my_number.wav" size="20976"/>
        <file type="regular" name="ai_nearest1.wav" size="20182"/>
        <file type="regular" name="ai_nearest2.wav" size="20182"/>
        <file type="regular" name="ai_nearest3.wav" size="22270"/>
        <file type="regular" name="ai_nearest4.wav" size="23942"/>
        <file type="regular" name="ai_no_answer.wav" size="36858"/>
        <file type="regular" name="ai_no_money_to_call.wav" size="210878"/>
        <file type="regular" name="ai_not_reachable.wav" size="37254"/>
        <file type="regular" name="ai_notaccess.wav" size="65234"/>
        <file type="regular" name="ai_notconnected.wav" size="50088"/>
        <file type="regular" name="ai_notification.wav" size="83276"/>
        <file type="regular" name="ai_notpay.wav" size="38808"/>
        <file type="regular" name="ai_number_absent.wav" size="55342"/>
        <file type="regular" name="ai_number_incorrect.wav" size="20824"/>
        <file type="regular" name="ai_number_is_hidden.wav" size="18734"/>
        <file type="regular" name="ai_number_not_detected.wav" size="18734"/>
        <file type="regular" name="ai_number_not_found.wav" size="66114"/>
        <file type="regular" name="ai_number_not_ready.wav" size="52028"/>
        <file type="regular" name="ai_one_minute_cost.wav" size="195404"/>
        <file type="regular" name="ai_out_of_order.wav" size="38112"/>
        <file type="regular" name="ai_overload.wav" size="39366"/>
        <file type="regular" name="ai_park_background_music.wav" size="3892940"/>
        <file type="regular" name="ai_park_slot.wav" size="15180"/>
        <file type="regular" name="ai_park_slot_busy.wav" size="12254"/>
        <file type="regular" name="ai_park_slot_empty.wav" size="41456"/>
        <file type="regular" name="ai_park_slot_number.wav" size="24794"/>
        <file type="regular" name="ai_participant_of_conference.wav" size="28154"/>
        <file type="regular" name="ai_pin_accepted.wav" size="25572"/>
        <file type="regular" name="ai_pin_incorrect.wav" size="33932"/>
        <file type="regular" name="ai_please_enter_number.wav" size="30172"/>
        <file type="regular" name="ai_prompt_recorder_intro.wav" size="116320"/>
        <file type="regular" name="ai_prompt_recorder_intro2.wav" size="164906"/>
        <file type="regular" name="ai_remote_hold.wav" size="3892940"/>
        <file type="regular" name="ai_ringback_second.wav" size="546266"/>
        <file type="regular" name="ai_rubles.wav" size="92684"/>
        <file type="regular" name="ai_silent.wav" size="12302"/>
        <file type="regular" name="ai_stay_on_line.wav" size="389572"/>
        <file type="regular" name="ai_subscriber_busy.wav" size="24318"/>
        <file type="regular" name="ai_supervising_mode_conference.wav" size="40446"/>
        <file type="regular" name="ai_supervising_mode_consult.wav" size="45230"/>
        <file type="regular" name="ai_supervising_mode_observing.wav" size="39964"/>
        <file type="regular" name="ai_supervising_mode_selected.wav" size="43332"/>
        <file type="regular" name="ai_system_problem.wav" size="39366"/>
        <file type="regular" name="ai_tempdenied.wav" size="37254"/>
        <file type="regular" name="ai_timeout.wav" size="35122"/>
        <file type="regular" name="ai_to_go_back_at_any_time.wav" size="58968"/>
        <file type="regular" name="ai_to_make_alarm_intro.wav" size="49962"/>
        <file type="regular" name="ai_to_make_subscriber_intro.wav" size="21868"/>
        <file type="regular" name="ai_to_make_voicemail_intro.wav" size="58270"/>
        <file type="regular" name="ai_to_turn_off.wav" size="28540"/>
        <file type="regular" name="ai_to_turn_on.wav" size="23106"/>
        <file type="regular" name="ai_unavailable.wav" size="28916"/>
        <file type="regular" name="ai_until.wav" size="14330"/>
        <file type="regular" name="ai_wait_connection.wav" size="64024"/>
        <file type="regular" name="ai_wait_time.wav" size="25342"/>
        <file type="regular" name="ai_wrong_number.wav" size="27036"/>
        <file type="regular" name="ai_you.wav" size="11670"/>
        <file type="regular" name="ai_you_are_first_participant.wav" size="50806"/>
        <file type="regular" name="ai_your_balance_is.wav" size="53804"/>
        <file type="regular" name="conference_already_exists.wav" size="246100"/>
        <file type="regular" name="conference_not_exists.wav" size="204704"/>
        <file type="regular" name="for_call_to_number.wav" size="151784"/>
        <file type="regular" name="reached_conference_restriction.wav" size="258330"/>
        <file type="regular" name="to_number.wav" size="107332"/>
    </cluster>
    <cluster name="default">
        <file type="directory" name="biysk.local" size="0"/>
    </cluster>
    <cluster name="default">
        <file type="directory" name="biysk.local" size="0"/>
    </cluster>
</out>
XML