虚拟主机相关 - API文档

删除绑定域名

/Hosting/Bind

API分类 虚拟主机相关 请求方法 DELETE

API简介

在空间上删除一条绑定域名。

请求参数

名称 必须 说明
ApiKey API请求时必须提供的密钥,请和管理员联系索取
Password 登录朝暮数据用户管理的密码

注:参数名称不区分大小写。

请求示例

BASE_URL/Hosting/Bind

以下参数请用 DELETE 方式提交到 Form Data 中。

  • ApiKey=testApi
  • Password=testPassword
  • FtpName=myhost
  • Domain=abc.com

输出结果

{
    success: true
    info: "绑定域名删除成功"
}

代码示例

using RestSharp; //使用第三方组件RestSharp

var client = new RestClient();
client.BaseUrl = new Uri("http://BASE_URL");

var request = new RestRequest("/Hosting/Bind",Method.DELETE);
request.AddParameter("ApiKey", "testApi");
request.AddParameter("Password", "testPassword");
request.AddParameter("FtpName", "myhost");
request.AddParameter("Domain", "abc.com");

var response = client.Execute(request);
string result = response.Content;
$url = 'http://BASE_URL/Hosting/Bind';
$param = array(
  'ApiKey' => 'testApi',
  'Password' => 'testPassword',
  'FtpName' => 'myhost'    
  'Domain' => 'abc.com'    
);
$data = http_build_query($param);

$options = array(
            'http' => array(
                'method' => 'DELETE',
                'header' => 'Content-Type: application/x-www-form-urlencoded',
                'content' => $data
        ));
$context = stream_context_create($options);
$result = file_get_contents($url, FILE_TEXT, $context);
?>
'API请求的URL地址
const url = "http://BASE_URL/Hosting/Bind"

'API请求的提交数据
postData = "ApiKey=testApi&Password=testPassword&FtpName=myhost&Domain=abc.com"

'执行HTTP请求
Set http = Server.CreateObject("MSXML2.ServerXMLHTTP")
http.Open "DELETE", url, False
http.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
http.Send

'获取并分析结果
result = http.responseText