Updated on 2025-08-07 GMT+08:00

API Overview

The DNS service provides RESTful APIs.

By calling these APIs, you can use all DNS functions, including creating, querying, modifying, and deleting public zones, private zones, and record sets.

Table 1 provides an overview of the DNS APIs.

Table 1 API overview

Category

Description

Version Management

Query version information of all DNS APIs or a specified API.

Public Zone Management

Create, delete, modify, and query public zones, set the status of a public zone, and query name servers in a public zone.

Private Zone Management

Create, delete, modify, and query private zones, set the status of a private zone, query name servers in a private zone, and associate a VPC to or disassociate a VPC from a private zone.

Record Set Management (New Version)

Create, delete, modify, and query record sets, set the record set status, and query public zone lines.

Record Set Management (To Be Deprecated)

Create, delete, modify, and query record sets.

PTR Record Management (New Version)

Create, delete, modify, and query PTR records of EIPs.

PTR Record Management (To Be Deprecated)

Create, delete, modify, and query PTR records that map EIPs to domain names.

Batch Operations

Batch delete record sets in a zone, batch modify record sets, batch create record sets with lines, batch delete zones, batch delete record sets, batch delete PTR records, batch set zone status, and batch set record set status.

Tag Management

Create, delete, modify, and query tags for specified DNS resources. You can also create or delete tags in batches for specified DNS resources.

Custom Line Management

Create, delete, update, and query custom lines.

Line Group Management

Create, delete, modify, and query line groups.

Name Server Management

Query name servers.

Quota Management

Query DNS resource quotas.

DNSSEC Management

Enable, disable, and query DNSSEC.

Endpoint Management

Create, delete, modify, and query endpoints.

Endpoint Rule Management

Create, delete, modify, and query endpoint rules.

Version Management

Query DNS API versions.

Table 2 Version management APIs

API

Description

Obtaining API Versions

Query the versions of all DNS APIs.

Querying a Specified API Version

Query the version of a specified DNS API.

Public Zone Management

Create, delete, modify, and query public zones, set the status of a public zone, and query name servers in a public zone.

Table 3 Public zone management APIs

API

Description

Creating a Public Zone

Create a public zone.

Querying the Public Zones

Query public zones.

Querying a Public Zone

Query a public zone.

Querying Name Servers in a Public Zone

Query name servers in a public zone.

Modifying a Public Zone

Modify a public zone.

Deleting a Public Zone

Delete a public zone.

Setting the Status of a Public Zone

Set the status of a public zone.

Private Zone Management

Create, delete, modify, and query private zones, set the status of a private zone, query name servers in a private zone, and associate a VPC to or disassociate a VPC from a private zone.

Table 4 Private zone management APIs

API

Description

Creating a Private Zone

Create a private zone.

Querying the Private Zones

Query private zones.

Querying a Private Zone

Query a private zone.

Querying Name Servers in a Private Zone

Query name servers in a private zone.

Modifying a Private Zone

Modify a private zone.

Deleting a Private Zone

Delete a private zone.

Associating a VPC with a Private Zone

Associate a VPC with a private zone.

Disassociating a VPC from a Private Zone

Disassociate a VPC from a private zone.

Setting the Status of a Private Zone

Set the status of a private zone.

Setting a Recursive Resolution Proxy for Subdomains in a Private Zone

Set a recursive resolution proxy for subdomains in a private zone.

Record Set Management (v2.1)

Create, delete, modify, and query record sets, set the record set status, and query public zone lines.

Table 5 Record set management APIs

API

Description

Creating a Record Set

Create a record set.

Querying Record Sets in a Zone

Query record sets in a zone.

Querying Record Sets

Query record sets.

Querying a Record Set

Query a record set.

Modifying a Record Set

Modify a record set.

Deleting a Record Set

Delete a record set.

Setting the Record Set Status

Set the record set status.

Querying Public Zone Lines

Query public zone lines.

Record Set Management (v2)

Create, delete, modify, and query record sets.

Table 6 Record set management APIs

API

Description

Creating a Record Set

Create a record set.

Querying Record Sets in a Zone

Query record sets in a zone.

Querying Record Sets

Query record sets.

Querying a Record Set

Query a record set.

Modifying a Record Set

Modify a record set.

Deleting a Record Set

Delete a record set.

PTR Record Management (v2.1)

Create, delete, modify, and query PTR records of EIPs.

Table 7 PTR record management APIs

API

Description

Creating a PTR Record for an EIP

Create a PTR record for an EIP.

Querying PTR Records of an EIP

Query PTR records of EIPs.

Querying a PTR Record of an EIP

