CDN Pro
获取已创建的webhook接口列表。当你创建部署任务,刷新任务,预取任务,或者配置验证任务时,都可以使用webhook接口来接收任务完成通知。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 描述 |
---|---|
offsetInteger | 默认值: 0 取值范围: >= 0
查询起始位置。 |
limitInteger | 默认值: 100 取值范围: <= 200
每次查询的最大条数。 |
参数名称 | 描述 |
---|---|
countInteger | 取值范围: >= 0
webhook接口数量,该数量与查询参数直接相关。 |
webooksList | |
idString | webhook接口ID。 |
nameString | 取值范围: <= 250 字符
webhook接口名称。 |
descriptionString | 取值范围: <= 500 字符
webhook接口描述。 |
creationTimeString | webhook接口创建时间,以RFC 3339日期格式展示。 |
lastUpdateTimeString | webhook接口最近一次更新时间,以RFC 3339日期格式展示。 |
lastCallTimeString | webhook接口最近一次调用时间,以RFC 3339日期格式展示。 |
totalCallsInteger | 取值范围: >= 0
webhook接口累计被调用的次数。 |
hasCredentialsBoolean | 是否要求鉴权。 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
InvalidListOffset | The offset must be a valid non-negative integer. | 400 | offset参数取值必须是0或者正整数。 |
InvalidListLimit | The value of limit should be an integer. | 400 | limit参数取值必须是整数。 |
#!/bin/bash username="example_username" apiKey="example_apiKey" date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"` password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64` curl -i --url "https://open.chinanetcenter.com/cdn/webhooks" \ -X "GET" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \
{ "count": 1, "webhooks": [ { "id": "607ed4b9ae4f763071be9e22", "name": "purgeNotification", "description": "Tell me when the purge has completed", "creationTime": "2021-04-20T13:18:49Z", "totalCalls": 0, "hasCredentials": true } ] }