Get Designations
Table of Contents
Note:
- This task is applicable to all services except Zoho Creator.
- Each time the zoho.directory.getDesignations integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
- Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if zoho.directory.getDesignations integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script.
Overview
The zoho.directory.getDesignations task is used to fetch all designations from the specified organization.
Syntax
<response> = zoho.directory.getDesignations(<orgID>, <page>, <perPage>, <connectionName>);
Scope
ZohoDirectory.Orgs.READ where:
| Parameter | Description | Data type |
| response | is the variable which will hold the details of the designations fetched from the organization. | KEY-VALUE |
| <orgID> | is the ID of the organization from which the designations need to be fetched. | NUMBER |
| <connectionName> | is the name of the Zoho Directory connection. | TEXT |
| <page> | To get the list of records based on pages. | NUMBER |
| <per_page> | Maximum number of records (1-200) in a single page. | NUMBER |
Example
The following script fetches the designations of the first 200 users from Zoho Directory organization:
response = zoho.directory.getDesignations(72XXXXXXX, "1", "200", "zoho_directory_connection");
where:
responseThis is the KEY-VALUEresponse returned by Zoho Directory.
72XXXXXXXThis is the NUMBERthat represents the organization ID of Zoho Directory account from which the designation of the users needs to be fetched.
zoho_directory_connectionThis is the TEXTthat represents the link name of the connection.
1This is the NUMBERresponse returned by Zoho Directory.
200This is the NUMBERthat represents the total number of records that need to be fetched.
Response Format
{
"status_code": 200,
"designations": [
{
"created_time": 17**********,
"designation_name": "M*****",
"designation_id": "96********"
},
{
"created_time": 16**********,
"designation_name": "S******",
"designation_id": "71*******"
},..
],
"has_more": false,
"resource_name": "designations"
}