> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-fix-issues-on-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Database

> This endpoint gets details of a database.

## Request

<ParamField path="id" type="string" required>
  The ID of the database to reset password
</ParamField>

<ParamField query="credentials" type="string">
  Set to `hide` to remove credentials from the response.
</ParamField>

## Response

<ResponseField name="database_id" type="string">
  ID of the created database
</ResponseField>

<ResponseField name="database_name" type="string">
  Name of the database
</ResponseField>

<ResponseField name="database_type" type="string">
  Type of the database in terms of pricing model(Free, Pay as You Go or
  Enterprise)
</ResponseField>

<ResponseField name="region" type="string">
  The region where database is hosted
</ResponseField>

<ResponseField name="port" type="int">
  Database port for clients to connect
</ResponseField>

<ResponseField name="creation_time" type="int">
  Creation time of the database as Unix time
</ResponseField>

<ResponseField name="state" type="string">
  State of database (active or deleted)
</ResponseField>

<ResponseField name="password" type="string">
  Password of the database
</ResponseField>

<ResponseField name="user_email" type="string">
  Email or team id of the owner of the database
</ResponseField>

<ResponseField name="endpoint" type="string">
  Endpoint URL of the database
</ResponseField>

<ResponseField name="tls" type="boolean">
  TLS/SSL is enabled or not
</ResponseField>

<ResponseField name="rest_token" type="string">
  Token for rest based communication with the database
</ResponseField>

<ResponseField name="read_only_rest_token" type="string">
  Read only token for rest based communication with the database
</ResponseField>

<ResponseField name="db_max_clients" type="int">
  Max number of concurrent clients can be opened on this database currently
</ResponseField>

<ResponseField name="db_max_request_size" type="int">
  Max size of a request that will be accepted by the database currently(in
  bytes)
</ResponseField>

<ResponseField name="db_disk_threshold" type="int">
  Total disk size limit that can be used for the database currently(in bytes)
</ResponseField>

<ResponseField name="db_max_entry_size" type="int">
  Max size of an entry that will be accepted by the database currently(in bytes)
</ResponseField>

<ResponseField name="db_memory_threshold" type="int">
  Max size of a memory the database can use(in bytes)
</ResponseField>

<ResponseField name="db_daily_bandwidth_limit" type="int">
  Max daily bandwidth can be used by the database(in bytes)
</ResponseField>

<ResponseField name="db_max_commands_per_second" type="int">
  Max number of commands can be sent to the database per second
</ResponseField>

<ResponseField name="db_request_limit" type="int">
  Total number of commands can be sent to the database
</ResponseField>

<RequestExample>
  ```shell curl
  curl -X GET \
    https://api.upstash.com/v2/redis/database/:id \
    -u 'EMAIL:API_KEY'
  ```

  ```python Python
  import requests

  response = requests.get('https://api.upstash.com/v2/redis/database/:id', auth=('EMAIL', 'API_KEY'))
  response.content
  ```

  ```go Go
  client := &http.Client{}
  req, err := http.NewRequest("GET", "https://api.upstash.com/v2/redis/database/:id", nil)
  if err != nil {
      log.Fatal(err)
  }
  req.SetBasicAuth("email", "api_key")
  resp, err := client.Do(req)
  if err != nil {
      log.Fatal(err)
  }
  bodyText, err := ioutil.ReadAll(resp.Body)
  if err != nil {
      log.Fatal(err)
  }
  fmt.Printf("%s\n", bodyText);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK
  {
    "database_id": "96ad0856-03b1-4ee7-9666-e81abd0349e1",
    "database_name": "MyRedis",
    "database_type": "Pay as You Go",
    "region": "eu-central-1",
    "port": 30143,
    "creation_time": 1658909671,
    "state": "active",
    "password": "038a8e27c45e43068d5f186085399884",
    "user_email": "example@upstash.com",
    "endpoint": "eu2-sought-mollusk-30143.upstash.io",
    "tls": true,
    "rest_token": "AXW_ASQgOTZhZDA4NTYtMDNiMS00ZWU3LTk2NjYtZTgxYWJkMDM0OWUxMDM4YThlMjdjNDVlNDMwNjhkNWYxODYwODUzOTk4ODQ=",
    "read_only_rest_token": "AnW_ASQgOTZhZDA4NTYtMDNiMS00ZWU3LTk2NjYtZTgxYWJkMDM0OWUx8sbmiEcMm9u7Ks5Qx-kHNiWr_f-iUXSIH8MlziKMnpY=",
    "db_max_clients": 1000,
    "db_max_request_size": 1048576,
    "db_disk_threshold": 107374182400,
    "db_max_entry_size": 104857600,
    "db_memory_threshold": 1073741824,
    "db_daily_bandwidth_limit": 53687091200,
    "db_max_commands_per_second": 1000,
    "db_request_limit": 9223372036854775808
  }
  ```
</ResponseExample>
