Skip to main content

List DNS zone-file import jobs belonging to a Project

GET/v2/projects/{projectId}/dns-zone-imports
API version
v2
Request method
GET
Operation ID
dns-list-dns-zone-file-imports

Returns the DNS zone-file import jobs of the Project, newest state per job (status plus the imported/skipped zones). Sorted by creation date, newest first, by default; paginated. Project-scoped and authorized on the Project.

Request​

  • projectIdstring
    required

    ID of the Project to list import jobs for.

Responses​

Response headers
  • X-Pagination-Limitinteger

    The limit used to select the resources for the response

  • X-Pagination-Skipinteger

    The number of skipped items

  • X-Pagination-Pagenumber

    The calculate page of the list response. Refer to parameters to learn more.

  • X-Pagination-TotalCountinteger

    The total amount of items available in the remote ressource. Use this value in combination with the limit to calculate the available pages.

Format
application/json
Description

A list of DNS zone-file import jobs, sorted by creation timestamp (newest first) unless specified otherwise.

  • Array[
    • *object
      • createdAtstring (date-time)
        required

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

      • idstring (uuid)
        required
      • importedZonesarray of string
        required
        • Array[
          • *string
          ]
      • projectIdstring (uuid)
        required
      • skippedZonesarray of object
        required
        • Array[
          • *object
            • namestring
              required
            • reasonstring
              required
          ]
      • statusstring (one of: 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"
}
]
{
"items": {
"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"
},
"type": "array"
}

Usage examples​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/projects/string/dns-zone-imports?limit=50&page=1&sort=createdAt&order=asc
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.dnsListDnsZoneFileImports({
"projectId": "string",
"queryParameters": {
"limit": 50,
"page": 1,
"sort": "createdAt",
"order": "asc"
}
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Domain\DnsListDnsZoneFileImports\DnsListDnsZoneFileImportsRequest;

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

$request = (new DnsListDnsZoneFileImportsRequest(
projectId: "string"
))
->withLimit(50)
->withPage(1)
->withSort("createdAt")
->withOrder("asc");
$response = $client->domain()->dnsListDnsZoneFileImports($request);

var_dump($response->getBody();

On this page