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).

MethodPathWhat it does
GET/api/db-devops/discovery/hostsList Discovery servers
GET/api/db-devops/discovery/hosts/:idGet a Discovery server
POST/api/db-devops/discovery/hostsAdd a Discovery server
PUT/api/db-devops/discovery/hosts/:idChange a Discovery server
DELETE/api/db-devops/discovery/hosts/:idDelete a Discovery server
POST/api/db-devops/discovery/hosts/:id/scanScan a Discovery server
GET/api/db-devops/discovery/hosts/:id/historyShow the scan history of a server
GET/api/db-devops/discovery/databasesList discovered databases
GET/api/db-devops/discovery/databases/:idGet a discovered database
PUT/api/db-devops/discovery/databases/:id/statusSet the status of a discovered database
POST/api/db-devops/discovery/hosts/:id/databasesAdd found databases of a server to a grouping
POST/api/db-devops/discovery/databases/:id/tagsTag a discovered database
DELETE/api/db-devops/discovery/databases/:id/tags/:tagIdRemove a tag from a discovered database
GET/api/db-devops/discovery/tagsList inventory tags
POST/api/db-devops/discovery/tagsCreate an inventory tag
DELETE/api/db-devops/discovery/tags/:idDelete an inventory tag
GET/api/db-devops/discovery/statsShow inventory totals
GET/api/db-devops/discovery/aws-accountsList AWS accounts
POST/api/db-devops/discovery/aws-accountsAdd an AWS account
PUT/api/db-devops/discovery/aws-accounts/:idChange an AWS account
DELETE/api/db-devops/discovery/aws-accounts/:idRemove an AWS account
POST/api/db-devops/discovery/aws-accounts/:id/syncSync 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

InputTypeDescription
id (path)string (uuid), requiredThe 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

InputTypeDescription
name (body)string, requiredThe server name, up to 255 characters
host (body)string, requiredThe host name or IP address
port (body)integer, 1 to 65535, requiredThe port
db_type (body)one of postgresql, timescaledb, cockroachdb, mysql, mariadb, sqlserver, mssql, oracle, mongodb, redis, cassandra, neo4j, elasticsearch, requiredThe database engine on the server
username (body)string, optionalThe user to sign in with
password (body)string, optionalThe password. Stored encrypted and never returned
ssl_enabled (body)boolean, optionalUse SSL/TLS
service_name (body)string, optionalOracle: the service name to connect to
scan_schedule (body)one of manual, hourly, every_6_hours, daily, weekly, optionalHow 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

InputTypeDescription
id (path)string (uuid), requiredThe server ID
name (body)string, optionalThe server name, up to 255 characters
host (body)string, optionalThe host name or IP address
port (body)integer, 1 to 65535, optionalThe port
db_type (body)one of postgresql, timescaledb, cockroachdb, mysql, mariadb, sqlserver, mssql, oracle, mongodb, redis, cassandra, neo4j, elasticsearch, optionalThe database engine on the server
username (body)string, optionalThe user to sign in with
password (body)string, optionalA new password. Stored encrypted and never returned; left out or empty, the stored one is kept
ssl_enabled (body)boolean, optionalUse SSL/TLS
service_name (body)string, optionalOracle: the service name to connect to
scan_schedule (body)one of manual, hourly, every_6_hours, daily, weekly, optionalHow 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

InputTypeDescription
id (path)string (uuid), requiredThe 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

InputTypeDescription
id (path)string (uuid), requiredThe 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

InputTypeDescription
id (path)string (uuid), requiredThe 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

InputTypeDescription
status (query)string, optionalOnly databases with this status: discovered, missing, managed or another status set by hand
is_managed (query)one of true, false, optionalOnly databases that are (true) or are not (false) connections
tag_id (query)string (uuid), optionalOnly databases with this tag
search (query)string, optionalOnly 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

InputTypeDescription
id (path)string (uuid), requiredThe 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

InputTypeDescription
id (path)string (uuid), requiredThe discovered database ID
status (body)one of discovered, managed, ignored, missing, requiredThe status
connection_id (body)string (uuid), optionalThe 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

InputTypeDescription
id (path)string (uuid), requiredThe discovery server ID
databaseIds (body)list of string (uuid), requiredThe found databases to add, all on this server, up to 500
grouping (body)string, requiredThe grouping that holds them: an existing one by name, or the name of a new one
environment (body)string, optionalFor a new grouping: the environment it is assigned to
connectionName (body)string, optionalFor 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

InputTypeDescription
id (path)string (uuid), requiredThe discovered database ID
tag_id (body)string (uuid), requiredThe 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

InputTypeDescription
id (path)string (uuid), requiredThe discovered database ID
tagId (path)string (uuid), requiredThe 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

InputTypeDescription
name (body)string, requiredThe tag name, up to 100 characters
color (body)string, optionalThe color as #RRGGBB. Left out, #6366f1
description (body)string, optionalWhat 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

InputTypeDescription
id (path)string (uuid), requiredThe 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

InputTypeDescription
name (body)string, requiredThe account name, up to 255 characters
role_arn (body)string, optionalA read-only IAM role to assume, as arn:aws:iam::<account>:role/<name>. Empty clears it
external_id (body)string, optionalThe external ID the role requires
regions (body)list of string, requiredThe regions to read
access_key_id (body)string, optionalAn AWS access key ID. Empty clears it
secret_access_key (body)string, optionalThe secret of the access key. Required with access_key_id; stored encrypted and never returned
endpoint_url (body)string, optionalAn http(s) endpoint for the AWS APIs, such as a private endpoint. Empty clears it
db_username (body)string, optionalThe database user given to the servers it registers. Left out, each instance's master user
db_password (body)string, optionalThe 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, optionalHow 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

InputTypeDescription
id (path)string (uuid), requiredThe AWS account ID
name (body)string, optionalThe account name, up to 255 characters
role_arn (body)string, optionalA read-only IAM role to assume, as arn:aws:iam::<account>:role/<name>. Empty clears it
external_id (body)string, optionalThe external ID the role requires
regions (body)list of string, optionalThe regions to read
access_key_id (body)string, optionalAn AWS access key ID. Empty clears it
secret_access_key (body)string, optionalA new secret for the access key. Stored encrypted and never returned; left out or empty, the stored one is kept
endpoint_url (body)string, optionalAn http(s) endpoint for the AWS APIs, such as a private endpoint. Empty clears it
db_username (body)string, optionalThe database user given to the servers it registers. Left out, each instance's master user
db_password (body)string, optionalA 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, optionalHow 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

InputTypeDescription
id (path)string (uuid), requiredThe 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

InputTypeDescription
id (path)string (uuid), requiredThe AWS account ID