Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

On this pageOverview

Get database usage metrics

GET/v1/databases/{databaseId}/usage

Returns usage metrics for the specified database.

AuthorizationBearer <token>

OAuth2 authentication

In: header

Scope: workspace:admin, offline_access

databaseId*string

Match^(db_)?([cC][^\s-]{8,}|[a-z0-9]+)$

startDate?string

Start date for metrics query. Defaults to start of current month if not provided.

Formatdate-time

endDate?string

End date for metrics query. Will be set to end of day if a future date is provided. Defaults to current date if not provided.

Formatdate-time

curl -X GET "https://example.com/v1/databases/string/usage"
{
  "period": {
    "start": "2019-08-24T14:15:22Z",
    "end": "2019-08-24T14:15:22Z"
  },
  "metrics": {
    "operations": {
      "used": 0,
      "unit": "ops"
    },
    "storage": {
      "used": 0,
      "unit": "GiB"
    }
  },
  "generatedAt": "2019-08-24T14:15:22Z"
}
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu