Updated on 2026-09-15 GMT+08:00

Querying Endpoint Rules

Function

This API is used to query endpoint rules.

URI

GET /v2.1/resolverrules

Table 1 Query parameters

Parameter

Mandatory

Type

Description

domain_name

No

String

Domain name of the endpoint rule to be queried

name

No

String

Name of the endpoint rule to be queried

endpoint_id

No

String

Endpoint ID

id

No

String

ID of an endpoint rule

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 the 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.

marker

No

String

Start resource ID of pagination query. If the parameter is left blank, only resources on the first page are queried.

It is left blank by default.

Request Parameters

Table 2 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

The token can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

resolver_rules

Array of ListResolverRuleParam objects

List of endpoint rules

links

pageLink object

Link of the current resource or other related resources. When a response is broken into pages, a next link is provided to retrieve all results.

metadata

metadata object

Number of resources that meet the query condition

page_info

PageInfo object

Pagination information

Table 4 ListResolverRuleParam

Parameter

Type

Description

id

String

ID of an endpoint rule

name

String

Rule name

domain_name

String

Domain name

endpoint_id

String

ID of the endpoint to which the current rule belongs

status

String

Resource status.

The value can be PENDING_CREATE, ACTIVE, PENDING_DELETE, or ERROR.

rule_type

String

Rule type.

This parameter is reserved. The default value is FORWARD.

ipaddress_count

Integer

Number of IP addresses in the endpoint rule

routers

Array of Router objects

VPC associated with the endpoint rule

create_time

String

Creation time.

Format: yyyy-MM-dd'T'HH:mm:ss.SSS

update_time

String

Update time.

Format: yyyy-MM-dd'T'HH:mm:ss.SSS

Table 5 Router

Parameter

Type

Description

router_id

String

ID of the associated VPC

router_region

String

Region where the associated VPC is located

status

String

Resource status

Table 7 metadata

Parameter

Type

Description

total_count

Integer

Number of resources that meet the filter criteria. The number is irrelevant to limit or offset.

Table 8 PageInfo

Parameter

Type

Description

next_marker

String

Marker of the next page

previous_marker

String

Marker of the previous page

current_count

Integer

Page size

Example Requests

None

Example Responses

Status code: 200

Successful request

{
  "resolver_rules" : [ {
    "id" : "8a36f60a753badb401753bade3400002",
    "name" : "rule-xxx",
    "domain_name" : "www.example.com",
    "endpoint_id" : "8a36f60a753badb401753bade3400001",
    "status" : "ACTIVE",
    "rule_type" : "FORWARD",
    "ipaddress_count" : 0,
    "routers" : [ {
      "router_id" : "ff7bd47f-3f12-4f24-a078-e6064abaa670",
      "router_region" : "xx",
      "status" : "ACTIVE"
    }, {
      "router_id" : "ff7bd47f-3f12-4f24-a078-e6064abaa671",
      "router_region" : "xx",
      "status" : "ACTIVE"
    } ],
    "create_time" : "2020-10-18T12:27:31.448",
    "update_time" : "2020-10-18T12:27:31.448"
  } ],
  "metadata" : {
    "total_count" : 1
  }
}

Status Codes

Status Code

Description

200

Successful request

Error Codes

For details, see Error Codes.