Documentation menu

Restart database

POSThttps://api.instacloud.com/projects/{projectId}/database/restart

Token scope: account · org · project — read-only tokens refused (not a GET).

Restart the postgres server (insta-db only) so settings written with ALTER SYSTEM that need a restart (wal_level, max_wal_senders, max_replication_slots, …) take effect. Connections drop while it restarts. Waits for the restart to finish. pending: true means it was still in progress when the wait ran out — GET .../database/instance reads running throughout, so confirm with SHOW <setting> instead. A suspended database stays suspended — its next connection starts it with the new settings. Gated — deploy.

Parameters

NameInTypeRequiredDescription
branchquerystringnobranch name (default branch if omitted)
groupquerystringnopostgres service name (default: the sole postgres service)
projectIdpathstringyes

Responses

200

Default Response

FieldTypeRequiredDescription
idstringno
namestringno
statestringno
routeKeystringno
hoststringno
portintegerno
connectionPoolingbooleanno
deletionProtectionbooleanno
scaleToZerobooleanno
idleTimeoutSecsintegerno
volumeSizestringnothe service's volume (block disk) size
volumeGibnumberno
storageSizestringnoDEPRECATED alias of volumeSize — dropped next release
storageGiBnumbernoDEPRECATED alias of volumeGib — dropped next release
enabledExtensionsstring[]no
cpuMilliintegernocurrent cpu ceiling in millicores (2000 = 2 vCPU)
memoryMibintegernocurrent memory ceiling in MiB
capobjectnothis plan's maximum for the ceilings — render sliders with their plan-limit markers. These are the caller's own tier caps and they move with the plan (and with env overrides per deployment), so read them from THIS field rather than assuming a tier's numbers; the parenthetical example that used to live here said 'pro 4 vCPU/4Gi/10Gi' and was stale on all three by the time anyone noticed.
cap.cpuMilliintegeryes
cap.memoryMibintegeryes
cap.volumeGibintegeryes
pendingbooleannotrue when the provider accepted the change asynchronously and it has not been applied yet — the ceiling/volume fields are then the PRE-change values. Re-read (GET) to see the applied state. Absent when the change was applied synchronously.
publicAccessbooleannopostgres (insta-db) — false: the public endpoint refuses every connection (SQLSTATE 28000) and the database is not reachable from the internet; only the private network lane connects. Change it with PUT .../services/{serviceId}/access. Absent when the provider does not report it.
privateAccessbooleannopostgres (insta-db) — true: the database has a private network connection string (privateConnString, and DATABASE_PRIVATE_URL in the service credentials) for compute services on the insta-compute provider. Change it with PATCH .../database/settings {privateAccess}. Absent when the provider does not report it.
privateConnStringstringnothe connection string over the private network lane, WITHOUT the password (the full URL is DATABASE_PRIVATE_URL in the service credentials). Present only while privateAccess is on.
privateLaneobjectnoGET .../database/instance only — this deployment's private-lane switches, so a UI can render the toggles without a probing write
privateLane.enabledbooleanyesthe private network access toggle and closing public access are available on this deployment; false: both answer 409 {code: private_lane_disabled}
privateLane.consolebooleanyesthe platform console reaches databases over the private network lane; false: it uses the public endpoint, so it cannot browse a database whose public access is closed
warningsstring[]nowhat this change will break and how to fix it (e.g. compute services bound to DATABASE_PRIVATE_URL when private access is turned off). Advisory: the change was applied.

202

Default Response

FieldTypeRequiredDescription
status"approval_required"no
approvalIdstringno
actionstringnothe gated action, or a comma-joined compound set — prefer `actions`
actionsstring[]noevery capability this approval covers
messagestringno
urlstringnothe console page where a project admin reviews this request
nextActionsobject[]no
nextActions.opstringyesNeutral logical action id, e.g. "service.add" — NOT an operationId or a CLI/MCP tool name; each client maps it to its own surface.
nextActions.reasonstringyesNatural-language, human/LLM-facing "why do this now".
nextActions.argsobjectnoSuggested, flat named arguments; "<placeholder>"s where a value is unknown.
nextActions.gatedbooleannoTrue if the action passes a governance gate.

400

Default Response

FieldTypeRequiredDescription
errorstringyes

403

Default Response

FieldTypeRequiredDescription
errorstringyes

404

Default Response

FieldTypeRequiredDescription
errorstringyes

409

Default Response

FieldTypeRequiredDescription
errorstringyes

502

Default Response

FieldTypeRequiredDescription
errorstringyes

View as Markdown