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

> Retrieve detailed information about a specific database.

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

Returns the static identity of a database: its name, owner, hosting cluster, allocated RAM, engine type and connection port. This is metadata only, it does not include live resource usage, use [Get Database Status](/en/api-reference/endpoint/databases/status) or [Get Database Metrics](/en/api-reference/endpoint/databases/metrics) for that.

Useful for confirming a database's configuration after [Create Database](/en/api-reference/endpoint/databases/create) or [Edit Database](/en/api-reference/endpoint/databases/edit), or for looking up which cluster it lives on before contacting support.

### Parameters

<ParamField path="database_id" type="string" placeholder="Database ID" required>
  The ID of the database. You can find this in the Square Cloud dashboard.
</ParamField>

### Response

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

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

  <Expandable title="Toggle object">
    <ResponseField name="name" type="string">
      The database's name.
    </ResponseField>

    <ResponseField name="id" type="string">
      The database's ID.
    </ResponseField>

    <ResponseField name="owner" type="string">
      The ID of the database owner.
    </ResponseField>

    <ResponseField name="cluster" type="string">
      The database's cluster.
    </ResponseField>

    <ResponseField name="ram" type="number">
      The database's RAM usage in MB.
    </ResponseField>

    <ResponseField name="type" type="string">
      The database's type (e.g., mongodb, postgresql).
    </ResponseField>

    <ResponseField name="port" type="number">
      The database's port.
    </ResponseField>

    <ResponseField name="created_at" type="date">
      The database's creation date.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "status": "success",
    "response": {
      "name": "my-database",
      "id": "db1234567890",
      "owner": "313397145698959364",
      "cluster": "suki-cluster",
      "ram": 1024,
      "type": "mongodb",
      "port": 27017,
      "created_at": "2023-01-15T10:00:00Z"
    }
  }
  ```
</ResponseExample>

### Common errors

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