# 新增待办任务 -------------------------------------------------------- 新增单个待办任务。 ## 请求格式说明 ** 调试工具:** 在线调试

请求方式: POST(HTTPS)

认证方式: access_token,请参考获取access_token

请求地址: https://open.welink.huaweicloud.com/api/todo/v1/addtask

请求头部:

x-wlk-Authorization:access_token

请求参数:

{
    "taskId": "5",
    "taskTitle": "todo20190725889",
    "userId": "yewei@weiying.com",
    "detailsUrl": "https://example.com/app/detail/5",
    "appName": "todo2019073001",
    "taskDesc": "todo20190725889描述1",
    "applicantUserId": "test",
    "applicantUserNameCn": "testCN",
    "applicantUserNameEn": "testEN"
}

请求参数说明:

参数 参数类型 说明 是否必填
taskId string 租户应用任务id
taskTitle string 审批任务标题
userId string 任务的当前处理人账号
detailsUrl string 消息处理路径
appName string 应用名称
taskDesc string 审批任务内容
applicantUserId string 申请人id
applicantUserNameCn string 申请人中文名称
applicantUserNameEn string 申请人英文名称

请求示例:


curl -X POST \  
' https://api.cloudlink-alpha.welink.huawei.com/kmiddle/api/todo/v1/addtask’\
  -H 'Accept-Charset: UTF-8' \
  -H 'Content-Type: application/json' \
  -H 'x-wlk-Authorization: access_token' \
  -d '{"请求参数 json格式"}'

响应格式说明

正常返回结果:

{
  "code": "0",
  "message": "Create todo_task successfully.",
  "data": {
            "taskId": "4",
            "uuid": "374731891993001984",
            "taskTitle": "todo2019073004",
            "userId": "wissng",
            "userName": "wssg",
            "detailUrlType": "h5",
            "status": 1,
            "detailsUrl": "https://welink.example.cn/todo/v1/appList",
            "appName": "todo2019073004",
            "lastModifyTime": "2019-12-01 18:00:00",
            "createTime": "2019-12-01 18:00:00",
            "taskDesc": "todo2019073004",
            "tenantId": "8C109D2A76604639BAAA582C75779WDS",
            "applicantUserId": "yewei@weiying",
            "applicantUserNameCn": "yewei",
            "applicantUserNameEn": "weiye"
  }
}

异常返回结果:


{
    "code": "55002",
    "message": "You haven't the permission to request this operation.",
    "data": "You haven't the permission to request this operation."
}

错误码说明:

错误码 说明
0 成功
55007 创建待办失败
55002 没有操作权限
55006 请求参数验证不通过
55005 缺失必填参数
55000 认证失败
55004 服务异常
55011 非法更新电子流
55012 认证服务异常
55014 token认证失败

结果。 ""

    无结果。 ""