> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squarecloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Blob 对象列表

> 本文档全面概述了 SquareCloud Blob API 的 GET /v1/objects endpoint。

<ParamField header="Authorization" type="string" placeholder="API Key" required>
  你账户的 API 密钥。你可以在[账户设置](https://squarecloud.app/zh/account/security)中找到它。
</ParamField>

<ParamField query="prefix" type="string" placeholder="文件前缀">
  表示文件前缀的字符串。<br />必须遵循 a to z、A to Z、0 to 9 和 \_ 的模式。（3 到 32 个字符）
</ParamField>

<ParamField query="continuationToken" type="string" placeholder="延续令牌">
  表示文件列表延续令牌的字符串。（每页 1000 个对象）
</ParamField>

### 响应

<ResponseField name="status" type="string">
  指示调用是否成功。成功为 "success"，否则为 "error"。
</ResponseField>

<ResponseField name="response" type="object">
  <Expandable title="展开对象">
    <ResponseField name="objects" type="array">
      <Expandable title="展开对象">
        <ResponseField name="id" type="string">
          对象的 id。
        </ResponseField>

        <ResponseField name="size" type="integer">
          对象的大小，以字节为单位。
        </ResponseField>

        <ResponseField name="created_at" type="ISO 8601">
          对象创建的日期和时间。
        </ResponseField>

        <ResponseField name="expires_at" type="ISO 8601">
          对象将过期的日期和时间。
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="continuationToken" type="string">
      用于获取下一页的令牌；将其作为 `continuationToken` 查询参数传回。当没有更多对象时为 `null` 或不存在。
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Response - [30s cache] theme={null}
  {
    "status": "success",
    "response": {
      "objects": [
        {
          "id": "ID/name1_ltq7b2sw-de6241.jpeg",
          "size": 78266,
          "created_at": "2024-03-13T19:31:28.776Z"
        },
        {
          "id": "ID/name_ltq7b2sw-de6243-ex1.jpeg",
          "size": 90466,
          "created_at": "2024-03-13T19:35:28.776Z",
          "expires_at": "2024-03-14T19:35:28.776Z"
        }
      ],
      "continuationToken": null
    }
  }
  ```
</ResponseExample>

### 故障排查

<Tabs>
  <Tab title="400 状态码">
    ### 对象相关

    <CodeGroup>
      ```json INVALID_PREFIX theme={null}
      // The provided object prefix is invalid.
      // Must adhere to the a to z, A to Z, 0 to 9, and _ pattern.
      {
          "status": "error",
          "code": "INVALID_OBJECT_PREFIX"
      }
      ```

      ```json INVALID_CONTINUATION_TOKEN theme={null}
      // The provided continuation token is invalid (must be a string up to 2048 characters).
      {
          "status": "error",
          "code": "INVALID_CONTINUATION_TOKEN"
      }
      ```

      ```json FAILED_LIST theme={null}
      // The request to list the objects failed. Please try again.
      {
          "status": "error",
          "code": "FAILED_LIST"
      }
      ```
    </CodeGroup>
  </Tab>

  <Tab title="401 状态码">
    ### 未授权

    <CodeGroup>
      ```json ACCESS_DENIED theme={null}
      // The API key is missing or invalid. Set a valid key in the Authorization header.
      {
          "status": "error",
          "code": "ACCESS_DENIED"
      }
      ```
    </CodeGroup>
  </Tab>

  <Tab title="429 状态码">
    ### 速率受限

    <CodeGroup>
      ```json RATELIMIT theme={null}
      // List rate limit reached (10 requests per 30s window).
      {
          "status": "error",
          "code": "RATELIMIT"
      }
      ```
    </CodeGroup>
  </Tab>
</Tabs>
