Get records
Reads one record of one zone by its id. The plane owns the authoritative zone and record store behind every name pointed at Hanzo; this head keeps none of…
GET /v1/dns/zones/{zone}/records/{record}
| Address | https://api.hanzo.ai/v1/dns/zones/{zone}/records/{record} |
| Method | GET |
| Operation | get_dns_zones_by_zone_records_by_record |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Reads one record of one zone by its id. The plane owns the authoritative zone and record store behind every name pointed at Hanzo; this head keeps none of it. The address and the query string ARE the plane's own, relayed verbatim, and the plane's answer comes back unchanged — its status code, its Content-Type, and its Location on a redirect this head never follows.
It travels under the CALLER'S OWN identity and substitutes no service credential, which would collapse tenants: the caller's validated session bearer goes upstream as Authorization and the server-validated org as X-Org-Id, so a caller in one org reaches only that org's zones, exactly as if it had called the plane directly. The upstream host comes only from deployment config, never from the request, so no path can re-target another host.
Fails closed before a byte leaves cloud: no validated principal is 403; an API key is 401, because a pk-/sk- key is not a JWT the OIDC-gated plane can validate and there is no substitute credential to send in its place; a path that normalizes outside /v1/dns, or still carries a percent-escape or a .. after one decode, is 400; an unconfigured plane is 503 and an unreachable one 502.
Request
2 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
zone | path | string | yes | |
record | path | string | yes |
Response
The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.
Examples
hanzo dns zones records get <zone> <record>import { Configuration, DnsApi } from 'hanzoai';
const api = new DnsApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getDnsZonesByZoneRecordsByRecord({ zone: 'zone', record: 'record' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import DnsApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = DnsApi(client).get_dns_zones_by_zone_records_by_record(zone='zone', record='record')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.DnsAPI.GetDnsZonesByZoneRecordsByRecord(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, dns_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = dns_api::get_dns_zones_by_zone_records_by_record(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.DnsApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new DnsApi(client).getDnsZonesByZoneRecordsByRecord();curl https://api.hanzo.ai/v1/dns/zones/<zone>/records/<record> \
-H "Authorization: Bearer $HANZO_API_KEY"MCP reaches dns through the dns tool, which names its 5 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "get_dns"
}
}
}'How is this guide?