用户预览

调试

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

请求语法

POST /user/preview/detail HTTP/1.1
Content-Type:application/json

{
  "userId" : Long,
  "clientToken" : "String"
}

请求参数

表 1. 请求Body参数
参数名称 类型 是否必选 示例 说明
userId Long 123

用户ID

clientToken String 2b63cdef-7ac3-4892-a76d-0f3389ef729f

clientToken

响应体语法

HTTP/1.1 200 OK
Content-Type:application/json

{
  "requestId" : "String",
  "data" : {
    "ramId" : "String",
    "userId" : Long,
    "username" : "String",
    "phone" : "String",
    "email" : "String",
    "serviceGroups" : [ {
      "serviceGroupId" : Long,
      "serviceGroupName" : "String",
      "groupDesc" : "String"
    } ]
  }
}

响应参数

表 2. 响应Body参数
参数名称 类型 示例 说明
requestId String 2b63cdef-7ac3-4892-a76d-0f3389ef7291

Id of the request

data Object

data

ramId Long 321

RAM子账号ID

userId Long 321

用户ID

username String 小明

用户昵称

phone String 1390000****

手机号

email String 12121****@163.com

邮箱

serviceGroups Array of serviceGroups

人员所属服务组

serviceGroupId Long 123

服务组id

serviceGroupName String 服务组A

服务组名称

serviceGroupDescription String 描述

服务组描述

示例1

POST /user/preview/detail HTTP/1.1
Host:gemp.aliyuncs.com
Content-Type:application/json

{
  "userId" : 123,
  "clientToken" : "2b63cdef-7ac3-4892-a76d-0f3389ef729f"
}

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<ListUserSerivceGroupsResponse>
    <requestId>2b63cdef-7ac3-4892-a76d-0f3389ef7291</requestId>
    <data>
        <ramId>321</ramId>
        <userId>321</userId>
        <username>小明</username>
        <phone>1390000****</phone>
        <email>12121****@163.com</email>
        <serviceGroups>
            <serviceGroupId>123</serviceGroupId>
            <serviceGroupName>服务组A</serviceGroupName>
            <serviceGroupDescription>描述</serviceGroupDescription>
        </serviceGroups>
    </data>
</ListUserSerivceGroupsResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "requestId" : "2b63cdef-7ac3-4892-a76d-0f3389ef7291",
  "data" : {
    "ramId" : 321,
    "userId" : 321,
    "username" : "小明",
    "phone" : "1390000****",
    "email" : "12121****@163.com",
    "serviceGroups" : [ {
      "serviceGroupId" : 123,
      "serviceGroupName" : "服务组A",
      "serviceGroupDescription" : "描述"
    } ]
  }
}

错误码

HttpCode 错误码 错误信息 描述
404 UserTypeNotExisted The user type does not exist. 用户类型不存在

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

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

开发者资源

  • SDK

    阿里云为您提供多种语言的SDK,帮助您快速通过API集成阿里云的产品和服务,推荐您使用SDK调用API,已免除您手动签名验证。

  • OpenAPI Explorer

    快速检索,可视化调试API,在线命令行工具,同步动态生成可执行的SDK代码示例。

  • 阿里云CLI

    阿里云资产管理和配置工具,可通过命令方式同时管理多个阿里云产品和服务,简单快捷,是您上云好帮手。