Docs
api
Cloud Delivery(UCDN)
GetUcdnDomainConfig

Batch acquisition of acceleration domain configuration - GetUcdnDomainConfig

Overview

Batch acquisition of acceleration domain configuration

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is GetUcdnDomainConfig.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.No
OffsetintData offset, default is 0, non-negative integerNo
LimitintReturn data length, default is all, non-negative integerNo
DomainId.NstringDomain ID, the ID generated when creating a domain. By default, it fetches all domain information under the account, where n is a natural number, starting from DomainId.0.No
ChannelTypestringProduct type ucdn, can be left blank, default is ucdnNo
Domain.NstringDomain NameNo
IsDcdnbooleanIs it dynamically accelerated? The default is false.No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
DomainListarray[DomainConfigInfo]The obtained domain information, refer to the following DomainConfigYes

Data Model

DomainConfigInfo

Field NameTypeDescription InformationRequired
AreaCodestringQuery bandwidth area: ‘cn’ represents domestic, ‘abroad’ represents overseas, ‘all’ represents all areas.Yes
CdnTypestringThe business type of the accelerated domain name, ‘web’ represents website, ‘stream’ represents video, ‘download’ represents download.Yes
StatusstringThe current status of the acceleration domain name created.
‘check’ represents under review;
‘checkSuccess’ represents review passed;
‘checkFail’ represents review failed;
‘enable’ represents accelerating;
‘disable’ represents acceleration stopped;
‘delete’ represents acceleration deleted;
‘enableing’ represents acceleration is being enabled;
‘disableing’ represents acceleration is being disabled;
‘deleteing’ represents being deleted;
‘deploying’ represents deploying.
Yes
CnamestringCDN domain name. The CDN domain name generated when creating an acceleration domain name, used for setting CNAME records.Yes
CreateTimeintThe time of domain creation. Format: Timestamp.Yes
TestUrlstringTest URL. Used for testing when creating acceleration for domain names.Yes
HttpsStatusCnstringDomestic HTTPS status enableing - Enabling fail - Enabling failed enable - Enabled disable - Not enabledYes
HttpsStatusAbroadstringOverseas HTTPS status enableing - Enabling, fail - Enabling failed, enable - Enabled, disable - Not enabledYes
CertNameCnstringDomestic Certificate NameYes
CertNameAbroadstringForeign Certificate NameYes
TagstringBusiness Group: DefaultYes
DomainIdstringDomain IdNo
DomainstringDomain NameNo
OriginConfOriginConfReference to OriginConfNo
AccessControlConfAccessControlConfAccess Control Configuration Refer to AccessControlConfNo
CacheConfCacheAllConfigCache Configuration Refer to CacheAllConfigNo
AdvancedConfAdvancedConfAdvanced Configuration Reference AdvancedConfNo

OriginConf

Field NameTypeDescription InformationRequired
OriginIpListarray[string]The source IP is the IP address that the CDN server accesses when it returns to the source. Multiple source IPs can be expressed like this, for example: [“1.1.1.1”,“2.2.2.2”].No
OriginHoststringBack-to-source Http request header Host, the default is the acceleration domain nameNo
OriginPortintOrigin PortNo
BackupOriginEnableboolean1 If set to false, it means that BackupOriginIp is empty, indicating that there is no backup source station, and the fields BackupOriginIp, BackupOriginHost should be ignored
2 If set to true, it means that there must be at least one backup source station address in BackupOriginIp.n
No
BackupOriginIpListarray[string]The backup source station IP is the IP address accessed by the CDN server when it returns to the source. Multiple source station IPs can be expressed like this, such as: [“1.1.1.1”,“2.2.2.2”].No
BackupOriginHoststringBackup source Http request header Host, the default is the acceleration domain name.No
OriginErrorCodestringThe return error code of the main source response (such as: 404|500), default is an empty stringNo
OriginErrorNumintThe number of failures in returning to the primary source, default is 1.No
OriginProtocolstringOrigin Protocol http, http|https Default httpNo
OriginFollow301intFollow 301 Redirect 0=Do not follow 1=FollowNo

AccessControlConf

Field NameTypeDescription InformationRequired
IpBlackListarray[string]IP blacklist, multiple IPs, can be represented as:
IpBlackList.0=1.1.1.1, IpBlackList.1=2.2.2.2
No
ReferConfReferConfrefer configurationNo

CacheAllConfig

Field NameTypeDescription InformationRequired
CacheHoststringCacheHost, different domain names can be configured to the same CacheHost to achieve cache sharing, the default is the accelerated domain name.No
CacheListarray[CacheConf]Cache configuration list, see CacheConfNo
HttpCodeCacheListarray[CacheConf]Status code cache configuration list, see CacheConfNo
CacheKeyListarray[CacheKeyInfo]Ignore the parameter cache configuration list, see CacheKeyInfoNo

