Queries a list of members.
Prerequisites
Replace
<domain>in your API request URL with the endpoint that you obtain.
Authorization information
Application | Resource | Required permission |
Administration | Member | Read-only |
Request syntax
POST https://{domain}/oapi/v1/platform/organizations/members:searchRequest headers
Parameter | Type | Required | Description | Example |
x-yunxiao-token | string | Yes | The access token. | pt-0fh3****0fbG_35af****0484 |
Request parameters
Parameter | Type | Location | Required | Description | Example |
- | object | body | No | ||
deptIds | array[string] | body | No | List of organization departments to which member belongs. This parameter is not required. | [99d1****6124] |
includeChildren | boolean | body | No | Whether to include subdepartments. Default value: false, which means does not includ subdepartments. When deptIds is empty, this field does not take effect. | false |
nextToken | string | body | No | ||
page | integer | body | No | The page number, starting from 1. Default value: 1. | 1 |
perPage | integer | body | No | The number of entries per page. Valid values: 1 to 100. Default value: 100. | 100 |
query | string | body | No | Query parameter. | phw |
roleIds | array[string] | body | No | Role list. This parameter is not required. | [99d1****6124] |
statuses | array[string] | body | No | Member status filter. By default, members in the ENABLED status are returned. Valid values: ENABLED,DISABLED,UNDELETED,DELETED,NORMAL_USING,UNVISITED. ENABLED=NORMAL_USING+UNVISITED;UNDELETED=ENABLED+DISABLED. | [ENABLED] |
Sample request
curl -X 'POST' \
'https://test.rdc.aliyuncs.com/oapi/v1/platform/organizations/members:search' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"deptIds": [99d1****6124],
"includeChildren": false,
"nextToken": "",
"page": 1,
"perPage": 100,
"query": "phw",
"roleIds": [99d1****6124],
"statuses": [ENABLED]
}'Response parameters
Parameter | Type | Description | Example |
- | array | ||
- | object | ||
deptIds | array[string] | List of organization departments to which member belongs. | [99d1****6124] |
id | string | Member ID. | 99d1 **** 6124 |
joined | string | The time when the member joined the organization. | 2023-08-31T03:59:16.201Z |
lastUpdated | string | The last time when the database updated. | 2023-08-31T03:59:16.201Z |
name | string | Member name. | Sample Name |
organizationId | string | Organization ID. | 99d1 **** 6124 |
roleIds | array[string] | Role information. | [99d1****6124] |
status | string | Member status. Valid values: ENABLED,DISABLED,UNDELETED,DELETED,NORMAL_USING,UNVISITED. | ENABLED |
userId | string | User ID. | 99d1 **** 6124 |
visited | string | Last visit time. | 2023-08-31T03:59:16.201Z |
Sample success responses
[
{
"deptIds": [99d1****6124],
"id": "99d1****6124",
"joined": "2023-08-31T03:59:16.201Z",
"lastUpdated": "2023-08-31T03:59:16.201Z",
"name": "Sample Name",
"organizationId": "99d1****6124",
"roleIds": [99d1****6124],
"status": "ENABLED",
"userId": "99d1****6124",
"visited": "2023-08-31T03:59:16.201Z"
}
]Response headers
Parameter | Description | Example |
x-next-page | The next page. | 1 |
x-page | The current page. | 2 |
x-per-page | The number of entries per page. | 1 |
x-prev-page | The previous page. | 2 |
x-total | The total number of entries returned. | 1 |
x-total-pages | The total number of pages. | 10 |
Error codes
For a list of error codes, see Service error codes.