# 账户

# 创建用户

# 请求 URL:

  • http://host:port/heycloud/api/base/account/create

# 请求方式:

  • POST

# 请求参数:

参数名称 类型 是否必须 默认值 说明
remark String - 账号的备注信息

# 请求示例:

POST http://host:port/heycloud/api/base/account/create

{
  "remark": "123"
}

# 正确响应示例:

{
  "result": {
    "id": "acf12c07-bd04-4e40-8953-f6429e895d81",
    "remark": "123",
    "createdAt": "2021-03-12T01:57:00.390Z"
  }
}

# 错误响应示例:

{
  "error": "Error",
  "message": "错误信息"
}

# 更新帐号的备注

# 请求 URL:

  • http://host:port/heycloud/api/base/account/:accountId/updateRemark

# 请求方式:

  • POST

# 请求参数:

参数名称 类型 是否必须 默认值 说明
remark String - 账号的备注信息

# 请求示例:

POST http://host:port/heycloud/api/base/account/xxxxx/updateRemark

{
  "remark": "123",
}

# 正确响应示例:

{
  "result": {
    "remark": "123"
  }
}

# 错误响应示例:

{
  "error": "Error",
  "message": "错误信息"
}

# 更新帐号的统计信息

# 请求 URL:

  • http://host:port/heycloud/api/base/account/:accountId/updateStat

# 请求方式:

  • POST

# 请求示例:

POST http://host:port/heycloud/api/base/account/xxxxx/updateStat

# 正确响应示例:

{
  "result": {
    "stat": {...}
  }
}

# 错误响应示例:

{
  "error": "Error",
  "message": "错误信息"
}

# 删除一个帐号

# 请求 URL:

  • http://host:port/heycloud/api/base/account/:accountId

# 请求方式:

  • DELETE

# 请求示例:

DELETE http://host:port/heycloud/api/base/account/xxxxx

# 正确响应示例:

{
  "result": [
    {
      "id": "acf12c07-bd04-4e40-8953-f6429e895d81",
      "remark": "123",
      "createdAt": "2021-03-12T01:57:00.390Z"
    }
  ]
}

# 错误响应示例:

{
  "error": "Error",
  "message": "错误信息"
}

# 查询账户列表

# 请求 URL:

  • http://host:port/heycloud/api/base/account/list

# 请求方式:

  • GET

# 请求参数:

参数名称 类型 是否必须 默认值 说明
search String - 搜索的文本
sortField String createdAt 排序的字段
sortType String desc 排序的类型
offset Number - 返回结果的偏移量,用于分页
limit Number - 返回结果的数量,用于分页

# 请求示例:

GET http://host:port/heycloud/api/base/account/list

# 正确响应示例:

{
  "result": [
    {
      "id": "160e2770-dc34-4ff1-b180-c0b48b63acbf",
      "remark": "123",
      "createdAt": "2021-03-12T02:02:02.870Z"
    }
  ]
}

# 错误响应示例:

{
  "error": "Error",
  "message": "错误信息"
}

# 根据 ID 数组查询若干帐号

# 请求 URL:

  • http://host:port/heycloud/api/base/account/queryByIds

# 请求方式:

  • POST

# 请求参数:

参数名称 类型 是否必须 默认值 说明
ids Array [String] - ID 数组

# 请求示例:

POST http://host:port/heycloud/api/base/account/queryByIds

{
  "ids": ["xxx", "yyy"]
}

# 正确响应示例:

{
  "result": [
    {
      "id": "160e2770-dc34-4ff1-b180-c0b48b63acbf",
      "remark": "123",
      "createdAt": "2021-03-12T02:02:02.870Z"
    }
  ]
}

# 错误响应示例:

{
  "error": "Error",
  "message": "错误信息"
}