UpdateDomainSrcInfo

Update time: 2026-09-01 18:07:31

Applicable Products

Content Acceleration,Dynamic Web Acceleration,Media Acceleration VoD,Media Acceleration Live Broadcast

API Description

Self-modify advanced source configurations through interfaces.Allows customers to specify regional configurations, different IP backsources, and when multiple sources are available, policy backsources can be specified.

  • API URL: https://api.atomile.com/api/basicconfig/advancedsource/*
  • Method: PUT
  • Limit Description: · The accelerated domain name must have been filed. · Accelerated domain names must not contain the following information: sales of drugs and controlled tools, including illegal speech and information. · Video-accelerated domain names must have audiovisual licenses; blog forums or community-based accelerated domain names must have BBS special approval qualifications. · Interface requests and return results only accept xml format.

Call frequency

Single user trigger frequency: 300/5min

Request parameter(s)

Body Params

NameDescription
ipString
Back to the source IP.Support IP or domain name;If IP supports both IPV4 and IPv6, only one value is allowed
areaString
A set of area configurations, with multiple parameters if more than one.
areasLong
"Area where advanced sources need to be set.See the attachment for details.The input value has no English value corresponding to the region.There must be a Global region configuration, Global input Global.If you have tag, this must be filled in. The recommended parameters are continent-grained, and there is a risk of adjusting other granularity data -- use with caution."
adv-ipString
A set of IP messages
weightInteger
The weight.Specify the weight of this back source IP, without entering the default 10
adv-ipsString
Configure the back source IP information under a region, or multiple groups if a region has more than one IP
priorityInteger
The hierarchy.Specify the level of this back source IP, without entering a default layer
src-portInteger
origin port
origin-ipString
Back to the source address, can be IP or domain name.
source-hostString
souce host, support ip and domain name, you can only specify one source-host in a adv-ips rule.
detection-portInteger
detection port, it is available when use-advanced-sources=true
advanced-sourceLong
Advanced source configuration, representing a high-level source.Customers can configure multiple advanced source content.
advanced-sourcesLong
Advanced source configuration tags
default-source-hostString
Origin HOST.
use-dynamic-sourcesString
Enable dynamic source, some configuration do not support dynamic source true: open false: do not open Clear: Web acceleration and site-wide acceleration are enabled by default; other services are disabled by default
authorization-methodString
authorization method, supports OSS,TOS,Amazon S3
use-advanced-sourcesString
This is required to enable advanced source configuration.
advanced-source-strategyString
Advanced source extension configuration, you can specify a single access policy for multiple IP addresses under a single advanced source configuration, multiple policies can have multiple parameters. port: Use the request port to return to the source offline: Enable offline mode primary: Primary source polling standby: Standby source polling
advanced-source-strategiesLong
Advanced source extension configuration, you can specify a single advanced source configuration under multiple IP, access policy.Supports multiple,

Response parameter(s)

Response Header

NameDescription
x-cnc-request-idString
Uniquely labeled id for querying each requested task (for all interfaces)

Body Params

NameDescription
codeString
The error code, when HTTPStatus is not 202, indicates the type of error the current request is calling.
messageString
Response information, when success is successful

Error code

