ModifyDomainOriginPathRewrite
1. API Description
This interface is used to modify the origin path rewrite policy for the accelerated domain.
2. Request Parameters
The following list of request parameters includes only those required by the interface:
domainId
Yes
String
Accelerated domain Id
rewrites
Yes
Array of OriginPathRewriteInfo
origin path rewrite information
the number of rules cannot exceed 10
3. Output Parameterss
requestId
String
Unique request ID returned with each request. Provide this requestId when locating issues.
4. Code Example
Modify the origin path rewrite Policy of the Accelerated Domain
POST / HTTP/1.1
Host: console.zenlayer.com/api/v2/cdn
Content-Type: application/json
X-ZC-Action: ModifyDomainOriginPathRewrite
<Common Request Params>
Request:
{
"domainId": "domainIdxxxxx",
"rewrites": [{
"sourcePath": "^(.*)$",
"targetPath": "/test$1",
"sort":1
}]
}
Response:
{
"requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
}
5. Error Codes
The following includes error codes encountered in business logic. For other error codes, see Common Error Codes.
404
INVALID_DOMAIN_NOT_FOUND
The specified accelerated domain does not exist.
403
DOMAIN_OPERATION_NO_PERMISSION
Operation denied due to lack of permission.
400
INVALID_REGEX_SOURCE_PATH
Invalid sourcePath
400
INVALID_TARGET_PATH
Invalid targetPath
Last updated