提取记录 API

目的

此 API 用于基于视图名称提取表单的所有记录,以及基于预定义的列获取记录。

请求 URL

https://people.zoho.com.cn/people/api/forms/<viewname>/records?authtoken=<token>&sIndex=<sIndex>&rec_limit=<rec_limit>

https://people.zoho.com.cn/people/api/forms/<viewname>/records?authtoken=<token>&searchColumn=<searchColumn>&searchValue=<searchValue>

请求参数

authtoken 指定身份验证令牌
viewName 要获取视图名称,请使用“视图”API。
sIndex 起始索引
rec_limit 待提取的记录数
searchColumn 搜索任何列,例如 EMPLOYEEID、EMPLOYEEMAILALIAS 等
searchValue 搜索任何值,例如员工的 EmployeeId 或员工的 MailId
 

示例

请求 URL:

https://people.zoho.com.cn/people/api/forms/P_EmployeeView/records?authtoken=9c69640f94ebb37f50ca148734b2c5e4

https://people.zoho.com.cn/people/api/forms/P_EmployeeView/records?authtoken=9c69640f94ebb37f50ca148734b2c5e4&searchColumn=EMPLOYEEMAILALIAS&searchValue=charless@zykler.com

XML 响应:

<Records>
<Record>
<field name="recordId">
173907000000228001</field>
<field name="Photo">
&lt;img class=&quot;ptB10&quot; src=&quot;/people/images/user.png&quot;&gt;</field>
<field name="EmployeeID">
335</field>
<field name="Reporting To">
</field>
<field name="First Name">
non</field>
<field name="Last Name">
user</field>
<field name="Email ID">
</field>
<field name="Nick Name">
</field>
<field name="Department">
</field>
<field name="Title">
</field>

<field name="Employee Role">
Team member</field>
<field name="Date of joining">

19-Nov-2016</field>

<field name="Work location">
</field>
<field name="Work phone">
</field>
<field name="Extension">
</field>
<field name="Other Email">
</field>
<field name="Birth Date">
</field>
<field name="Mobile Phone">
</field>
<field name="Address">
</field>
<field name="Tags">
</field>
<field name="Job Description">
</field>
<field name="Ask me about/Expertise">
</field> <field name="AbouMe"></field> <field name="Employee Type">
</field> <field name="Employee Status">
Active</field>
<field name="Source of Hire">
</field>
<field name="Marital Status">
</field>
<field name="Offer Letter">
</field>
<field name="ID Proof">
</field>
</Record>
<Record>

JSON 响应:

[ { "recordId": 173907000000181100,
"Date of joining": "",
"Employee Role": "Team member",
"Work phone": "",
"AbouMe": "",
"EmployeeID": "123",
"Extension": "",
"Nick Name": "",
"ID Proof": "",
"Department": "",
"Work location": "",
"createdTime": 1351588396243,
"modifiedTime": 1351588396243,
"Job Description": "",
"Employee Type": "",
"Mobile Phone": "",
"Photo": "",
"Title": "",
"Marital Status": "",
"Tags": "",
"Source of Hire": "",
"Offer Letter": "",
"Birth Date": "", "Address": "", "Reporting To": "", "Ask me about/Expertise": "", "Employee Status": "Active",
"Other Email": "",
"Email ID": "",
"Last Name": "",
"First Name": "dummy123" },
{ "recordId": 173907000000111000,
"Date of joining": "19-Nov-2016",
"Employee Role": "Team member",
"Work phone": "",
"AbouMe": "",
"EmployeeID": "HRM3",
"Extension": "",
"Nick Name": "",
"ID Proof": "" } ]

提取单条记录 API

用途:

此 API 将显示使用 Record ID 编入索引的特定表单的记录。

请求 URL:

https://people.zoho.com.cn/people/api/forms/department/getDataByID?authtoken=55edc91c2412037e6c9e14416b200a0d&recordId=261091000000049003

注:

  • 请参阅 API 参考页以查看表单列表。必须以管理员身份登录才可查看该页面。

请求参数:

authtoken 指定身份验证令牌
formLinkName 要获取 formLinkName,您可使用提取表单 API。
recordId 指定待提取记录的记录 ID。记录 ID 可使用提取记录 API 来标识。

示例 URL

https://people.zoho.com.cn/people/api/forms/department/getDataByID?authtoken=55edc91c2412037e6c9e14416b200a0d&recordId=261091000000049003

XML 响应:

