查询组织列表

通过 OpenAPI 查询组织列表。

适用版本

企业专属版、企业标准版

服务接入点

获取服务接入点,替换 API 请求语法中的 {domain}

授权信息

产品

资源

所需权限

组织管理

组织

只读

请求语法

GET https://{domain}/oapi/v1/platform/organizations

请求说明

企业标准版

查询某用户加入的组织列表

curl -X 'GET' \
  'https://openapi-rdc.aliyuncs.com/oapi/v1/platform/organizations' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

企业专属版

查询某用户加入的组织列表

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/organizations?userId=99d1****6124&page=1&perPage=100' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

查询所有组织列表

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/organizations?page=1&perPage=100' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

请求头(Headers)

x-yunxiao-token string (必选)

个人访问令牌。您可参考个人访问令牌获取。

示例:pt-0fh3****0fbG_35af****0484。

请求参数

userId string (可选)

用户 ID。

  • 标准版:返回个人访问令牌对应用户加入的组织列表,此参数无效。

  • 专属版:为空返回所有组织列表,不为空返回加入的组织列表。

page integer (可选)默认值为1

【仅专属版适用】当前页。

perPage integer (可选)默认为100

【仅专属版适用】每页数据条数,取值范围:[1,100]

返回参数

返回示例

[
    {
        "createdAt": "2023-08-31T03:59:16.201Z",
        "creatorId": "99d1****6124",
        "defaultRole": "99d1****6124",
        "description": "示例描述",
        "id": "99d1****6124",
        "name": "示例名",
        "updateAt": "2023-08-31T03:59:16.201Z"
    }
]

createdAt string

创建时间。

creatorId string

组织创建者。

defaultRolestring

默认角色。

description string

组织描述。

idstring

组织 ID。

namestring

组织名称。

updateAtstring

更新时间。

响应头

参数

描述

示例值

x-next-page

【仅专属版适用】下一页。

2

x-page

【仅专属版适用】当前页。

1

x-per-page

【仅专属版适用】每页数据条数。

100

x-prev-page

【仅专属版适用】上一页。

1

x-total

【仅专属版适用】总数据量。

2

x-total-pages

【仅专属版适用】总分页数。

1

错误码

访问错误码中心查看 API 相关错误码。