Data Sharing Rules Summary Filter
Purpose
To get module-wise data on the number and running status of a filtered set of data sharing rules
Request Details
Request URL
{api-domain}/crm/{version}/settings/data_sharing/rules/actions/summary
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.data_sharing.READ
Supported modules
Leads, Accounts, Contacts, Deals, Tasks, Meetings, Calls, Products, Vendors, Price Books, Quotes, Sales Orders, Purchase Orders, Invoices, and Custom modules
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/data_sharing/rules/actions/summary"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d @summaryoffilteredsharingrules.json
-X POST
Input JSON
- group_operator string, optionalSpecifies how the filter conditions are combined (e.g., "and", "or").
- group array, optionalContains individual filter conditions.
- field JSON object, mandatoryRepresents the field being filtered.
- api_name string, mandatoryRepresents the API name of the field.
- value string or array, mandatoryThe value to compare against.
- comparator string, mandatoryThe comparison operator (e.g., "equal", "in").
The table below presents a list of keys and their corresponding operators:
Key | Operator |
---|---|
superiors_allowed | equal |
status | equal |
shared_to.type | equal |
shared_to.resource.id | in |
shared_from.type | equal |
shared_to.resource.id | in |
name | like |
permission_type | equal |
Sample Filter
Copied{
"filters": [
{
"group_operator": "and",
"group": [
{
"group_operator": "or",
"group": [
{
"group_operator": "and",
"group": [
{
"field": {
"api_name": "shared_to.resource.id"
},
"value": [
"3602353000000601002"
],
"comparator": "in"
},
{
"field": {
"api_name": "shared_to.type"
},
"value": "groups",
"comparator": "equal"
}
]
},
{
"group_operator": "and",
"group": [
{
"field": {
"api_name": "shared_to.resource.id"
},
"value": [
"3602353000000015969"
],
"comparator": "in"
},
{
"field": {
"api_name": "shared_to.type"
},
"value": "roles",
"comparator": "equal"
}
]
}
]
},
{
"field": {
"api_name": "status"
},
"value": "active",
"comparator": "equal"
}
]
}
]
}
Response JSON
- module JSON objectRepresents api name and the unique identifier of the module.
- rule_computation_status BooleanIndicates whether the rule is currently in running status for the records of the module
Possible values:
true
false - rule_count integerRepresents the number of sharing rules configured for the module.
Possible Errors
- INVALID_DATA HTTP 400
- Maximum length exceeded for the number of sharing rules.
Resolution: You can create only one sharing rule at a time. Try creating a single sharing rule. - Invalid criteria given
Resolution: Specify valid criteria. Refer to the Input JSON section for more details. - Invalid data given in the filters JSON array
Resolution: Specify valid values in the "filters" JSON array. Refer to the above Input JSON and table sections for more details. - Invalid data given in the field JSON object
Resolution: Specify valid values in the "field" JSON object. Refer to the Input JSON section for more details. - Invalid comparator given
Resolution: Specify valid comparators in the input body. Refer to the Input JSON section for more details. - Invalid value given in the "group_operator" key
Resolution: Specify a valid value. Supported values are "AND", "OR".
- Maximum length exceeded for the number of sharing rules.
- MANDATORY_NOT_FOUNDHTTP 400
One or more mandatory keys missing
Resolution: Specify all the mandatory keys. Refer to the Input JSON section to know the mandatory fields. - DEPENDENT_FIELD_MISSINGHTTP 400
One or more dependent fields are missing
Resolution: Check the Input JSON section to avoid missing dependent fields. - EXPECTED_FIELD_MISSINGHTTP 400
The "filters" JSON array is empty
Resolution: Specify atleast one filter in the "filters" JSON array. - NOT_ALLOWED HTTP 400
Status key should not be passed in the Input JSON.
Resolution: Provide a valid Input JSON without status key. - OAUTH_SCOPE_MISMATCHHTTP 401
The access token you have used to make this API call does not have the required scope.
Resolution: Generate a new access token with the required scopes for this API. Refer to Scope section at the beginning of this page for the list of required scopes. - NO_PERMISSIONHTTP 403
You do not have Modules Customization permission.
Resolution: Get permission for the Modules Customization. - INVALID_URL_PATTERNHTTP 404
The request URL is incorrect.
Resolution: Specify a valid request URL. Refer to request URL section at the beginning of this page for more details. - INTERNAL_ERRORHTTP 500
Unexpected and unhandled exception in the server.
Resolution: Contact the support team at support@zohocrm.com.
Sample Response
Copied{
"sharing_rules_summary": [
{
"module": {
"api_name": "Leads",
"id": "3602353000000000125"
},
"rule_computation_status": false,
"rule_count": 4
},
{
"module": {
"api_name": "Accounts",
"id": "3602353000000000127"
},
"rule_computation_status": false,
"rule_count": 1
},
{
"module": {
"api_name": "Deals",
"id": "3602353000000000131"
},
"rule_computation_status": false,
"rule_count": 1
}
]
}