应用安全加速解决方案、IPv6一体化解决方案、电商安全加速解决方案、金融安全加速解决方案、政企安全加速解决方案、应用安全解决方案、区块链安全加速解决方案、IPv6安全加速解决方案、点播分发、直播分发、移动加速、网页加速、下载分发、全站加速
通过接口查询客户高级源配置
单用户调用频率:300/5min
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
domain-name/domain-id | String | 否 | 需要查询配置的域名或域名id |
参数名称 | 类型 | 描述 |
---|---|---|
origin-ip | String | 回源地址,可以是IP或域名。 1、IP以分号分隔,支持多个。 2、域名只能输入一个。IP与域名不能同时输入。 3、限制最大不能超过500个字符长度。 |
plan-advanced-sources | String | 域名是否有规划高级源配置 true:表示域名有规划高级源配置 false:表示域名无高级源配置规划 |
use-advanced-sources | String | 是否开启高级源配置,此项必填。 true:开启 false:不开启 如果要清空配置可以传入false. |
advanced-sources | complex | 高级源配置标签 注意:表示需要设置高级源配置时,此项必填 |
advanced-source | complex | 高级源配置,表示一条高级源。客户可以配置多条高级源内容。 |
advanced-source-strategies | complex | 高级源扩展配置,可以指定一条高级源配置下多个IP时,访问策略。支持多个, |
advanced-source-strategy | string | 高级源扩展配置,可以指定一条高级源配置下多个IP时一种访问策略,多种策略可以多个参数 port:用请求端口回源 primary:主源轮询(需要与技术支持同事确认) standby:备源轮询(需要与技术支持同事确认) |
areas | complex | 设置高级源的区域。 |
area | string | 一组区域配置,如果有多个则,参数多个。 |
adv-ips | string | 一个区域下配置回源IP信息,如果一个区域有多个IP则有多组 |
adv-ip | String | 一组IP信息 |
ip | String | 回源IP。支持IP或域名;如果是IP支持IPV4和IPv6,值只能一个 |
priority | int | 层级。指定这个回源IP的层级,不输入默认一层 |
weight | int | 权重。指定这个回源IP的权重,不输入默认10 |
source-host | string | 回源host,支持ip和域名,值只支持一个(动态源不支持) |
authorization-method | string | 鉴权方式,可选值OSS、TOS、Amazon S3 |
use-dynamic-sources | String | 是否开启动态源 true:开启 false:不开启 清空:网页加速、全站加速默认为开启;其他服务默认为关闭 |
default-source-host | String | 回源请求Host |
src-port | String | 回源请求端口 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
NoSuchOperator | The specified operator does not exist. | 404 | 操作者不存在 |
NoSuchCustomer | The specified customer name does not exist. | 404 | 客户名对应客户不存在 |
NoSuchCustomer | The specified customer id does not exist. | 404 | 客户id对应客户不存在 |
NoSuchRequestID | The specified request id does not exist. | 404 | 请求id为空 |
DuplicatedRequestID | The specified request id already exist. | 400 | 请求id重复 |
NoSpecifiedDomain | You must specified domain. | 400 | 请求的域名为空 |
NoSuchDomain | The specified domain does not exist. | 404 | 域名不属于当前客户 |
DomainNotRestored | The domain you are trying to cancel has not been restored. | 409 | 域名已取消加速需要重新启用 |
#!/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/api/basicconfig/advancedsource/a1.example.com" \ -X "GET" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \ -H "Content-Type:application/json"
HTTP/1.1 200 OK Server: openresty/1.11.2.2 Date: Fri, 24 May 2019 06:32:39 GMT Content-Type: application/json;charset=utf-8 Content-Length: 488 Connection: keep-alive App-Name: service_confApi x-cnc-request-id: e189da67-333d-4795 { "origin-ip":"127.0.1.1;127.0.2.1;127.0.4.1;127.0.5.1", "default-source-host":"1.1.1.1", "src-port":"80", "plan-advanced-sources":true, "use-advanced-sources":true, "use-dynamic-sources":"false", "advanced-sources":[ { "advanced-source-strategies":[ "primary", "standby" ], "areas":[ "Global", "Japan" ], "adv-ips":[ { "ip":"127.0.1.1", "priority":"1", "weight":"10", "source-host": "sourcehost1.example.com" }, { "ip":"127.0.2.1", "priority":"2", "weight":"9", "source-host": "sourcehost2.example.com" } ] }, { "advanced-source-strategies":[ "standby" ], "areas":[ "China" ], "adv-ips":[ { "ip":"127.0.5.1", "priority":"2", "weight":"9", "source-host": "sourcehost1.example.com" }, { "ip":"127.0.4.1", "priority":"1", "weight":"10", "source-host": "sourcehost2.example.com" } ] } ] }