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.
| Method | Path | What it does |
|---|---|---|
| GET | /api/db-devops/environments | List environments |
| POST | /api/db-devops/environments | Create an environment |
| PUT | /api/db-devops/environments/:id | Change an environment |
| DELETE | /api/db-devops/environments/:id | Delete an environment |
| GET | /api/db-devops/groupings | List groupings |
| GET | /api/db-devops/groupings/:id | Get a grouping |
| POST | /api/db-devops/groupings | Create a grouping |
| PUT | /api/db-devops/groupings/:id | Change a grouping |
| PUT | /api/db-devops/groupings/:id/members | Set the members of a grouping |
| GET | /api/db-devops/groupings/:id/targets | Preview the databases of a grouping |
| DELETE | /api/db-devops/groupings/:id | Delete 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
| Input | Type | Description |
|---|---|---|
name (body) | string, required | The environment name, up to 50 characters, unique in any letter case |
type (body) | string, optional | A label for the kind of environment, stored as given |
connectionString (body) | string, optional | A connection string stored with the environment as given |
requiresApproval (body) | boolean, optional | When 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, optional | Approvers stored with the environment as given |
groupings (body) | list of string, optional | Existing 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, optional | The 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
| Input | Type | Description |
|---|---|---|
id (path) | string, required | The environment ID (env_ followed by a UUID) |
name (body) | string, optional | A 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, optional | A label for the kind of environment, stored as given |
connectionString (body) | string, optional | A connection string stored with the environment as given |
requiresApproval (body) | boolean, optional | When 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, optional | Approvers stored with the environment as given |
groupings (body) | list of string, optional | The 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, optional | The 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
| Input | Type | Description |
|---|---|---|
id (path) | string, required | The 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
| Input | Type | Description |
|---|---|---|
id (path) | string, required | The 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
| Input | Type | Description |
|---|---|---|
name (body) | string, required | The grouping name, up to 100 characters |
description (body) | string, optional | What the grouping is for |
environment (body) | string or null, optional | The 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
| Input | Type | Description |
|---|---|---|
id (path) | string, required | The grouping ID (grp_ followed by a number) |
name (body) | string, optional | The grouping name, up to 100 characters. Leave it out to keep the current one |
description (body) | string, optional | A new description. Leave it out to keep the current one |
environment (body) | string or null, optional | The 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
| Input | Type | Description |
|---|---|---|
id (path) | string, required | The grouping ID (grp_ followed by a number) |
members (body) | list of object, required | The full list of members |
members[].connectionId (body) | string (uuid), required | The DB DevOps connection ID |
members[].selection (body) | one of connection, picked, pattern, optional | Which 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, optional | With picked: the databases, up to 1000 |
members[].pattern (body) | string, optional | With 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, optional | With pattern: patterns of databases to leave out, up to 100 |
members[].schemaSelection (body) | one of default, picked, pattern, optional | Which 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, optional | With schemaSelection picked: the schemas |
members[].schemaPattern (body) | string, optional | With schemaSelection pattern: a name pattern where * matches any run of characters and ? one character |
members[].schemaExclude (body) | list of string, optional | With 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
| Input | Type | Description |
|---|---|---|
id (path) | string, required | The 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
| Input | Type | Description |
|---|---|---|
id (path) | string, required | The grouping ID (grp_ followed by a number) |