Skip to main content

App databases

App databases are external Postgres connection profiles that Magic Apps can be assigned to (so an app's data lives in a dedicated database rather than the Informer database). They are system-level resources: every route requires a root-manager superuser.

note

Creating a profile lazily provisions the target database, and the ping route opens a live connection — these are real infrastructure operations.

GET /api/app-databases

List the connection profiles. A root-manager superuser sees all; otherwise the list is scoped to the profile assigned to the caller's tenant.

List app databasesGET /api/app-databases
GET /api/app-databases lists the connection profiles. A root-manager superuser sees all; otherwise the list is scoped to the profile assigned to the caller’s tenant.
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/app-databases"
}
},
"start": 0,
"count": 1,
"total": 1,
"_embedded": {
"inf:app-database": [
{
"_links": {
"self": {
"href": "https://informer.example.com/api/app-databases/00000000-0000-4000-8000-000000000001"
},
"inf:ping": {
"href": "https://informer.example.com/api/app-databases/00000000-0000-4000-8000-000000000001/_ping"
}
},
"id": "00000000-0000-4000-8000-000000000001",
"name": "Order Desk DB",
"host": "127.0.0.1",
"port": 5432,
"database": "app_docs_db",
"username": "i5",
"useSsl": false,
"sslRejectUnauthorized": true,
"sslCaCert": null,
"createdAt": "2026-01-15T16:20:00.000Z",
"updatedAt": "2026-01-15T16:20:00.000Z",
"assignedTenants": []
}
]
}
}
Captured from the API examples test suite; ids and timestamps are normalized.

POST /api/app-databases

Create a connection profile and lazily provision its target database.

FieldTypeRequiredDescription
namestringYesDisplay name.
hoststringYesDatabase host.
portintegerNoPort (default 5432).
databasestringYesDatabase name.
usernamestringYesConnection user.
dbPasswordstringYesConnection password (stored encrypted; never returned).
useSslbooleanNoEnable SSL (with sslRejectUnauthorized, sslCaCert).

The response reports provisioned. If auto-provisioning failed (provisioned: false with provisionError), pre-create the database manually and use _ping to verify. Returns 201 with a Location header.

Create an app databasePOST /api/app-databases
POST /api/app-databases saves an external Postgres connection profile and lazily provisions the target database. Payload { name, host, port (default 5432), database, username, dbPassword, useSsl? }. Requires a root-manager superuser. The encrypted dbPassword is never returned; the response reports provisioned (and provisionError if auto-provisioning failed — pre-create the database and use _ping to verify).
Request body
{
"name": "Order Desk DB",
"host": "127.0.0.1",
"port": 5432,
"database": "app_docs_db",
"username": "i5",
"dbPassword": "i5"
}
Response · 201
{
"_links": {
"self": {
"href": "https://informer.example.com/api/app-databases/00000000-0000-4000-8000-000000000001"
}
},
"id": "00000000-0000-4000-8000-000000000001",
"name": "Order Desk DB",
"host": "127.0.0.1",
"port": 5432,
"database": "app_docs_db",
"username": "i5",
"useSsl": false,
"sslRejectUnauthorized": true,
"sslCaCert": null,
"updatedAt": "2026-01-15T16:20:00.000Z",
"createdAt": "2026-01-15T16:20:00.000Z",
"provisioned": true
}
Captured from the API examples test suite; ids and timestamps are normalized.

GET /api/app-databases/{id}

Get one connection profile (the dbPassword is never included).

Get an app databaseGET /api/app-databases/00000000-0000-4000-8000-000000000001
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/app-databases/00000000-0000-4000-8000-000000000001"
},
"inf:ping": {
"href": "https://informer.example.com/api/app-databases/00000000-0000-4000-8000-000000000001/_ping"
}
},
"id": "00000000-0000-4000-8000-000000000001",
"name": "Order Desk DB",
"host": "127.0.0.1",
"port": 5432,
"database": "app_docs_db",
"username": "i5",
"useSsl": false,
"sslRejectUnauthorized": true,
"sslCaCert": null,
"createdAt": "2026-01-15T16:20:00.000Z",
"updatedAt": "2026-01-15T16:20:00.000Z"
}
Captured from the API examples test suite; ids and timestamps are normalized.

PUT /api/app-databases/{id}

Update a profile. dbPassword is only changed when supplied.

Update an app databasePUT /api/app-databases/00000000-0000-4000-8000-000000000001
PUT /api/app-databases/{id} updates the profile. dbPassword is only changed when supplied.
Request body
{
"name": "Order Desk DB (primary)"
}
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/app-databases/00000000-0000-4000-8000-000000000001"
},
"inf:ping": {
"href": "https://informer.example.com/api/app-databases/00000000-0000-4000-8000-000000000001/_ping"
}
},
"id": "00000000-0000-4000-8000-000000000001",
"name": "Order Desk DB (primary)",
"host": "127.0.0.1",
"port": 5432,
"database": "app_docs_db",
"username": "i5",
"useSsl": false,
"sslRejectUnauthorized": true,
"sslCaCert": null,
"createdAt": "2026-01-15T16:20:00.000Z",
"updatedAt": "2026-01-15T16:20:00.000Z"
}
Captured from the API examples test suite; ids and timestamps are normalized.

DELETE /api/app-databases/{id}

Remove the connection profile. Returns 200 with an empty body. The external database itself is not dropped.

Delete an app databaseDELETE /api/app-databases/00000000-0000-4000-8000-000000000001
DELETE /api/app-databases/{id} removes the connection profile. Returns 200 with an empty body. (The external database itself is not dropped.)
Response · 200 · no body
Captured from the API examples test suite; ids and timestamps are normalized.

POST /api/app-databases/{id}/_ping

Test the connection. Returns 200 when reachable, or 503 with the driver error — for example 28P01 (auth failed), 3D000 (database does not exist), or ECONNREFUSED (host unreachable).

Test an app database connectionPOST /api/app-databases/00000000-0000-4000-8000-000000000001/_ping
POST /api/app-databases/{id}/_ping opens a live connection and returns 200 when reachable, or 503 with the driver error (28P01 = auth, 3D000 = missing database, ECONNREFUSED = unreachable).
Response · 200 · no body
Captured from the API examples test suite; ids and timestamps are normalized.