Search Records Based on Record Values
This API is used to fetch all the records of a form based on the record values.
Request URL:
https://people.zoho.com/people/api/forms/<formLinkName>/getRecords?searchParams={searchField: '<fieldLabelName>', searchOperator: '<operator>', searchText : '<textValue>'}
Header:
Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf
Scope:
ZOHOPEOPLE.forms.ALL
OR
ZOHOPEOPLE.forms.READ
Possible Operation Types:
ALL - Complete access to data
READ - Read form data
Request Parameters:
viewName | To get the view name, use views API. |
sIndex | Starting Index |
rec_limit | Number of records to be fetched |
searchField | Search any column using field label name |
searchOperator | Search any record using the operators (Eg- Is, Contains,) |
searchText | Search any text that belongs to the record |
Additional Info:
The format to search through records is as follows:
searchParams : '|' separated JSONObjects with following keys and values
{
searchField : FieldName based on which search should be performed,
searchText : The value to be searched for,
searchOperator : Based on field type - True|False|Is|Is_Not|Is_Empty|Is_Not_Empty|Starts_With|Ends_With|Like|Contains|Not_Contains
|Lesser_Than|Greater_Than|Lesser_than_or_equal_to|Before|Greater_than_or_equal_to|After| Between|Yesterday|Today|Tomorrow| Last_7_Days|Last_30_Days|Last_60_Days|Last_90_Days|
Last_120_Days|Next_7_Days|Next_30_Days|Next_60_Days|Next_90_Days|Next_120_Days|
Last_Month|This_Month|Next_Month|Current_and_Previous_Month|Current_and_Next_Month|Last_Year|
This_Year|Next_Year|Last_2_Years| Next_2_Years|Current_and_Previous_Year|Current_and_Next_Year
searchCriteria : AND | OR
}
If no searchOperator is specified by default, we assume the search operation to be 'Contains' and similarly if no searchCriteria is specified, we assume it to be 'AND'. For operators like 'Between' which needs two search values to be specified, semi-colon separated values may be given.
Note: Lookup values of a record contains field name as key and their lookup id's key is fieldname.ID.
Threshold Limit: 400 requests | Lock period: 5 minutes
Threshold Limit - Number of API calls allowed within a minute.
Lock Period - Wait time before consecutive API requests.
Request
CopiedTo search for records with a value:
https://people.zoho.com/people/api/forms/employee/getRecords?searchParams={searchField: 'Employeestatus', searchOperator: 'Is', searchText : 'Active'}
To search for records with two field values:
https://people.zoho.com/people/api/forms/employee/getRecords?searchParams={searchField: 'Employeestatus', searchOperator: 'Contains', searchText : 'Active'}|{searchField: 'Role', searchOperator: 'Is', searchText: 'Team Member'}
To search between dates:
https://people.zoho.com/people/api/forms/employee/getRecords?searchParams={searchField : 'Dateofjoining', searchOperator : 'Between', searchText : '18-Nov-2016;20-Nov-2016'}
Header
CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf
Response
Copied"message": "Data fetched successfully",
"result": [
{ "177402000000034203": [
{ "Role.ID": 177402000000029631,
"PAN_number": "",
"Bloodgroup": "O +ve",
"LastName": "John",
"Extension": "1234",
"LocationName": "India",
"Mobile": "6547657454",
"Work_phone": "",
"Passportexpirydate": "2015/09/23",
"Personal_Email": "",
"Skype_iD2": "",
"Marital_status": "Single",
"Expertise": "Responsible for assisting java software engineer in designing and developing Java-based systems\\\n\\\nHandle the tasks of writing codes by following appropriate design patterns\\\n\\\nPerform responsibilities of maintaining and developing code under configuration control\\\n\\\nHandle the tasks of implementing the module in java ensuring compatibility in tools and interfaces with support from senior java software engineer", "Photo": "{fileName=}",
"Reporting_To": "",
"Nick_Name": "Kare",
"Employeestatus": "Active",
"Role": "Team member",
"Dateofjoining": "01-Mar-2016",
"Tags": "HR",
"Gender": "",
"Designation.ID": 177402000000969033,
"Contract_Start_Date": "2013/09/01",
"Pan_Card": "",
"Designation": "HR Head",
"Visanumber": "",
"Date_of_birth": "1986/01/23",
"Eligible_for_rehire": "",
"LocationName.ID": 177402000000053013,
"Department.ID": 177402000000969057 }
Copied<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/forms/employee/getRecords">
<status>0</status>
<message>Data fetched successfully</message>
<result>
<177402000000034203>
<field name="Role.ID">177402000000029631</field>
<field name="PAN_number"></field>
<field name="Bloodgroup">O +ve</field>
<field name="LastName">John</field>
<field name="Extension">1234</field>
<field name="LocationName">India</field>
<field name="Mobile">6547657454</field>
<field name="Work_phone"></field>
<field name="Passportexpirydate">2015/09/23</field>
<field name="Personal_Email"></field>
<field name="Skype_iD2"></field>
<field name="Marital_status">Single</field>
<field name="Expertise">Responsible for assisting java software engineer in designing and developing Java-based systems Handle the tasks of writing codes by following appropriate design patterns Perform responsibilities of maintaining and developing code under configuration control Handle the tasks of implementing the module in java ensuring compatibility in tools and interfaces with support from senior java software engineer</field>
<field name="Photo">{fileName=}</field>
<field name="Reporting_To"></field>
<field name="Nick_Name">Kare</field>
<field name="Tags">HR</field>
<field name="Gender"></field>
<field name="Designation.ID">177402000000969033</field>
<field name="Contract_Start_Date">2013/09/01</field>
<field name="Employeestatus">Active</field>
<field name="Employee Role">Team member</field>
<field name="Date of joining">
19-Nov-2016</field>
<field name="Designation">HR Head</field>
<field name="Pan_Card"></field>
<field name="Visanumber"></field>
<field name="Date_of_birth">1986/01/23</field>
<field name="Eligible_for_rehire"></field>
<field name="LocationName.ID">177402000000053013</field>
<field name="Department.ID">177402000000969057</field>