更新时间:2023-04-23 GMT+08:00
示例3:查询用户工作项的评论
约束限制
工作项存在。
步骤1:查询用户的工作项列表
- 接口信息
URI:Post /v4/projects/{project_id}/issues
API文档详情请参见:高级查询工作项
API Explorer在线调试请参见: 高级查询工作项
- 请求示例
Post https://projectman-ext.ap-southeast-3.myhuaweicloud.com/v4/projects/526cefde62004de2b62b5e8dd2c2b3af/issues
- 请求体:
{ "status_ids": [1], "limit":1 }
- 响应示例
{ "issues": [ { "id": 1692040, "name": "测试", "done_ratio": 0, "tracker": { "id": 2, "name": "Task" }, "priority": { "id": 2, "name": "中" }, "severity": { "id": 12, "name": "一般" }, "status": { "id": 1, "name": "新建" }, "updated_time": "2020-09-17 10:18:31", "begin_time": "1970-01-01", "end_time": "1970-01-01", "project": { "project_num_id": 3694732, "project_id": "526cefde62004de2b62b5e8dd2c2b3af", "project_name": "sdfsdfdsf" }, "parent_issue": { "id": 1684959, "name": "testDemo阿达萨达" }, "module": { "id": null, "name": null }, "domain": { "id": null, "name": null }, "iteration": { "id": null, "name": null }, "expected_work_hours": 0.0, "actual_work_hours": 0.0, "created_time": "2020-09-17 10:18:31", "custom_fields": [], "assigned_cc_user": null, "assigned_user": { "id": 4091, "name": "test001", "nick_name": "pcedgeXXXXXXX" }, "creator": { "id": 4091, "name": "test001", "nick_name": "pcedgeXXXXXXX" }, "developer": { "id": 0, "name": null, "nick_name": null } } ], "total": 24 }
步骤2:查询工作项的评论
- 接口信息
URI:GET /v4/projects/{project_id}/issues/{issue_id}/comments
API文档详情请参见:获取指定工作项的评论列表
API Explorer在线调试请参见: 获取指定工作项的评论列表
- 请求示例
GET https://projectman-ext.ap-southeast-3.myhuaweicloud.com/v4/projects/526cefde62004de2b62b5e8dd2c2b3af/issues/1692040/comments
- 响应示例
{ "comments": [ { "id": 3235092, "created_time": "2020-08-26", "user": { "user_num_id": 4091, "user_name": "test001", "nick_name": "pcedgeXXXXXXX" }, "comment": "<p>这是一个测试样例</p>" } ], "total": 1 }
父主题: 应用示例