<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/forms/department/getDataByID">
<status>0</status>
<message>Data fetched successfully</message>
<result>
<field name="Parent_Department.ID">177402000000969127</field>
<field name="Department_Lead">Karan John 1</field>
<field name="Department_Lead.ID">177402000000034203</field>
<field name="Email_1">test@g.com</field>
<field name="Parent_Department">Product Support</field>
<field name="Single_Line_2">test1</field>
<field name="Department">Chat Support</field>
<field name="MailAlias">chatsupport@example.com</field>
</result>
</response>

JSON 响应:

{
"response": {
"message": "Data fetched successfully",
"result": [
{ "Parent_Department.ID": 177402000000969127,
"Department_Lead": "Karan John 1",
"Department_Lead.ID": 177402000000034203,
"Email_1": "test@g.com",
"Parent_Department": "Product Support",
"Department": "Chat Support",
"Single_Line_2": "test1",
"MailAlias": "chatsupport@example.com"
}
], "status": 0,
"uri": "/api/forms/department/getDataByID"
} }

在分栏范围内提取单条记录 API

用途:

此 API 将按分栏提取使用 Record ID 编入索引的特定表单的所有记录。

请求 URL:

https://people.zoho.com.cn/people/api/forms/<formLinkName>/getRecordByID?authtoken=<token>&recordId=<recordId>

注:

  • 请参阅 API 参考页以查看表单列表。必须以管理员身份登录才可查看该页面。

请求参数:

authtoken 指定身份验证令牌
formLinkName 要获取 formLinkName,您可使用提取表单 API。
recordId 指定待提取记录的记录 ID。记录 ID 可使用提取记录 API 来标识。

示例 URL

https://people.zoho.com.cn/people/api/forms/department/getRecordByID?authtoken=7d985878998943g4j09h43dd0b167dda34b&recordId=6000000043063

XML 响应:

<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/forms/department/getRecordByID">
<status>0</status>
<message>Data fetched successfully</message>
<result>
<section name="Department Details">
<field name="Parent_Department.ID">177402000000969127</field>
<field name="Department_Lead">Karan John 1</field>
<field name="Department_Lead.ID">177402000000034203</field>
<field name="Parent_Department">Product Support</field>
<field name="Department">Chat Support</field>
<field name="MailAlias">chatsupport@example.com</field>
</section>
<section name="Dept members">
<field name="Email_1">test@g.com</field>
<field name="Single_Line_2">test1</field>
</section>
</result>
</response>

JSON 响应:

{ "response": {
"message": "Data fetched successfully",
"result": [
{ "Departtment members": {
"Email_1": "test@g.com",
"Single_Line_2": "test1"
},
"Department Details": {
"Parent_Department.ID": 177402000000969127,
"Department_Lead": "Karan John 1",
"Department_Lead.ID": 177402000000034203,
"Parent_Department": "Product Support",
"Department": "Chat Support",
"MailAlias": "chatsupport@example.com"
} }
], "status":
"uri": "/api/forms/department/getRecordByID"
}
}

获取相关记录 API

用途:

此 API 将基于查找 Record ID 获取记录。

请求 URL:

https://people.zoho.com.cn/people/api/forms/<formLinkName>/getRelatedRecords?authtoken=<token>&sIndex=<sIndex>&limit=<limit>& parentModule=<parentModule>&id=<id>&lookupfieldName=<lookupfieldName>

注:

  • 请参阅 API 参考页以查看表单列表。必须以管理员身份登录才可查看该页面。
  • 如果未给出 lookupfieldName,则将使用表单的主查找作为输入。

请求参数:

authtoken 指定身份验证令牌
formLinkName 要获取 formLinkName,您可使用提取表单 API。
sIndex 起始索引
limit 待提取的记录数
parentModule 将提取父模块的相关记录
id 基于 record id 获取相关记录
lookupfieldName 将根据此查找字段获取记录

示例 URL

https://people.zoho.com.cn/people/api/forms/employee/getRelatedRecords?authtoken=9c69640f94ebb37f50ca148734b2c5e4&parentModule=department&id=3000000032001

XML 响应:

