Zum Hauptinhalt springen

Update the nameservers of a Domain

PATCH/v2/domains/{domainId}/nameservers
API-Version
v2
Request-Methode
PATCH
Operation-ID
domain-update-domain-nameservers

Request​

  • domainIdstringrequired

Responses​

Kein Response-Inhalt angegeben.

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-X PATCH \
-d '{"nameservers":["some-hostname.example"]}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/domains/string/nameservers
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";

const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.domain.updateDomainNameservers({
"domainId": "string",
"data": {
"nameservers": [
"some-hostname.example"
]
}
});

assertStatus(response, 204);

use \Mittwald\ApiClient\Generated\V2\Clients\Domain\UpdateDomainNameservers\UpdateDomainNameserversRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Domain\UpdateDomainNameservers\UpdateDomainNameserversRequestBody;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

// TODO: Please consult the properties and constructor signature of
// UpdateDomainNameserversRequestBody to learn how to construct a valid instance
$body = new UpdateDomainNameserversRequestBody(/* TODO: ... */);

$request = (new UpdateDomainNameserversRequest(
domainId: "string",
body: $body
));
$response = $client->domain()->updateDomainNameservers($request);

var_dump($response->getBody();

Auf dieser Seite