调用ListWebHostingFiles分页获取网站静态文件。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String ListWebHostingFiles

系统规定参数。取值:ListWebHostingFiles。

Marker String 0e16bb12-14af-4635-b24c-5ac1a9a*****/test/error1.png

分页游标。取值为上一页返回的NextMarker的值,当获取第一页时,取空字符串。

Prefix String /

路径前缀。

SpaceId String 0e16bb12-14af-4635-b24c-5ac1a9a*****

服务空间ID。

PageSize Integer 100

分页大小,默认50,最大500。

返回数据

名称 类型 示例值 描述
Code String success

请求返回状态。

  • success:成功。
  • failed:失败。
Data Struct

返回数据。

Count Integer 50

返回数据总数。

NextMarker String 0e16bb12-14af-4635-b24c-5ac1a9a*****/test/error1.png

分页标记,标记当前分页请求到的最后一条数据。

WebHostingFiles Array

静态网站文件信息。

BucketName String test

Bucket名称。

ContentType String image/png

文件类型。

ETag String test

标记。

FilePath String error/error.jpg

文件路径。

LastModifiedTime Long 1590398956000

上一次修改文件时间的时间戳。

SignedUrl String http://fbpsbvmo-15415903938*****-static.oss-cn-zhangjiakou.aliyuncs.com/0e16bb12-14af-4635-b24c-5ac1a9a*****/test/error.jpg?Expires=1590462873&OSSAccessKeyId=STS.NT9oaFvbRzj8vSViJL2y*****&Signature=pSMbsZUZGwfZEcvT9R7VZPMp%2BVA%3D&security-token=CAISgQJ1q6Ft5B2yfSjIr5eMJNvym71zzajTdHXnjUoZPvYVjIHgpjz2IHBEeXRuA%2B0WsvQ%2Bnm9X6vgelqFZYqRoYGHiUZOgBG3HPUXzDbDasumZsJYm6vT8a0XxZjf%2F2MjNGZabKPrWZvaqbX3diyZ32sGUXD6%2BXlujQ%2Fbr4NwdGbZxZASjaidcD9p7PxZrrNRgVUHcLvGwKBXn8AGyZQhKwlMh1ToiuPzkk5bMukuE1gXAp7VL99irEP%2BNdNJxOZpzadCx0dFte7DJuCwqsEgaqfoo1vEUpWeW5I7CXwcN%2BWePN%2BvF79tuIEpwae0gEqsBtv%2F4mLhxtunSkZQQTrutnEPAOhqAAZ6L6gVhZYEK78ZBsQq1hP9nvtEGENelJYiTPWAHmB1mDutOaEzgSpwVMaP3FWpMTy6KgBKMox1NJLUZJK23NlJIlMIJ8lVyCQOG4Ig7oTXTbFc0PQMShK%2FeQIQ2WvZ2x%2F%2FZdgaZIeQR4WnawsWF%2BYC4ScTig0wYTuaLx7pH2WHJ

文件下载URL,有效时间30分钟。

Size Long 235628

文件大小,单位字节。

HttpStatusCode String 200

HTTP请求返回的响应状态码,200表示请求成功。

Message String SpaceNotExist

错误信息。

RequestId String 93FC5921-2A54-408B-B360-2E5C93488CF4

唯一请求ID。

Success Boolean true

请求返回状态。

  • true:成功。
  • false:失败。

示例

请求示例

http(s)://[Endpoint]/?Action=ListWebHostingFiles
&Marker=0e16bb12-14af-4635-b24c-5ac1a9a*****/test/error1.png
&Prefix=/
&SpaceId=0e16bb12-14af-4635-b24c-5ac1a9a*****
&<公共请求参数>

正常返回示例

XML 格式

