Discovery endpoints
Find databases on servers and cloud accounts and keep an inventory of them. Paths are relative to the address of your Simcha DB Studio server.
Through the MCP server these endpoints are the Discovery tool group, off until an admin turns it on.
While this group is on, the MCP server also offers the lookups its tools need: environments_list (List environments, from Environments and Groupings), groupings_list (List groupings, from Environments and Groupings), connections_devops_list (List DB DevOps connections, from Connections).
| Method | Path | What it does |
|---|---|---|
| GET | /api/db-devops/discovery/hosts | List Discovery servers |
| GET | /api/db-devops/discovery/hosts/:id | Get a Discovery server |
| POST | /api/db-devops/discovery/hosts | Add a Discovery server |
| PUT | /api/db-devops/discovery/hosts/:id | Change a Discovery server |
| DELETE | /api/db-devops/discovery/hosts/:id | Delete a Discovery server |
| POST | /api/db-devops/discovery/hosts/:id/scan | Scan a Discovery server |
| GET | /api/db-devops/discovery/hosts/:id/history | Show the scan history of a server |
| GET | /api/db-devops/discovery/databases | List discovered databases |
| GET | /api/db-devops/discovery/databases/:id | Get a discovered database |
| PUT | /api/db-devops/discovery/databases/:id/status | Set the status of a discovered database |
| POST | /api/db-devops/discovery/hosts/:id/databases | Add found databases of a server to a grouping |
| POST | /api/db-devops/discovery/databases/:id/tags | Tag a discovered database |
| DELETE | /api/db-devops/discovery/databases/:id/tags/:tagId | Remove a tag from a discovered database |
| GET | /api/db-devops/discovery/tags | List inventory tags |
| POST | /api/db-devops/discovery/tags | Create an inventory tag |
| DELETE | /api/db-devops/discovery/tags/:id | Delete an inventory tag |
| GET | /api/db-devops/discovery/stats | Show inventory totals |
| GET | /api/db-devops/discovery/aws-accounts | List AWS accounts |
| POST | /api/db-devops/discovery/aws-accounts | Add an AWS account |
| PUT | /api/db-devops/discovery/aws-accounts/:id | Change an AWS account |
| DELETE | /api/db-devops/discovery/aws-accounts/:id | Remove an AWS account |
| POST | /api/db-devops/discovery/aws-accounts/:id/sync | Sync an AWS account |
GET /api/db-devops/discovery/hosts
Lists every server Discovery scans, sorted by name, with its engine, schedule, last scan result and next_scan_at. Passwords are never returned; password_set says whether one is stored.
Reads only · Role: Any signed-in user · MCP tool: discovery_servers_list
No inputs.
GET /api/db-devops/discovery/hosts/:id
Returns one server with its engine, schedule, last scan result and next_scan_at. The password is never returned; password_set says whether one is stored.
Reads only · Role: Any signed-in user · MCP tool: discovery_servers_get
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The server ID |
POST /api/db-devops/discovery/hosts
Adds a database server to scan, without connecting to it. A schedule other than manual scans it automatically; discovery_scan_history shows each scan. A caller who is not an admin also needs the Configuration section in one of their roles.
Changes data · Role: Release manager or admin · MCP tool: discovery_servers_create
| Input | Type | Description |
|---|---|---|
name (body) | string, required | The server name, up to 255 characters |
host (body) | string, required | The host name or IP address |
port (body) | integer, 1 to 65535, required | The port |
db_type (body) | one of postgresql, timescaledb, cockroachdb, mysql, mariadb, sqlserver, mssql, oracle, mongodb, redis, cassandra, neo4j, elasticsearch, required | The database engine on the server |
username (body) | string, optional | The user to sign in with |
password (body) | string, optional | The password. Stored encrypted and never returned |
ssl_enabled (body) | boolean, optional | Use SSL/TLS |
service_name (body) | string, optional | Oracle: the service name to connect to |
scan_schedule (body) | one of manual, hourly, every_6_hours, daily, weekly, optional | How often the server is scanned automatically. Left out, manual |
PUT /api/db-devops/discovery/hosts/:id
Changes the fields sent. A caller who is not an admin also needs the Configuration section in one of their roles.
Changes data · Role: Release manager or admin · MCP tool: discovery_servers_update
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The server ID |
name (body) | string, optional | The server name, up to 255 characters |
host (body) | string, optional | The host name or IP address |
port (body) | integer, 1 to 65535, optional | The port |
db_type (body) | one of postgresql, timescaledb, cockroachdb, mysql, mariadb, sqlserver, mssql, oracle, mongodb, redis, cassandra, neo4j, elasticsearch, optional | The database engine on the server |
username (body) | string, optional | The user to sign in with |
password (body) | string, optional | A new password. Stored encrypted and never returned; left out or empty, the stored one is kept |
ssl_enabled (body) | boolean, optional | Use SSL/TLS |
service_name (body) | string, optional | Oracle: the service name to connect to |
scan_schedule (body) | one of manual, hourly, every_6_hours, daily, weekly, optional | How often the server is scanned automatically |
DELETE /api/db-devops/discovery/hosts/:id
Deletes a server with its discovered databases, their tags and its scan history. Connections already added from it are kept. A caller who is not an admin also needs the Configuration section in one of their roles.
Changes data and can remove or overwrite it · Role: Admin · MCP tool: discovery_servers_delete
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The server ID |
POST /api/db-devops/discovery/hosts/:id/scan
Connects with the server's stored credentials and lists what it holds (databases, Oracle schemas, Cassandra keyspaces, Elasticsearch indices), adding new ones and marking ones no longer found as missing; the call waits for the scan and returns found, newCount and removed. A server that cannot be reached or signed in to is refused with 400 and the reason, which is recorded on the server and in discovery_scan_history. A caller who is not an admin also needs the Configuration section in one of their roles.
Changes data · Role: Release manager or admin · MCP tool: discovery_servers_scan
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The server ID |
GET /api/db-devops/discovery/hosts/:id/history
Lists the last 20 scans of a server, newest first, each with when it started and finished, its status, how many databases it found, new and removed, the error and who started it.
Reads only · Role: Any signed-in user · MCP tool: discovery_scan_history
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The server ID |
GET /api/db-devops/discovery/databases
Lists the databases found on every server, sorted by server and name, each with its size, status, whether it is a connection, its server and its tags.
Reads only · Role: Any signed-in user · MCP tool: discovery_databases_list
| Input | Type | Description |
|---|---|---|
status (query) | string, optional | Only databases with this status: discovered, missing, managed or another status set by hand |
is_managed (query) | one of true, false, optional | Only databases that are (true) or are not (false) connections |
tag_id (query) | string (uuid), optional | Only databases with this tag |
search (query) | string, optional | Only databases whose name, server name or server address contains this text, ignoring case |
GET /api/db-devops/discovery/databases/:id
Returns one discovered database with its size, owner, encoding, status, server and tags.
Reads only · Role: Any signed-in user · MCP tool: discovery_databases_get
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The discovered database ID |
PUT /api/db-devops/discovery/databases/:id/status
Sets the inventory status of a discovered database and the connection it is linked to; managed marks it as added to a grouping through that connection, any other status unmarks it. Leaving out connection_id keeps the link, and null clears it. A caller who is not an admin also needs the Configuration section in one of their roles.
Changes data · Role: Release manager or admin · MCP tool: discovery_databases_set_status
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The discovered database ID |
status (body) | one of discovered, managed, ignored, missing, required | The status |
connection_id (body) | string (uuid), optional | The connection the database is linked to |
POST /api/db-devops/discovery/hosts/:id/databases
Adds databases found on one server: reuses the DB DevOps connection Discovery already made for that server, or creates and tests one with the server's credentials, then puts the databases in a grouping as picked databases (an existing grouping keeps its other members and the connection's other picks; a new one is created, optionally in an environment). Engines without a list of databases hold the connection's own database. The databases are marked managed and the change is recorded as ADD_DISCOVERED_DATABASES. Refused with 400 for databases of another server, 409 for a database not found on the last scan, a grouping that holds the connection by a name pattern, or a database that is in another environment, and 400 when the new connection fails its test. A caller who is not an admin also needs the Configuration section in one of their roles.
Changes data · Role: Release manager or admin · MCP tool: discovery_hosts_add_databases
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The discovery server ID |
databaseIds (body) | list of string (uuid), required | The found databases to add, all on this server, up to 500 |
grouping (body) | string, required | The grouping that holds them: an existing one by name, or the name of a new one |
environment (body) | string, optional | For a new grouping: the environment it is assigned to |
connectionName (body) | string, optional | For a new connection: its name. Left out, the server name |
POST /api/db-devops/discovery/databases/:id/tags
Adds a tag to a discovered database and returns its tags. Adding a tag it already has changes nothing. A caller who is not an admin also needs the Configuration section in one of their roles.
Changes data · Role: Release manager or admin · MCP tool: discovery_databases_tag
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The discovered database ID |
tag_id (body) | string (uuid), required | The tag to add |
DELETE /api/db-devops/discovery/databases/:id/tags/:tagId
Removes a tag from a discovered database and returns the tags it still has. A caller who is not an admin also needs the Configuration section in one of their roles.
Changes data and can remove or overwrite it · Role: Release manager or admin · MCP tool: discovery_databases_untag
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The discovered database ID |
tagId (path) | string (uuid), required | The tag ID |
GET /api/db-devops/discovery/tags
Lists the tags for discovered databases, sorted by name, with their color and description.
Reads only · Role: Any signed-in user · MCP tool: discovery_tags_list
No inputs.
POST /api/db-devops/discovery/tags
Creates a tag for discovered databases. Tag names are unique: a name in use is 409. A caller who is not an admin also needs the Configuration section in one of their roles.
Changes data · Role: Release manager or admin · MCP tool: discovery_tags_create
| Input | Type | Description |
|---|---|---|
name (body) | string, required | The tag name, up to 100 characters |
color (body) | string, optional | The color as #RRGGBB. Left out, #6366f1 |
description (body) | string, optional | What the tag is for |
DELETE /api/db-devops/discovery/tags/:id
Deletes a tag and removes it from every discovered database. A caller who is not an admin also needs the Configuration section in one of their roles.
Changes data and can remove or overwrite it · Role: Admin · MCP tool: discovery_tags_delete
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The tag ID |
GET /api/db-devops/discovery/stats
Returns the number of active servers, discovered databases, databases added to a grouping, databases missing at the last scan, and tags.
Reads only · Role: Any signed-in user · MCP tool: discovery_stats
No inputs.
GET /api/db-devops/discovery/aws-accounts
Lists the AWS accounts Discovery reads, sorted by name, with their role, regions, schedule and last sync result. Secrets are never returned; secret_access_key_set and db_password_set say whether they are stored.
Reads only · Role: Any signed-in user · MCP tool: discovery_aws_accounts_list
No inputs.
POST /api/db-devops/discovery/aws-accounts
Adds an AWS account to read RDS instances and Aurora clusters from, without contacting AWS. It needs a role to assume, an access key with its secret, or both. A caller who is not an admin also needs the Configuration section in one of their roles.
Changes data · Role: Release manager or admin · MCP tool: discovery_aws_accounts_create
| Input | Type | Description |
|---|---|---|
name (body) | string, required | The account name, up to 255 characters |
role_arn (body) | string, optional | A read-only IAM role to assume, as arn:aws:iam::<account>:role/<name>. Empty clears it |
external_id (body) | string, optional | The external ID the role requires |
regions (body) | list of string, required | The regions to read |
access_key_id (body) | string, optional | An AWS access key ID. Empty clears it |
secret_access_key (body) | string, optional | The secret of the access key. Required with access_key_id; stored encrypted and never returned |
endpoint_url (body) | string, optional | An http(s) endpoint for the AWS APIs, such as a private endpoint. Empty clears it |
db_username (body) | string, optional | The database user given to the servers it registers. Left out, each instance's master user |
db_password (body) | string, optional | The database password given to the servers it registers. Stored encrypted and never returned |
scan_schedule (body) | one of manual, hourly, every_6_hours, daily, weekly, optional | How often the servers it registers are scanned automatically; each sync also applies it, and the account username and password, to servers already registered |
PUT /api/db-devops/discovery/aws-accounts/:id
Changes the fields sent. A new schedule applies to servers the account registers from then on. A caller who is not an admin also needs the Configuration section in one of their roles.
Changes data · Role: Release manager or admin · MCP tool: discovery_aws_accounts_update
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The AWS account ID |
name (body) | string, optional | The account name, up to 255 characters |
role_arn (body) | string, optional | A read-only IAM role to assume, as arn:aws:iam::<account>:role/<name>. Empty clears it |
external_id (body) | string, optional | The external ID the role requires |
regions (body) | list of string, optional | The regions to read |
access_key_id (body) | string, optional | An AWS access key ID. Empty clears it |
secret_access_key (body) | string, optional | A new secret for the access key. Stored encrypted and never returned; left out or empty, the stored one is kept |
endpoint_url (body) | string, optional | An http(s) endpoint for the AWS APIs, such as a private endpoint. Empty clears it |
db_username (body) | string, optional | The database user given to the servers it registers. Left out, each instance's master user |
db_password (body) | string, optional | A new database password. Stored encrypted and never returned; left out or empty, the stored one is kept |
scan_schedule (body) | one of manual, hourly, every_6_hours, daily, weekly, optional | How often the servers it registers are scanned automatically; each sync also applies it, and the account username and password, to servers already registered |
DELETE /api/db-devops/discovery/aws-accounts/:id
Removes an AWS account together with the servers it registered and their discovered databases and scan history. Connections already added from them are kept. A caller who is not an admin also needs the Configuration section in one of their roles.
Changes data and can remove or overwrite it · Role: Admin · MCP tool: discovery_aws_accounts_delete
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The AWS account ID |
POST /api/db-devops/discovery/aws-accounts/:id/sync
Reads the RDS instances and Aurora clusters in each region and registers those Discovery can scan as servers, updating ones registered before and retiring ones no longer in AWS so they are no longer scanned on schedule; it does not scan them (use discovery_servers_scan). Returns registered, updated, retired, the instances skipped for their engine, and the servers; an AWS error is refused with 502 and recorded on the account. A caller who is not an admin also needs the Configuration section in one of their roles.
Changes data · Role: Release manager or admin · MCP tool: discovery_aws_accounts_sync
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The AWS account ID |