Request
| Basic information | |
|---|---|
| HTTP URL | https://oapi.dingtalk.io/topapi/role/simplelist |
| HTTP Method | POST |
| Supported app types | appType-Internal appappType-Third-party enterprise app |
| Required permissions | permission-qyapi_get_department_member-Read permission for department users in Contacts |
Query parameter
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | String | Yes | bE74xxxx | The app credential used to call this API. - For an internal app, obtain it through the API for obtaining the access_token of an internal app. - For a third-party enterprise app, obtain it through the API for obtaining the access_token of a third-party enterprise. |
Request body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| role_id | Number | Yes | 1203141 | The role ID. To get this value, call the Get the role list API and use the value of the id parameter. |
| size | Number | No | 20 | The page size. Note This parameter takes effect only when set together with the offset parameter. The default value is 20 and the maximum value is 100. |
| offset | Number | No | 0 | The pagination offset. Note This parameter takes effect only when set together with the size parameter. The offset starts from 0. |
Request example
Response
Response body
| Name | Type | Example | Description |
|---|---|---|---|
| request_id | String | f6249uw1kuus | The request ID. |
| errcode | Number | 0 | The return code. |
| errmsg | String | ok | The description of the return code. |
| result | PageVo | The query result. | |
| hasMore | Boolean | true | Indicates whether more data is available. |
| list | OpenEmpSimple[] | The list of users assigned to the role. | |
| userid | String | manager4220 | The user ID of the user. |
| name | String | John | The name of the user. |
| manageScopes | OrgDeptVo[] | The management scope. | |
| dept_id | Number | 11 | The department ID. |
| name | String | Discipline Inspection Department | The department name. |
Response body example
Error codes
If an error occurs when you call this API, look up the solution in the Global error codes document based on the error message.| Error code (errorcode) | Error message (errmsg) | Solution |
|---|---|---|
| 33011 | Invalid roleId | Check whether the roleId is correct. |
| 40069 | Invalid size | Adjust the page size. |
| 40068 | Invalid offset | Adjust the offset. |
| 400001 | System error | Try again later. |