# 说明
将过滤条件转换成页面能用的 QueryToken
# url
https://api.tapd.cn/stories/filter_to_query_token
# 支持格式
JSON/XML(默认JSON格式)
# HTTP 请求方式
POST
# 请求数限制
过滤条件不能超过10个
# 请求参数
| 字段名 | 必选 | 类型及范围 | 说明 |
|---|---|---|---|
| workspace_id | 是 | integer | 项目ID |
| filter[owner] | 是 | string | 过滤条件,格式为 filter[字段名] = 过滤值,如 filter[owner]=当前登录用户;张三; |
| block_type | 否 | string | 分组字段 |
| show_fields | 否 | string | 显示字段,以,号分割 |
# filter 参数说明
- 时间字段类型说明:filter[created]=2024-12-24 00:00,2024-12-24 23:59
- 成员名称字段类型说明:filter[owner]=当前登录用户;张三;
# 调用示例及返回结果
# 把需求过滤条件转换成 queryToken 及返回列表链接
# curl 使用 Basic Auth 鉴权调用示例
curl -u 'api_user:api_password' -d 'workspace_id=20358527&filter[custom_field_one]=是&show_fields=title,current_owner,status,custom_field_one&block_type=current_owner' 'https://api.tapd.cn/stories/filter_to_query_token'
#
# 返回结果
{
"status": 1,
"data": {
"queryToken": "71ab88eeb45d084d8fbc85686a0d2399",
"href": "http://www.tapd.cn/tapd_fe/10104801/story/list?page=1&queryToken=71ab88eeb45d084d8fbc85686a0d2399&displayEmptyGroup=display&groupType=owner"
},
"info": "success"
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
# 重要字段说明
该接口过滤字段和值与 WEB 页面过滤器保持一致,与其他API略有差异,请注意
| 字段 | 说明 |
|---|---|
| status | 状态,传别名(一般是中文) |
| workitem_type_id | 需求类别,中文名(非ID) |
| priority_label | 优先级,页面显示值,与 priority 存在映射关系 |
其他需求字段说明,请参考 需求说明
# 返回字段字段说明
| 字段 | 说明 |
|---|---|
| queryToken | 列表queryToken |
| href | 对应的TAPD需求列表链接 |