Environments and Groupings endpoints

Organize the databases that scripts and releases run on. Paths are relative to the address of your Simcha DB Studio server.

Through the MCP server these endpoints are the Environments and Groupings tool group, off until an admin turns it on.

MethodPathWhat it does
GET/api/db-devops/environmentsList environments
POST/api/db-devops/environmentsCreate an environment
PUT/api/db-devops/environments/:idChange an environment
DELETE/api/db-devops/environments/:idDelete an environment
GET/api/db-devops/groupingsList groupings
GET/api/db-devops/groupings/:idGet a grouping
POST/api/db-devops/groupingsCreate a grouping
PUT/api/db-devops/groupings/:idChange a grouping
PUT/api/db-devops/groupings/:id/membersSet the members of a grouping
GET/api/db-devops/groupings/:id/targetsPreview the databases of a grouping
DELETE/api/db-devops/groupings/:idDelete a grouping

GET /api/db-devops/environments

Lists the environments in creation order, each with the groupings assigned to it, whether releases need approval to run there and the environment a release must run in first.

Reads only · Role: Any signed-in user · MCP tool: environments_list

No inputs.

POST /api/db-devops/environments

Creates an environment. Refused when the name is taken, a grouping does not exist, a grouping mixes database types or would put a database in two environments, or the groupings hold a database type the environment it runs after lacks.

Changes data · Role: Release manager or admin · MCP tool: environments_create

InputTypeDescription
name (body)string, requiredThe environment name, up to 50 characters, unique in any letter case
type (body)string, optionalA label for the kind of environment, stored as given
connectionString (body)string, optionalA connection string stored with the environment as given
requiresApproval (body)boolean, optionalWhen true, a release runs here only after an approval request for this environment is approved after the release was signed off
approvers (body)list of string, optionalApprovers stored with the environment as given
groupings (body)list of string, optionalExisting grouping names to assign to this environment. A grouping that mixes database types or holds a database that is in another environment is refused, and so is one that would break Runs Only After: an environment holds only database types the environment it runs after holds too
promoteFrom (body)string or null, optionalThe name of the environment a release must complete a run in, since its sign-off, before it runs here. Send null or an empty string for none. A loop is refused, and so is an environment that lacks a database type this one holds, unless it has no groupings yet

PUT /api/db-devops/environments/:id

Changes the fields sent. A rename carries over to everything that uses the old name and returns how many references changed; changing groupings returns the groupings added and removed. Refused when the new name is taken, a grouping or environment named does not exist, an added grouping mixes database types or would put a database in two environments, or the environment would hold a database type the environment it runs after lacks.

Changes data · Role: Release manager or admin · MCP tool: environments_update

InputTypeDescription
id (path)string, requiredThe environment ID (env_ followed by a UUID)
name (body)string, optionalA new name, up to 50 characters. Connections, scripts, releases, approval requests, release runs, compliance rules and other environments that use the old name are changed to it
type (body)string, optionalA label for the kind of environment, stored as given
connectionString (body)string, optionalA connection string stored with the environment as given
requiresApproval (body)boolean, optionalWhen true, a release runs here only after an approval request for this environment is approved after the release was signed off
approvers (body)list of string, optionalApprovers stored with the environment as given
groupings (body)list of string, optionalThe full list of grouping names assigned to this environment. Added groupings move here from any other environment and removed ones are left without an environment; the response names both. A grouping that mixes database types or holds a database that is in another environment is refused, and so is one that would break Runs Only After: an environment holds only database types the environment it runs after holds too
promoteFrom (body)string or null, optionalThe name of the environment a release must complete a run in, since its sign-off, before it runs here. Send null or an empty string for none. A loop is refused, and so is an environment that lacks a database type this one holds, unless it has no groupings yet

DELETE /api/db-devops/environments/:id

Deletes an environment. Refused while another environment runs only after it, a release pipeline uses it, a grouping is assigned to it or scripts are in it.

Changes data and can remove or overwrite it · Role: Release manager or admin · MCP tool: environments_delete

InputTypeDescription
id (path)string, requiredThe environment ID (env_ followed by a UUID)

GET /api/db-devops/groupings

