Database users
All paths below use https://api.lordbase.com. Read conventions for headers, authentication, pagination and error handling. Values in responses are illustrative; examples show selected fields, not fixed quotas or service guarantees.
Developer tokens authorize only explicitly supported operations. Required scopes appear below; account, billing and token-management operations require a dashboard session. See token permissions.
List or create database credentials — GET
GET /e/v1/developer/databases/{database_id}/users/
Authentication: Authenticated developer with an active Lordbase subscription. Use the dashboard session, or Authorization: Bearer YOUR_DEVELOPER_TOKEN with read_databases (or api). Resource roles and quotas still apply.
Request and permissions: Workspace member; no body. Returns users and engine, not a bare array.
Required path parameters: database_id (UUID).
Response: 200
{
"users": [
{
"id": "11111111-1111-4111-8111-111111111111",
"database": "11111111-1111-4111-8111-111111111111",
"username": "lb_example_app",
"permissions": "write",
"is_active": true,
"last_used_at": null
}
],
"engine": "postgres"
}
Failures: Common API errors, plus the validation, role, state, engine and plan restrictions stated above.
List or create database credentials — POST
POST /e/v1/developer/databases/{database_id}/users/
Authentication: Authenticated developer with an active Lordbase subscription. Use the dashboard session, or Authorization: Bearer YOUR_DEVELOPER_TOKEN with write_databases (or api). Resource roles and quotas still apply.
Request and permissions: Owner/admin; active database. Required username (string,2..63 before namespacing, letters/numbers/underscores, lowercased); optional password (otherwise generated), permissions (read default, write, admin). Returned username includes the database prefix; use it exactly. Quota is charged to the workspace owner. PostgreSQL connection_string is masked; use the separate password and public host from connection details.
Required path parameters: database_id (UUID).
Field reference: DatabaseUserCreate. The operation above defines which fields to send.
Example JSON body:
{
"username": "app",
"permissions": "write"
}
Response: 201
{
"id": "11111111-1111-4111-8111-111111111111",
"username": "lb_example_app",
"permissions": "write",
"password": "GENERATED_PASSWORD",
"connection_string": "postgresql://lb_example_app:****@YOUR_DATABASE_HOST:6432/lb_example?sslmode=require"
}
Failures: Common API errors, plus the validation, role, state, engine and plan restrictions stated above.
Read, edit or delete a database user — GET
GET /e/v1/developer/databases/{database_id}/users/{user_id}/
Authentication: Authenticated developer with an active Lordbase subscription. Use the dashboard session, or Authorization: Bearer YOUR_DEVELOPER_TOKEN with read_databases (or api). Resource roles and quotas still apply.
Request and permissions: Workspace member; no body. Password is not returned.
Required path parameters: database_id (UUID); user_id (UUID).
Response: 200
{
"id": "11111111-1111-4111-8111-111111111111",
"database": "11111111-1111-4111-8111-111111111111",
"username": "lb_example_app",
"permissions": "write",
"is_active": true,
"last_used_at": null
}
Failures: Common API errors, plus the validation, role, state, engine and plan restrictions stated above.
Read, edit or delete a database user — PATCH
PATCH /e/v1/developer/databases/{database_id}/users/{user_id}/
Authentication: Authenticated developer with an active Lordbase subscription. Use the dashboard session, or Authorization: Bearer YOUR_DEVELOPER_TOKEN with write_databases (or api). Resource roles and quotas still apply.
Request and permissions: Owner/admin. Partial JSON permissions or is_active. PostgreSQL permission changes currently update metadata without applying engine grants. is_active alone is not guaranteed to revoke database access. Use deletion or verified engine permission changes for revocation; do not rename/reassign credentials through this endpoint.
Required path parameters: database_id (UUID); user_id (UUID).
Field reference: DatabaseUser. The operation above defines which fields to send.
Example JSON body:
{
"permissions": "read"
}
Response: 200
{
"id": "11111111-1111-4111-8111-111111111111",
"database": "11111111-1111-4111-8111-111111111111",
"username": "lb_example_app",
"permissions": "write",
"is_active": true,
"last_used_at": null
}
Failures: Common API errors, plus the validation, role, state, engine and plan restrictions stated above.
Read, edit or delete a database user — DELETE
DELETE /e/v1/developer/databases/{database_id}/users/{user_id}/
Authentication: Authenticated developer with an active Lordbase subscription. Use the dashboard session, or Authorization: Bearer YOUR_DEVELOPER_TOKEN with write_databases (or api). Resource roles and quotas still apply.
Request and permissions: Owner/admin; no body. Removes the engine credential and its management record.
Required path parameters: database_id (UUID); user_id (UUID).
Response: 204
Empty body. Do not parse JSON for this response.
Failures: Common API errors, plus the validation, role, state, engine and plan restrictions stated above.
Rotate a database user password — POST
POST /e/v1/developer/databases/{database_id}/users/{user_id}/reset-password/
Authentication: Authenticated developer with an active Lordbase subscription. Use the dashboard session, or Authorization: Bearer YOUR_DEVELOPER_TOKEN with write_databases (or api). Resource roles and quotas still apply.
Request and permissions: Owner/admin; no body. Generates a password and applies it to the engine. Update your application secret immediately. The new_password value is returned once by this request; a masked connection_string is display text.
Required path parameters: database_id (UUID); user_id (UUID).
Response: 200
{
"message": "Password reset successfully",
"new_password": "NEW_GENERATED_PASSWORD",
"connection_string": "postgresql://lb_example_app:****@YOUR_DATABASE_HOST:6432/lb_example?sslmode=require"
}
Failures: Common API errors, plus the validation, role, state, engine and plan restrictions stated above.