docs
api
Object-based Storage(US3)
DescribeCORSRule

Get Cross-Domain Rule Information - DescribeCORSRule

Overview

Get Cross-Domain Rule Information

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is DescribeCORSRule.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
ProjectIdstringProject ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the GetProjectList interface.No
BucketNamestringBucket NameYes
CORSIdstringCross-domain rule ID, if not specified, all cross-domain rule information will be returned.No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
DataSetarray[CORSRuleSet]Cross-domain Rule Information CollectionYes

Data Model

CORSRuleSet

Field NameTypeDescription InformationRequired
AllowedOriginstringSpecify the allowed origins for cross-domain requests, use wildcard (*) to allow cross-domain requests from all sources (multiple Origins are separated by ',')Yes
AllowedMethodstringSpecify allowed cross-origin request methods. Supported method names include: GET, PUT, POST, DELETE, HEAD, OPTIONS (multiple Methods are separated by ',').Yes
CORSIdstringCross-domain Rule IDYes
CreateTimeintCross-domain Rule Creation TimeYes
ModifyTimeintLatest modification time of cross-domain rulesYes
AllowedHeaderstringSpecify the allowed cross-domain request headers (multiple Headers are separated by ',')Yes
ExposeHeaderstringSpecify the response headers that are allowed for user access from the application (multiple ExposeHeaders are separated by ',')Yes

Example

Request Example

https://api.surfercloud.com/?Action=DescribeCORSRule
&BucketName=vKqZsPWy
&CORSId=zAjPoFbr
&ProjectId=BqlWTeMK

Response Example

{
  "Action": "DescribeCORSRuleResponse",
  "DataSet": [
    {
      "AllowedHeader": "rRdVitUa",
      "AllowedMethod": "OoNanzZo",
      "AllowedOrigin": "uUeaGfwz",
      "CreateTime": 2,
      "ExposeHeader": "fxknMzKB",
      "MaxAgeSeconds": 7,
      "ModifyTime": 7
    }
  ],
  "RetCode": 0
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved