文档
测试

新增域名

POST
http://admin.301admin.com/api/v1/adds

请求参数

参数名
类型
描述
必填
hosts
json
域名信息
必填
domain
string
域名
必填
redirect
string
网页跳转地址
必填
redirectmobile
string
手机跳转地址
必填
type
int
1-精准匹配 2-@ www 3- @ * 去掉任何二级域名去匹配(默认1)
必填
path
int
启用path参数 1=启用 0=不启用(默认0)
可选
uri
int
启用uri参数 1=启用 0=不启用(默认0)
可选
certData
string
base64证书内容
可选
certKey
string
base64证书密钥
可选
siteid
int
组别ID,小于100000 (默认0)
可选
timespan
int
时间戳
必填
sign
string
签名
必填

响应参数

参数名
类型
描述
必填
code
int
状态码,200; 400及其他错误码
必填
msg
string
错误或成功信息提示
必填
data
json
返回信息描述的对象
必填
success
json
成功域名信息
必填
count
int
数量
必填
hosts
json
域名
必填
errors
json
错误域名信息
必填
count
int
数量
必填
hosts
json
域名
必填
exists
json
已存在域名信息
必填
count
int
数量
必填
hosts
json
域名
必填

说明 / 示例

请求参数示例: ``` { "hosts": [{ "domain": "test.com", "redirect": "www.baidu.com", "redirectmobile": "www.baidu.com", "type": 1, "siteid":10000 }, { "domain": "test2.com", "redirect": "www.baidu.com", "redirectmobile": "www.baidu.com", "type": 1, "siteid":10000 }], "timespan": 1626695841, "sign": "2883f60dee4820647fbc32f429cfaf77" } ``` 返回参数示例: ``` { "code": 200, "msg": "success", "data": { "success": { "count": 1, "hosts": [ "test.com" ] }, "errors": { "count": 0, "hosts": [] }, "exists": { "count": 1, "hosts": [ "test2.com" ] } } } ```