> ## 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.

# 获取数据库状态

> 获取与单个数据库相关的所有状态信息。

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

### 参数

<ParamField path="database_id" type="string" placeholder="Database ID" required>
  数据库的 ID。
</ParamField>

<ParamField path="rawData" type="boolean" placeholder="true or false">
  是否需要原始数据。设为 True 时，返回以字节为单位的值。
</ParamField>

### 响应

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

<ResponseField name="response" type="object">
  响应内容。

  <Expandable title="展开对象">
    <ResponseField name="cpu" type="string">
      当前 CPU 使用率百分比。
    </ResponseField>

    <ResponseField name="ram" type="string">
      当前 RAM 使用量
    </ResponseField>

    <ResponseField name="running" type="boolean">
      表示是否正在运行的布尔值。
    </ResponseField>

    <ResponseField name="storage" type="string">
      当前使用的存储量。
    </ResponseField>

    <ResponseField name="network" type="object">
      网络使用情况及累计使用量。

      <Expandable title="展开对象">
        <ResponseField name="total" type="string">
          累计使用量。
        </ResponseField>

        <ResponseField name="now" type="string">
          当前使用量。
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="uptime" type="int">
      表示运行时长的时间戳。
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
      "status": "success",
      "response": {
          "cpu": "0.54%",
          "ram": "111.32MB",
          "status": "running",
          "running": true,
          "storage": "210.1MB",
          "network": {
              "total": "16.83KB ↑ 126B ↓",
              "now": "0B ↑ 0B ↓"
          },
          "uptime": 1755028584438
      }
  }
  ```
</ResponseExample>
