HTTP/HTTPS
请求协议
YesDev / WebAPI / 获取项目列表
获取项目列表
接口地址:http://test.www.yesdev.cn/api/platform.php?s=Platform.Projects.GetProjectList
接口描述: 获取项目列表
接口参数
参数名字 | 类型 | 是否必须 | 默认值 | 其他 | 说明 |
---|---|---|---|---|---|
access_token | 字符串 | 可选 | 访问令牌,仅当开启签名验证时需要传递,生成令牌可使用App.Auth.ApplyToken接口 | ||
app_key | 字符串 | 可选 | app_key,团队代码 | ||
sign | 字符串 | 可选 | - | 动态签名,签名算法请联系我们技术客服获取 | |
id | 整型 | 可选 | - | 项目ID | |
project_name | 字符串 | 可选 | - | 项目名称 | |
search_word | 字符串 | 可选 | - | 搜索关键词(匹配项目名称,id,负责人名称) | |
charge_staff_name | 字符串 | 可选 | - | 负责人,模糊匹配 | |
project_status | 数组用,分割 | 可选 | 项目状态,多个用逗号分割,0规划中1进行中2已完成3挂起 | ||
mine_type | 整型 | 可选 | 0 | 我的项目过滤,0为全部项目,1为我负责的项目,2为我创建的项目,3为抄送给我的项目 | |
project_type | 整型 | 可选 | - | 项目类型,0迭代需求1新产品2重构项目3故障修复10普通内部项目11协作项目或外部项目 | |
project_level_type | 整型 | 可选 | - | 项目级别类型:0-普通项目;1-高级项目 | |
workgroup_ids | 字符串 | 可选 | 0 | 工作组ids,多个用,隔开 | |
is_need_top | 布尔型 | 可选 | true | 默认需要置顶 | |
simple_project_list | 整型 | 可选 | 0 | 返回简单的项目列表2.0样的 | |
not_page | 整型 | 可选 | 0 | 不分页,默认0是分页 | |
page | 整型 | 可选 | 1 | 当前页数 | |
perpage | 整型 | 可选 | 50 | 每页多少条 | |
order_status | 整型 | 可选 | 0 | 排序:0 开始时间,1完成时间 2状态 3项目进度 4最后更新 5创建时间 | |
order_status_sort | 整型 | 可选 | 0 | 排序:0降序 1升序 | |
staff_id | 字符串 | 可选 | 0 | 最小:1 | 员工staff_id |
project_start_time | 字符串 | 可选 | 项目开始时间 | ||
project_end_time | 字符串 | 可选 | 项目结束时间 | ||
add_time | 字符串 | 可选 | 项目创建时间 | ||
project_product_ids | 字符串 | 可选 | 0 | 产品线id,多个使用英文逗号分隔 | |
charge_staff_id | 字符串 | 可选 | 项目负责人id,多个使用英文逗号分隔 |
返回字段
返回结果 | 类型 | 说明 |
---|---|---|
ret | 整型 | 状态码,200表示成功,4xx表示客户端非法请求,5xx表示服务器错误 |
data | 对象或混合类型 | 业务数据,由各自接口指定,通常为对象 |
data.projects | 数组 | 项目列表 |
data.projects[].charge_staff_name | 数组 | 项目负责人 |
data.projects[].project_type | 整型 | 项目类型,11外部协作项目 |
data.projects[].all | 浮点型 | 总工时 |
data.projects[].done | 浮点型 | 已完成工时 |
data.projects[].percent | 浮点型 | 完成进度 |
data.projects[].project_status | 整型 | 项目状态,0新项目1进行中2已完成3挂起 |
data.projects[].product_name | 整型 | 产品线 |
data.projects[].project_start_time | 浮点型 | 开始时间 |
data.projects[].project_end_time | 浮点型 | 结束时间 |
data.projects[].project_product_id | 整型 | 产品id |
data.projects[].add_time | 浮点型 | 创建时间 |
data.projects[].workgroup_name | 整型 | 工作组 |
data.projects[].sys_update_time | 浮点型 | 最后更新时间 |
data.projects[].projects_count[] | 数组 | need_sum,done_need 需求 task_sum,done_task 任务 problem_sum,done_problem 问题 |
data.total | 整型 | 总数 |
msg | 字符串 | 提示信息,失败时的错误提示 |
在线测试
参数 | 是否必须 | 值 |
---|---|---|
service | 必须 | |
access_token | 可选 | |
app_key | 可选 | |
sign | 可选 | |
id | 可选 | |
project_name | 可选 | |
search_word | 可选 | |
charge_staff_name | 可选 | |
project_status | 可选 | |
mine_type | 可选 | |
project_type | 可选 | |
project_level_type | 可选 | |
workgroup_ids | 可选 | |
is_need_top | 可选 | |
simple_project_list | 可选 | |
not_page | 可选 | |
page | 可选 | |
perpage | 可选 | |
order_status | 可选 | |
order_status_sort | 可选 | |
staff_id | 可选 | |
project_start_time | 可选 | |
project_end_time | 可选 | |
add_time | 可选 | |
project_product_ids | 可选 | |
charge_staff_id | 可选 |
客户端请求示例
{
"ret": 200,
"data": {
"projects": [
{
"id": 20,
"project_name": "test",
"admin_id": 1,
"project_type": 0,
"project_start_time": "2020-11-27",
"project_end_time": "2020-11-30",
"project_product_id": 1,
"project_desc": "",
"project_status": 1,
"add_time": "2020-11-28 16:06:21",
"app_key": "gc",
"charge_staff_id": 14,
"workgroup_id": 3,
"top_time": 100,
"charge_staff_name": "部门1的员工",
"need_list": [
{
"id": 16,
"need_name": "hellow12344",
"need_check_status": 0,
"need_status": 5,
"product_category_id": 4,
"need_from": "",
"need_finish_date": "2020-12-10",
"need_content": "",
"need_note": "",
"need_level": 0,
"app_key": "gc",
"admin_id": 1,
"add_time": "2020-11-23 14:36:55",
"charge_staff_id": 0,
"project_id": 20,
"staff_name": null,
"staff_title": null
},
{
"id": 17,
"need_name": "1124",
"need_check_status": 0,
"need_status": 5,
"product_category_id": 0,
"need_from": "",
"need_finish_date": "2020-12-01",
"need_content": "",
"need_note": "",
"need_level": 0,
"app_key": "gc",
"admin_id": 1,
"add_time": "2020-11-24 11:31:59",
"charge_staff_id": 0,
"project_id": 20,
"staff_name": null,
"staff_title": null
}
],
"task_time_stat": {
"all": 13,
"todo": 0,
"doing": 5,
"done": 8,
"percent": 62
},
"labels": [
{
"name": "已延期",
"key": "is_delay",
"color": "#b50000"
},
{
"name": "置顶",
"key": "is_top",
"color": "#4563f1"
}
]
},
{
"id": 17,
"project_name": "项目1820",
"admin_id": 1,
"project_type": 0,
"project_start_time": "2020-11-04",
"project_end_time": "2020-11-18",
"project_product_id": 0,
"project_desc": "",
"project_status": 3,
"add_time": "2020-11-30 09:42:59",
"app_key": "gc",
"charge_staff_id": 0,
"workgroup_id": 3,
"top_time": 100,
"charge_staff_name": "",
"need_list": [
{
"id": 6,
"need_name": "测试需求",
"need_check_status": 0,
"need_status": 1,
"product_category_id": 9,
"need_from": "",
"need_finish_date": "2020-11-09",
"need_content": "<h2><strong>估在春在</strong></h2><p><strong>发好好好</strong></p><p><br></p>",
"need_note": "",
"need_level": 1,
"app_key": "gc",
"admin_id": 1,
"add_time": "2020-11-09 12:20:14",
"charge_staff_id": 0,
"project_id": 17,
"staff_name": null,
"staff_title": null
},
{
"id": 9,
"need_name": "1121-1",
"need_check_status": 0,
"need_status": 0,
"product_category_id": 0,
"need_from": "",
"need_finish_date": null,
"need_content": "",
"need_note": "",
"need_level": 0,
"app_key": "gc",
"admin_id": 1,
"add_time": "2020-11-21 22:43:04",
"charge_staff_id": 0,
"project_id": 17,
"staff_name": null,
"staff_title": null
},
{
"id": 13,
"need_name": "需求中1121",
"need_check_status": 0,
"need_status": 0,
"product_category_id": 0,
"need_from": "",
"need_finish_date": null,
"need_content": "",
"need_note": "",
"need_level": 0,
"app_key": "gc",
"admin_id": 1,
"add_time": "2020-11-21 22:43:41",
"charge_staff_id": 0,
"project_id": 17,
"staff_name": null,
"staff_title": null
}
],
"task_time_stat": {
"all": 0,
"todo": 0,
"doing": 0,
"done": 0,
"percent": 0
},
"labels": [
{
"name": "已延期",
"key": "is_delay",
"color": "#b50000"
},
{
"name": "置顶",
"key": "is_top",
"color": "#4563f1"
}
]
}
],
"total": 15
},
"msg": ""
}
错误列表
错误状态码 | 错误描述信息 |
---|---|
400 | ret=400,客户端参数错误或非法请求 |
404 | 表示接口服务不存在 |
406 | ret=406,access_token令牌校验不通过 |
407 | ret=407,app_key权限不足,或未知应用 |
408 | ret=408,当前用户禁止使用,或用户未登录 |
410 | 权限不足 |
500 | 表示服务端内部错误 |
本文档生成时间:2024-09-08 10:47:21 联系我们开通接入OpenAPI