You need to enable JavaScript to run this app.
导航
ListAccounts - 获取企业组织内账号列表
最近更新时间:2024.01.11 17:42:35首次发布时间:2024.01.11 17:42:35

获取企业组织内账号列表

请求参数

名称
类型
是否必填
示例值
描述
Action
String

ListAccounts

要执行的操作,取值:ListAccounts

Version
String

2022-01-01

API的版本,取值:2022-01-01

Limit
Integer

每一页显示数量

Offset
Integer

页数,起始值1

OrgUnitId
String

组织单元ID

VerificationId
String

认证主体ID

Search
String

显示名称或成员账号Id模糊查询

OrderBy
Integer

排序顺序,1.降序 2.升序,默认为1

IncludeTags
Boolean

是否返回tags信息

响应数据

名称
类型
示例值
描述
Offset
Integer

页数

Limit
Integer

每一页显示数量

Total
Integer

总数

AccountList
Array of AccountAndTag

账号列表

示例

请求

GET /?Action=ListAccounts&Version=2022-01-01 
--header 'Content-Type: application/json' \
-d '{"OrgId": 0011223344556677889","Limit":10,"Offset":1,"Search":"","OrderBy":1,"includeTags":true}'

响应

{
    "ResponseMetadata": {
        "RequestId": "20231013163537F34A54826CC7100AD6DC",
        "Action": "ListAccounts",
        "Version": "2022-01-01",
        "Service": "organization",
        "Region": "cn-north-1"
    },
    "Result": {
        "Limit": 1000,
        "Offset": 1,
        "Total": 2,
        "AccountList": [
            {
                "ID": "1122334455667788990",
                "CreatedTime": "2023-03-02T19:36:59+08:00",
                "UpdatedTime": "2023-03-02T20:40:03+08:00",
                "Owner": "2111111111",
                "OrgID": "0011223344556677889",
                "OrgType": 1,
                "OrgUnitID": "0011223344556677889",
                "OrgVerificationID": "0011223344556677889",
                "AccountID": "2111111112",
                "AccountName": "x",
                "ShowName": "x",
                "Description": "description",
                "IamRole": "OrganizationAccessControlRole",
                "JoinType": 1,
                "AllowConsole": 1,
                "AllowExit": 1,
                "OrgUnitName": "Root",
                "IsOwner": 0
            },
            {
                "ID": "1122334455667788999",
                "CreatedTime": "2022-11-23T16:10:19+08:00",
                "UpdatedTime": "2022-11-23T16:10:19+08:00",
                "Owner": "2111111111",
                "OrgID": "0011223344556677889",
                "OrgType": 1,
                "OrgUnitID": "0011223344556677889",
                "OrgVerificationID": "0011223344556677889",
                "AccountID": "2111111111",
                "AccountName": "owner",
                "ShowName": "owner",
                "Description": "",
                "IamRole": "",
                "JoinType": 1,
                "AllowConsole": 1,
                "AllowExit": 2,
                "OrgUnitName": "Root",
                "IsOwner": 1,
                "Tags": [
                    {
                        "Key": "key",
                        "Value": "value",
                        "Type": "Custom"
                    }
                ]
            }
        ]
    }
}

错误码

下表提供了该接口业务逻辑相关的错误码。公共错误码请参见公共错误码

HttpCode
错误码
错误信息
描述
500
InternalError
Unknown internal error: %v

未知错误,根据错误信息判断详情

404
RecordNotExists
record %s not exists

记录不存在