检索默认数据共享设置
目的
检索您组织的模块默认数据共享权限。
端点
- GET /settings/data_sharing
请求详情
请求 URL
{api-domain}/crm/{version}/settings/data_sharing
标题
授权: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
范围
ZohoCRM.settings.data_sharing.READ
(或)
ZohoCRM.settings.data_sharing.ALL
示例请求
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/data_sharing"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"响应 JSON
- data_sharingJSON array
包含每个模块的组织默认数据共享权限。
- public_in_portalsBoolean
显示模块是否配置在公共门户中。
- true - 模块配置在公共门户中。
- false - 模块未配置在公共门户中。
- share_typestring
表示Users在Zoho CRM中每个模块的访问级别。
可能的值:- private: 只有记录所有者及其上级可以查看模块中的记录。
- public_read_only: Users可以查看其他人的记录,但不能修改或删除它们。
- public_read_write: Users可以查看和修改其他人的记录,但不能删除它们。
- public: Users可以查看、修改和删除其他人的记录。
- moduleJSON object
包含模块的 API 名称及其 ID。
- rule_computation_runningJSON object
此键显示模块的共享规则是否正在运行。
在UI中,如果你前往 设置 > 安全控制 > Role和共享 > 数据共享设置 > 共享规则 > 你可以看到 重新运行选项。
如果你重新运行为模块配置的规则,此键将为true,直到过程完成。如果值为false,则当前没有规则在为模块运行。
可能的错误
- INVALID_REQUEST_METHODHTTP 400
HTTP请求方法类型无效
解决方法:您指定了一个无效的HTTP方法来访问API URL。
请指定一个有效的请求方法。请参阅端点部分。 - OAUTH_SCOPE_MISMATCHHTTP 401
未经授权
解决方法:客户端没有有效的范围来检索默认的组织数据共享权限。请创建一个具有所需范围的新令牌。详情请参阅范围部分。 - Authentication_FAILUREHTTP 401
Authentication 失败
解决方法: 在API调用的请求头中传递访问令牌。 - INVALID_URL_PATTERNHTTP 404
请检查尝试访问的URL是否正确
解决方案: 请求的URL不正确。请指定一个有效的请求URL。详情请参阅请求URL部分。请参阅上面的请求URL部分。 - INTERNAL_ERRORHTTP 500
内部服务器错误
解决方法:服务器中出现了意外且未处理的异常。请联系支持团队。
示例响应
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
}
]
}