调用GetWebHostingConfig查询静态网站配置。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | GetWebHostingConfig |
系统规定参数。取值:GetWebHostingConfig。 |
SpaceId | String | 是 | 0e16bb12-14af-4635-b24c-5ac1a9a***** |
服务空间ID。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 828A8808-3FC9-418C-893A-5A708CFABB8E |
唯一请求ID。 |
Data | Object |
返回数据。 |
|
SpaceId | String | 0e16bb12-14af-4635-b24c-5ac1a9a***** |
服务空间ID。 |
AllowedIps | String | 42.120.72.0/24 |
静态网站托管测试域名允许访问IP的白名单,不在白名单中的访问可能会被限制。 |
ErrorPath | String | error.html |
404错误路径 |
DefaultDomain | String | static-0e16bb12-14af-4635-b24c-5ac1a9a*****.bspapp.com |
默认域名,仅供测试使用,请求速度会收到限制。如果您需要对外正式提供网站服务,请绑定您已备案的自定义域名。 |
IndexPath | String | index.html |
首页路径。 |
HistoryModePath | String | / |
在根目录开启history模式。 |
示例
请求示例
http(s)://[Endpoint]/?Action=GetWebHostingConfig
&SpaceId=0e16bb12-14af-4635-b24c-5ac1a9a*****
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<GetWebHostingConfigResponse>
<Code>success</Code>
<HttpStatusCode>200</HttpStatusCode>
<Message>SpaceNotExist</Message>
<RequestId>828A8808-3FC9-418C-893A-5A708CFABB8E</RequestId>
<Success>true</Success>
<Data>
<SpaceId>0e16bb12-14af-4635-b24c-5ac1a9a*****</SpaceId>
<AllowedIps>42.120.72.0/24</AllowedIps>
<ErrorPath>error.html</ErrorPath>
<DefaultDomain>static-0e16bb12-14af-4635-b24c-5ac1a9a*****.bspapp.com</DefaultDomain>
<IndexPath>index.html</IndexPath>
<HistoryModePath>/</HistoryModePath>
</Data>
</GetWebHostingConfigResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"Code" : "success",
"HttpStatusCode" : "200",
"Message" : "SpaceNotExist",
"RequestId" : "828A8808-3FC9-418C-893A-5A708CFABB8E",
"Success" : true,
"Data" : {
"SpaceId" : "0e16bb12-14af-4635-b24c-5ac1a9a*****",
"AllowedIps" : "42.120.72.0/24",
"ErrorPath" : "error.html",
"DefaultDomain" : "static-0e16bb12-14af-4635-b24c-5ac1a9a*****.bspapp.com",
"IndexPath" : "index.html",
"HistoryModePath" : "/"
}
}