Extension Metadata Methods
The Extension Metadata methods allow you to fetch details about the particular extension installed in your Zoho Desk portal. These methods are accessible from global widget locations.
Available metadata methods for an extension are listed below:
Sample Request
CopiedZOHODESK.get("extension.departments").then(function(response) {
console.log(response["extension.departments"]);
// your code here...
}).catch(function(err){
// handle error here...
});
Sample Response
Copied{
0: {name: 'Integration Notification', id: '692061000000379045'}
1: {name: 'Marketplace Test Department', id: '692061000000249045'}
length: 2
}
Profiles
This API allows you to retrieve a list of profiles, such as Supervisor, Support Manager, Agent, and others, configured for a specific extension.
Parameter Description
Parameters | Type | Description |
name | string | Name of the profile |
id | string | ID of the profile |
length | string | Number of profiles configured for a specific extension |
Sample Request
CopiedZOHODESK.get("extension.profiles").then(function(response) {
console.log(response["extension.profiles"]);
// your code here...
}).catch(function(err){
// handle error here...
});
Sample Reponse
Copied{
0: {name: 'Newbie Agent', id: '692061000000055067'}
1: {name: 'Supervisor', id: '692061000000055071'}
3: {name: 'Support Manager', id: '692061000000055069'}
4: {name: 'Support Administrator', id: '692061000000008343'}
length: 4
}
Users
This API allows you to retrieve a list of users (i.e., agents) who can access a specific extension.
Parameter Description
Parameters | Type | Description |
ID | array | IDs of the agents who can access a specific extension |
length | string | Number of agents |
Sample Request
CopiedZOHODESK.get("extension.users").then(function(response) {
console.log(response["extension.users"]);
// your code here...
}).catch(function(err){
// handle error here...
});
Sample Response
Copied(5) ['188422000033271001', '188422000041195001', '188422000031494359', '188422000009239956', '188422000031494323']
0: "188422000033271001"
1: "188422000041195001"
2: "188422000031494359"
3: "188422000009239956"
4: "188422000031494323"
length: 5
Permissions
This API allows you to fetch the list of custom permissions defined for the extension. It helps determine whether each permission is enabled for the current user by the admin.
Parameter Description
Parameters | Type | Description |
apiName | string | Unique name given to each permission |
isEnabled | boolean | Determines whether the permission to perform a specific action has been enabled for the user by an admin. |
Sample Request
CopiedZOHODESK.get("extension.permissions").then(function(response) {
console.log(response["extension.permissions"]);
// your code here...
}).catch(function(err){
// handle error here...
});
Sample Response
Copied{
0: {apiName: 'createResolution', isEnabled: true}
1: {apiName: 'createPermissions_test', isEnabled: true}
length: 2
}
Resources
This API allows you to retrieve a list of resources configured for a specific extension.
Parameter Description
Parameters | Type | Description |
ressourceName | string | Name of the resource |
id | string | Id of the resource |
resourceType | string | Type of the resource |
apiName | string | Unique name of the resource |
length | string | Number of resources configured for a specific extension |
Sample Request
CopiedZOHODESK.get('extension.resource',
{
resourceName: "fieldCreatetesting",
resourceType: "fields"
}
).then(console.log).catch(console.log);
Sample Response
Copied{
0: {
resourceName: 'field1',
id: '188422000047179009',
resourceType: 'fields',
apiName: 'cf_counter'
}
length: 1
}