Edit Access Control

This API is used to edit access control for website acceleration or file download service.

1. Request Definition

  • API URL
https://cdn-api.swiftfederation.com/v1.0/services/{serviceId}/access_controls/{policyId}
  • Request Method
PUT
  • Request Header

Refer to HTTP Request Headers

  • Request Body

Request Body Data Format: JSON

Field Required Type Description
name Mandatory string Policy name for access control.
type Mandatory string Access control type, could be "allow", "deny" or "token".
matchType Mandatory string Policy match type, could be "regex" or "prefix".
url Mandatory string Prefix or regex of url pattern.
subnet Optional string IP subnet for access control.
location Optional string Comma-separated list of geographic locations to be matched. Each location should be specified as a 2-letter ISO3166 code. E.g "SG,GB".

Field tokenSecret is only for type "token". And "allow", "deny" don't need this field.

Field Required Type Description
tokenSecret Mandatory string Comma-separated list of tokens.Each token should have 64 characters,Each character must be numeric or lowercase letter. E.g "qjzw8z2c306hwqqg7pkl0po1k1afqljf4oxcbxv511wds50j56y5qyh1f2i8wi9b, 5i70op0gqbvvfbz6r8qosn0qkxsxcxavqy7xs2heoomhtt7n3bmtwye6qme5jxwu"
  • Request Body Example
{
    "name": "ac1001",
    "type": "token",
    "matchType": "regex",
    "url": "/*.js",
    "subnet": "192.168.1.0/24",
    "location": "SG,CN",
    "tokenSecret":"qjzw8z2c306hwqqg7pkl0po1k1afqljf4oxcbxv511wds50j56y5qyh1f2i8wi9b,5i70op0gqbvvfbz6r8qosn0qkxsxcxavqy7xs2heoomhtt7n3bmtwye6qme5jxwu"
}


2. Response Definition

  • Response Header

Refer to HTTP Response Headers

  • Response Body
No response body for this API.
© 2018-2020 Conversant Solutions Pte Ltd. All rights reserved.            Updated 2019-12-19 02:19:44

results matching ""

    No results matching ""