新增用户操作日志API

新增用户操作日志,使用POST发起请求,请求地址为/api/v1/users/{id}/logs

  1. POST /api/v1/users/{id}/logs HTTP/1.1

请求 URI

参数名 位置 类型 必填 说明
id path 整数 用户Id
apiKey query 字符串 API 密钥,请参考身份认证

请求 Body

参数名 类型 必填 说明
action 字符串 动作
summary 字符串 描述

返回

名称 类型 说明
200 OK UserLog 用户操作日志
401 Unauthorized Error 认证错误
404 NotFound Error 用户Id不存在错误
400 BadRequest Error 参数错误

示例

请求示例

  1. POST /api/v1/users/1/logs HTTP/1.1
  2. Content-Type: application/json
  3. X-SS-API-KEY: 7cd22002-27a7-4c5d-ba4d-a1c108a20eaf
  4. {
  5. "action": "访问页面",
  6. "summary": "页面地址:http://sample.com"
  7. }

返回示例

  1. {
  2. "value": {
  3. "id": 1,
  4. "userName": "demo",
  5. "ipAddress": "localhost",
  6. "addDate": "2018-06-18 10:03:10",
  7. "action": "访问页面",
  8. "summary": "页面地址:http://sample.com"
  9. }
  10. }