Skip to navigation

Check database status

Beta

Check if a database is running, suspended, or starting up. Poll this endpoint to determine when a serverless database is ready.

Status Values:

  • running - Database is active and accepting connections
  • suspended - Database is suspended (scale-to-zero). It wakes on POST /databases/{asset_id}/wake or on the first SQL request. When reason is ComputeUnschedulable, no node could host its compute size: waking it only restarts the same wait
  • starting - Database is waking up, or its compute is being recreated
  • creating - Database is being created; it has no compute yet
  • failed - Database failed to start, or its creation failed (message says which)
  • unknown - Status could not be determined (the control plane did not answer); retry

A database suspends (scales to zero) after suspend_timeout_seconds without activity; GET/PATCH /databases/{asset_id}/settings read and set that window, and 0 keeps it running. Reading the compute status or the settings never wakes a suspended database. Two things do: POST /databases/{asset_id}/wake, which answers at once while the compute starts, or any request that runs SQL on it, such as POST /databases/{asset_id}/sql, which waits for the compute up to 120 seconds; if the compute is still starting then, the answer is 503 with Retry-After and the statement did not run. A cold start usually takes 30 seconds to 2 minutes.

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

asset_idstringRequired

Headers

X-Athena-Session-CredentialstringOptional

Response

Successful Response
asset_idstring
The database asset ID
providerstring

Database provider (‘kronos’)

statusenum
Standardized database status
messagestring or nullOptional
Optional status message or error details
reasonstring or nullOptional

Why the compute is in this state, when the control plane says: ComputeUnschedulable on a suspended database means no node could host its compute size, so a wake only restarts the same wait; choose a smaller compute size in the database’s Settings in Athena first. Absent on older control planes.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
501
Not Implemented Error