<?xml version="1.0" encoding="UTF-8"?> <response uri="/api/forms/employee/getRelatedRecords">
<status>
0</status>
<message>
Data fetched successfully</message>
<result>
<3000000020481>
<tabularSections>
<section name="Education">
<row count="0">
<field name="Yearofgraduation">
2013</field>
<field name="Education_AdditionalNotes"></field> <field name="Degree">B.Tech</field>
<field name="Specialization">CSE</field> <field name="Interests">
</field>
<field name="College">
IIT</field>
</row>
</section>
<section name="Dependent">
<row count="0">
<field name="Name">
Abhi</field>
<field name="DependentDOB">
19-Sep-1997</field>
<field name="DependentRelationship">
Brother</field>
</row>
<row count="1">
<field name="Name">fatima</field>
<field name="DependentDOB">15-Oct-1989</field> <field name="DependentRelationship">
Sister</field>
</row>
</section>
</tabularSections>
<section name="Work">
<field name="Extension">
</field>
<field name="Work_location">
</field>
<field name="Role.ID">3000000015529</field>
<field name="Work_phone">
</field>
<field name="Role">
Admin</field>
<field name="Department">
People</field>
<field name="Employeestatus">
Active</field>
<field name="Department.ID">
3000000032001</field>
</section>
<section name="Basic Info">
<field name="Nick_Name">
</field>
<field name="EmployeeID">12</field> <field name="Decision_box_1">false</field> <field name="FirstName">
charless</field>
<field name="LastName">
charless@zohocorp.com</field>
</section> <section name="Summary">
<field name="Current_Job_Description">
</field>
<field name="Expertise">
</field>
<field name="Weddingday">
12-Oct-1985</field>
<field name="AboutMe">
</field>
</section>
<section name="Personal">
<field name="Tags">
</field>
<field name="Date_of_birth">04-Oct-1991</field>
<field name="Address">
</field>
<field name="Other_Email">
</field>
<field name="Mobile"></field> </section>
</3000000020481>
<3000000020509>
<tabularSections>
<section name="Education">
</section> <section name="Dependent">
</section> </tabularSections>
<section name="Work">
<field name="Reporting_To.ID">
3000000020481</field>
<field name="Extension"></field> <field name="Work_location">
</field>
<field name="Role.ID">
3000000015533</field>
<field name="Work_phone">
</field>
<field name="Role">
Team member</field>
<field name="Department">
People</field>
<field name="Employeestatus">
Active</field>
<field name="Reporting_To">charless charless 12</field>
<field name="Department.ID">3000000032001</field>
</section>
<section name="Basic Info">
<field name="Nick_Name">
</field>
<field name="EmployeeID">
2</field>
<field name="Decision_box_1">true</field>
<field name="FirstName">
charless</field> <field name="LastName">
charless.sp+sham_tst</field> <field name="EmailID">
charless@zohocorp.com</field>
</section>
<section name="Summary">
<field name="Current_Job_Description">
</field>
<field name="Expertise">
</field>
<field name="AboutMe">
</field>
</section> <section name="Personal">
<field name="Tags">
</field>
<field name="Date_of_birth">
11-Sep-1987</field> <field name="Address">
</field>
<field name="Other_Email">
</field>
<field name="Mobile"></field> </section>
</3000000020509> </result>
</response>

JSON 响应:

