域名创建
POST
/API/cdn/domain
请求参数
Header 参数
Authorization
string
必需
默认值:
Bearer Af8VDldHtQxxxF4n=H8tLRl9Er7WdhaXvWWd/
Content-Type
string
json 类型
默认值:
application/json
Body 参数application/json
domain
string
域名名称
type
string
必需
source_type
string
必需
cache_type
string
必需
source_conf
array [object {2}]
必需
source
string
必需
type
string
必需
is_ssl
string
必需
cert_id
string
必需
share_did
string
可选
note
string
备注
示例
{
"domain": "apitest3.rgslb.link",
"type": "CDN",
"source_type": "2",
"cache_type": "1",
"source_conf": [
{
"source": "ec2-test-boss.verycloud.cn",
"type": "1"
}
],
"is_ssl": "1",
"cert_id": "22",
"note": "备注"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://ctgcdn.esurfingcloud.com/API/cdn/domain' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"domain": "apitest3.rgslb.link",
"type": "CDN",
"source_type": "2",
"cache_type":"1",
"source_conf": [
{
"source": "ec2-test-boss.verycloud.cn",
"type": "1"
}
],
"is_ssl": "1",
"cert_id": "22",
"note": "备注"
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
返回信息
data
object
必需
type
string
必需
type_zh
string
必需
username
string
域名所属用户
source_conf
array [object {1}]
源站配置
id
string
加速域名ID
name
string
加速域名名称
cname
string
必需
share_did
string
共享缓存的域名ID
示例
{
"code": 1,
"message": "OK",
"data": {
"type": "cdn",
"type_zh": "CDN加速",
"username": "test",
"source_conf": [
{
"source": "ec2-test-boss.verycloud.cn"
}
],
"id": "255",
"name": "apitest42.rgslb.link",
"cname": "apitest42.rgslb.link.cloudhkgslb.com",
"share_did": ""
}
}
修改于 2024-08-07 02:32:18