View API

Purpose

This API is used to retrieve the list of views available for all forms and for specific forms.

Default and Custom View API

Every form has a default view which displays the original set of records which is also called as the master data. However, you can create a custom view to filter out the records based on the specified field level condition.

Request URL:

https://people.zoho.com/people/api/views?authtoken=<token>

Request parameter:

authtokenSpecify the authentication token

Example URL:

https://people.zoho.com/people/api/views?authtoken=7d985878998943g4j09h43dd0b167dda34b

XML response:

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

[{"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"}]}]

Fetch Views of a Specific Form API

To know the list of views available in a specific form, use the API below by specifying the formLinkName.

Request URL:

https://people.zoho.com/people/api/forms/<formLinkName>/views?authtoken=<token>

Note:

Request parameter:

authtokenSpecify the authentication token
formLinkNameTo get the formLinkName, use the Fetch Forms API.

Example URL:

https://people.zoho.com/people/api/forms/department/views?authtoken=7d985878998943g4j09h43dd0b167dda34b

XML response:

<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 response:

[{"viewName":"P_DepartmentView","displayName":"Department View","viewId":"6000000015699"},{"viewName":"Support","displayName":"Support","viewId":"6000000041003"}]

Error codes

Please refer Error Codes.