智能双录质检 GetCurrentUser

By | 2021年4月23日

调用GetCurrentUser获取当前用户的概览信息

调用该接口,会返回用户的基础信息、部门信息以及开通的服务列表

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

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

系统规定参数。取值:GetCurrentUser。

返回数据

名称 类型 示例值 描述
Code String OK
Data Struct

BizList Array of BizList

业务开通列表

Code String cloud

业务代码

Status String available

状态

CreatedAt String 2020-07-14T14:01:41.000+08:00

创建日期

Departments Array of Departments

部门列表

Description String 部门

描述

GmtCreate String 2020-07-14T14:01:41.000+08:00

创建日期

GmtModified String 2020-07-14T14:01:41.000+08:00

创建日期

Id String 59b0bbfe-929b-4a8c-9833-3ce70b4bad38

id

Name String 部门

姓名

Email String email@.com

电子邮件

Id String 59b0bbfe-929b-4a8c-9833-3ce70b4bad38

id

Name String 姓名

姓名

PhoneNumber String 193232323

手机号码

Role String admin

角色

Source String ram

来源

UpdatedAt String 2020-07-14T14:01:41.000+08:00

更新日期

Username String test

用户名

Message String
RequestId String 59b0bbfe-929b-4a8c-9833-3ce70b4bad38

示例

请求示例

http(s)://[Endpoint]/?Action=GetCurrentUser
&<公共请求参数>

正常返回示例

XML 格式

<RequestId>59b0bbfe-929b-4a8c-9833-3ce70b4bad38</RequestId>
<Message>-</Message>
<Data>
    <Role>admin</Role>
    <Departments>
        <GmtModified>2020-07-14T14:01:41.000+08:00</GmtModified>
        <GmtCreate>2020-07-14T14:01:41.000+08:00</GmtCreate>
        <Description>部门</Description>
        <Id>59b0bbfe-929b-4a8c-9833-3ce70b4bad38</Id>
        <Name>部门</Name>
    </Departments>
    <BizList>
        <Status>available</Status>
        <Code>cloud</Code>
    </BizList>
    <BizList>
        <Detail>
            <BizCount>100</BizCount>
            <ExpirationDay>10</ExpirationDay>
            <UsingDay>15</UsingDay>
            <ExpirationDate>2020-12-05T18:48:35.000+08:00</ExpirationDate>
            <DetectDuration>1000</DetectDuration>
        </Detail>
    </BizList>
    <Email>email@.com</Email>
    <Username>test</Username>
    <CreatedAt>2020-07-14T14:01:41.000+08:00</CreatedAt>
    <PhoneNumber>193232323</PhoneNumber>
    <Id>59b0bbfe-929b-4a8c-9833-3ce70b4bad38</Id>
    <UpdatedAt>2020-07-14T14:01:41.000+08:00</UpdatedAt>
    <Source>ram</Source>
    <Name>姓名</Name>
</Data>
<Code>OK</Code>

JSON 格式

{
    "RequestId": "59b0bbfe-929b-4a8c-9833-3ce70b4bad38",
    "Message": "-",
    "Data": {
        "Role": "admin",
        "Departments": {
            "GmtModified": "2020-07-14T14:01:41.000+08:00",
            "GmtCreate": "2020-07-14T14:01:41.000+08:00",
            "Description": "部门",
            "Id": "59b0bbfe-929b-4a8c-9833-3ce70b4bad38",
            "Name": "部门"
        },
        "BizList": [
            {
                "Status": "available",
                "Code": "cloud"
            },
            {
                "Detail": {
                    "BizCount": 100,
                    "ExpirationDay": 10,
                    "UsingDay": 15,
                    "ExpirationDate": "2020-12-05T18:48:35.000+08:00",
                    "DetectDuration": 1000
                }
            }
        ],
        "Email": "email@.com",
        "Username": "test",
        "CreatedAt": "2020-07-14T14:01:41.000+08:00",
        "PhoneNumber": 193232323,
        "Id": "59b0bbfe-929b-4a8c-9833-3ce70b4bad38",
        "UpdatedAt": "2020-07-14T14:01:41.000+08:00",
        "Source": "ram",
        "Name": "姓名"
    },
    "Code": "OK"
}

错误码

HttpCode 错误码 错误信息 描述
403 Forbidden Access to this resource on the server is denied. 没有权限访问该资源
500 InternalServerError An internal server error occurred. 服务器内部出错
400 InvalidRequest The request is invalid. 无效的请求
404 ResourceNotFound The specified resource does not exist. 找不到指定的资源
401 Unauthorized The request requires user authentication. 该请求需要进行身份认证

访问错误中心查看更多错误码。

访问错误中心查看更多错误码。

请关注公众号获取更多资料

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Iconic One Theme | Powered by Wordpress