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

# Get database status

> Get a database's live CPU, RAM, network, storage and uptime with GET /v2/databases/{database_id}/status. Pass rawData=true for numbers, not strings.

<ParamField header="Authorization" type="string" placeholder="API Key" required>
  The API key for your account. You can find this in your [account settings](https://squarecloud.app/en/account/security).
</ParamField>

Requires an API key with the `databases:read` [scope](/en/api-reference/authentication#scopes).

Returns live runtime stats for a single database: CPU, RAM, network usage, storage and uptime. Pass `rawData=true` to get raw numeric values instead of the formatted strings (`"0.54%"`, `"111.32MB"`) shown in the example below, useful when you want to do your own formatting or math client-side.

To fetch this for every owned database at once, use [All Databases Status](/en/api-reference/endpoint/databases/status-all). For historical trends instead of a live reading, see [Get Database Metrics](/en/api-reference/endpoint/databases/metrics).

## Parameters

<ParamField path="database_id" type="string" placeholder="Database ID" required>
  The ID of the database.
</ParamField>

<ParamField query="rawData" type="boolean" placeholder="true or false">
  When `true`, `cpu`, `ram` and the other figures come as numbers instead of formatted strings.
</ParamField>

## Response

<ResponseField name="status" type="string">
  Indicates whether the call was successful: `success` if it was, `error` if not.
</ResponseField>

<ResponseField name="response" type="object">
  The contents of the response.

  <Expandable title="Toggle object">
    <ResponseField name="cpu" type="string">
      The current CPU usage percentage.
    </ResponseField>

    <ResponseField name="ram" type="string">
      The RAM in use, for example `"120.4MB"`. It does not include the allocated limit.
    </ResponseField>

    <ResponseField name="running" type="boolean">
      The boolean value if is running.
    </ResponseField>

    <ResponseField name="storage" type="string">
      The current storage it is using.
    </ResponseField>

    <ResponseField name="network" type="object">
      The network usage and total used.

      <Expandable title="Toggle object">
        <ResponseField name="total" type="string">
          The total used.
        </ResponseField>

        <ResponseField name="now" type="string">
          The current use.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="uptime" type="int">
      The timestamp representing the uptime.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json theme={"system"}
  {
      "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>

## Common errors

| Code | HTTP | Meaning |
| - | - | - |
| `DATABASE_NOT_FOUND` | 404 | The database does not exist or is not owned by the caller. |

## Related

* CLI: [`squarecloud db status`](/en/cli-reference/databases#squarecloud-db-status)
* SDKs: [`api.databases.status()`](/en/sdks/js/databases) (JavaScript), [`client.databases.status()`](/en/sdks/py/databases) (Python), [`c.Databases.Status()`](/en/sdks/go/databases) (Go)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.