scans, http_records, findings, source_repos, session_hostnames, oast_interactions, scan_logs, agent_runs, scopes) automatically filter by the X-Project-UUID header. Pass ?all_projects=true to disable project scoping (admin use).
GET /api/db/tables — List All Tables
Returns all database tables with their row counts.GET /api/db/tables/:table/columns — List Table Columns
Returns column metadata and primary key information for a specific table.| Code | Condition |
|---|---|
| 404 | Table name not found in database |
GET /api/db/tables/:table/records — List Records
Returns paginated, filtered, sorted records from any table. Query parameters:| Parameter | Type | Default | Description |
|---|---|---|---|
limit | int | 100 | Number of records to return (max 1000) |
offset | int | 0 | Offset for pagination |
sort | string | Column name to sort by (validated against table schema) | |
order | string | desc | Sort order: asc or desc |
columns | string | Comma-separated column whitelist (only return these columns) | |
search | string | Fuzzy search across all text/varchar columns | |
truncate | int | 0 | Truncate large text/binary fields to N characters (0 = full) |
all_projects | string | false | Set to true to disable automatic project_uuid filtering |
filter.<column> | string | Exact match filter on a column | |
filter.<column>__like | string | SQL LIKE pattern match (% wildcards) | |
filter.<column>__gt | string | Greater than comparison | |
filter.<column>__gte | string | Greater than or equal comparison | |
filter.<column>__lt | string | Less than comparison | |
filter.<column>__lte | string | Less than or equal comparison | |
filter.<column>__in | string | Comma-separated IN list | |
filter.<column>__neq | string | Not equal comparison |
| Code | Condition |
|---|---|
| 400 | Invalid query parameter or filter |
| 404 | Table not found |
GET /api/db/tables/:table/records/:id — Get Single Record
Returns a single record by its primary key value. Only works for tables with a single-column primary key.| Code | Condition |
|---|---|
| 400 | Table not found or composite PK (not supported) |
| 404 | Record not found |
POST /api/db/tables/:table/records — Create Record
Inserts a new record into the specified table. Requires admin role. The request body is a JSON object where keys are column names and values are the data to insert. Column names are validated against the table schema. For project-scoped tables,project_uuid is automatically injected from the X-Project-UUID header if not provided in the body.
| Code | Condition |
|---|---|
| 400 | Invalid JSON, invalid column name, or empty fields |
| 500 | Database constraint violation |
PUT /api/db/tables/:table/records/:id — Update Record
Updates one or more fields on an existing record. Requires admin role. Only the fields included in the request body are updated (partial update). Primary key columns cannot be updated. Column names are validated against the table schema.| Code | Condition |
|---|---|
| 400 | Invalid JSON, invalid column, or attempt to update PK |
| 404 | Record not found |
DELETE /api/db/tables/:table/records/:id — Delete Record
Deletes a single record by primary key. Requires admin role.| Code | Condition |
|---|---|
| 404 | Record not found |
| 500 | Database error |
