Loading...

Search

Catalyst Search enables data searching in the indexed columns of the tables in your Catalyst Data Store. When you integrate Search in your application, the end users will be able to perform powerful searches through volumes of data in your Data Store with a single search query.

Execute Search Query

Description

This API enables you to execute a search operation in the indexed columns of all the tables in the Data Store. You can pass the search parameters in the request JSON. The records that match the search query are fetched as the response.

Request Details

Request URL

POST

{api-domain}/baas/v1/project/{project_id}/search

copy

api-domain
URL
The DC-specific domain to access Catalyst API

project_id
Numerical
The unique ID of the project

Request Headers

Authorization: Zoho-oauthtoken {oauth_token}
Content-Type: application/json

Optional Headers

CATALYST-ORG: {org_id}

Environment: Development

Scope

ZohoCatalyst.search.READ

Note: This operation can also be executed with Catalyst user authentication permissions using Catalyst SDKs. Refer to the Catalyst API Prerequisites section for details.

Request JSON Properties

search string
mandatory

Search pattern that contains the keywords to search for

You can provide multiple keywords separated by commas.

search_table_columns json
mandatory

The indexed columns to be searched in a table

You must provide this in the following format:

{“table_name_1”: [“column_name_1”, “column_name_2”, “column_name_3”..], “table_name_2”: [“column_name_1”, “column_name_2”, “column_name_3”..]..}

select_table_columns json
optional

The columns to be selected and displayed based on the search

You must provide this in the following format:

{“table_name_1”: [“column_name_1”, “column_name_2”, “column_name_3”..], “table_name_2”: [“column_name_1”, “column_name_2”, “column_name_3”..]..}

order_by json
optional

Sorts the records fetched in the search results either in an ascending or descending manner

Allowed Values: ASC, DESC

start integer
optional

Starting index of a row where the search must begin

Default value: 0

end integer
optional

The offset value of a row where search must end

Default value: 500

Response Details

The response returns the records that match the search query. The details of the rows including their metadata such as CREATORID and CREATEDTIME, and the column key names and values are returned.

Sample Request
copy

curl -X POST
https://api.catalyst.zoho.com/baas/v1/project/4000000006007/search
-H “Authorization: Zoho-oauthtoken 1000.910*************************16.2f*************************57”
-H “Content-Type: application/json”
-d ‘{ “search” : “Mary”, “search_table_columns” : { “CustomerInfo”: [ “CustomerName”, “TrainerName” ] }, “start”:1000, “end”:200 }’

Sample Response
copy
{
"status": "success",
"data": {
    "CustomerInfo": [
        {
            "CREATORID": "56000000002003",
            "MODIFIEDTIME": "2019-02-08 13:13:44",
            "CustomerName": "Mary Johnson",
            "TrainerName": "Helena Stewart",
            "CustomerID":"PL1213234",
            "CREATEDTIME": "2019-02-08 13:13:44"
        },
        {
            "CREATORID": "56000000002003",
            "MODIFIEDTIME": "2019-02-08 20:11:10",
            "CustomerName": "Mary Palmer",
            "TrainerName": "Ronald Wazlib",
            "CustomerID":"SY091834",
            "CREATEDTIME": "2019-02-08 20:11:10"
        },
       {
            "CREATORID": "56000000002003",
            "MODIFIEDTIME": "2019-11-09 10:00:12",
            "CustomerName": "Herbert Spielberg",
            "TrainerName": "Mary Amber Rogers",
            "CustomerID":"AL987627",
            "CREATEDTIME": "2019-11-08 00:12:40"
        }
    ]
}
}