<ListWebHostingFilesResponse>
      <RequestId>077C43E6-95E9-40FC-A796-B2CFBD63C2D6</RequestId>
      <HttpStatusCode>200</HttpStatusCode>
      <Data>
            <WebHostingFiles>
                  <FilePath>error.html</FilePath>
                  <SignedUrl>http://fbpsbvmo-154159039388****-static.oss-cn-zhangjiakou.aliyuncs.com/0e16bb12-14af-4635-b24c-5ac1a9a*****/error.html?Expires=1590460358&amp;OSSAccessKeyId=STS.NUcPHyHQr2xQ6zAe5ybi*****&amp;Signature=b2L4kBEFrA2EZvZbm3B%2FyNSxVeA%3D&amp;security-token=CAISgQJ1q6Ft5B2yfSjIr5bWG%2FLNpY5Thbq6NFzwgTUsbuZ4grfe0Tz2IHBEeXRuA%2B0WsvQ%2Bnm9X6vgelqFZYqRoYGHiUZOjKEbIPUXzDbDasumZsJYm6vT8a0XxZjf%2F2MjNGZabKPrWZvaqbX3diyZ32sGUXD6%2BXlujQ%2Fbr4NwdGbZxZASjaidcD9p7PxZrrNRgVUHcLvGwKBXn8AGyZQhKwlMh1ToiuPzkk5bMukuE1gXAp7VL99irEP%2BNdNJxOZpzadCx0dFte7DJuCwqsEgaqfoo1vEUpWeW5I7CXwcN%2BWePN%2BvF79tuIEpwae0gEqsBtv%2F4mLhxtunSkZQQTrutnEPAOhqAAU49tl4awl%2F0fID3wRpPDCKqg%2BfXifeRRPI2Tr%2Bm4PmK4qPffsI%2F5JXB4JA71uN5TkvMC6LxxTuQnJaTateDrfEDnzyyIVISjvQ7rzt8sxZCnDDfjzx6Lc5TAELuapDjeXK6w%2BWkbhwBTWcjrGAJvdaOA4IodaPZyDlyhO4jt1nv</SignedUrl>
                  <ContentType>text/html</ContentType>
                  <Size>172</Size>
                  <LastModifiedTime>1590399001000</LastModifiedTime>
            </WebHostingFiles>
            <WebHostingFiles>
                  <FilePath>index.html</FilePath>
                  <SignedUrl>http://fbpsbvmo-154159039388****-static.oss-cn-zhangjiakou.aliyuncs.com/0e16bb12-14af-4635-b24c-5ac1a9a7*****/index.html?Expires=1590460358&amp;OSSAccessKeyId=STS.NUcPHyHQr2xQ6zAe5ybi*****&amp;Signature=w7ke9GsiFjb2bR7bQNOOTk4nlbA%3D&amp;security-token=CAISgQJ1q6Ft5B2yfSjIr5bWG%2FLNpY5Thbq6NFzwgTUsbuZ4grfe0Tz2IHBEeXRuA%2B0WsvQ%2Bnm9X6vgelqFZYqRoYGHiUZOjKEbIPUXzDbDasumZsJYm6vT8a0XxZjf%2F2MjNGZabKPrWZvaqbX3diyZ32sGUXD6%2BXlujQ%2Fbr4NwdGbZxZASjaidcD9p7PxZrrNRgVUHcLvGwKBXn8AGyZQhKwlMh1ToiuPzkk5bMukuE1gXAp7VL99irEP%2BNdNJxOZpzadCx0dFte7DJuCwqsEgaqfoo1vEUpWeW5I7CXwcN%2BWePN%2BvF79tuIEpwae0gEqsBtv%2F4mLhxtunSkZQQTrutnEPAOhqAAU49tl4awl%2F0fID3wRpPDCKqg%2BfXifeRRPI2Tr%2Bm4PmK4qPffsI%2F5JXB4JA71uN5TkvMC6LxxTuQnJaTateDrfEDnzyyIVISjvQ7rzt8sxZCnDDfjzx6Lc5TAELuapDjeXK6w%2BWkbhwBTWcjrGAJvdaOA4IodaPZyDlyhO4jt1nv</SignedUrl>
                  <ContentType>text/html</ContentType>
                  <Size>166</Size>
                  <LastModifiedTime>1590398956000</LastModifiedTime>
            </WebHostingFiles>
            <Count>2</Count>
      </Data>
      <Code>success</Code>
      <Success>true</Success>
</ListWebHostingFilesResponse>

JSON 格式