Error code(code)Description(message)HTTP statusSemantic
InvalidParameterThe value of use-advanced-sources must be true or false.400The value of use-advanced-sources must be true or false.
InvalidParameterThe strategy is invalid.400The strategy is invalid.
InvalidParameterThe area is invalid.400The area is invalid.
NoSuchOperatorThe specified operator does not exist.404The specified operator does not exist.
NoSuchCustomerThe specified customer name does not exist.404The specified customer name does not exist.
NoSuchCustomerThe specified customer id does not exist.404The specified customer id does not exist.
NoSuchRequestIDThe specified request id does not exist.404The specified request id does not exist.
DuplicatedRequestIDThe specified request id already exist.400The specified request id already exist.
NoSpecifiedDomainYou must specified domain.400You must specified domain.
NoSuchDomainThe specified domain does not exist.404The specified domain does not exist.
DomainNotRestoredThe domain you are trying to cancel has not been restored.409The domain you are trying to cancel has not been restored.
InternalErrorWe encountered an internal error. Please try again.500We encountered an internal error. Please try again.
DuplicatedDomainNameThe specified domain name must be unique.400The specified domain name must be unique.
InvalidParameterDomain attribute Origin ip config err.400Domain attribute Origin ip config err.
InvalidParameterDomain attribute Origin ip config err.400Domain attribute Origin ip config err.
InvalidParameterDomain attribute Origin ip config err.400Domain attribute Origin ip config err.
ConfigErrorThe config advSrc does not access.400The config advSrc does not access.
InvalidParameterDomain attribute Origin ip config err.403Domain attribute Origin ip config err.
ConfigVersionOutOfDateThe specified version is out of date.409The specified version is out of date.
ForbiddenThe domain is being deleted403The domain is being deleted
InvalidParameterThe specified use-advanced-sources is invalid.400The specified use-advanced-sources is invalid.
InvalidParameterThe specified use-dynamic-sources is invalid.400The specified use-dynamic-sources is invalid.
ForbiddenDisallow to change adv advanced-sources before authorization.403Disallow to change adv advanced-sources before authorization.
InvalidParameterThe specified advanced-sources is empty.400The specified advanced-sources is empty.
InternalErrorWe encountered an internal error. Please try again.500We encountered an internal error. Please try again.
InvalidParameterThe specified areas is empty400The specified areas is empty
DuplicatedAreaThe specified area must be unique.400The specified area must be unique.
InvalidParameterThe specified strategy is invalid.400The specified strategy is invalid.
InvalidParameterThe specified config adv-ips must not empty .400The specified config adv-ips must not empty .
InvalidParameterThe specified ip is empty.400The specified ip is empty.
InvalidParameterThe specified ip is invalid.400The specified ip is invalid.
DuplicatedIpThe specified ip already exist in advanced-source config.400The specified ip already exist in advanced-source config.
InvalidParameterThe priority must in [1,5].400The priority must in [1,5].
InvalidParameterThe weight must in [1,99999].400The weight must in [1,99999].
RequiredPriorityValueOneMust contain a priority config value is 1.400Must contain a priority config value is 1.
InvalidParameterThe area is invalid.400The area is invalid.
RequiredGlobalAreaMust contain a area config value is Global.400Must contain a area config value is Global.
InternalErrorWe encountered an internal error. Please try again.500We encountered an internal error. Please try again.
InvalidParametersource-host error, ipv4, ipv6 and domain name are supported, and you can specify one.400source-host error, ipv4, ipv6 and domain name are supported, and you can specify one.
InvalidParameterauthorizationMethod parameter error400authorizationMethod parameter error
InvalidParameterdefault-source-host error, ipv4, ipv6 and domain name are supported, and you can specify one.400default-source-host error, ipv4, ipv6 and domain name are supported, and you can specify one.

Example

JSON
XML
JSON2
JSON
Request example
Copy Copy success
#!/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://{@apiDomain}/api/basicconfig/advancedsource/123344" \
-X "PUT" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-d '
{
    "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",
    "use-advanced-sources":"true",
    "use-dynamic-sources":"true",
    "advanced-sources":[
        {
            "advanced-source-strategies":[
                "primary",
                "standby"
            ],
            "areas":[
                "Global",
                "Japan"
            ],
            "adv-ips":[
                {
                    "ip":"127.0.1.1",
                    "priority":"1",
                    "weight":"10"
                },
                {
                    "ip":"127.0.2.1",
                    "priority":"2",
                    "weight":"9"
                }
            ]
        },
        {
            "advanced-source-strategies":[
                "standby"
            ],
            "areas":[
                "China"
            ],
            "adv-ips":[
                {
                    "ip":"127.0.4.1",
                    "priority":"1",
                    "weight":"10"
                },
                {
                    "ip":"127.0.5.1",
                    "priority":"2",
                    "weight":"9"
                }
            ]
        }
    ]
}'
Response example
Copy Copy success
HTTP/1.1 202 Accepted
Server: openresty/1.11.2.2
Date: Fri, 24 May 2019 06:08:47 GMT
Content-Type: application/json;charset=utf-8
Content-Length: 31
Connection: keep-alive
App-Name: service_confApi
x-cnc-request-id: 01f0d3ac-d326-44d3

{"message":"success","code":""}