通过 OpenAPI 查询组织成员信息(用户ID)。
适用版本 | 企业标准版、企业专属版 |
说明
专属版“组织”对应标准版“企业”概念,本文在专属版中代表组织相关接口,在标准版中代表企业相关接口。
服务接入点与授权信息
获取服务接入点,替换 API 请求语法中的 <domain> :服务接入点(domain)。
获取个人访问令牌,具体操作,请参见获取个人访问令牌。
请求语法
GET https://<doamin>/oapi/v1/platform/organizations/<organizationId>/members:readByUser?userId=<userId>
请求头
参数 | 类型 | 是否必填 | 描述 | 示例值 |
x-yunxiao-token | string | 是 | 个人访问令牌。 | pt-0fh3****0fbG_35af****0484 |
请求参数
参数 | 类型 | 位置 | 是否必填 | 描述 | 示例值 |
organizationId | string | path | 是 | 组织 ID。 | 99d1****71d4 |
userId | string | query | 是 | 用户 ID。 | 3ab3****b634 |
请求示例
curl -X 'GET' \
'https://test.rdc.aliyuncs.com/oapi/v1/platform/organizations/99d1****71d4/members:readByUser?userId=3ab3****b634' \
-H 'accept: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
返回参数
参数 | 类型 | 描述 | 示例值 |
deptIds | string | 部门 ID。 | 8446****ce9f |
id | string | 成员 ID。 | 3a41****3eca |
joined | string | 加入时间。 | 2024-07-04T03:45:11.547648Z |
name | string | 成员名称。 | name1 |
organizationId | string | 组织 ID。 | 99d1****71d4 |
roleIds | string | 角色 ID。 | org_member |
status | string | 状态。 | ENABLED |
userId | string | 用户 ID。 | 3ab3****b634 |
visited | string | 访问组织时间。 | 2024-07-05T12:45:11.547345Z |
返回示例
{
"deptIds": [
"8446****ce9f"
],
"id": "3a41****3eca",
"joined": "2024-07-04T03:45:11.547648Z",
"name": "name1",
"organizationId": "99d1****71d4",
"roleIds": [
"org_member"
],
"status": "ENABLED",
"userId": "3ab3****b634",
"visited": "2024-07-05T12:45:11.347345Z"
}
错误码
访问错误码中心查看 API 相关错误码。
文档内容是否对您有帮助?