获取用户所在组织机构的路径
GET
/api/v2/users/{id}/orgs
请求参数
Path 参数
id
string
用户 ID
示例值:
61de98be25bd7eb96892f46c
Header 参数
Authorization
string
token
示例值:
Bearer token
x-authing-userpool-id
string
用户池 ID
示例值:
61b95d6c96d42670da568408
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://core.authing.cn/api/v2/users/61de98be25bd7eb96892f46c/orgs' \
--header 'Authorization: Bearer token' \
--header 'x-authing-userpool-id: 61b95d6c96d42670da568408'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
array [array]
必需
string
可选
示例
{
"code": 200,
"message": "获取用户组织机构列表成功",
"data": [
[
{
"type": "org",
"id": "61de98be49267601119fb83a",
"createdAt": "2022-01-12T09:00:46.843Z",
"updatedAt": "2022-01-12T09:00:46.925Z",
"userPoolId": "61b95d6c96d42670da568408",
"rootNodeId": "61de98be25bd7eb96892f46c",
"logo": null,
"tenantId": null
},
{
"type": "node",
"id": "61de98be25bd7eb96892f46c",
"createdAt": "2022-01-12T09:00:46.880Z",
"updatedAt": "2022-01-12T09:00:46.880Z",
"userPoolId": "61b95d6c96d42670da568408",
"orgId": "61de98be49267601119fb83a",
"name": "北京非凡科技有限公司",
"nameI18n": null,
"description": null,
"descriptionI18n": null,
"order": null,
"code": "feifan",
"leaderUserId": null
},
{
"type": "node",
"id": "61de98be345a0152e8559104",
"createdAt": "2022-01-12T09:00:46.906Z",
"updatedAt": "2022-01-12T09:00:46.906Z",
"userPoolId": "61b95d6c96d42670da568408",
"orgId": "61de98be49267601119fb83a",
"name": "研发",
"nameI18n": null,
"description": "研发部门",
"descriptionI18n": null,
"order": null,
"code": "dev",
"leaderUserId": null
}
]
]
}
修改于 2022-01-17 07:56:22