Répertorier les méthodes DCV

GET
https://www.digicert.com/services/v2/domain/dcv/method

Exécutez ce point de terminaison pour répertorier les méthodes DCV (validation du contrôle de domaine) disponibles pour les domaines.

cURL
curl -X GET \
  https://www.digicert.com/services/v2/domain/dcv/method \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}'
Python
import requests

url = "https://www.digicert.com/services/v2/domain/dcv/method"

headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json"
    }

response = requests.request("GET", url, headers=headers)

print(response.text)
Go
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://www.digicert.com/services/v2/domain/dcv/method"

	req, _ := http.NewRequest("GET", url, nil)

	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))

}
NodeJS
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.digicert.com/services/v2/domain/dcv/method',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
200 OK
{
    "methods": [
        {
            "name": "email",
            "display_name": "Verification Email",
            "description": "This method sends a verification link and token via email",
            "default": true
        },
        {
            "name": "dns-cname-token",
            "display_name": "DNS CNAME Record",
            "description": "This method lets you add a CNAME record from your domain registrar's control panel",
            "default": false
        },
        {
            "name": "http-token",
            "display_name": "HTTP Practical Demonstration",
            "description": "This method lets you add a token value to a specific URL on the domain being validated",
            "default": false
        },
        {
            "name": "dns-txt-token",
            "display_name": "DNS TXT Record",
            "description": "This method lets you add a TXT record from your domain registrar's control panel",
            "default": false
        }
    ]
}

Paramètres de réponse

Nom Type Description
methods array Liste des méthodes DCV disponibles
.. name string Identificateur de la méthode DCV
.. display_name string Nom complet de la méthode DCV
.. description string Description de la méthode DCV
.. default bool Indique si la méthode DCV est la méthode définie par défaut pour votre compte.