EditDomainRedirectConfig

Update time: 2026-08-14 11:20:52

Applicable Products

Content Acceleration,Dynamic Web Acceleration,Media Acceleration VoD,Media Acceleration Live Broadcast

API Description

Self-service through interface, url redirection function

  • API URL: https://api.atomile.com/api/config/InnerRedirect/*
  • Method: PUT
  • Limit Description: · The accelerated domain name must have been filed. · Accelerated domain names must not contain the following information: sales of drugs and controlled tools, including illegal speech and information. · Video-accelerated domain names must have audiovisual licenses; blog forums or community-based accelerated domain names must have BBS special approval qualifications. · Interface requests and return results only accept xml format.

Call frequency

Single user trigger frequency: 300/5min

Request parameter(s)

Path Params

NameDescription
*domain-nameString
the domain whoes need query config

Body Params

NameDescription
*rewrite-rule-settingsList
redirection function note: 1. Define a set of internal redirected content. If there is internal redirected content, this field is required. 2. need to clear the content redirection content under the domain name, you can pass the empty node
after-valueString
Configuration item: new url Indicates the protocol method after rewriting, such as: http://$1
file-typeString
gif png bmp jpeg jpg html htm shtml mp3 wma flv mp4 wmv zip exe rar css txt ico js swf m3u8 xml f4m bootstarp ts
custom-file-typeString
Matching condition: Custom file type, please separate them by semicolon.
operators-areaString
Region
ignore-letter-caseString
Ignore case, the optional value is true or false, true means to ignore case; false means not to ignore case; When adding a new configuration item, the default is not true. If the client passes a null value: such as , the configuration is cleared.
exceptional-operators-areaString
Exceptional region
exceptional-requestString
Exceptional Request Method
path-patternString
The url matching mode supports fuzzy regularization. If all matches, the input parameters can be configured as:
custom-patternString
Matching conditions: specify common types, optional values are all or homepage 1. all: all files 2. homepage: home page
request-wayString
Request Method
priorityString
Indicates the priority execution order of multiple sets of redirected content by the customer. The higher the number, the higher the priority. When adding a new configuration item, the default is 10
uaString
UA
directoryString
directory
rewrite-typeString
Redirection type; support for input: before: before the anti-theft chain after: after the anti-theft chain
publish-typeString
Rewrite the location where the content is generated. The input value is: Cache indicates the node; Other input formats are not supported at this time
exception-request-headerString
Matching condition: Exception request header
exceptional-uaString
Exceptional UA
request-headerString
Matching condition: Request header
data-idLong
Add a grid type identifier to indicate a specific group configuration when the client has multiple groups of configurations.
except-path-patternString
Exceptional url matching mode, except for certain URLs: such as abc.jpg, no content redirection Customer reference: ^https?://[^/]+/.*\.m3u8
before-valueString
Configuration item: old url Indicates the protocol mode before rewriting (that is, the object that needs to be rewritten), such as: ^https://([^/]+/.*)
descriptionString
description

Response parameter(s)

Body Params

NameDescription
codeString
The error code, when HTTPStatus is not 202, indicates the type of error the current request is calling.
httpStatusInteger
httpstatus=202; Indicates that the new domain API was successfully invoked, and the current deployment of the new domain can be viewed using x-cnc-request-id in the header
x-cnc-request-idString
Uniquely identified id for querying tasks per request (for all API)
messageString
Response information, when success is successful

Error code

Error code(code)Description(message)HTTP statusSemantic
InvalidParameterThe url-pattern can't be empty.400The url-pattern can't be empty.
InvalidParameterThe publish-type can't be empty.400The publish-type can't be empty.
InvalidParameterThe before-value can't be empty.400The before-value can't be empty.
InvalidParameterThe after-value can't be empty.400The after-value can't be empty.
InvalidParameterThe rewrite-type can't be empty.400The rewrite-type can't be empty.
InvalidParameterNo rewrite-rule-settings was specified.400No rewrite-rule-settings was specified.
InvalidParameterNo domain was specified.400No domain was specified.
InvalidParameterThe ignore-letter-case is invalid.400The ignore-letter-case is invalid.
InvalidParameterThe publish-type is invalid.400The publish-type is invalid.
InvalidParameterThe priority is invalid.400The priority is invalid.
InvalidParameterThe rewrite-type is invalid.400The rewrite-type is invalid.
InvalidParameterThe path-pattern is required.400The path-pattern is required.
InvalidParameterThe publish-type is required.400The publish-type is required.
InvalidParameterThe before-value is required.400The before-value is required.
InvalidParameterThe after-value is required.400The after-value is required.
InvalidParameterThe rewrite-type is required.400The rewrite-type is required.
InvalidParameterThe request has null config with null data-id, please remove it.400The request has null config with null data-id, please remove it.
NoSuchDomainThe specified domain does not exist.404The specified domain does not exist.
InternalErrorWe encountered an internal error. Please try again.500We encountered an internal error. Please try again.
ConfigErrorThe config {0} does not access.400The config {0} does not access.
CustomerNoOwnDomaincustomer not own domain name.400customer not own domain name.
WrongDataIdWrong data-id.400Wrong data-id.

Example

JSON
XML
JSON
Request example
Copy Copy success
#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://{@apiDomain}/api/config/InnerRedirect/123344" \
-X "PUT" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-d '{
    "rewrite-rule-settings": [
        {
            "data-id": "31506537", 
            "path-pattern": ".*", 
            "except-path-pattern": "^https?://[^/]+/.*.m3u8", 
            "ignore-letter-case": "true", 
            "publish-type": "Cache", 
            "priority": "10", 
            "before-value": "^http://([^/]+/.*)", 
            "after-value": "https://$1", 
            "rewrite-type": "before",
            "request-way":"POST;PUT",
            "exceptional-request":"Purge",
            "ua":"iPhone",
            "exceptional-ua":"iPad",
            "operators-area":"Asia_East",
            "exceptional-operators-area":"Asia_South"
        }, 
        {
            "path-pattern": ".*", 
            "except-path-pattern": "^https?://[^/]+/.*.m3u8", 
            "ignore-letter-case": "true", 
            "publish-type": "Cache", 
            "priority": "9", 
            "before-value": "http", 
            "after-value": "https", 
            "rewrite-type": "before"
        }
    ],
    "description":"description"
}'
Response example
Copy Copy success
HTTP/1.1 202 Accepted
Date: Fri, 17 May 2017 06:33:26 GMT
Content-Type: application/json;charset=utf-8
x-cnc-request-id:c54cbbb4-19fe-407a-930c-3988b62ed2fd
{"message":"success"}