Domains : DNSSEC
Omschrijving
Wijzig de DNSSEC records van een domeinnaamEndpoint
PUT https://api.mijndomeinreseller.nl/v2/domains/domain/dnssec
Parameters
Parameter | Datatype | Verplicht | Omschrijving |
---|---|---|---|
dnssec_keys | Array | Nee | Een array met objecten met de DNSSEC keys: flags: integer: 256 voor ZSK of 257 voor KSK protocol: integer: alleen 3 mogelijk algorithm: integer: het nummer van het gebruikte algoritme public_key: string: de public key |
Antwoord
HTTP status code: 204 No Content
Voorbeelden
Beschrijving:
Stel één DNSSEC key in bij een domeinnaam
Opdracht in PHP:
<?php $env = "live"; // live or test $api_key = "XXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; $api_url = "/v2/domains/testdomeinnaam.nl/dnssec"; $api_host = $env === "live" ? "https://api.mijndomeinreseller.nl" : "https://api-test.mijndomeinreseller.nl"; $a_data = ["dnssec_keys" => []]; $a_data["dnssec_keys"][] = ["flags" => 257, "protocol" => 3, "algorithm" => 8, "public_key" => "AwEAAcRh4kHAQzj3mVEhQXs8XNiLu/D4R+jx6y1ZQuEqSYEebgnypt1m KZwtCrdmcHSULs0BqoIeKZOszfhx22NiQOC7r/rdpW7K0GHfhkabdvSz K+el6u5JHPw9FMVtRidexo4qSLVrhRiF3xRKwyagw3eOZc+NJYdbbFnC 7WTaa1Ncl5attAVqA9+Yt6thzmY0ifUSketjtob61MZ9OLdF6au1jfxE BlqXlnr2NBL5gJaSxH5fer0xXE8x+Q0/DIF1L3HHmxrnVpCi55wTPAeP N2Ngor5nS4eR9jW3LhttyJehw8Ld63Lx+0QpAgy+QacplvkgHJZhZlKV bB6ReCY8ASHZbpISZtiUzBByu2nHRowysp7HGkiMs1bAJKH0NpaXiAMq WcwjjFAh6tXwWWO74VgazrB7Z0BxT1dfbYNnP9QeCjDe5FvJptdxm8nC 2rGV9+zrWVPhUWL345RtTptWWXN6gGgpB/U2QxGWri1tU1XkB2TwyfdE fxayEVt+vAldtZFvmxrci1tssuzzawef6Y7CL1ziZZrXdLhO4maiLWQo Tqk6q6QHVbdSA38CBk0opsBjjYJHxVo2KCCuJDTHygIJMYpk+W92xhpY oVBtLJ74B+LDoxmPgutFN97MVP/WRPFHZK3ZI4IGFYQHbA9H3QqBbuaW RVvkaovpnPXBtRVJ"]; $json_data = json_encode($a_data); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $api_host . $api_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT"); curl_setopt( $ch, CURLOPT_POSTFIELDS, $json_data ); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: Bearer $api_key","Content-Type: application/json")); $output = curl_exec($ch); if(curl_getinfo($ch, CURLINFO_HTTP_CODE) === 204) { echo "DNSSEC keys successfully set"; } curl_close($ch);
Opdracht in cURL:
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer XXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \ -d '{"dnssec_keys" : [{"flags":257,"protocol":3,"algorithm":8, "public_key":"AwEAAcRh4kHAQzj3mVEhQXs8XNiLu/D4R+jx6y1ZQuEqSYEebgnypt1m KZwtCrdmcHSULs0BqoIeKZOszfhx22NiQOC7r/rdpW7K0GHfhkabdvSz K+el6u5JHPw9FMVtRidexo4qSLVrhRiF3xRKwyagw3eOZc+NJYdbbFnC 7WTaa1Ncl5attAVqA9+Yt6thzmY0ifUSketjtob61MZ9OLdF6au1jfxE BlqXlnr2NBL5gJaSxH5fer0xXE8x+Q0/DIF1L3HHmxrnVpCi55wTPAeP N2Ngor5nS4eR9jW3LhttyJehw8Ld63Lx+0QpAgy+QacplvkgHJZhZlKV bB6ReCY8ASHZbpISZtiUzBByu2nHRowysp7HGkiMs1bAJKH0NpaXiAMq WcwjjFAh6tXwWWO74VgazrB7Z0BxT1dfbYNnP9QeCjDe5FvJptdxm8nC 2rGV9+zrWVPhUWL345RtTptWWXN6gGgpB/U2QxGWri1tU1XkB2TwyfdE fxayEVt+vAldtZFvmxrci1tssuzzawef6Y7CL1ziZZrXdLhO4maiLWQo Tqk6q6QHVbdSA38CBk0opsBjjYJHxVo2KCCuJDTHygIJMYpk+W92xhpY oVBtLJ74B+LDoxmPgutFN97MVP/WRPFHZK3ZI4IGFYQHbA9H3QqBbuaW RVvkaovpnPXBtRVJ"}]}' \ https://api-test.mijndomeinreseller.nl/v2/domains/testdomeinnaam.nl/dnssec
HTTP/1.1 204 No Content
Beschrijving:
Stel twee DNSSEC keys in bij een domeinnaam
Opdracht in PHP:
<?php $env = "live"; // live or test $api_key = "XXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; $api_url = "/v2/domains/testdomeinnaam.nl/dnssec"; $api_host = $env === "live" ? "https://api.mijndomeinreseller.nl" : "https://api-test.mijndomeinreseller.nl"; $a_data = ["dnssec_keys" => []]; $a_data["dnssec_keys"][] = ["flags" => 257, "protocol" => 3, "algorithm" => 8, "public_key" => "AwEAAcRh4kHAQzj3mVEhQXs8XNiLu/D4R+jx6y1ZQuEqSYEebgnypt1m KZwtCrdmcHSULs0BqoIeKZOszfhx22NiQOC7r/rdpW7K0GHfhkabdvSz K+el6u5JHPw9FMVtRidexo4qSLVrhRiF3xRKwyagw3eOZc+NJYdbbFnC 7WTaa1Ncl5attAVqA9+Yt6thzmY0ifUSketjtob61MZ9OLdF6au1jfxE BlqXlnr2NBL5gJaSxH5fer0xXE8x+Q0/DIF1L3HHmxrnVpCi55wTPAeP N2Ngor5nS4eR9jW3LhttyJehw8Ld63Lx+0QpAgy+QacplvkgHJZhZlKV bB6ReCY8ASHZbpISZtiUzBByu2nHRowysp7HGkiMs1bAJKH0NpaXiAMq WcwjjFAh6tXwWWO74VgazrB7Z0BxT1dfbYNnP9QeCjDe5FvJptdxm8nC 2rGV9+zrWVPhUWL345RtTptWWXN6gGgpB/U2QxGWri1tU1XkB2TwyfdE fxayEVt+vAldtZFvmxrci1tssuzzawef6Y7CL1ziZZrXdLhO4maiLWQo Tqk6q6QHVbdSA38CBk0opsBjjYJHxVo2KCCuJDTHygIJMYpk+W92xhpY oVBtLJ74B+LDoxmPgutFN97MVP/WRPFHZK3ZI4IGFYQHbA9H3QqBbuaW RVvkaovpnPXBtRVJ"]; $a_data["dnssec_keys"][] = ["flags" => 256, "protocol" => 3, "algorithm" => 8, "public_key" => "AwEAAci1QujH/FAwbbwdjfMAZfLkdhjdiJ04JuBAntOAQW0o3KwgeF1K PXpXi5fy0Xsf7Xn2NQhwmBiOmcdnW2im/JGGKA5svwuhushgXf7n79cC /iqPqm66IlUrQuMGR66pio6sPFs2u4/n8W39Shhr8KtiZlCZvOAzaIdv eXEE/Gmt8okaKB+uF6xyku+h0pXA3Ac/IaEMepwtvuv9NgQ/lAEVW8r6 /rQazMHuDlrzzTZlo7bgC56UD3o9gFhjVLmYC6edcTvrilbu89x+7bmN fOYaVprd9c8ef2RPclOxpZd4naRQ5np2ClfDYZnZTZGGnruJih93duX4 1gGtgf6u6z7h0cKgTSd3pGDLFnxcOgoGYJKoVJ4fSICNrGZRcuISYnoD TnvDpF5WM02mTEmsERX/JYONKLGLz4ElhlJEDUqzt+mylWcXVnM1jvzi /mVEtEfXw9m/Q6XDEYshkbxxLGQo3HtJRE3v2B05B5FOheWE8a8trB67 jPI8NmD9WMyNLdZTJTW20m3S9Vo4p2Xwgg8IUrKyBN9L7mIhSgqz7t7K 36vvCmiJU1FEqFFarT86rEMqv7aDhuNEoc/JxrIelgxrZtMPsuXaxWEg K3tPxF6ukOkh8knz2n5zVtFGGI1YahsXzHY7kNPhxTDcOOv0bEOol6lE g8rjSrv1SKJh9gX9"]; $json_data = json_encode($a_data); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $api_host . $api_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT"); curl_setopt( $ch, CURLOPT_POSTFIELDS, $json_data ); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: Bearer $api_key","Content-Type: application/json")); $output = curl_exec($ch); if(curl_getinfo($ch, CURLINFO_HTTP_CODE) === 204) { echo "DNSSEC keys successfully set"; } curl_close($ch);
Opdracht in cURL:
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer XXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \ -d '{"dnssec_keys" : [{"flags":257,"protocol":3,"algorithm":8,"public_key":"AwEAAcRh4kHAQzj3mVEhQXs8XNiLu\/D4R+jx6y1ZQuEqSYEebgnypt1m KZwtCrdmcHSULs0BqoIeKZOszfhx22NiQOC7r\/rdpW7K0GHfhkabdvSz K+el6u5JHPw9FMVtRidexo4qSLVrhRiF3xRKwyagw3eOZc+NJYdbbFnC 7WTaa1Ncl5attAVqA9+Yt6thzmY0ifUSketjtob61MZ9OLdF6au1jfxE BlqXlnr2NBL5gJaSxH5fer0xXE8x+Q0\/DIF1L3HHmxrnVpCi55wTPAeP N2Ngor5nS4eR9jW3LhttyJehw8Ld63Lx+0QpAgy+QacplvkgHJZhZlKV bB6ReCY8ASHZbpISZtiUzBByu2nHRowysp7HGkiMs1bAJKH0NpaXiAMq WcwjjFAh6tXwWWO74VgazrB7Z0BxT1dfbYNnP9QeCjDe5FvJptdxm8nC 2rGV9+zrWVPhUWL345RtTptWWXN6gGgpB\/U2QxGWri1tU1XkB2TwyfdE fxayEVt+vAldtZFvmxrci1tssuzzawef6Y7CL1ziZZrXdLhO4maiLWQo Tqk6q6QHVbdSA38CBk0opsBjjYJHxVo2KCCuJDTHygIJMYpk+W92xhpY oVBtLJ74B+LDoxmPgutFN97MVP\/WRPFHZK3ZI4IGFYQHbA9H3QqBbuaW RVvkaovpnPXBtRVJ"},{"flags":257,"protocol":3,"algorithm":8,"public_key":"AwEAAci1QujH\/FAwbbwdjfMAZfLkdhjdiJ04JuBAntOAQW0o3KwgeF1K PXpXi5fy0Xsf7Xn2NQhwmBiOmcdnW2im\/JGGKA5svwuhushgXf7n79cC \/iqPqm66IlUrQuMGR66pio6sPFs2u4\/n8W39Shhr8KtiZlCZvOAzaIdv eXEE\/Gmt8okaKB+uF6xyku+h0pXA3Ac\/IaEMepwtvuv9NgQ\/lAEVW8r6 \/rQazMHuDlrzzTZlo7bgC56UD3o9gFhjVLmYC6edcTvrilbu89x+7bmN fOYaVprd9c8ef2RPclOxpZd4naRQ5np2ClfDYZnZTZGGnruJih93duX4 1gGtgf6u6z7h0cKgTSd3pGDLFnxcOgoGYJKoVJ4fSICNrGZRcuISYnoD TnvDpF5WM02mTEmsERX\/JYONKLGLz4ElhlJEDUqzt+mylWcXVnM1jvzi \/mVEtEfXw9m\/Q6XDEYshkbxxLGQo3HtJRE3v2B05B5FOheWE8a8trB67 jPI8NmD9WMyNLdZTJTW20m3S9Vo4p2Xwgg8IUrKyBN9L7mIhSgqz7t7K 36vvCmiJU1FEqFFarT86rEMqv7aDhuNEoc\/JxrIelgxrZtMPsuXaxWEg K3tPxF6ukOkh8knz2n5zVtFGGI1YahsXzHY7kNPhxTDcOOv0bEOol6lE g8rjSrv1SKJh9gX9"}]}' \ https://api-test.mijndomeinreseller.nl/v2/domains/testdomeinnaam.nl/dnssec
HTTP/1.1 204 No Content