List Redirections V3

This API is used to list url redirection policies for website accleration domain or filedownload service.

1. Request Definition

  • API URL
https://cdn-api.swiftfederation.com/v3.0/services/{serviceId}/redirections
  • Request Method
GET
  • Request Header

Refer to HTTP Request Headers

  • Request Body

No request body for this API.


2. Response Definition

  • Response Header

Refer to HTTP Response Headers

  • Response Body
Field Type Description
id int Policy ID number for access control.
name string Policy name for access control.
matchUrlPath PolicyMatchVO URL path match rule.
matchQueryString PolicyMatchVO Query string match rule.
redirectionURL string Send an HTTP redirect if this policy matches.
statusCode int HTTP response code to use if sending an HTTP redirect. Could be "301/302".
PolicyMatchVO Definition
operator string Defines how to match the field. Supported values:prefix,regex,equals,suffix.
patterns string[] List of patterns to match what against. If any of the patterns matches then the match succeeds.
  • Response Body Example
[
    {
        "id": 3001,
        "name": "rd3001",
        "matchUrlPath": {"operator":"prefix","patterns":["/"]},
        "matchQueryString": {"operator":"equals","patterns":["name1=1","name2=2"]},
        "redirectionURL": "http://www.example.com/404.html",
        "statusCode": 302
    },
    {
        "id": 3002,
        "name": "rd3002",
        "matchUrlPath": {"operator":"prefix","patterns":["/"]},
        "matchQueryString": {"operator":"equals","patterns":["name1=1","name2=22"]},
        "redirectionURL": "http://www.example.com/500.html",
        "statusCode": 302
    },
    {
        "id": 3003,
        "name": "rd3003",
        "matchUrlPath": {"operator":"prefix","patterns":["/"]},
        "matchQueryString": {"operator":"equals","patterns":["name1=1","name2=222"]},
        "redirectionURL": "http://www.example.com/503.html",
        "statusCode": 301
    }
]
           Updated 2024-08-26 07:42:13

results matching ""

    No results matching ""