Supprimer le certificat

POST
https://daas.digicert.com/apicontroller/v1/certificate/delete

Supprimer un ou plusieurs certificats de l'inventaire des certificats précédemment détectés.

cURL
curl -X POST \
  https://daas.digicert.com/apicontroller/v1/certificate/delete \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}' \
  -d '{
    "accountId": "126993",
    "divisionIds": [],
    "certId": [
        "fb92ee3a2fd0cb6549e58c252f8787f467bfbeff"
    ]
}'
Python
import requests

url = "https://daas.digicert.com/apicontroller/v1/certificate/delete"

payload = "{\n    \"accountId\": \"126993\",\n    \"divisionIds\": [],\n    \"certId\": [\n        \"fb92ee3a2fd0cb6549e58c252f8787f467bfbeff\"\n    ]\n}"
headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json",
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
Go
package main

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

func main() {

	url := "https://daas.digicert.com/apicontroller/v1/certificate/delete"

	payload := strings.NewReader("{\n    \"accountId\": \"126993\",\n    \"divisionIds\": [],\n    \"certId\": [\n        \"fb92ee3a2fd0cb6549e58c252f8787f467bfbeff\"\n    ]\n}")

	req, _ := http.NewRequest("POST", 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))

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

var options = { method: 'POST',
  url: 'https://daas.digicert.com/apicontroller/v1/certificate/delete',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' },
  body: 
   { accountId: '126993',
     divisionIds: [],
     certId: [ 'fb92ee3a2fd0cb6549e58c252f8787f467bfbeff' ] },
  json: true };

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

  console.log(body);
});
200 OK
{
    "data": "Request accepted successfully"
}

Paramètres de demande

Nom Obligatoire/facultatif Type Description
accountId Obligatoire string ID de compte
divisionIds Facultatif array ID de la division.
certId Obligatoire array ID unique généré par DigiCert pour le certificat détecté sur le point de terminaison. Obtenez l'identifiant du certificat à partir de la demande List certificates (Liste des certificats).