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

# Ottieni Metriche Database

> Ottieni le metriche del tuo database ospitato.

<ParamField header="Authorization" type="string" placeholder="API Key" required>
  La chiave API del tuo account. Puoi trovarla nelle [impostazioni del tuo account](https://squarecloud.app/it/account/security).
</ParamField>

### Parametri

<ParamField path="database_id" type="string" placeholder="Database ID" required>
  L'ID del database.
</ParamField>

### Risposta

<ResponseField name="status" type="string">
  Indica se la chiamata è andata a buon fine. `success` in caso di successo, `error` in caso contrario.
</ResponseField>

<ResponseField name="response" type="array">
  Il contenuto della risposta.

  <Expandable title="Mostra oggetto">
    <ResponseField name="date" type="string">
      La data in formato ISO.
    </ResponseField>

    <ResponseField name="cpu" type="number">
      La percentuale attuale di utilizzo della CPU.
    </ResponseField>

    <ResponseField name="ram" type="number">
      L'utilizzo attuale di RAM in MB.
    </ResponseField>

    <ResponseField name="net" type="int[]">
      Un array che rappresenta il totale della rete utilizzata. Primo l'input, secondo l'output.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
      "status": "success",
      "response": [
          {
              "date": "2025-08-13T12:55:01.348Z",
              "cpu": 0.45,
              "ram": 111.27,
              "net": [
                  16834,
                  126
              ]
          },
          {
              "date": "2025-08-13T12:50:01.349Z",
              "cpu": 0.45,
              "ram": 111.22,
              "net": [
                  16834,
                  126
              ]
          },
          {
              "date": "2025-08-13T12:45:01.350Z",
              "cpu": 0.58,
              "ram": 111.36,
              "net": [
                  16834,
                  126
              ]
          },
          {
              "date": "2025-08-13T12:40:01.348Z",
              "cpu": 0.43,
              "ram": 118.44,
              "net": [
                  16834,
                  126
              ]
          }
      ]
  }
  ```
</ResponseExample>
