Querying All Record Sets

Function

Query record sets in list.

URI

GET /v2/recordsets?zone_type={zone_type}&limit={limit}&marker={marker}&offset={offset}&tags={tags}&status={status}&type={type}&name={name}&id={id}&records={records}&sort_key={sort_key}&sort_dir={sort_dir}

For details, see Table 1.
Table 1 Parameters in the URI

Parameter

Mandatory

Type

Description

zone_type

No

String

Zone type of the record set to be queried, which can be public or private

  • public: Record sets in public zones are queried.
  • private: Record sets in private zones are queried.

    If the value is left blank, record sets in public zones are queried by default.

A fuzzy search will be performed.

The default value is public.

marker

No

String

Start resource ID of pagination query

If the parameter is left blank, only resources on the first page are queried.

The value is left blank by default.

limit

No

Integer

Number of resources on each page

The value ranges from 0 to 500.

Commonly used values are 10, 20, and 50. The default value is 500.

offset

No

Integer

Start offset of pagination query. The query will start from the next resource of the offset value.

The value ranges from 0 to 2147483647.

The default value is 0.

If marker is not left blank, the query starts from the resource specified by marker.

tags

No

String

Resource tag

The format is as follows: key1,value1|key2,value2.

Multiple tags are separated by vertical bar (|). The key and value of each tag are separated by comma (,).

The tags are in AND relationship.

For details, see Adding Resource Tags.

Exact matching will work. If the value starts with an asterisk (*), fuzzy matching will work for the string following the asterisk.

The value is left blank by default.

status

No

String

Status of the record sets to be queried

The value can be ACTIVE, ERROR, DISABLE, FREEZE, PENDING_CREATE, PENDING_UPDATE, or PENDING_DELETE.

For details, see Resource Status.

A fuzzy search will be performed.

The value is left blank by default.

type

No

String

Type of the record sets to be queried

The value can be A, AAAA, MX, CNAME, TXT, NS, SOA, SRV, CAA (only in public zones), or PTR (only in private zones).

For details, see Record Set Type.

Exact matching will work.

The value is left blank by default.

name

No

String

Names of record sets to be queried

A fuzzy search will be performed.

The value is left blank by default.

id

No

String

IDs of record sets to be queried

A fuzzy search will be performed.

The value is left blank by default.

records

No

String

Value included in the values of record sets to be queried

A fuzzy search will be performed.

The value is left blank by default.

sort_key

No

String

Sorting condition of the record set list

The value can be:

  • name: domain name
  • type: record set type

The default value is left blank, indicating that the records are not sorted.

sort_dir

No

String

Sorting order of the record set list

The value can be:

  • desc: descending order
  • asc: ascending order

The default value is left blank, indicating that the records are not sorted.

Request

Response

Returned Value

If a 2xx status code is returned, for example, 200, 202, or 204, the request is successful.

For details, see Status Code.