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

Querying Endpoint Rules

Function

This API is used to query endpoint rules.

Calling Method

For details, see Calling APIs.

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

Definition

The number of records returned on each page during pagination query.

Constraints

N/A

Range

0 to 500

Default Value

500

offset

No

Integer

Definition

The offset of pagination query. It specifies the number of rows or records to skip from the beginning of the result set before retrieving the desired data.

Constraints

If marker is not left blank, the query starts from the resource specified by marker and the offset does not take effect.

Range

0 to 2147483647

Default Value

0

marker

No

String

Definition

The resource ID from which the next page of data should begin in pagination query.

  • When querying the first page, leave this parameter empty.

  • When querying the next page, set this parameter to the ID of the last resource on the previous page.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

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

For details about how to obtain a user token, seeObtaining a User Token.

Constraints

N/A

Range

N/A

Default Value

N/A

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

Definition

The link to the current page or other pages. When a response is broken into pages, a next link is provided to point to the next page.

Range

N/A

metadata

metadata object

Definition

Number of resources that meet the filter condition

Range

N/A

page_info

PageInfo object

Definition

Pagination information

Range

N/A

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

The creation time.

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

update_time

String

The 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

Definition

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

Range

N/A

Table 8 PageInfo

Parameter

Type

Description

next_marker

String

Definition

Marker of the next page

Range

N/A

previous_marker

String

Definition

Marker of the previous page

Range

N/A

current_count

Integer

Definition

Page size

Range

N/A

Status code: 400

Table 9 Response body parameters

Parameter

Type

Description

code

String

Definition

Error code

Range

N/A

message

String

Definition

Error description

Range

N/A

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

code

String

Definition

Error code

Range

N/A

message

String

Definition

Error description

Range

N/A

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" : "NetworkService",
      "status" : "ACTIVE"
    }, {
      "router_id" : "ff7bd47f-3f12-4f24-a078-e6064abaa671",
      "router_region" : "NetworkService",
      "status" : "ACTIVE"
    } ],
    "create_time" : "2020-10-18T12:27:31.448",
    "update_time" : "2020-10-18T12:27:31.448"
  } ],
  "metadata" : {
    "total_count" : 33
  }
}

Status Codes

Status Code

Description

200

Successful request

400

Error response

500

Error response

Error Codes

See Error Codes.