Query String Syntax

There are two types of terms: single terms (e.g. "hello") and phrases (e.g. "hello moxtra"). Query terms are case-insensitive. Multiple terms can be combined together with Boolean operators to form a more complex query. Combining multiple terms without specifying any Boolean operators, Or (||) operators are used.

Operators/Symbols Description Example
* Wildcard at the end of a word win*
space&&space And operator moxtra && collaboration : documents that contain both "moxtra" and "collaboration"
space||space Or operator moxtra || collaboration : documents that contain either "moxtra" or "collaboration"
Space Space is treated as Or operator moxtra collaboration : documents that contain either "moxtra" or "collaboration"
+ Required term +moxtra collaboration : documents that must contain "moxtra" and may contain "collaboration"
- Excluded term moxtra -meet : documents that contain "moxtra" but not "meet"
() Grouping moxtra && (collaboration || meet) : documents that contain "moxtra" and either "collaboration" or "meet"
AND, OR, NOT Unsupported Boolean operators
Stop words Reserved words that can not be used as search query terms "a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "no", "not", "of", "on", "or", "such", that", "the", their", "then", "there", "these", "they", "this", "to", "was", "will", "with"

Global Search

Search by {query_string}

GET /search?query={query_string}

URL Parameters
Name Type Description
query String Query string follows above Query String Syntax and URL encoded. Search goes through user's Contacts and Binders. Search would run through Business Directory and Business Library as well for the user belongs to an Org.
filter String Optional: Default is "all".
  • binder - binders
  • all - binders, contacts, business directory, and business library
timestamp Number Optional: Feeds or updated time (if no feeds) before the specified time in milliseconds since 1/1/1970 0:0:0 with UTC.
until Number Optional: Feeds or updated time (if no feeds) after the specified time in milliseconds since 1/1/1970 0:0:0 with UTC.
index Number Optional: Start index of binder list, default is 0.
size Number Optional: List size, default is 100.
json_users String Optional: Search binder with creators, max is 10, in JSON format and URL encoded. The JSON format example is as follows:
{
  "users": [
    {
        "user_id": "UkAKhXTpiMXHlsMXcKBXtF5"
    },
    {
        "unique_id": "A453224",
        "org_id": "PTHpzIJ4jGx1upvgjWZa4S1"
    },
        "email": "test@gmail.com",
        "org_id": "PTHpzIJ4jGx1upvgjWZa4S1"
    }
  ]
}

Sample Request
GET /search?query=test@gmail.com
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "contacts_count": 1,
        "binders_count": 1,
        "business_directory_count": 1,
        "business_library_count": 0,
        "contacts": [
            {
                "id": "UkAKhXTpiMXHlsMXcKBXtF5",
                "email": "test@gmail.com",
                "name": "Test Wend",
                "unique_id": null,
                "picture_uri": "https://www.moxtra.com/user/contact/329/2164"
            }
        ],
        "binders": [
            {
                "category": 0,
                "binder": {
                    "id": "BQ5xRWpfiVsHLzaE11t0uP1",
                    "name": "test@gmail.com",
                    "created_time": 1393284236851,
                    "updated_time": 1393284238187,
                    "total_comments": 0,
                    "total_members": 2,
                    "total_pages": 0,
                    "total_todos": 0,
                    "revision": 11,
                    "thumbnail_uri": "https://www.moxtra.com/service/themes/images/default/avatar-single-100.png",
                    "conversation": true,
                    "users": [
                        {
                            "revision": 2,
                            "status": "BOARD_MEMBER",
                            "type": "BOARD_OWNER",
                            "updated_time": 1393284236851,
                            "created_time": 1393284236851,
                            "user": {
                                "id": "U25PKSV2Oce1mpegiV48W56",
                                "email": "joe@yahoo.com",
                                "name": "Joe Smith",
                                "unique_id": null,
                                "picture_uri": "https://www.moxtra.com/board/BQ5xRWpfiVsHLzaE11t0uP1/user/3/23459"
                            }
                        },
                        {
                            "revision": 7,
                            "status": "BOARD_INVITED",
                            "type": "BOARD_READ_WRITE",
                            "updated_time": 1393284237242,
                            "created_time": 1393284237242,
                            "user": {
                                "id": "",
                                "email": "test@gmail.com",
                                "name": "",
                                "unique_id": null
                            }
                        }
                    ],
                    "restricted": false,
                    "unread_feeds": 0,
                    "team": false
                }
            }
        ],
        "business_directory": [
            {
                "id": "UkAKhXTpiMXHlsMXcKBXtF5",
                "email": "test@gmail.com",
                "name": "Test Wend",
                "unique_id": ""
            }
        ],
        "business_library": null
    }
}

Binder Search

Search by {query_string} identified by {binder_id}

GET /{binder_id}/search?query={query_string}

URL Parameters
Name Type Description
query String Query string follows above Query String Syntax and URL encoded. Search goes through the current Binder. Search would run through Comments, Pages, and Todos.
timestamp Number Optional: Feeds or updated time (if no feeds) before the specified time in milliseconds since 1/1/1970 0:0:0 with UTC.
until Number Optional: Feeds or updated time (if no feeds) after the specified time in milliseconds since 1/1/1970 0:0:0 with UTC.
index Number Start index of binder list, default is 0.
size Number List size, default is 100.

Sample Request
GET /B9rArkzRe094lPPiMH4UpS8/search?query=github
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "todos": [
            {
                "creator_id": "2",
                "name": "github",
                "due_time": 0,
                "assignee_id": null,
                "comments": null,
                "reminder_time": 0,
                "description": "",
                "id": 253,
                "created_time": 1429664563532,
                "updated_time": 1433962092803
            }
        ],    
        pages": [
            {
                "height": 792,
                "width": 612,
                "revision": 0,
                "id": 112,
                "page_index": 0,
                "page_number": "100.04347826086956",
                "page_uri": "/board/BIAJqlZHHHMB6O4JI5fv6Q4/112",
                "thumbnail_uri": "/board/BIAJqlZHHHMB6O4JI5fv6Q4/112/115",
                "background_uri": "/board/BIAJqlZHHHMB6O4JI5fv6Q4/112/114",
                "updated_time": 0,
                "created_time": 0,
                "is_deleted": false,
                "type": "PAGE_TYPE_PDF",
                "original_file_name": "",
                "file_id": ""
            }
        ],   
        "comments": [
            {
                "text": "[moxtraweb/webdriverio] Deployment by [url=https://github.com/moxtraweb]moxtraweb[/url] on production - ",
                "created_time": 1418996178160,
                "updated_time": 1418996178160,
                "id": 23,
                "user": null,
                "richtext": "",
                "chat_id": 24
            },
            {
                "text": "[moxtraweb/webdriverio] Member added for [url=https://github.com/moxtracn]moxtracn[/url]",
                "created_time": 1418998634353,
                "updated_time": 1418998634353,
                "id": 26,
                "user": null,
                "richtext": "",
                "chat_id": 27
            }
        ],
    }
}