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.
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.
{
"_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": []
}
]
}
}
POST /api/app-databases
Create a connection profile and lazily provision its target database.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name. |
host | string | Yes | Database host. |
port | integer | No | Port (default 5432). |
database | string | Yes | Database name. |
username | string | Yes | Connection user. |
dbPassword | string | Yes | Connection password (stored encrypted; never returned). |
useSsl | boolean | No | Enable 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.
{
"name": "Order Desk DB",
"host": "127.0.0.1",
"port": 5432,
"database": "app_docs_db",
"username": "i5",
"dbPassword": "i5"
}
{
"_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
}
GET /api/app-databases/{id}
Get one connection profile (the dbPassword is never included).
{
"_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"
}
PUT /api/app-databases/{id}
Update a profile. dbPassword is only changed when supplied.
{
"name": "Order Desk DB (primary)"
}
{
"_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"
}
DELETE /api/app-databases/{id}
Remove the connection profile. Returns 200 with an empty body. The external
database itself is not dropped.
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).