新增提醒时间
该接口用于创建任务的提醒时间。提醒时间在截止时间基础上做偏移,但是偏移后的结果不能早于当前时间。
请求
| 项目 | 值 |
|---|---|
| HTTP URL | https://open.feishu.cn/open-apis/task/v1/tasks/:task_id/reminders |
| HTTP Method | POST |
| 接口频率限制 | 1000 次/分钟、50 次/秒 |
| 支持的应用类型 | custom,isv |
| 权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用 | task:task 查看、创建、编辑和删除飞书任务(历史版本) |
请求头
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Authorization | string | 是 | tenant_access_token 或 user_access_token 值格式:"Bearer access_token" 示例值:"Bearer u-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token |
| Content-Type | string | 是 | 固定值:"application/json; charset=utf-8" |
路径参数
| 名称 | 类型 | 描述 |
|---|---|---|
task_id | string | 任务 ID 示例值:"83912691-2e43-47fc-94a4-d512e03984fa" |
请求体
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
relative_fire_minute | int | 是 | 相对于截止时间的提醒时间(如提前 30 分钟,截止时间后 30 分钟,则为 -30) 任务没有截止时间则为全天任务(截止时间为0) 示例值:30 |
请求体示例
json
{
"relative_fire_minute": 30
}响应
响应体
| 名称 | 类型 | 描述 |
|---|---|---|
code | int | 错误码,非 0 表示失败 |
msg | string | 错误描述 |
data | \- | - |
└ reminder | reminder | 返回创建成功的提醒时间 |
└ id | string | 提醒时间设置的 ID(在删除时候需要使用这个) |
└ relative_fire_minute | int | 相对于截止时间的提醒时间(如提前 30 分钟,截止时间后 30 分钟,则为 -30) 任务没有截止时间则为全天任务(截止时间为0) |
响应体示例
json
{
"code": 0,
"msg": "success",
"data": {
"reminder": {
"id": "1",
"relative_fire_minute": 30
}
}
}错误码
| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 403 | 1470403 | The identity token is incorrect. It should be either user_access_token or tenant_access_token. | 发起请求方的身份token不正确,需要为UserAccessToken或TenantAccessToken其中一种 |
| 400 | 1470602 | Invalid task id. | 请检查任务的 id 是否合法 |
| 500 | 1470721 | add task remainder failded | 设置任务的提醒时间失败,请结合返回的具体错误进行排查。如果无法解决,请提供 request id 并联系飞书技术人员协助排查 |
| 400 | 1470450 | request too fast | 当前同时发起的请求过多,峰值较高导致了限流,请稍后重新尝试 |
| 400 | 1470419 | task due time not set | 该任务没有设置时区,需要先进行设置 |
| 400 | 1470420 | already exists duplicate reminder time | 已经存在一个相同的提醒时间,不能重复添加 |
| 400 | 1470427 | total reminder exceeds limit | 提醒时间的数量超过了最大限制 |
| 400 | 1470451 | request api concurrently | 对同一个任务的操作请求太频繁,需要降低请求频次 |
| 400 | 1470404 | be refused to create or update task | 一般是因为操作者没有操作权限,导致更新任务或其他更新任务的操作失败。如,任务的关注者没有权限修改任务。 |
