API call description
After calling the Add or modify visibility restriction settings for Contacts API, call this API to paginate through the visibility restriction settings configured for your organization.Request
Basic information
| Field | Value |
|---|---|
| HTTP URL | https://api.dingtalk.io/v1.0/contact/restrictions/settings |
| HTTP Method | GET |
| Supported app type | appType-Internal app |
| Permissions required | permission-Contact.Visibility.ReadWrite-Permission to manage Contacts data visibility |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
| x-acs-dingtalk-access-token | String | Yes | The access credential for calling this API. Obtain it by calling the Obtain the access token of an internal app API. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| nextToken | Long | No | The pagination cursor. - Leave this parameter empty for the first call. - For subsequent calls, set this parameter to the nextToken returned by the previous call. |
| maxResults | Integer | No | The maximum number of results to return. Maximum value: 100. |
Request example
HTTPResponse
Response body
| Name | Type | Description |
|---|---|---|
| hasMore | Boolean | Whether more data is available. - true: Yes - false: No |
| nextToken | Long | The pagination cursor. |
| list | Array | The list of visibility restriction settings for Contacts. |
| id | Long | The setting ID. |
| name | String | The name of the visibility restriction setting for Contacts. |
| description | String | The description of the visibility restriction for Contacts. |
| subjectUserIds | Array of String | The list of userIds subject to the Contacts visibility restriction. |
| subjectDeptIds | Array of Long | The list of deptIds subject to the Contacts visibility restriction. |
| subjectTagIds | Array of Long | The list of roleIds subject to the Contacts visibility restriction. |
| type | String | The restriction type. - excludeNode: Only users and departments in the allowlist are visible. - onlySelf: Only the user themselves is visible. - onlySelfDeptAndChild: Only the user’s own department and its sub-departments are visible. |
| excludeUserIds | Array of String | The list of userIds in the allowlist. |
| excludeDeptIds | Array of Long | The list of deptIds in the allowlist. |
| excludeTagIds | Array of Long | The list of roleIds in the allowlist. |
| active | Boolean | Whether the setting is in effect. - true: In effect - false: Not in effect |
| restrictInUserProfile | Boolean | Whether to also restrict viewing of the Profile page. - true: Yes - false: No |
| restrictInSearch | Boolean | Whether to also restrict Search. - true: Yes - false: No |
Response body example
Error codes
If an error occurs when calling this API, look up the solution in the Global error codes document based on the error message.| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 500 | system.error | Query service error | Query service error |