Get All Variables Data API - v3
To retrieve all the available variables through an API request.
Request URL:
https://people.zoho.com/people/api/v3/variables/getAllVariables
Scope:
ZOHOPEOPLE.variables.{operation_type}
Possible Operation Types:
ALL - Full access to data
Read - Only to read data
Request Type:
GET
Request Parameters:
| Parameters | Values Allowed | Default Value | Description | Mandatory |
| index | <integer> | 0 | Start index | No |
Note: By default, the first 200 variables are fetched. To retrieve additional variables, pass the appropriate index.
Error Codes:
| Error Code | Description |
| 403 | PERMISSION_DENIED - The user does not have permission to read variables data. |
| 500 | INTERNAL_ERROR - Unexpected and unhandled exception in Server. Contact support team. |
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.
REQUESTS
CopiedOkHttpClient client = new OkHttpClient.Builder().build();
Request request = new Request.Builder()
.url("https://people.zoho.com/people/api/v3/variables/getAllVariables")
.get()
.addHeader("Authorization", “**********”)
.build();
Response response = client.newCall(request).execute();Copiedconst url = "https://people.zoho.com/people/api/v3/variables/getAllVariables";
const headers = {
"Authorization": "Zoho-oauthtoken ******”
};
fetch(url, {
method: "GET",
headers: headers
})
.then(response => response.json())
.then(data => { console.log(data) })
.catch(error => console.error("Error:", error));Copiedcurl --location --request GET 'https://people.zoho.com/people/api/v3/variables/getAllVariables' \
--header "Authorization: Zoho-oauthtoken *****"Copiedurl = "https://people.zoho.com/people/api/v3/variables/getAllVariables";
headers = map();
headers.put("Authorization", "Zoho-oauthtoken ******”);
response = invokeurl
[
url : url
type : GET
headers: headers
];
info response;Copiedimport requests
url = "https://people.zoho.com/people/api/v3/variables/getAllVariables"
headers = {
"Authorization": "Zoho-oauthtoken *******"
}
response = requests.get(url, headers=headers)
print(response.text)HEADER
CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxfSAMPLE REQUEST
Copiedhttps://people.zoho.com/people/api/v3/variables/getAllVariablesSAMPLE RESPONSE - WITH DATA
Copied{
"variables": [
{
"datatype": "text",
"api_name": "sam_1",
"name": "sample1",
"description": "",
"id": "153045000000780001",
"value": "samplevalue",
"variable_group": {
"api_name": "General",
"id": "153045000000759001"
}
},
{
"datatype": "textarea",
"api_name": "sam_2",
"name": "sample2",
"description": "Sample desc",
"id": "153045000000780003",
"value": "",
"variable_group": {
"api_name": "General",
"id": "153045000000759001"
}
},
{
"datatype": "email",
"api_name": "sam_3",
"name": "sample 3",
"description": "",
"id": "153045000000780005",
"value": "test@gmail.com",
"variable_group": {
"api_name": "samApi",
"id": "153045000000776001"
}
},
{
"datatype": "number",
"api_name": "sam_4",
"name": "sample 4",
"description": "Testing",
"id": "153045000000780007",
"value": "111222333",
"variable_group": {
"api_name": "sam4Api",
"id": "153045000000776003"
}
}
]
}
SAMPLE RESPONSE - WITHOUT DATA
CopiedSample Response without data If no variables created:
204 - No content status code will be passed