获取 Webhook 列表
接口概述
- 功能:创建的webhook列表信息
- 请求方式: GET
- 请求地址:/api/surveys/{survey_id}/webhooks?appid={appid}&access_token={access_token}
请求参数
参数名 | 类型 | 参数位置 | 描述 | 示例值 |
---|---|---|---|---|
survey_id | integer | uri | 问卷ID | 292190 |
响应参数
参数名 | 类型 | 描述 |
---|---|---|
total | integer | webhook 配置数量 |
list | array[object] | webhook列表 |
list[_].id | integer | 自增ID |
list[_].url | string | url |
list[_].is_active | bool | 是否启用 |
list[_].created_at | datetime | 创建时间 |
list[_].updated_at | datetime | 修改时间 |
响应示例
- 请求成功
{
"code": "OK",
"error": {
"type": ""
},
"data": {
"list": [
{
"id": 51,
"user_id": 0,
"object": "Survey_292197",
"url": "https://stage.wesurvey.com",
"secret": "",
"is_active": false,
"options": "{\"listenedResources\":[\"answer\"]}",
"created_at": "2021-07-22 16:46:56",
"updated_at": "2021-07-22 16:56:00"
}
],
"total": 1
},
"request_id": "6b17fcf0-c08a-4311-8297-db7338cd49a1"
}
- 请求失败
{
"code": "InvalidArgument",
"error": {
"type": "invalid_argument",
},
"data": {},
"request_id": "ddec96d2-165e-4f3e-8a64-2057db116983"
}
错误码
error.type 错误代码 | 错误描述 |
---|---|
not_found | 找不到数据 |
invalid_argument | 参数校验不通过 |