Zum Hauptinhalt springen

Get the status of a DNS zone-file import job

GET/v2/dns-zone-imports/{zoneFileImportId}
API-Version
v2
Request-Methode
GET
Operation-ID
dns-get-dns-zone-file-import

Request​

  • zoneFileImportIdstring (uuid)
    required

    ID of the import job (returned when the import is created).

Responses​

Format
application/json
Beschreibung

The import job status.

  • createdAtstring (date-time)
    required

    When the import job was created (publish time of the created event).

  • idstring (uuid)
    required
  • importedZonesArray von string
    required
    • Array[
      • *string
      ]
  • projectIdstring (uuid)
    required
  • skippedZonesArray von object
    required
    • Array[
      • *object
        • namestring
          required
        • reasonstring
          required
      ]
  • statusstring (einer von: running, succeeded, completedWithErrors)
    required
Content-Type: application/json

{
"createdAt": "1985-10-26T01:21:00.000Z",
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"importedZones": [
"string"
],
"projectId": "f0f86186-0a5a-45b2-aa33-502777496347",
"skippedZones": [
{
"name": "string",
"reason": "string"
}
],
"status": "running"
}
{
"properties": {
"createdAt": {
"description": "When the import job was created (publish time of the created event).",
"format": "date-time",
"type": "string"
},
"id": {
"format": "uuid",
"type": "string"
},
"importedZones": {
"items": {
"type": "string"
},
"type": "array"
},
"projectId": {
"format": "uuid",
"type": "string"
},
"skippedZones": {
"items": {
"properties": {
"name": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": [
"name",
"reason"
],
"type": "object"
},
"type": "array"
},
"status": {
"enum": [
"running",
"succeeded",
"completedWithErrors"
],
"type": "string"
}
},
"required": [
"id",
"projectId",
"status",
"importedZones",
"skippedZones",
"createdAt"
],
"type": "object"
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/dns-zone-imports/f0f86186-0a5a-45b2-aa33-502777496347
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.dnsGetDnsZoneFileImport({
"zoneFileImportId": "f0f86186-0a5a-45b2-aa33-502777496347"
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Domain\DnsGetDnsZoneFileImport\DnsGetDnsZoneFileImportRequest;

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

$request = (new DnsGetDnsZoneFileImportRequest(
zoneFileImportId: "f0f86186-0a5a-45b2-aa33-502777496347"
));
$response = $client->domain()->dnsGetDnsZoneFileImport($request);

var_dump($response->getBody();

Auf dieser Seite