员工身份(EIAM)
 更新待办
   接口
 # 权限
身份管理API是以应用维度授权的,在调用接口前需为不同的应用设置接口权限,详情请参考API权限。
| 权限代码 | 描述 | 
|---|---|
| app_todo_msg | 应用侧任务待办管理权限 | 
| all | 全部接口读写权限 | 
# 请求说明
PUT https://{your_domain}/api/v2/tenant/todo/task/{todo_id}
# 请求头
| 参数名 | 中文名称 | 必须 | 类型 | 描述 | 
|---|---|---|---|---|
| Authorization | 授权 | 是 | String | 格式:Bearer {access_token} | 
| Content-Type | 内容类型 | 是 | String | 固定值:application/json; charset=utf-8 | 
# 请求示例
{
    "title": "待办标题",
    "content": "待办内容",
    "message_type": "TEXT",
    "ending_at": "2022-08-14 12:00:00",
    "user_name": "zhangsan",
    "external_id": "123fdsafsafdsafdsa-fdas",
    "detail_url": {
        "web_url": "https://imczhangyu001.idaas-test-alpha.bccastle.com",
        "mobile_url": "https://imczhangyu001.idaas-test-alpha.bccastle.com"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
# 请求参数
| 参数名 | 中文名称 | 必须 | 类型 | 描述 | 
|---|---|---|---|---|
| todo_id | 待办id | 是 | String | 待办id,不可更改 | 
| title | 待办标题 | 是 | String | 不为空,长度不超过100 | 
| content | 待办内容 | 是 | String | 不为空,长度不超过1024 | 
| message_type | 消息类型 | 是 | String | TEXT=文本 MARKDOWN=markdown | 
| ending_at | 截止时间 | 是 | String | 格式yyyy-MM-dd HH:mm:ss | 
| external_id | 外部待办ID | 是 | String | 第三方应用生成的待办ID,不可更改 | 
| detail_url | 是否发送所有 | 是 | Map | 包含pc和mobile的待办事件url | 
| --web_url | pc端url | 是 | String | pc端url | 
| --mobile_url | 手机端url | 是 | String | 手机端url | 
# 返回示例
成功示例:
HTTP/1.1 200 OK
Content-Type: application/json
{
    "code": "0",
    "data": true, 
    "message": null
}
错误示例:
HTTP/1.1 400 Bad Request
{
  "error_code": "TODOTASK.0001",
  "error_msg": "待办不存在"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 返回参数
| 参数名 | 中文名称 | 类型 | 描述 | 
|---|---|---|---|
| todo_id | 待办任务ID | String | 
# 错误码
| 状态码 | 错误码 | 错误信息 | 处理措施 | 
|---|---|---|---|
| 400 | COM.0601 | 参数错误,缺少参数或者参数类型不正确 | 请检查入参是否符合校验规则 | 
| Parameter missing or incorrect parameter type | |||
| 400 | TODOTASK.0001 | 待办不存在 | 请检查对应待办是否存在 | 
| Todo does not exist | |||
| 400 | TODOTASK.0002 | 待办已存在 | 请检查对应待办是否存在 | 
| Todo already exists | |||
| 400 | TODOTASK.0004 | 待办标题不能为空 | 请检查入参中的待办标题字段是否为空 | 
| Todo title cannot be empty | |||
| 400 | TODOTASK.0005 | 待办内容不能为空 | 请检查入参中的待办内容字段是否为空 | 
| Todo content cannot be empty | |||
| 400 | TODOTASK.0006 | 待办消息类型不能为空 | 请检查入参中的待办消息类型字段是否为空 | 
| Todo message type cannot be empty | |||
| 400 | TODOTASK.0007 | 外部待办ID不能为空 | 请检查入参中的外部待办ID字段是否为空 | 
| External todo ID cannot be empty | |||
| 400 | TODOTASK.0008 | 截止时间不能为空 | 请检查入参中的截止时间字段是否为空 | 
| The deadline cannot be empty | |||
| 400 | TODOTASK.0009 | 详情URL不能为空 | 请检查入参中的详情URL字段是否为空 | 
| Detail URL cannot be empty | |||
| 400 | TODOTASK.0010 | 网页版URL不能为空 | 请检查入参中的网页版URL字段是否为空 | 
| Web URL cannot be empty | |||
| 400 | TODOTASK.0011 | 移动端URL不能为空 | 请检查入参中的移动端URL字段是否为空 | 
| Mobile URL cannot be empty | |||
| 400 | TODOTASK.0013 | 待办标题不符合校验规则 | 请检查入参中的待办标题字段是否符合校验规则 | 
| Todo title does not meet verification rules | |||
| 400 | TODOTASK.0014 | 待办内容不符合校验规则 | 请检查入参中的待办内容字段是否符合校验规则 | 
| Todo content does not meet verification rules | |||
| 400 | TODOTASK.0015 | 待办消息类型不符合校验规则 | 请检查入参中的待办消息类型字段是否符合校验规则 | 
| Todo message type does not meet verification rules | |||
| 400 | TODOTASK.0016 | 外部待办ID不符合校验规则 | 请检查入参中的外部待办ID字段是否符合校验规则 | 
| The external todo ID does not meet the verification rules | 
