curl --location --request POST '/open_api//view/' \
--header 'X-PLUGIN-TOKEN: {{plugin_token}}' \
--header 'X-USER-KEY: {{user_key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"page_size": 10,
"page_num": 1,
"expand": {
"need_workflow": true,
"relation_fields_detail": true,
"need_multi_text": true,
"need_user_detail": true,
"need_sub_task_parent": true
}
}'
{
"data": [
{
"id": 1, //工作项id
"name": "item1", //工作项名称
"work_item_type_key": "story", //工作项类型
"project_key": "60acd5610444ba031b503055", //空间id
"simple_name": "test", //空间域名
"template_id": 12345 //使用的模板id
"template": "control", //流程类型
"pattern": "Node", //工作流模式;Node节点流,State状态流
"sub_stage": "started", //需求状态(仅早期实例涉及,已弃用)
"work_item_status": {}, //工作项状态
"current_nodes": [ //当前进行中节点(仅节点流有值)
{
"id": "state_1", //节点id
"name": "node1", //节点名称
"owners": [ //节点负责人userKey列表
"7012514555133820947"
]
}
],
"state_times": [ //节点时间
{
"end_time": 1654156400805,
"name": "开始",
"start_time": 1654156400804,
"state_key": "started"
},
{
"end_time": 0,
"name": "节点表单",
"start_time": 1654156400805,
"state_key": "doing"
}
],
"created_by": "7009146719661228031", //创建者userKey
"updated_by": "7009146719661228031", //更新者userKey
"created_at": 1633776613033, //创建时间 毫秒时间戳
"updated_at": 1633776613033, //更新时间 毫秒时间戳
"fields": [ //工作项字段,字段格式可查看字段格式对应表
{
"field_alias": "",
"field_key": "aborted",
"field_type_key": "aborted",
"field_value": {
"is_aborted": false,
"reason": ""
}
},
{
"field_alias": "",
"field_key": "role_owners",
"field_type_key": "role_owners",
"field_value": [
{
"owners": [
"7012514555184152596"
],
"role": "uiouiouio"
},
{
"owners": null,
"role": "test"
},
{
"owners": null,
"role": "tt"
}
]
}
],
}
],
"err": {},
"err_msg": "",
"err_code": 0
}