作者: 浏览量:301 更新时间: 2020.09.10
用户操作API,适用于标准模式和托管模式。
版本 : 2.0.0
域名 : {domainId}.api.aliyunpds.com
基础路径 : /v2
协议 : HTTP, HTTPS
application/jsonapplication/json
POST /v2/user/create
创建用户,只有管理员可以调用
创建用户的请求参数
名称 : 创建用户请求标志 : 必填类型 : CreateUserRequest
| HTTP代码 | 说明 | 类型 |
|---|---|---|
| 201 | 创建用户成功 | CreateUserResponse |
| 400 | 1. InvalidParameterError:请求参数不正确 2. InvalidRequestJSONFormatError 请求JSON格式错误 | InvalidParameterError |
| 403 | 1.ForbiddenNoPermissionError 没有用户接口权限 2.ForbiddenAccountNotFoundError 账号没找到 | ForbiddenNoPermissionError |
| 500 | 服务内部故障 | InternalErrorError |
| 503 | 服务临时不可用 | ServiceUnavailableError |
/v2/user/create
{"avatar" : "http://a.b.c/pds.jpg","description" : "pds team user","email" : "123@pds.com","nick_name" : "pdsuser","phone" : "13700000000","role" : "user","status" : "enabled","user_id" : "pdsuserid","user_name" : "abc"}
{"avatar" : "http://a.b.c/pds.jpg","created_at" : 1567407718386,"default_drive_id" : "123","description" : "pds team user","domain_id" : "hz999","email" : "123@pds.com","nick_name" : "abc","phone" : "13700000000","role" : "user","status" : "enabled","updated_at" : 1567407718386,"user_id" : "pdsuserid","user_name" : "name"}
{"code" : "InvalidParameter","message" : "The input parameter {parameter_name} is not valid."}
{"code" : "ForbiddenNoPermission","message" : "No Permission to access resource {resource_name}."}
{"code" : "InternalError","message" : "The request has been failed due to some unknown error."}
{"code" : "ServiceUnavailable","message" : "The request has failed due to a temporary failure of the server."}
POST /v2/user/delete
只有管理员可以调用
删除用户的请求参数
名称 : 删除用户请求标志 : 必填类型 : DeleteUserRequest
| HTTP代码 | 说明 | 类型 |
|---|---|---|
| 204 | 无返回内容 | 无内容 |
| 400 | 1. InvalidParameterError:请求参数不正确 2. InvalidRequestJSONFormatError 请求JSON格式错误 | InvalidParameterError |
| 403 | 1.ForbiddenNoPermissionError 没有用户接口权限 2.ForbiddenAccountNotFoundError 账号没找到 | ForbiddenNoPermissionError |
| 500 | 服务内部故障 | InternalErrorError |
| 503 | 服务临时不可用 | ServiceUnavailableError |
/v2/user/delete
{"user_id" : "pdsuserid"}
{"code" : "InvalidParameter","message" : "The input parameter {parameter_name} is not valid."}
{"code" : "ForbiddenNoPermission","message" : "No Permission to access resource {resource_name}."}
{"code" : "InternalError","message" : "The request has been failed due to some unknown error."}
{"code" : "ServiceUnavailable","message" : "The request has failed due to a temporary failure of the server."}
POST /v2/user/get
获取用户详细信息,普通用户只能获取自己的信息,管理员可以获取任意用户的信息。
获取用户信息的请求参数
名称 : 获取用户信息请求标志 : 必填类型 : GetUserRequest
| HTTP代码 | 说明 | 类型 |
|---|---|---|
| 200 | 获取用户信息成功 | GetUserResponse |
| 400 | 1. InvalidParameterError:请求参数不正确 2. InvalidRequestJSONFormatError 请求JSON格式错误 | InvalidParameterError |
| 403 | 1.ForbiddenNoPermissionError 没有用户接口权限 2.ForbiddenAccountNotFoundError 账号没找到 | ForbiddenNoPermissionError |
| 404 | 指定的用户不存在 | NotFoundError |
| 500 | 服务内部故障 | InternalErrorError |
| 503 | 服务临时不可用 | ServiceUnavailableError |
/v2/user/get
{"user_id" : "string"}
{"avatar" : "http://a.b.c/pds.jpg","created_at" : 1567407718386,"default_drive_id" : "123","description" : "pds team user","domain_id" : "hz999","email" : "123@pds.com","nick_name" : "abc","phone" : "13700000000","role" : "user","status" : "enabled","updated_at" : 1567407718386,"user_id" : "pdsuserid","user_name" : "name"}
{"code" : "InvalidParameter","message" : "The input parameter {parameter_name} is not valid."}
{"code" : "ForbiddenNoPermission","message" : "No Permission to access resource {resource_name}."}
{"code" : "NotFound","message" : "The resource {resource_name} cannot be found. Please check."}
{"code" : "InternalError","message" : "The request has been failed due to some unknown error."}
{"code" : "ServiceUnavailable","message" : "The request has failed due to a temporary failure of the server."}
POST /v2/user/list
只有管理员可以调用
列举用户的请求参数
名称 : 列举用户请求标志 : 必填类型 : ListUserRequest
| HTTP代码 | 说明 | 类型 |
|---|---|---|
| 200 | 列举用户列表成功 | ListUserResponse |
| 400 | 1. InvalidParameterError:请求参数不正确 2. InvalidRequestJSONFormatError 请求JSON格式错误 | InvalidParameterError |
| 403 | 1.ForbiddenNoPermissionError 没有用户接口权限 2.ForbiddenAccountNotFoundError 账号没找到 | ForbiddenNoPermissionError |
| 500 | 服务内部故障 | InternalErrorError |
| 503 | 服务临时不可用 | ServiceUnavailableError |
/v2/user/list
{"limit" : 10,"marker" : "marker"}
{"items" : [ {"avatar" : "http://a.b.c/pds.jpg","created_at" : 1567407718386,"default_drive_id" : "123","description" : "pds team user","domain_id" : "hz999","email" : "123@pds.com","nick_name" : "abc","phone" : "13700000000","role" : "user","status" : "enabled","updated_at" : 1567407718386,"user_id" : "pdsuserid","user_name" : "name"} ],"next_marker" : "nextmarker"}
{"code" : "InvalidParameter","message" : "The input parameter {parameter_name} is not valid."}
{"code" : "ForbiddenNoPermission","message" : "No Permission to access resource {resource_name}."}
{"code" : "InternalError","message" : "The request has been failed due to some unknown error."}
{"code" : "ServiceUnavailable","message" : "The request has failed due to a temporary failure of the server."}
POST /v2/user/search
该接口将会根据条件查询用户,只有管理员可以调用
查询用户的请求参数
名称 : 查询用户请求标志 : 必填类型 : SearchUserRequest
| HTTP代码 | 说明 | 类型 |
|---|---|---|
| 200 | 查询用户成功 | ListUserResponse |
| 400 | 1. InvalidParameterError:请求参数不正确 2. InvalidRequestJSONFormatError 请求JSON格式错误 | InvalidParameterError |
| 403 | 1.ForbiddenNoPermissionError 没有用户接口权限 2.ForbiddenAccountNotFoundError 账号没找到 | ForbiddenNoPermissionError |
| 500 | 服务内部故障 | InternalErrorError |
| 503 | 服务临时不可用 | ServiceUnavailableError |
/v2/user/search
{"email" : "abc@pds.com","limit" : 10,"marker" : "marker","nick_name" : "la","phone" : "13700000000","role" : "user","status" : "enabled","user_name" : "abc"}
{"items" : [ {"avatar" : "http://a.b.c/pds.jpg","created_at" : 1567407718386,"default_drive_id" : "123","description" : "pds team user","domain_id" : "hz999","email" : "123@pds.com","nick_name" : "abc","phone" : "13700000000","role" : "user","status" : "enabled","updated_at" : 1567407718386,"user_id" : "pdsuserid","user_name" : "name"} ],"next_marker" : "nextmarker"}
{"code" : "InvalidParameter","message" : "The input parameter {parameter_name} is not valid."}
{"code" : "ForbiddenNoPermission","message" : "No Permission to access resource {resource_name}."}
{"code" : "InternalError","message" : "The request has been failed due to some unknown error."}
{"code" : "ServiceUnavailable","message" : "The request has failed due to a temporary failure of the server."}
POST /v2/user/update
用户可以修改自己的description,nick_name,avatar;管理员在用户基础上还可修改status(可以修改任意用户);超级管理员在管理员基础上还可修改role(可以修改任意用户)。
更新用户的请求参数
名称 : 更新用户信息请求标志 : 必填类型 : UpdateUserRequest
| HTTP代码 | 说明 | 类型 |
|---|---|---|
| 200 | 更新用户成功 | UpdateUserResponse |
| 400 | 1. InvalidParameterError:请求参数不正确 2. InvalidRequestJSONFormatError 请求JSON格式错误 | InvalidParameterError |
| 403 | 1.ForbiddenNoPermissionError 没有用户接口权限 2.ForbiddenAccountNotFoundError 账号没找到 | ForbiddenNoPermissionError |
| 404 | 指定的用户不存在 | NotFoundError |
| 500 | 服务内部故障 | InternalErrorError |
| 503 | 服务临时不可用 | ServiceUnavailableError |
/v2/user/update
{"avatar" : "http://a.b.c/pds.jpg","description" : "pds team user","email" : "123@pds.com","nick_name" : "pdsuser","phone" : "13700000000","role" : "user","status" : "enabled","user_id" : "pdsuserid"}
{"avatar" : "http://a.b.c/pds.jpg","created_at" : 1567407718386,"default_drive_id" : "123","description" : "pds team user","domain_id" : "hz999","email" : "123@pds.com",
工作时间5-10分钟将由1对1顾问为您提供尊享服务