Database usage
Get database usage metrics
Returns usage metrics for the specified database.
GET
/v1/databases/{databaseId}/usageAuthorizationBearer <token>
OAuth2 authentication
In: header
Scope: workspace:admin, offline_access
Path Parameters
databaseId*string
Match
^(db_)?([cC][^\s-]{8,}|[a-z0-9]+)$Query Parameters
startDate?string
Start date for metrics query. Defaults to start of current month if not provided.
Format
date-timeendDate?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.
Format
date-timeResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://api.prisma.io/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"
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}