> ## 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 获取设置

> 通过 GET /v1/account/settings 读取你的 Blob Storage 账户按前缀设置的规则。

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

获取设置会返回通过[更新设置](/zh/blob-reference/endpoint/settings-put)保存的规则。每条规则适用于其前缀下的文件：默认可见性、过期时间和缓存、大小和类型限制，以及自动删除。需要 `blob:read` scope。

### 响应

<ResponseField name="status" type="string">
  成功为 "success"，否则为 "error"。
</ResponseField>

<ResponseField name="response" type="object">
  <Expandable title="展开对象">
    <ResponseField name="rules" type="array">
      已保存的规则。各字段说明见[更新设置](/zh/blob-reference/endpoint/settings-put)。

      <Expandable title="展开对象">
        <ResponseField name="prefix" type="string">
          规则适用的前缀，以 `/` 结尾。
        </ResponseField>

        <ResponseField name="private" type="boolean">
          默认可见性。
        </ResponseField>

        <ResponseField name="expire" type="string">
          默认过期时间。
        </ResponseField>

        <ResponseField name="max_size" type="number">
          最大文件大小，单位为字节。
        </ResponseField>

        <ResponseField name="extensions" type="string[]">
          可接受的扩展名。
        </ResponseField>

        <ResponseField name="cache_control" type="string">
          默认缓存。
        </ResponseField>

        <ResponseField name="delete_after_days" type="number">
          文件在多少天后被删除。
        </ResponseField>

        <ResponseField name="created_at" type="ISO 8601">
          规则的保存时间。
        </ResponseField>

        <ResponseField name="active_from" type="ISO 8601">
          自动删除开始生效的时间（`created_at` 之后 24 小时）。仅在设置了 `delete_after_days` 时出现。
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://blob.squarecloud.app/v1/account/settings' \
    --header 'Authorization: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "status": "success",
    "response": {
      "rules": [
        {
          "prefix": "invoices/",
          "private": true,
          "extensions": ["pdf"],
          "created_at": "2026-09-25T12:00:00.000Z"
        },
        {
          "prefix": "tmp/",
          "delete_after_days": 7,
          "created_at": "2026-09-25T12:00:00.000Z",
          "active_from": "2026-09-26T12:00:00.000Z"
        }
      ]
    }
  }
  ```
</ResponseExample>
