Retrieve Default Data Sharing Settings
Purpose
Retrieve your organization's default data-sharing permissions for modules.
Endpoints
- GET /settings/data_sharing
Request Details
Request URL
{api-domain}/crm/{version}/settings/data_sharing
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.data_sharing.READ
(or)
ZohoCRM.settings.data_sharing.ALL
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/data_sharing"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Response JSON
- data_sharingJSON array
Contains the organization's default data-sharing permissions for each module.
- public_in_portalsBoolean
Shows whether the module is configured in public portals.
- true - The module is configured in public portals.
- false - The module is not configured in public portals.
- share_typestring
Represents the access levels available for each module for users in Zoho CRM.
Possible values:- private: Only the record owner and their superior can view the records in the module.
- public_read_only: Users can view others' records but cannot modify or delete them.
- public_read_write: Users can view and modify others' records but cannot delete them.
- public: Users can view, modify, and delete others' records.
- moduleJSON object
Contains the module's API name and its ID.
- rule_computation_runningJSON object
This key shows whether a sharing rule is currently running for the module.
In UI, if you Go to Setup > Security Control > Roles and Sharing > Data Sharing Settings > Sharing Rules > you can seethe Rerun option.
If you rerun a rule configured for a module, this key will be true until the process completes. If the value is false, no rules are currently running for the module.
Possible Errors
- INVALID_REQUEST_METHODHTTP 400
The http request method type is not a valid one
Resolution: You have specified an invalid HTTP method to access the API URL.
Specify a valid request method. Refer to the Endpoints section. - OAUTH_SCOPE_MISMATCHHTTP 401
Unauthorized
Resolution: The client does not have a valid scope to retrieve the default organization data-sharing permissions. Create a new token with the required scope. Refer to Scope section for details. - AUTHENTICATION_FAILUREHTTP 401
Authentication failed
Resolution: Pass the access token in the request header of the API call. - INVALID_URL_PATTERNHTTP 404
Please check if the URL trying to access is a correct one
Resolution: The request URL specified is incorrect. Specify a valid request URL. Refer to the Request URL section for details.Refer to the request URL section above. - INTERNAL_ERRORHTTP 500
Internal Server Error
Resolution: Unexpected and unhandled exception in the server. Contact support team.
Sample Response
Copied{
"data_sharing": [
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Leads",
"id": "2276164000000000125"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Accounts",
"id": "2276164000000000127"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Contacts",
"id": "2276164000000000129"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Deals",
"id": "2276164000000000131"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Campaigns",
"id": "2276164000000000133"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Tasks",
"id": "2276164000000000143"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Events",
"id": "2276164000000000145"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Cases",
"id": "2276164000000000159"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Solutions",
"id": "2276164000000000161"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "public_read_only",
"module": {
"api_name": "Products",
"id": "2276164000000000163"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Vendors",
"id": "2276164000000000165"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Price_Books",
"id": "2276164000000000167"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Quotes",
"id": "2276164000000000169"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Sales_Orders",
"id": "2276164000000000171"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Purchase_Orders",
"id": "2276164000000000173"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Invoices",
"id": "2276164000000000175"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "private",
"module": {
"api_name": "Calls",
"id": "2276164000000017015"
},
"rule_computation_running": false
},
{
"public_in_portals": false,
"share_type": "public",
"module": {
"api_name": "Visits",
"id": "2276164000000068007"
},
"rule_computation_running": false
}
]
}