MAPI Manual

NAME

LIST_ORGS

FUNCTION

List organisations

SYNOPSIS

db_partition_id, keyword_set, ctime_from, ctime_to, order_by, search_limit

DESCRIPTION

This function can be used to list organisations within a database partition.

Required Parameters

* action: LIST_ORGS.
* db_partition_id: database partition ID. It specifies in which partition of the database the organisations are stored. For more information about the list of partition IDs, see LIST_DBPS.

Optional Parameters

* keyword_set: searches the organisations for titles and descriptions which contain the specified keywords.
* ctime_from: beginning of the time interval. It searches for the organisations which were created during the given time interval. The format of date and time is YYYY-MM-DD HH:MM:SS. Must be URL encoded.
* ctime_to: end of the time interval. The format of date and time is YYYY-MM-DD HH:MM:SS. Must be URL encoded.
* order_by: specifies by which column the list is ordered.
* 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.

* org_name: name of the organisation.

* org_type: type of organisation. Available types are given below:

  • MCPTYPE_PERSONAL: personal,
  • MCPTYPE_ENTERPRISE: enterprise.

* org_description: description of the organisation.

* org_logo: logo of the organisation.

* web_site: website of the organisation.
* creat_dt: the date and time the organisation was created.

* db_partition_id: the partition ID of the database where the organisation is stored.

* status: status of the organisation.

ROLE PERMITTED

Account manager, Root

EXAMPLES

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

Request:

http://app02.yvntech.com/MapIHttpS/MapIS?action=LIST_ORGS&db_partition_id=1&login_name=accountmanager@example.com&login_passwd=1111

Response:

<result tftype='1' infotype='0'>
    <resultset name='sys_orgs' search_found_rows='30'>
        <row>
            <field name='org_id'>30001</field>
            <field name='org_name'>Class Cover</field>
            <field name='org_type'>MCPTYPE_PERSONAL</field>
            <field name='org_description'>for Class Cover</field>
            <field name='org_logo'></field>
            <field name='web_site'></field>
            <field name='creat_dt'>2014-09-21 16:50:01</field>
            <field name='db_partition_id'>1</field>
            <field name='status'>MCPTYPE_ACTIVE</field>
        </row>
        ...
        ...
    </resultset>
</result>

TIPS

ENVIRONMENT

AUTHOR

YVN Tech

SEE ALSO

LIST_DBPS

Mweb v2.0 YVNTECH 2014