Query the PTR record of an EIP.

Modifying a PTR Record for an EIP

Modify the PTR record for an EIP.

Restoring the PTR Record of an EIP to the Default Value

Restore the PTR record of an EIP to the default value.

PTR Record Management (v2)

Create, delete, modify, and query PTR records of EIPs.

Table 8 PTR record management APIs

API

Description

Creating a PTR Record for an EIP

Create a PTR record for an EIP.

Querying PTR Records of an EIP

Query PTR records of an EIP.

Querying a PTR Record of an EIP

Query a PTR record of an EIP.

Modifying a PTR Record for an EIP

Modify the PTR record for an EIP.

Restoring the PTR Record of an EIP to the Default Value

Restore the PTR record of an EIP to the default value.

Batch Operations

Batch delete record sets in a zone, batch modify record sets, batch create record sets with lines, batch delete zones, batch delete record sets, batch delete PTR records, batch set zone status, and batch set record set status.

Table 9 APIs for batch operations

API

Description

Batch Creating Record Sets with Lines

Create record sets with lines in batches.

Modifying Record Sets

Modify record sets in batches.

Deleting Record Sets in a Zone in Batches

Delete record sets in a zone in batches.

Batch Setting Zone Status

Batch set zone status.

Batch Setting the Status of Record Sets

Batch set the status of record sets.

Batch Deleting Zones

Delete zones in batches.

Batch Deleting Record Sets

Delete record sets in batches.

Deleting PTR Records

Delete PTR records.

Tag Management

Create, delete, modify, and query tags for specified DNS resources. You can also create or delete tags in batches for specified DNS resources.

Table 10 Tag management APIs

API

Description

Adding a Tag to a Specific Resource

Add tags to a specified resource. You can add up to 10 tags to a resource.

Deleting a Resource Tag

Delete a resource tag.

Batch Adding or Deleting Tags for a Specific Instance

Add or delete tags for a specified resource in batches.

Querying Tags of a Specific Instance

Query tags of a specified resource.

Querying All Tags of a Specific Resource

Query all tags of a resource type.

Querying Resources Using Tags

Query DNS resources by tag. Resources are sorted by creation time in descending order.

Custom Line Management

Create, delete, update, and query custom lines.

Table 11 Custom line management APIs

API

Description

Creating a Custom Line

Create a custom line.

Querying a Custom Line

Query custom lines.

Modifying a Custom Line

Update a custom line.

Deleting a Custom Line

Delete a custom line.

Line Group Management

Create, delete, update, and query line groups.

Table 12 Line group management APIs

API

Description

Creating a Line Group

Create a line group.

Querying Line Groups

Query line groups.

Querying a Line Group

Query a line group.

Modifying a Line Group

Update a line group.

Deleting a Line Group

Delete a line group.

Name Server Management

Query name servers.

Table 13 Name server management API

API

Description

Querying Name Servers

List the name servers.

Quota Management

Query DNS resource quotas.

Table 14 Quota management API

API

Description

Querying Resource Quotas

Query DNS resource quotas.

DNSSEC

Enable, disable, and query DNSSEC.

Table 15 DNSSEC APIs

API

Description

Enabling DNSSEC

Enable DNSSEC for a public zone.

Disabling DNSSEC

Disable DNSSEC for a public zone.

Querying DNSSEC

Query DNSSEC for a public zone.

Endpoint Management

Create, delete, modify, and update endpoints.

Table 16 Endpoint management APIs

API

Description

Creating an Endpoint

Create an endpoint.

Querying Endpoints

Query endpoints.

Querying an Endpoint

Query an endpoint.

Modifying an Endpoint

Modify an endpoint.

Deleting an Endpoint

Delete an endpoint.

Binding an IP Address to an Endpoint

Bind an IP address to an endpoint.

Querying IP Addresses

Query IP addresses.

Unbinding an IP Address from an Endpoint

Unbind an IP address from an endpoint.

Querying VPCs of an Endpoint

Query VPCs of an endpoint.

Endpoint Rule Management

Create, delete, modify, and update endpoint rules.

Table 17 Endpoint rule management APIs

API

Description

Creating an Endpoint Rule

Create an endpoint rule.

Querying Endpoint Rules

Query endpoint rules.

Querying an Endpoint Rule

Query an endpoint rule.

Modifying an Endpoint Rule

Modify an endpoint rule.

Deleting an Endpoint Rule

Delete an endpoint rule.

Associating a VPC with an Endpoint Rule

Associate a VPC with an endpoint rule.

Disassociating an Endpoint Rule from a VPC

Disassociate an endpoint rule from a VPC.