Create a DNS Zone for a verified Ingress in a Project
POST/v2/ projects/ {projectId}/ dns-zones/
API version
v2
Request method
POST
Operation ID
dns-create-project-dns-zone
Creates a DNSZone for a verified Ingress in a Project. The service resolves whether the domain is a root zone or a subzone and creates it accordingly. This lets a project prepare DNS for a domain that is not yet hosted at mittwald once ownership has been proven via a verified vHost.
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X POST \
-d '{"name":"string"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/projects/string/dns-zones
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.dnsCreateProjectDnsZone({
"projectId": "string",
"data": {
"name": "string"
}
});
assertStatus(response, 201);
use \Mittwald\ApiClient\Generated\V2\Clients\Domain\DnsCreateProjectDnsZone\DnsCreateProjectDnsZoneRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Domain\DnsCreateProjectDnsZone\DnsCreateProjectDnsZoneRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// DnsCreateProjectDnsZoneRequestBody to learn how to construct a valid instance
$body = new DnsCreateProjectDnsZoneRequestBody(/* TODO: ... */);
$request = (new DnsCreateProjectDnsZoneRequest(
projectId: "string",
body: $body
));
$response = $client->domain()->dnsCreateProjectDnsZone($request);
var_dump($response->getBody();