AdvancedConf

Field NameTypeDescription InformationRequired
HttpClientHeaderarray[string]Client Response HTTP Header ListNo
HttpOriginHeaderarray[string]Source HTTP Header ListNo
Http2HttpsbooleanHTTP to HTTPS back to source, true for yes, false for noNo
WebSocketEnablebooleanEnable websocket?No
QuicEnablebooleanEnable QUIC?No

CacheConf

Field NameTypeDescription InformationRequired
PathPatternstringPath mode, supports regular expressionYes
CacheTTLintCaching TimeYes
CacheUnitstringUnit of cache time. sec (seconds), min (minutes), hour (hours), day (days). The upper limit is 1 year.Yes
CacheBehaviorbooleanWhether to cache, true for caching, false for not caching. In the case of false, CacheTTL and CacheUnit are forced to be ineffective.Yes
HttpCodePatternstringStatus code mode, non-200, 206 status codes, multiple status codes are separated by a vertical line (|), this attribute is only returned in the status code cache configuration list.No
DescriptionstringCaching Rule DescriptionNo
FollowOriginRulebooleanWhether to prioritize following the source station’s header caching strategy, false means not prioritizing the source station, true means prioritizing the source station’s caching header. The default is 0.No

CacheKeyInfo

Field NameTypeDescription InformationRequired
IgnorebooleanIgnore?No
PathPatternstringPath mode, supports regular expressionNo
QueryStringstringCustom variables, starting with the $ symbol, multiple variables are connected with a plus (+), $querystring represents all variables.No

ReferConf

Field NameTypeDescription InformationRequired
ReferTypeintRefer Anti-theft Chain Configuration 0Whitelist, 1BlacklistNo
NullReferintWhen ReferType is set to whitelist (delete), NullRefer set to 0 means NULL refer access is not allowed, and set to 1 means NULL refer access is allowed.No
ReferListarray[string]Refer to the anti-theft chain rule list, supports regular expressionsNo

Example

Request Example

http://api.spark.ucloud.cn/?Action= GetUcdnDomainConfig
& DomainId.0=domain-0331qd
&ChannelType=sdVTSYmK
&Domain.n=AhjiGKwI
&IsDcdn=false

Response Example

{
  "Action": " GetUcdnDomainConfigResponse",
  "DomainList": [
    {
      "AccessConf": {
        "IpBlackList": [
          "2.2.2.2",
          "3.3.3.3"
        ],
        "ReferConf": {
          "NullRefer": 0,
          "ReferList": [
            "www.baidu.com",
            "www.ucloud.com"
          ],
          "ReferType": 0
        }
      },
      "AdvancedConf": {
        "Http2Https": true,
        "HttpClientHeader": [
          "Access-Control-Allow-Origin:*",
          "Access-Control-Request-Method:GET"
        ],
        "HttpOriginHeader": [
          "Access-Control-Allow-Origin:*",
          "Access-Control-Request-Method:GET"
        ]
      },
      "AreaCode": "cn",
      "CacheConf": {
        "CacheHost": "share.ucloud.cn",
        "CacheList": [
          {
            "CacheBehavior": true,
            "CacheTTL": 12,
            "CacheUnit": "hour",
            "Description": "网站首页",
            "FollowOriginRule": false,
            "IgnoreQueryString": true,
            "PathPattern": "/"
          },
          {
            "CacheBehavior": true,
            "CacheTTL": 12,
            "CacheUnit": "hour",
            "Description": "所有文件",
            "FollowOriginRule": false,
            "IgnoreQueryString": true,
            "PathPattern": "/*.*"
          }
        ]
      },
      "CdnType": "web",
      "CertName": "ucloud_2019",
      "Cname": "9sqlhpr2.cdn.ucloud.cn",
      "CreateTime": 1392974921,
      "Domain": "abc.ucloud.cn",
      "DomainId": "domain-0331qd",
      "HttpsStatusAbroad": "enable",
      "HttpsStatusCn": "enable",
      "OriginConf": {
        "OriginFollow301": 0,
        "OriginHost": "www.xx.com",
        "OriginIpList": [
          "1.1.1.1",
          "2.2.2.2"
        ],
        "OriginPort": 80,
        "OriginProtocol": "http"
      },
      "Status": "enable",
      "Tag": "Default",
      "TestUrl": "http://static.ucloud.cn/logogg.jpg"
    }
  ],
  "RetCode": 0
}