このエンドポイントを使用して、ドメインに利用可能なドメイン名の利用権確認 (DCV) 方法を設定します。
curl -X PUT \
'https://www.digicert.com/services/v2/domain/{{domain_id}}/dcv/method' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}' \
-d '{
"dcv_method": "<dcv_method>"
}'
import requests
url = "https://www.digicert.com/services/v2/domain/{{domain_id}}/dcv/method"
payload = "{\n\t\"dcv_method\": \"<dcv_method>\"\n}"
headers = {
'X-DC-DEVKEY': "{{api_key}}",
'Content-Type': "application/json"
}
response = requests.request("PUT", url, data=payload, headers=headers)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/domain/{{domain_id}}/dcv/method"
payload := strings.NewReader("{\n\t\"dcv_method\": \"<dcv_method>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
var request = require("request");
var options = { method: 'PUT',
url: 'https://www.digicert.com/services/v2/domain/{{domain_id}}/dcv/method',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' },
body: { dcv_method: '<dcv_method>' },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{}
{
"dcv_token": {
"token": "<random_value>",
"status": "pending",
"expiration_date": "2018-11-18T20:35:32+00:00",
"verification_value": "dcv.digicert.com"
}
}
{
"dcv_token": {
"token": "<random_value>",
"status": "pending",
"expiration_date": "2018-11-18T20:38:45+00:00",
"http_token_url": "http://example.com/.well-known/pki-validation/<random_file_name>.txt"
}
}
{
"dcv_token": {
"token": "<random_value>",
"status": "pending",
"expiration_date": "2018-11-18T20:40:43+00:00"
}
}
名前 | 申請/オプション | 種別 | 説明 |
---|---|---|---|
dcv_method | 必須 | string |
ドメインに使用する DCV 方法 「用語集 — DCV 方法」を参照してください。 |
名前 | 種別 | 説明 |
---|---|---|
dcv_token | string | DCV 方法の変更についての情報を記載したオブジェクト |
.. token | string | ドメイン名の利用権を確認するのに使用するランダム値 |
.. status | string | ドメイン確認のステータス |
.. expiration_date | string |
DCV トークンが有効期限切れとなる時点のタイムスタンプ 形式:UTC タイムゾーンと ISO 8601 日付 |
.. verification_value | string |
DNS レコード対象ホストフィールドの値 DCV 方法が dns-cname-token の場合にのみ返されます。
|
.. http_token_url | string |
.txt ファイルのファイル名と場所 DCV 方法が http-token の場合にのみ返されます。
|