Default And Custom View API
Every form has a default view that displays the original set of records, which is also called the master data. However, you can create a custom view to filter out the records based on the specified field level condition.
This API is used to know the list of view details available in all forms.
Request URL:
https://people.zoho.com/people/api/views
Header:
Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf
Scope:
ZOHOPEOPLE.forms.READ
Possible Operation Types:
READ- Read form data
Threshold Limit: 30 requests | Lock period: 5 minutes
Threshold Limit - Number of API calls allowed within a minute.
Lock Period - Wait time before consecutive API requests.
Sample Request
Copiedhttps://people.zoho.com/api/views
Sample Response
Copied{
"response": {
"result": [
{
"P_Employee": [
{
"viewId": 759415000000035705,
"viewdisplayName": "Employee View",
"viewName": "P_EmployeeView"
},
{
"viewId": 759415000000035793,
"viewdisplayName": "Disabled Employee View",
"viewName": "DowngradedEmployeeView"
},
{
"viewId": 759415000000035795,
"viewdisplayName": "Inactive Employees View",
"viewName": "EmployeeInactiveView"
}
]
},
{
"P_Department": [
{
"viewId": 759415000000035707,
"viewdisplayName": "Department View",
"viewName": "P_DepartmentView"
}
]
},
],
"message": "Data fetched successfully",
"uri": "/api/views",
"status": 0
}
}
Show full
Show less
CopiedOkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
Request request = new Request.Builder()
.url("https://people.zoho.com/api/views")
.get()
.addHeader("Authorization", "••••••")
.addHeader("Cookie", "CSRF_TOKEN=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zcsr_tmp=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zpsid=C9B0C2739FAE8B31975D2F7745237EFA; zalb_c7cb34e6ac=15579241ea20d8d7fa5eb5f3fb79c37a")
.build();
Response response = client.newCall(request).execute();
Copiedconst myHeaders = new Headers();
myHeaders.append("Authorization", "••••••");
myHeaders.append("Cookie", "CSRF_TOKEN=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zcsr_tmp=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zpsid=C9B0C2739FAE8B31975D2F7745237EFA; zalb_c7cb34e6ac=15579241ea20d8d7fa5eb5f3fb79c37a");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://people.zoho.com/api/views", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
Copiedcurl --location 'https://people.zoho.com/api/views' \
--header 'Authorization: ••••••' \
--header 'Cookie: CSRF_TOKEN=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zcsr_tmp=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zpsid=C9B0C2739FAE8B31975D2F7745237EFA; zalb_c7cb34e6ac=15579241ea20d8d7fa5eb5f3fb79c37a'
CopiedAuthMap = Collection();
AuthMap.insert("Authorization":"••••••");
response = invokeUrl
[
url: "https://people.zoho.com/api/views"
type: GET
headers: AuthMap.toMap()
];
info response;
Copiedimport requests
url = "https://people.zoho.com/api/views"
payload = {}
headers = {
'Authorization': '••••••',
'Cookie': 'CSRF_TOKEN=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zcsr_tmp=790891fd-6d6f-40fd-8381-8e81176e2d2f; _zpsid=C9B0C2739FAE8B31975D2F7745237EFA; zalb_c7cb34e6ac=15579241ea20d8d7fa5eb5f3fb79c37a'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Show full
Show less