# 说明
推送事件到TAPD,触发自动化规则事件
# url
https://apiv2.tapd.tencent.com/open_app_events/hook?workspace_id=项目ID
# 支持格式
JSON
# HTTP请求方式
POST
# 请求数限制
一次推送一条事件数据
# 请求参数
字段名 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
workspace_id | 是 | integer | 项目ID |
object_type | 是 | string | 自动化对象名,如AutoDemo |
event_key | 是 | string | trigger事件名,如trigger_demo |
注:其他参数不限,请在插件应用中提供event_change.handle方法,供TAPD将参数转为标准自动化规则事件参数
# 调用示例及返回结果
# 推送个简单的事件
# curl 使用 Basic Auth 鉴权调用示例
curl -u 'api_user:api_password' -d 'workspace_id=10158231&field1=value1&field2=value2' 'https://apiv2.tapd.tencent.com/open_app_events/hook'
# curl 使用 OAuth Access Token 鉴权调用示例
curl -H 'Authorization: Bearer ACCESS_TOKEN' -d 'workspace_id=10158231&field1=value1&field2=value2' 'https://apiv2.tapd.tencent.com/open_app_events/hook'
# 返回结果
{
"status": 1,
"info": "success"
}
1
2
3
4
2
3
4