Updated on 2025-08-19 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.

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.

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.

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 9 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 10 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 11 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 12 Name server management API

API

Description

Querying Name Servers

List the name servers.

Quota Management

Query DNS resource quotas.

Table 13 Quota management API

API

Description

Querying Resource Quotas

Query DNS resource quotas.