HTTP/HTTPS
请求协议
YesDev / WebAPI / 添加新任务
添加新任务
接口地址:https://www.yesdev.cn/api/platform.php?s=Platform.Tasks.CreateNewTask
接口描述: 添加新任务
接口参数
| 参数名字 | 类型 | 是否必须 | 默认值 | 其他 | 说明 |
|---|---|---|---|---|---|
| access_token | 字符串 | 可选 | 访问令牌,仅当开启签名验证时需要传递,生成令牌可使用App.Auth.ApplyToken接口 | ||
| app_key | 字符串 | 可选 | app_key,团队代码 | ||
| sign | 字符串 | 可选 | - | 动态签名,签名算法请联系我们技术客服获取 | |
| task_title | 字符串 | 必须 | - | 最大:500 | 任务标题 |
| task_type | 整型 | 可选 | 0 | 任务类型,0其他1UI设计2产品原型3技术开发4测试5会议6编写文档7调研8沟通 | |
| task_time | 浮点型 | 可选 | - | 最小:0 | 任务工时评估,单位:小时,保留一位小数 |
| task_finish_time | 字符串 | 可选 | - | 完成时间 | |
| staff_id | 字符串 | 可选 | - | 负责人ID,多个用逗号隔开,默认为当前用户 | |
| project_id | 整型 | 可选 | 0 | 项目ID | |
| need_id | 整型 | 可选 | 0 | 需求ID | |
| task_status | 整型 | 可选 | 600 | 任务状态 | |
| task_desc | 字符串 | 可选 | 任务描述 | ||
| extended_row | 整型 | 可选 | 0 | 是否进行任务延排,1是进行,0是不进行,默认不进行 | |
| not_send_email | 整型 | 可选 | 0 | 不发送邮件 | |
| from_channel | 字符串 | 可选 | 最大:20 | ||
| outside_charge_name | 字符串 | 可选 | 最大:50 | 外部对接人 | |
| problem_id | 字符串 | 可选 | 0 | 问题id | |
| repeat | 字符串 | 可选 | 0 | 重复:0不重复 1重复 | |
| repeat_type | 整型 | 可选 | 1 | 重复类型:1周 2月 | |
| repeat_end_date | 字符串 | 可选 | 0 | 重复结束时间 | |
| label_ids | 数组用,分割 | 可选 | 标签ids 逗号分隔 | ||
| custom_field_value | 数组JSON格式 | 可选 | - | 需求自定义字段,格式:{"系统KEY":"值","_CFKEY_1":"xxx"} | |
| plan_start_date | 字符串 | 可选 | - | 计划开始时间 | |
| is_milestone | 布尔型 | 可选 | - | 是否任务里程碑,0否1是 | |
| real_task_time | 字符串 | 可选 | - | 实际工时 | |
| task_parent_id | 整型 | 可选 | - | 父任务ID |
返回字段
| 返回结果 | 类型 | 说明 |
|---|---|---|
| ret | 整型 | 状态码,200表示成功,4xx表示客户端非法请求,5xx表示服务器错误 |
| data | 对象或混合类型 | 业务数据,由各自接口指定,通常为对象 |
| data.id | 整型 | 新增的任务ID |
| msg | 字符串 | 提示信息,失败时的错误提示 |
在线测试
| 参数 | 是否必须 | 值 |
|---|---|---|
| service | 必须 | |
| access_token | 可选 | |
| app_key | 可选 | |
| sign | 可选 | |
| task_title | 必须 | |
| task_type | 可选 | |
| task_time | 可选 | |
| task_finish_time | 可选 | |
| staff_id | 可选 | |
| project_id | 可选 | |
| need_id | 可选 | |
| task_status | 可选 | |
| task_desc | 可选 | |
| extended_row | 可选 | |
| not_send_email | 可选 | |
| from_channel | 可选 | |
| outside_charge_name | 可选 | |
| problem_id | 可选 | |
| repeat | 可选 | |
| repeat_type | 可选 | |
| repeat_end_date | 可选 | |
| label_ids | 可选 | |
| custom_field_value | 可选 | |
| plan_start_date | 可选 | |
| is_milestone | 可选 | |
| real_task_time | 可选 | |
| task_parent_id | 可选 |
客户端请求示例
{
"ret": 200,
"data": {
"id": 2
},
"msg": ""
}
错误列表
| 错误状态码 | 错误描述信息 |
|---|---|
| 400 | ret=400,客户端参数错误或非法请求 |
| 404 | 表示接口服务不存在 |
| 406 | ret=406,access_token令牌校验不通过 |
| 407 | ret=407,app_key权限不足,或未知应用 |
| 408 | ret=408,当前用户禁止使用,或用户未登录 |
| 410 | 权限不足 |
| 500 | 表示服务端内部错误 |
本文档生成时间:2025-11-03 13:22:17 联系我们开通接入OpenAPI