MAPI Manual

NAME

LIST_FILES

FUNCTION

List files

SYNOPSIS

file_type, keyword_set, time_from, time_to, order_type, search_limit

DESCRIPTION

This function allows users to list files.

Required Parameters

* action: LIST_FILES.

Optional Parameters

* file_type: type of the file. Available types are given below:

  • IVR_SOUND: sound file.
  • LOGO: logo.
  • MAP_IMAGE: dialog map image.
  • IC3_IMAGE: image file.
  • USER_DATA: user data.
  • VIDEO: video file.

* keyword_set: searches for titles and descriptions of files which contain the given keywords.

* time_from: the beginning of time interval. This field together with "time_to" are used to filter search results based on the date and time the file was last modified. Files whose timestamp is greater than or equal to the time_from and less than the time_to will be returned. The date and time format is YYYY-MM-DD HH:MM:SS. Must be URL encoded.

* time_to: the end of time interval. This field together with "time_from" are used to filter results based on the date and time the file was last modified. Files whose timestamp is greater than or equal to the time_from and less than the time_to will be returned. The date and time format is YYYY-MM-DD HH:MM:SS. Must be URL encoded.

* order_type: specifies the list order of the results. Value is either "DESC" or "ASC", which means in descending or ascending order respectively.

* search_limit: constrains the number of search results that are returned. It can also be used for pagination of search results. Value is a number or two numbers split by a comma. With one number, the value specifies the maximum number of results to return from the beginning of the search results. With two numbers, the first number specifies the offset of the first result to return, and the second specifies the maximum number of results to return. Note: The offset of the first result is 0 (not 1).  E.g., if value is "5", the first five search results will be returned; if value is "20,5", it will return maximum five results starting from the 21st result. Default value is 100.

RETURN DATA

The response contains the following attributes:

* org_id: organisation ID.

* file_type: type of the file.

* mcp_org_file_id: file ID.

* file_name: file name in database.

* file_displayname: file name on screen.

* file_description: description of file.

* file_format: format of the file.

* owner_mcp_user_id: user who created the file.

* lastupdate_mcp_user_id: ID of the user by whom the file was last modified.

* last_update_dt: date and time the file was last modified.

* path_file: file path.

ROLE PERMITTED

Manager

EXAMPLES

The following example shows a successful HTTP GET request and response.

Request:

http://app02.yvntech.com/MapIHttpS/MapIS?action=LIST_FILES&file_type=IVR_SOUND&search_limit=1%2C2&login_name=user@example.com&login_passwd=1111

Response:

<result tftype='1' infotype='0'>
    <resultset name='mcp_org_file' search_found_rows='3'>
        <row>
            <field name='org_id'>9000</field>
            <field name='file_type'>IVR_SOUND</field>
            <field name='mcp_org_file_id'>116</field>
            <field name='file_name'>9000.IVR_SOUND.116.1e732dc6978.mp3</field>
            <field name='file_displayname'>test file three</field>
            <field name='file_description'>test three</field>
            <field name='file_format'>mp3</field>
            <field name='owner_mcp_user_id'>6009000</field>
            <field name='lastupdate_mcp_user_id'>6009000</field>
            <field name='last_update_dt'>2014-10-21 11:02:04</field>
            <field name='path_file'>/mdcp/mcp/data/9000//sound/9000.IVR_SOUND.116.1e732dc6978.mp3</field>
        </row>
        ...
        ...
    </resultset>
</result>

TIPS

ENVIRONMENT

AUTHOR

YVN Tech

SEE ALSO

Mweb v2.0 YVNTECH 2014