视图 API
目的
此API 用于检索适用于所有表单和特定表单的视图列表。
默认和自定义视图 API
每一个表单都有一个默认视图,显示记录的原始设置(也称为主数据)。但您可创建自定义视图以便基于指定的字段水平条件筛选出记录。
请求 URL:
https://people.zoho.com.cn/people/api/views?authtoken=<token>
请求参数:
authtoken | 指定身份验证令牌 |
示例 URL:
https://people.zoho.com.cn/people/api/views?authtoken=7d985878998943g4j09h43dd0b167dda34b
XML 响应:
<Response Status="1">
<Views>
<Form name="P_Employee">
<View>
<viewName>
P_EmployeeView</viewName>
<displayName>Employee View</displayName>
<viewId>
6000000015697</viewId>
</View> <View>
<viewName>
DowngradedEmployeeView</viewName>
<displayName>
Disabled Employee View</displayName>
<viewId>
6000000015783</viewId>
</View>
<View>
<viewName>
EmployeeInactiveView</viewName>
<displayName>
Inactive Employees View</displayName>
<viewId>6000000015785</viewId>
</View>
<View>
<viewName>
simple_view</viewName>
<displayName>
simple view</displayName>
<viewId>
6000000066025</viewId>
</View>
<View>
<viewName>
new_view</viewName>
<displayName>
new view</displayName>
<viewId>
6000000075067</viewId>
</View>
<View>
<viewName>
checking_view_order</viewName>
<displayName>checking view order</displayName>
<viewId>
6000000239003</viewId>
</View> </Form>
</Views>
</Response>
JSON 响应
[{"P_Employee":[{"viewName":"P_EmployeeView","displayName":"Employee View","viewId":"6000000015697"},{"viewName":"DowngradedEmployeeView","displayName":"Disabled Employee View","viewId":"6000000015783"},{"viewName":"EmployeeInactiveView","displayName":"Inactive Employees View","viewId":"6000000015785"},{"viewName":"P_Employee_ViewForAPI","displayName":"Api Employees View","viewId":"6000000015787"},{"viewName":"ok","displayName":"ok","viewId":"6000000040003"},{"viewName":"test","displayName":"test","viewId":"6000000041003"},{"viewName":"test","displayName":"test","viewId":"6000000041003"},{"viewName":"simple_view","displayName":"simple view","viewId":"6000000066025"},{"viewName":"simple_view","displayName":"simple view","viewId":"6000000066025"},{"viewName":"panch_user_vpersonal_view","displayName":"panch user vpersonal view","viewId":"6000000075003"},{"viewName":"new_view","displayName":"new view","viewId":"6000000075067"},{"viewName":"checking_view_order","displayName":"checking view order","viewId":"6000000239003"},{"viewName":"panchuuddd","displayName":"panchuuddd","viewId":"6000000436005"}]}, {"P_Department": [{"viewName":"P_DepartmentView","displayName":"Department View","viewId":"6000000015699"},{"viewName":"P_Department_ViewForAPI","displayName":"Api Department View","viewId":"6000000015789"},{"viewName":"test","displayName":"test","viewId":"6000000041003"}]},{"P_Designation":[{"viewName":"P_DesignationView","displayName":"Designation View","viewId":"6000000015701"},{"viewName":"P_Designation_ViewForAPI","displayName":"Api Designation View","viewId":"6000000015791"},{"viewName":"test","displayName":"test","viewId":"6000000041003"},{"viewName":"simple_view","displayName":"simple view","viewId":"6000000066025"}]}]
提取特定表单的视图 API
要获取特定表单中可用的视图列表,请使用以下 API 并指定 formLinkName。
请求 URL:
https://people.zoho.com.cn/people/api/forms/<formLinkName>/views?authtoken=<token>
注:
- 请参阅 API 参考页以查看表单列表。必须以管理员身份登录才可查看该页面。
请求参数:
authtoken | 指定身份验证令牌 |
formLinkName | 要获取 formLinkName,请使用“提取表单 API”。 |
示例 URL:
https://people.zoho.com.cn/people/api/forms/department/views?authtoken=7d985878998943g4j09h43dd0b167dda34b
XML 响应:
<Response Status="1">
<Views>
<View>
<viewName>P_DepartmentView</viewName>
<displayName>Department View</displayName>
<viewId>6000000015699</viewId>
</View>
<View>
<viewName>Support</viewName>
<displayName>Support</displayName>
<viewId>6000000041003</viewId>
</View>
</Views>
</Response>
JSON 响应:
[{"viewName":"P_DepartmentView","displayName":"Department View","viewId":"6000000015699"},{"viewName":"Support","displayName":"Support","viewId":"6000000041003"}]
错误代码
请参阅错误代码。