All Products
Search
Document Center

Edge Security Acceleration:ListRewriteUrlRules

Last Updated:Nov 15, 2025
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

List of Rewrite URL Rules

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
esa:ListRewriteUrlRulesnone
*Site
acs:esa:{#regionId}:{#accountId}:site/{#SiteId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SiteIdlongYes

Site ID, which can be obtained by calling the ListSites interface.

123456789****
ConfigIdlongNo

Configuration ID.

35281609698****
ConfigTypestringNo

Configuration type, which can be used to query global or rule configurations. Value range:

  • global: Query global configuration;
  • rule: Query rule configuration;

This parameter is optional. If not provided, it does not distinguish between global and rule configurations. This parameter only takes effect when the functionName parameter is provided.

global
RuleNamestringNo

Rule name. Not required when adding a global configuration.

rule_example
PageNumberintegerNo

Page number.

1
PageSizeintegerNo

Page size. Range: 1~500, default is 500.

10
SiteVersionintegerNo

Version number of the site configuration. For sites with version management enabled, you can use this parameter to specify the effective version of the configuration, defaulting to version 0.

0

Response parameters

ParameterTypeDescriptionExample
object

Request response result.

RequestIdstring

Request ID.

CB1A380B-09F0-41BB-280B-72F8FD6DA2FE
Configsarray<object>

List of rewrite URL configurations.

configsobject

Configuration details.

ConfigIdlong

Configuration ID.

39538644977****
SiteVersioninteger

Version number of the site configuration. For sites with version management enabled, you can use this parameter to specify the effective version of the configuration, defaulting to version 0.

0
Sequenceinteger

Rule execution order. The smaller the value, the higher the priority.

1
RuleEnablestring

Rule switch. Not required when adding a global configuration. Value range:

  • on: Enabled.
  • off: Disabled.
on
Rulestring

Rule content, using conditional expressions to match user requests. Not required when adding a global configuration. There are two usage scenarios:

  • Match all incoming requests: Set the value to true
  • Match specific requests: Set the value to a custom expression, e.g., (http.host eq "video.example.com")
(http.host eq "video.example.com")
RuleNamestring

Rule name. Not required when adding a global configuration.

rule_example
ConfigTypestring

Configuration type. Value range:

  • global: Global configuration;
  • rule: Rule configuration;
global
RewriteUriTypestring

URI rewrite type. Value range:

  • static: Static mode.
  • dynamic: Dynamic mode.
static
Uristring

Target URI after rewriting.

/image.example.com/index.html
RewriteQueryStringTypestring

Query string rewrite type. Value range:

  • static: Static mode.
  • dynamic: Dynamic mode.
static
QueryStringstring

The rewritten query string.

example=123
PageNumberinteger

The current page number.

1
PageSizeinteger

The size of the page.

10
TotalCountinteger

The total number of items.

8
TotalPageinteger

Total number of pages.

1

Examples

Sample success responses

JSONformat

{
  "RequestId": "CB1A380B-09F0-41BB-280B-72F8FD6DA2FE",
  "Configs": [
    {
      "ConfigId": 0,
      "SiteVersion": 0,
      "Sequence": 1,
      "RuleEnable": "on",
      "Rule": "(http.host eq \"video.example.com\")",
      "RuleName": "rule_example",
      "ConfigType": "global",
      "RewriteUriType": "static",
      "Uri": "/image.example.com/index.html\n",
      "RewriteQueryStringType": "static",
      "QueryString": "example=123\n"
    }
  ],
  "PageNumber": 1,
  "PageSize": 10,
  "TotalCount": 8,
  "TotalPage": 1
}

Error codes

HTTP status codeError codeError messageDescription
400InternalExceptionFailed to call the service. Try again later or contact technical support.Failed to call the service. Try again later or contact technical support.
400InvalidParameter.FunctionNameThe specified feature does not exist. Specify a valid feature name based on the related documentation.The specified feature does not exist. Specify a valid feature name based on the related documentation.

For a list of error codes, visit the Service error codes.