# 说明

返回符合查询条件的所有Webhook配置(分页显示,默认一页30条)

# url

https://apiv2.tapd.tencent.com/webhook_settings

# 支持格式

JSON/XML(默认JSON格式)

# HTTP请求方式

GET

# 请求数限制

默认返回 30 条。可通过传 limit 参数设置,最大取 200。也可以传 page 参数翻页

# 请求参数

字段名 必选 类型及范围 说明 特殊规则
id 否 integer id 支持多ID查询
workspace_id 是 integer 项目ID
webhook_url 否 string 接收 Webhook 请求的URL
content_type 否 enum('json','form') 数据格式。取 json 或者 form,默认 json
secret 否 string 验证密码(非必选,给接入方验证请求是否来自 TAPD)
owner 否 string 配置负责人理人
events 否 string 事件。取值见页尾 支持模糊匹配
status 否 enum('closed','normal') 配置状态
creator 否 string 配置创建人。取 API 帐号
created 否 datetime 创建时间 支持时间查询
modifier 否 string 配置最后人。取 API 帐号
modified 否 datetime 最后修改时间 支持时间查询
limit 否 integer 设置返回数量限制,默认为30
page 否 integer 返回当前数量限制下第N页的数据,默认为1(第一页)
order 否 string 排序规则,规则:字段名 ASC或者DESC,然后 urlencode 如按创建时间逆序:order=created%20desc
fields 否 string 设置获取的字段,多个字段间以','逗号隔开

# 调用示例及返回结果

# 获取项目下的Webhook配置

# curl 使用 Basic Auth 鉴权调用示例

curl -u 'api_user:api_password' 'https://apiv2.tapd.tencent.com/webhook_settings?workspace_id=10158231&limit=2'

# curl 使用 OAuth Access Token 鉴权调用示例

curl -H 'Authorization: Bearer ACCESS_TOKEN' 'https://apiv2.tapd.tencent.com/webhook_settings?workspace_id=10158231&limit=2'

# 返回结果

{
    "status": 1,
    "data": [
        {
            "WebhookSetting": {
                "id": "1010158231000002141",
                "workspace_id": "10158231",
                "url": "https:\/\/www.tapd.cn\/",
                "content_type": "json",
                "secret": "HelloTAPD",
                "owner": "",
                "events": "bug::create,bug::update,bug::delete",
                "status": "normal",
                "creator": "api_doc_oauth",
                "created": "2020-02-28 00:34:11",
                "modifier": "api_doc_oauth",
                "modified": "2020-02-28 00:43:25"
            }
        },
        {
            "WebhookSetting": {
                "id": "1010158231000002133",
                "workspace_id": "10158231",
                "url": "http:\/\/lion.oa.com\/~anyechen\/code\/php\/webhook.php",
                "content_type": "form",
                "secret": "StrongSecretx",
                "owner": "anyechen",
                "events": "story::create,story::update",
                "status": "normal",
                "creator": "dev",
                "created": "2020-02-27 22:31:02",
                "modifier": "",
                "modified": "2020-03-02 16:18:26"
            }
        }
    ],
    "info": "success"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# Webhook配置字段说明

# Webhook配置重要字段说明

字段 说明
id id
workspace_id 项目ID
url 接收 Webhook 请求的URL
content_type 数据格式。取 json 或者 form,默认 json
secret 验证密码(非必选,给接入方验证请求是否来自 TAPD)
owner 配置负责人理人
events 事件。取值见页尾
status 配置状态
creator 配置创建人。取 API 帐号
created 创建时间
modifier 配置最后人。取 API 帐号
modified 最后修改时间

# Webhook配置数据格式(content_type)取值字段说明

取值 字面值
json json 格式,默认格式
form 即 application/x-www-form-urlencoded 形式 ,如 key1=value1&key2=value2

# Webhook配置事件(events)取值字段说明,可写多个,使用 , 分隔

取值 字面值
launchform::create 发布评审创建
launchform::update 发布评审更新
bug::create 缺陷创建
bug::update 缺陷更新
bug::delete 缺陷删除
story::create 需求创建
story::update 需求更新
story::delete 需求删除
task::create 任务创建
task::update 任务更新
task::delete 任务删除
release::create 发布计划创建
release::update 发布计划更新
release::delete 发布计划删除
branch::relate 需求缺陷任务绑定Git分支
branch::unrelate 需求缺陷任务解除绑定Git分支
story_comment::add 需求评论添加
story_comment::update 需求评论更新
story_comment::delete 需求评论删除
bug_comment::add 缺陷评论添加
bug_comment::update 缺陷评论更新
bug_comment::delete 缺陷评论删除
task_comment::add 任务评论添加
task_comment::update 任务评论更新
task_comment::delete 任务评论删除
iteration::create 迭代创建
iteration::update 迭代更新
iteration::delete 迭代删除
workitem_time_relation::bind 前后置对象绑定
workitem_time_relation::unbind 前后置对象解绑
上次更新: 2025-04-17 19:58:41