Skip to content
Pre-release. HostCraft is in testing and not yet for sale. These docs describe the current build and may change. Join the waitlist to hear when it launches.

DNS API

Source: daemon/proto/hostcraft/v1/dns.proto

DNSService manages PowerDNS zones and records. REST: /api/v1/dns/zones.

Method REST route Permission Streaming
ListZones GET /api/v1/dns/zones DNSZoneRead unary
CreateZone POST /api/v1/dns/zones DNSZoneCreate unary
GetZone GET /api/v1/dns/zones/{id} DNSZoneRead unary
DeleteZone DELETE /api/v1/dns/zones/{id} DNSZoneDelete unary
ListRecords GET /api/v1/dns/zones/{zone_id}/records DNSRecordRead unary
CreateRecord POST /api/v1/dns/zones/{zone_id}/records DNSRecordCreate unary
UpdateRecord PATCH /api/v1/dns/zones/{zone_id}/records/{id} DNSRecordUpdate unary
DeleteRecord DELETE /api/v1/dns/zones/{zone_id}/records/{id} DNSRecordDelete unary
BulkUpdateRecords POST /api/v1/dns/zones/{zone_id}/records/bulk DNSRecordBulk unary
EnableDNSSEC POST /api/v1/dns/zones/{zone_id}/dnssec/enable DNSDNSSECManage unary
DisableDNSSEC POST /api/v1/dns/zones/{zone_id}/dnssec/disable DNSDNSSECManage unary
GetDNSSEC GET /api/v1/dns/zones/{zone_id}/dnssec DNSDNSSECRead unary
GetNameservers GET /api/v1/dns/zones/{zone_id}/nameservers DNSZoneRead unary
CheckZone POST /api/v1/dns/zones/{zone_id}/check DNSZoneCheck unary
ImportZone POST /api/v1/dns/zones/{zone_id}/import DNSZoneImport unary
ExportZone GET /api/v1/dns/zones/{zone_id}/export DNSZoneExport unary

/hostcraft.v1.DNSService/ListZones

/hostcraft.v1.DNSService/CreateZone

/hostcraft.v1.DNSService/GetZone

/hostcraft.v1.DNSService/DeleteZone

/hostcraft.v1.DNSService/ListRecords

/hostcraft.v1.DNSService/CreateRecord

/hostcraft.v1.DNSService/UpdateRecord

/hostcraft.v1.DNSService/DeleteRecord

/hostcraft.v1.DNSService/BulkUpdateRecords

/hostcraft.v1.DNSService/EnableDNSSEC

/hostcraft.v1.DNSService/DisableDNSSEC

/hostcraft.v1.DNSService/GetDNSSEC

/hostcraft.v1.DNSService/GetNameservers

/hostcraft.v1.DNSService/CheckZone

/hostcraft.v1.DNSService/ImportZone

ExportZone returns the zone in BIND format.

/hostcraft.v1.DNSService/ExportZone

Field Type Number Description
zone_id string 1 -
records repeated DNSRecord 2 records with an id are updated, without are created
delete_ids repeated string 3 -
Field Type Number Description
created int64 1 -
updated int64 2 -
deleted int64 3 -
Field Type Number Description
zone_id string 1 -
Field Type Number Description
valid bool 1 -
warnings repeated string 2 -
errors repeated string 3 -
Field Type Number Description
zone_id string 1 -
name string 2 -
type string 3 -
content string 4 -
ttl uint32 5 -
priority uint32 6 -
Field Type Number Description
account_id string 1 -
fqdn string 2 -
type string 3 -
default_a string 4 IPv4 for the default A/www records
Field Type Number Description
zone DNSZone 1 -
workflow_id string 2 -
Field Type Number Description
id string 1 -
zone_id string 2 -
name string 3 -
type string 4 -
content string 5 -
ttl uint32 6 -
priority uint32 7 -
disabled bool 8 -
Field Type Number Description
ds_records repeated string 1 -
dnskey_records repeated string 2 -
Field Type Number Description
id string 1 -
account_id string 2 -
fqdn string 3 -
type string 4 master | slave | native
soa_serial uint32 5 -
dnssec_enabled bool 6 -
created_at google.protobuf.Timestamp 7 -
updated_at google.protobuf.Timestamp 8 -
Field Type Number Description
zone_id string 1 -
id string 2 -
Field Type Number Description
id string 1 -
Field Type Number Description
zone_id string 1 -

Empty is returned by RPCs whose REST route answers with an empty object or 204 No Content.

No fields.

Field Type Number Description
zone_id string 1 -
Field Type Number Description
zone_id string 1 -
Field Type Number Description
bind_zone string 1 -
Field Type Number Description
zone_id string 1 -
Field Type Number Description
zone_id string 1 -
Field Type Number Description
nameservers repeated string 1 -
Field Type Number Description
id string 1 -
Field Type Number Description
zone DNSZone 1 -
records repeated DNSRecord 2 -
Field Type Number Description
zone_id string 1 -
bind_zone string 2 -
replace bool 3 -
Field Type Number Description
records_imported int64 1 -
Field Type Number Description
zone_id string 1 -
Field Type Number Description
records repeated DNSRecord 1 -
Field Type Number Description
account_id string 1 -
Field Type Number Description
zones repeated DNSZone 1 -
Field Type Number Description
zone_id string 1 -
id string 2 -
content optional string 3 -
ttl optional uint32 4 -
priority optional uint32 5 -
disabled optional bool 6 -

WorkflowAccepted is the body of every 202 response that only starts a workflow saga. Follow progress with WorkflowService.StreamWorkflow.

Field Type Number Description
workflow_id string 1 -