{"response":{"message":"Data fetched successfully","result":[{"tabularSections":{},"Department Details":{"Department_Lead":"charless charless 1","Parent_Department":"","Department":"People","MailAlias":"charless@zohocopr.com}}],"status":0,"uri":"/api/forms/department/getRecordByID"}}{
"response": {
"message": "Data fetched successfully",
"result": [
{ "3000000020481": [
{ "tabularSections": {
"Education": [
{ "Yearofgraduation": "2013",
"Education_AdditionalNotes": "",
"Degree": "B.Tech",
"Specialization": "CSE",
"Interests": "",
"College": "IIT"
} ], "Dependent": [
{ "Name": "Abhi",
"DependentDOB": "19-Sep-1997",
"DependentRelationship": "Brother"
}, { "Name": "fatima",
"DependentDOB": "15-Oct-1989",
"DependentRelationship": "Sister"
} ] }, "Basic Info": {
"EmployeeID": "12",
"Nick_Name": "",
"Decision_box_1": "false",
"FirstName": "charless",
"LastName": "charless",
"EmailID": "charless@zohocorp.com"
}, "Work": {
"Extension": "",
"Work_location": "",
"Role.ID": 3000000015529,
"Work_phone": "",
"Role": "Admin",
"Department": "People",
"Department.ID": 3000000032001,
"Employeestatus": "Active"
}, "Personal": {
"Tags": "",
"Date_of_birth": "04-Oct-1991",
"Address": "",
"Mobile": "",
"Other_Email": ""
}, "Summary": {
"Current_Job_Description": "",
"Expertise": "",
"Weddingday": "12-Oct-1985",
"AboutMe": ""
} } ] }, { "3000000020509": [
{ "tabularSections": {
"Education": [],
"Dependent": []
}, "Basic Info": {
"EmployeeID": "2",
"Nick_Name": "",
"Decision_box_1": "true",
"FirstName": "charless",
"LastName": "charless",
"EmailID":
"charless@zohocorp.com"
}, "Work": {
"Reporting_To.ID": 3000000020481,
"Extension": "",
"Work_location": "",
"Role.ID": 3000000015533,
"Work_phone": "",
"Role": "Team member",
"Department": "People",
"Department.ID": 3000000032001,
"Reporting_To": "charless charless 12",
"Employeestatus": "Active"
}, "Personal": {
"Tags": "",
"Date_of_birth": "11-Sep-1987",
"Address": "",
"Mobile": "",
"Other_Email": ""
}, "Summary": {
"Current_Job_Description": "",
"Expertise": "",
"AboutMe": ""
} } ] } ], "status": 0,
"uri": "/api/forms/employee/getRelatedRecords"
} }

获取基于表单名的记录 API

用途:

此 API 用于基于表单名提取表单的所有记录,以及基于预定义的列提取记录。

请求 URL:

https://people.zoho.com.cn/people/api/forms/<formLinkName>/getRecords?authtoken=<token>&sIndex=<sIndex>&limit=<limit>

https://people.zoho.com.cn/people/api/forms/<formLinkName>/getRecords?authtoken=<token>&searchColumn=<searchColumn>&searchValue=<searchValue>

注:

  • 请参阅 API 参考页以查看表单列表。必须以管理员身份登录才可查看该页面。

请求参数:

authtoken 指定身份验证令牌
formLinkName 要获取 formLinkName,您可使用提取表单 API。
sIndex 起始索引
limit 待提取的记录数
searchColumn 搜索任何列,例如 EMPLOYEEID 或 EMPLOYEEMAILALIAS
searchValue 搜索任何值,例如员工的 EmployeeId 或员工的 MailId

示例 URL

https://people.zoho.com.cn/people/api/forms/employee/getRecords?authtoken=9c69640f94ebb37f50ca148734b2c5e4

https://people.zoho.com.cn/people/api/forms/employee/getRecords?authtoken=9c69640f94ebb37f50ca148734b2c5e4&searchColumn=EMPLOYEEID&searchValue=2

XML 响应:

<?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="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>

JSON 响应:

{ "response": {
"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",
"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 }

注:

  • 记录的查找值包含字段名作为键值,其查找 id 的键值为 fieldname.ID。

基于记录值搜索记录 

用途:

此 API 用于基于记录值提取表单的所有记录。

请求 URL:

https://people.zoho.com.cn/people/api/forms/<formLinkName>/getRecords?authtoken=****&searchParams={searchField: '<fieldLabelName>', searchOperator: '<operator>', searchText : '<textValue>'}

注:

  • 请参阅 API 参考页以查看表单列表。必须以管理员身份登录才可查看该页面。

请求参数:

authtoken 指定身份验证令牌
viewName 要获取视图名称,请使用“视图”API。
sIndex 起始索引
rec_limit 待提取的记录数
searchField 使用字段标签名搜索任何列
searchOperator 使用运算符(例如“是”、“包含”)搜索任何记录
searchText 搜索属于记录的任何文本 

示例 URL

https://people.zoho.com.cn/people/api/forms/employee/getRecords?authtoken=****&searchParams={searchField: 'Employeestatus', searchOperator: 'Is', searchText : 'Active'}

要搜索带有两个字段值的记录:

https://people.zoho.com.cn/people/api/forms/employee/getRecords?authtoken=****&searchParams={searchField: 'Employeestatus', searchOperator: 'Is', searchText : 'Active'}|{searchField: 'Role', searchOperator: 'Is', searchText: 'Team Member'}

要搜索中间的日期:

https://people.zoho.com.cn/people/api/forms/employee/getRecords?authtoken=****&searchParams={searchField : 'Dateofjoining', searchOperator : 'Between', searchText : '18-Nov-2016;20-Nov-2016'}

XML 响应:

<?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>

JSON 响应:

{ "response": {
"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 }

注:

  • 记录的查找值包含字段名作为键值,其查找 id 的键值为 fieldname.ID。

 

错误代码

请参阅错误代码