Lists the groupings by name, each with its description, the environment it is assigned to, its database types and its members: each connection with its engine, host, port, database and which of its databases the grouping holds.

Reads only · Role: Any signed-in user · MCP tool: groupings_list

No inputs.

GET /api/db-devops/groupings/:id

Returns one grouping with its environment, database types and members.

Reads only · Role: Any signed-in user · MCP tool: groupings_get

InputTypeDescription
id (path)string, requiredThe grouping ID (grp_ followed by a number)

POST /api/db-devops/groupings

Creates a grouping of connections, optionally assigned to an environment. Refused when the name is taken in any letter case or the environment does not exist.

Changes data · Role: Release manager or admin · MCP tool: groupings_create

InputTypeDescription
name (body)string, requiredThe grouping name, up to 100 characters
description (body)string, optionalWhat the grouping is for
environment (body)string or null, optionalThe environment the grouping is assigned to. Leave it out or send null for none

PUT /api/db-devops/groupings/:id

Renames a grouping, changes its description or moves it to another environment. A rename carries over to the releases that name it and returns how many changed. A move is refused when it would put a database in two environments, or leave an environment holding a database type the environment it runs after lacks.

Changes data · Role: Release manager or admin · MCP tool: groupings_update

InputTypeDescription
id (path)string, requiredThe grouping ID (grp_ followed by a number)
name (body)string, optionalThe grouping name, up to 100 characters. Leave it out to keep the current one
description (body)string, optionalA new description. Leave it out to keep the current one
environment (body)string or null, optionalThe environment to assign the grouping to, or null for none. Leave it out to keep the current one

PUT /api/db-devops/groupings/:id/members

Replaces the connections in a grouping, up to 500, each with the databases the grouping holds on it: its own database, databases picked from its server, or a name pattern with exclusions (system databases never match a pattern). Picked databases must be on the server; engines without a list of databases hold only their own database. A grouping holds one database type, and when it is assigned to an environment a database it holds may not be in another environment, checked against the list on the server where a pattern is involved. Returns the grouping with its members.

Changes data · Role: Release manager or admin · MCP tool: groupings_members

InputTypeDescription
id (path)string, requiredThe grouping ID (grp_ followed by a number)
members (body)list of object, requiredThe full list of members
members[].connectionId (body)string (uuid), requiredThe DB DevOps connection ID
members[].selection (body)one of connection, picked, pattern, optionalWhich databases of the connection the grouping holds: connection, its own database; picked, the databases listed; pattern, every user database whose name matches the pattern
members[].databases (body)list of string, optionalWith picked: the databases, up to 1000
members[].pattern (body)string, optionalWith pattern: a name pattern where * matches any run of characters and ? one character, in any letter case. * is every user database
members[].exclude (body)list of string, optionalWith pattern: patterns of databases to leave out, up to 100
members[].schemaSelection (body)one of default, picked, pattern, optionalWhich schemas a run uses in each database it holds: default, the connection default; picked, the schemas listed; pattern, every user schema whose name matches. Only Oracle, Snowflake and the PostgreSQL family can choose a schema
members[].schemas (body)list of string, optionalWith schemaSelection picked: the schemas
members[].schemaPattern (body)string, optionalWith schemaSelection pattern: a name pattern where * matches any run of characters and ? one character
members[].schemaExclude (body)list of string, optionalWith schemaSelection pattern: schemas to leave out

GET /api/db-devops/groupings/:id/targets

Lists exactly which databases the grouping resolves to now, member by member, reading the list of databases on each server, and for a member that chooses schemas the schemas of each database (schemas, keyed by database). A member whose picked database is gone or whose server cannot be reached carries the reason, and problems lists every reason; a pipeline stage on the grouping is refused while there is one.

Reads only · Role: Any signed-in user · MCP tool: groupings_targets

InputTypeDescription
id (path)string, requiredThe grouping ID (grp_ followed by a number)

DELETE /api/db-devops/groupings/:id

Deletes a grouping. Refused while a release pipeline uses it or it holds connections.

Changes data and can remove or overwrite it · Role: Release manager or admin · MCP tool: groupings_delete

InputTypeDescription
id (path)string, requiredThe grouping ID (grp_ followed by a number)