Last updated: 2021-05-10 15:35:49

1. API Description

Domain name for API request:

This API (DescribeRewrite) is used to query the redirection relationship between the forwarding rules of a CLB instance by instance ID. If no listener ID or forwarding rule ID is specified, all redirection relationships in the instance will be returned.

A maximum of 20 requests can be initiated per second for this API.

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example:

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: DescribeRewrite.
Version Yes String Common parameter. The value used for this API: 2018-03-17.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
LoadBalancerId Yes String CLB instance ID
SourceListenerIds.N No Array of String Array of CLB listener IDs
SourceLocationIds.N No Array of String Array of CLB forwarding rule IDs

3. Output Parameters

Parameter Name Type Description
RewriteSet Array of RuleOutput Array of redirection forwarding rules. If there are no redirection rules, an empty array will be returned.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying redirection relationship by a specified forwarding rule ID

Input Example
&<Common request parameters>

Output Example

  "Response": {
    "RewriteSet": [
        "TargetType": "Node",
        "ListenerId": "lbl-j36caqde",
        "LocationId": "loc-5t7526km",
        "Domain": "",
        "Url": "/",
        "Certificate": null,
        "HealthCheck": {
          "HealthSwitch": 1,
          "TimeOut": 2,
          "IntervalTime": 5,
          "HealthNum": 3,
          "UnHealthNum": 3,
          "HttpCode": 15,
          "HttpCheckPath": "/",
          "HttpCheckDomain": "",
          "HttpCheckMethod": "get"
        "RewriteTarget": {
          "TargetListenerId": "lbl-9nj07x0m",
          "TargetLocationId": "loc-8gdc4qcq"
        "SessionExpireTime": 0,
        "Scheduler": "WRR",
        "HttpGzip": true,
        "BeAutoCreated": false,
        "DefaultServer": false,
        "Http2": false,
        "ForwardType": "HTTP",
        "TrpcCallee": "",
        "QuicStatus": "OFF",
        "TargetGroup": null,
        "WafDomainId": "",
        "TrpcFunc": "",
        "CreateTime": "2020-06-18 19:51:13"
    "RequestId": "6b4b80ba-12f6-4b7c-9eba-c9203b3bbf1e"

5. Developer Resources


TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed.
InternalError Internal error.
InvalidParameter Parameter error.
InvalidParameter.FormatError Wrong parameter format.
InvalidParameter.LBIdNotFound Wrong CLB instance ID.
InvalidParameterValue Incorrect parameter value.
InvalidParameterValue.Length Wrong parameter length.
LimitExceeded Quota exceeded.
ResourceInsufficient Insufficient resources.
ResourceNotFound Resources do not exist.
UnauthorizedOperation Unauthorized operation.