Profiles APIs
In Zoho CRM, the administrator assigns a profile to every user which decides the user's level of access to Zoho CRM data. Use this API to get the details of different profiles.
Get profiles
Purpose
To retrieve the data of profiles through an API request.
Request URL
https://www.zohoapis.com/crm/v2/settings/profiles
Request Method
GET
Scope
scope=ZohoCRM.settings.profiles.{operation_type}
| Possible operation types |
|---|
| ALL - Full access to profiles data READ - get profile data |
Sample Request
curl "https://www.zohoapis.com/crm/v2/settings/profiles"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf" Sample Response
{
"profiles": [
{
"name": "Administrator",
"modified_by": null,
"description": """This profile will have all the permissions. Users with Administrator profile will be able to view and manage all the data within the organization account by default.",
"id": "2883756000000026011",
"category": false
},
{
"name": "Standard",
"modified_by": null,
"description": "This profile will have all the permissions except administrative privileges.",
"id": "2883756000000026014",
"category": false
}
]
} Sample Request
ZCRMRestClient restClient = ZCRMRestClient.getInstance();
BulkAPIResponse response = restClient.getOrganizationInstance().getAllProfiles();
List<ZCRMProfile> profiles = (List<ZCRMProfile>) response.getData(); Sample Response
{
"profiles": [
{
"name": "Administrator",
"modified_by": null,
"description": """This profile will have all the permissions. Users with Administrator profile will be able to view and manage all the data within the organization account by default.",
"id": "2883756000000026011",
"category": false
},
{
"name": "Standard",
"modified_by": null,
"description": "This profile will have all the permissions except administrative privileges.",
"id": "2883756000000026014",
"category": false
}
]
} Sample Request
def get_profiles(self):
try:
resp = ZCRMOrganization.get_instance().get_all_profiles()
profiles = resp.data
print(resp.status_code)
for profile in profiles:
print("\n\n")
print(profile.name)
print(profile.id)
print(profile.is_default)
print(profile.created_time)
print(profile.modified_time)
print(profile.modified_by)
print(profile.description)
print(profile.created_by)
print(profile.category)
print(profile.permissions)
sections = profile.sections
if sections is not None:
for section in sections:
print(section.name)
print(section.categories)
except ZCRMException as ex:
print(ex.status_code)
print(ex.error_message)
print(ex.error_code)
print(ex.error_details)
print(ex.error_content) Sample Response
{
"profiles": [
{
"name": "Administrator",
"modified_by": null,
"description": """This profile will have all the permissions. Users with Administrator profile will be able to view and manage all the data within the organization account by default.",
"id": "2883756000000026011",
"category": false
},
{
"name": "Standard",
"modified_by": null,
"description": "This profile will have all the permissions except administrative privileges.",
"id": "2883756000000026014",
"category": false
}
]
} Sample Request
ZCRMRestClient restClient = ZCRMRestClient.GetInstance();
BulkAPIResponse<ZCRMProfile> response = restClient.GetOrganizationInstance().GetAllProfiles();
List<ZCRMProfile> profiles = response.BulkData; // profiles - list of ZCRMProfile instance Sample Response
{
"profiles": [
{
"name": "Administrator",
"modified_by": null,
"description": """This profile will have all the permissions. Users with Administrator profile will be able to view and manage all the data within the organization account by default.",
"id": "2883756000000026011",
"category": false
},
{
"name": "Standard",
"modified_by": null,
"description": "This profile will have all the permissions except administrative privileges.",
"id": "2883756000000026014",
"category": false
}
]
}