文档首页/ 测试计划 CodeArts TestPlan/ API参考/ API/ 测试设计接口管理/ 根据条件信息查询资源操作记录
更新时间:2025-07-25 GMT+08:00
分享

根据条件信息查询资源操作记录

功能介绍

根据条件信息查询资源操作记录

调用方法

请参见如何调用API

URI

POST /v1/{project_id}/operation-record

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

参数解释:

项目的32位uuid,项目唯一标识,通过获取CodeArts项目ID接口查询项目列表获取。

取值范围:

字符串长度32。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

参数解释:

用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

约束限制:

必传。

取值范围:

字符串长度不少于1,不超过10万。

默认取值:

不涉及。

表3 请求Body参数

参数

是否必选

参数类型

描述

params

ResourceOpetaionRecordPageParam object

参数解释:

请求体

表4 ResourceOpetaionRecordPageParam

参数

是否必选

参数类型

描述

offset

Integer

参数解释:

起始偏移量,表示从此偏移量开始查询,offset大于等于0,小于等于100000

limit

Integer

参数解释:

每页显示的条目数量,最大支持200条

resource_id

String

参数解释:

资源ID

resource_type

String

参数解释:

资源类型

operation_type

String

参数解释:

操作类型

响应参数

状态码:200

表5 响应Body参数

参数

参数类型

描述

code

String

参数解释:

错误码

取值范围:

大小写字母、数字。

长度限制0到20位

data

Object

参数解释:

返回体

取值范围:

不涉及

message

String

参数解释:

错误信息

取值范围:

大小写字母、数字、符号、中文。

长度限制0到1000位

状态码:201

Created

请求示例

根据条件信息查询资源操作记录

post https://{endpoint}/v1/b94c9a6947a44597891e0a7362e7383f/operation-record

{
  "params" : {
    "operation_type" : "updateMindmapCreatorInfo",
    "resource_type" : "feature_root_id",
    "resource_id" : "mindmap",
    "offset" : 1,
    "limit" : 5
  }
}

响应示例

状态码:200

OK

{
  "code" : "success",
  "data" : {
    "total" : 1,
    "list" : [ {
      "id" : "1cfb40efafa14e3f812b51028502bad5",
      "project_id" : "76667cb543a14cacac2ade913ca44a47",
      "resource_id" : "fb6bd82a6c084fdab0d8e5d8f820eabc",
      "resource_type" : "mindmap",
      "operator" : "efdb403066474ab08836b9eeaaa23bca",
      "operation_type" : "updateMindmapCreatorInfo",
      "operation_batch_id" : null,
      "operation_detail" : "{\"new_user_num\":\"昵称xxx1111144445454545\",\"old_user_num\":\"--\",\"update_business_type\":\"mindmap\",\"update_resource_id\":\"fb6bd82a6c084fdab0d8e5d8f820eabc\"}",
      "create_time" : "2025/01/13 14:52:00 GMT+08:00",
      "creator_name" : "user",
      "creator_num" : "efdb403066474ab08836b9eeaaa23bca",
      "is_delete" : false,
      "delete_batch_id" : null
    } ],
    "offset" : 1,
    "limit" : 5,
    "pages" : 1,
    "size" : 1
  },
  "message" : null
}

状态码

状态码

描述

200

OK

201

Created

401

Unauthorized

403

Forbidden

404

Not Found

错误码

请参见错误码

相关文档