{
    "RequestId": "077C43E6-95E9-40FC-A796-B2CFBD63C2D6",
    "HttpStatusCode": 200,
    "Data": {
        "WebHostingFiles": [
            {
                "FilePath": "error.html",
                "SignedUrl": "http://fbpsbvmo-154159039388****-static.oss-cn-zhangjiakou.aliyuncs.com/0e16bb12-14af-4635-b24c-5ac1a9a*****/error.html?Expires=1590460358&OSSAccessKeyId=STS.NUcPHyHQr2xQ6zAe5ybi*****&Signature=b2L4kBEFrA2EZvZbm3B%2FyNSxVeA%3D&security-token=CAISgQJ1q6Ft5B2yfSjIr5bWG%2FLNpY5Thbq6NFzwgTUsbuZ4grfe0Tz2IHBEeXRuA%2B0WsvQ%2Bnm9X6vgelqFZYqRoYGHiUZOjKEbIPUXzDbDasumZsJYm6vT8a0XxZjf%2F2MjNGZabKPrWZvaqbX3diyZ32sGUXD6%2BXlujQ%2Fbr4NwdGbZxZASjaidcD9p7PxZrrNRgVUHcLvGwKBXn8AGyZQhKwlMh1ToiuPzkk5bMukuE1gXAp7VL99irEP%2BNdNJxOZpzadCx0dFte7DJuCwqsEgaqfoo1vEUpWeW5I7CXwcN%2BWePN%2BvF79tuIEpwae0gEqsBtv%2F4mLhxtunSkZQQTrutnEPAOhqAAU49tl4awl%2F0fID3wRpPDCKqg%2BfXifeRRPI2Tr%2Bm4PmK4qPffsI%2F5JXB4JA71uN5TkvMC6LxxTuQnJaTateDrfEDnzyyIVISjvQ7rzt8sxZCnDDfjzx6Lc5TAELuapDjeXK6w%2BWkbhwBTWcjrGAJvdaOA4IodaPZyDlyhO4jt1nv",
                "ContentType": "text/html",
                "Size": 172,
                "LastModifiedTime": 1590399001000
            },
            {
                "FilePath": "index.html",
                "SignedUrl": "http://fbpsbvmo-154159039388****-static.oss-cn-zhangjiakou.aliyuncs.com/0e16bb12-14af-4635-b24c-5ac1a9a7*****/index.html?Expires=1590460358&OSSAccessKeyId=STS.NUcPHyHQr2xQ6zAe5ybi*****&Signature=w7ke9GsiFjb2bR7bQNOOTk4nlbA%3D&security-token=CAISgQJ1q6Ft5B2yfSjIr5bWG%2FLNpY5Thbq6NFzwgTUsbuZ4grfe0Tz2IHBEeXRuA%2B0WsvQ%2Bnm9X6vgelqFZYqRoYGHiUZOjKEbIPUXzDbDasumZsJYm6vT8a0XxZjf%2F2MjNGZabKPrWZvaqbX3diyZ32sGUXD6%2BXlujQ%2Fbr4NwdGbZxZASjaidcD9p7PxZrrNRgVUHcLvGwKBXn8AGyZQhKwlMh1ToiuPzkk5bMukuE1gXAp7VL99irEP%2BNdNJxOZpzadCx0dFte7DJuCwqsEgaqfoo1vEUpWeW5I7CXwcN%2BWePN%2BvF79tuIEpwae0gEqsBtv%2F4mLhxtunSkZQQTrutnEPAOhqAAU49tl4awl%2F0fID3wRpPDCKqg%2BfXifeRRPI2Tr%2Bm4PmK4qPffsI%2F5JXB4JA71uN5TkvMC6LxxTuQnJaTateDrfEDnzyyIVISjvQ7rzt8sxZCnDDfjzx6Lc5TAELuapDjeXK6w%2BWkbhwBTWcjrGAJvdaOA4IodaPZyDlyhO4jt1nv",
                "ContentType": "text/html",
                "Size": 166,
                "LastModifiedTime": 1590398956000
            }
        ],
        "Count": 2
    },
    "Code": "success",
    "Success": true
}