Repo Sources endpoints
Pull migration scripts from Git providers and cloud storage. Paths are relative to the address of your Simcha DB Studio server.
Through the MCP server these endpoints are the Repo Sources 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).
| Method | Path | What it does |
|---|---|---|
| GET | /api/db-devops/repo-connections | List repo sources |
| GET | /api/db-devops/repo-connections/:id | Get a repo source |
| POST | /api/db-devops/repo-connections | Add a repo source |
| PUT | /api/db-devops/repo-connections/:id | Change a repo source |
| DELETE | /api/db-devops/repo-connections/:id | Delete a repo source |
| POST | /api/db-devops/repo-connections/test-config | Test repo source settings |
| POST | /api/db-devops/repo-connections/:id/test | Test a repo source |
| POST | /api/db-devops/repo-connections/:id/pull | Pull scripts from a repo source |
| POST | /api/db-devops/repo-connections/:id/browse | Browse the files in a repo source |
GET /api/db-devops/repo-connections
Lists every repo source sorted by name, with its provider, paths, file pattern and the result of its last pull. Secrets in the settings come back as ********.
Reads only · Role: Any signed-in user · MCP tool: repo_sources_list
No inputs.
GET /api/db-devops/repo-connections/:id
Returns one repo source with its settings and the result of its last pull. Secrets come back as ********.
Reads only · Role: Any signed-in user · MCP tool: repo_sources_get
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The repo source ID |
POST /api/db-devops/repo-connections
Adds a repo source with its secrets stored encrypted, without testing it. A name already used is refused with 409.
Changes data · Role: Admin · MCP tool: repo_sources_create
| Input | Type | Description |
|---|---|---|
name (body) | string, required | The source name, up to 255 characters and unique (case does not matter) |
provider (body) | one of github, gitlab, bitbucket, azure_devops, s3, azure_blob, gcs, dropbox, required | Where the scripts are kept |
config (body) | object, optional | The provider settings and credentials. Other keys are kept as given |
config.token (body) | string, optional | GitHub, GitLab, Azure DevOps: the access token. Stored encrypted; reads show ******** |
config.base_url (body) | string, optional | GitHub or GitLab: the API address of a self-hosted server. Left out, github.com or gitlab.com |
config.owner (body) | string, optional | GitHub: the repository owner |
config.repo (body) | string, optional | GitHub: the repository name |
config.project_id (body) | string, optional | GitLab: the numeric project ID or the group/project path |
config.workspace (body) | string, optional | Bitbucket: the workspace |
config.repo_slug (body) | string, optional | Bitbucket: the repository slug |
config.username (body) | string, optional | Bitbucket: the user name or account email |
config.app_password (body) | string, optional | Bitbucket: the app password or API token. Stored encrypted; reads show ******** |
config.organization (body) | string, optional | Azure DevOps: the organization |
config.project (body) | string, optional | Azure DevOps: the project |
config.repository (body) | string, optional | Azure DevOps: the repository |
config.bucket (body) | string, optional | S3 or Google Cloud Storage: the bucket name |
config.region (body) | string, optional | S3: the bucket region, such as us-east-1 |
config.access_key_id (body) | string, optional | S3: the access key ID. Left out, the server's own AWS identity is used |
config.secret_access_key (body) | string, optional | S3: the secret access key. Stored encrypted; reads show ******** |
config.session_token (body) | string, optional | S3: a session token for temporary keys. Stored encrypted; reads show ******** |
config.role_arn (body) | string, optional | S3: an IAM role to assume for reading the bucket |
config.external_id (body) | string, optional | S3: the external ID the role requires. Stored encrypted; reads show ******** |
config.role_session_name (body) | string, optional | S3: the session name used when assuming the role, up to 64 characters |
config.role_duration_seconds (body) | integer, 1 or more, optional | S3: how long the assumed role lasts, in seconds. Left out, 3600 |
config.connection_string (body) | string, optional | Azure Blob Storage: the storage account connection string. Stored encrypted; reads show ******** |
config.container (body) | string, optional | Azure Blob Storage: the container name |
config.credentials_json (body) | string, optional | Google Cloud Storage: the service account key JSON. Stored encrypted; reads show ******** |
config.access_token (body) | string, optional | Dropbox: an access token, used when no refresh token is given. Stored encrypted; reads show ******** |
config.refresh_token (body) | string, optional | Dropbox: the refresh token, sent with app_key and app_secret. Stored encrypted; reads show ******** |
config.app_key (body) | string, optional | Dropbox: the app key |
config.app_secret (body) | string, optional | Dropbox: the app secret. Stored encrypted; reads show ******** |
config.root_folder (body) | string, optional | Dropbox: the folder every path is under |
default_branch (body) | string, optional | The branch to read for Git providers, up to 255 characters. Left out, main |
release_path (body) | string, optional | The folder release scripts are pulled from, up to 500 characters |
adhoc_path (body) | string, optional | The folder ad-hoc scripts are pulled from, up to 500 characters |
file_pattern (body) | string, optional | The file names to pull, up to 255 characters: glob patterns separated by commas, semicolons or spaces, such as *.sql or migrations/**/*.sql. Left out, *.sql |
is_active (body) | boolean, optional | Whether scripts can be pulled from it. Left out, true |
PUT /api/db-devops/repo-connections/:id
Changes the fields sent. Secrets left out, empty or sent as ******** keep their stored values, and a name already used is refused with 409.
Changes data · Role: Admin · MCP tool: repo_sources_update
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The repo source ID |
name (body) | string, optional | The source name, up to 255 characters and unique (case does not matter) |
provider (body) | one of github, gitlab, bitbucket, azure_devops, s3, azure_blob, gcs, dropbox, optional | Where the scripts are kept |
config (body) | object, optional | The provider settings and credentials. A secret left out, empty or sent as ******** keeps the stored one |
config.token (body) | string, optional | GitHub, GitLab, Azure DevOps: the access token. Stored encrypted; reads show ******** |
config.base_url (body) | string, optional | GitHub or GitLab: the API address of a self-hosted server. Left out, github.com or gitlab.com |
config.owner (body) | string, optional | GitHub: the repository owner |
config.repo (body) | string, optional | GitHub: the repository name |
config.project_id (body) | string, optional | GitLab: the numeric project ID or the group/project path |
config.workspace (body) | string, optional | Bitbucket: the workspace |
config.repo_slug (body) | string, optional | Bitbucket: the repository slug |
config.username (body) | string, optional | Bitbucket: the user name or account email |
config.app_password (body) | string, optional | Bitbucket: the app password or API token. Stored encrypted; reads show ******** |
config.organization (body) | string, optional | Azure DevOps: the organization |
config.project (body) | string, optional | Azure DevOps: the project |
config.repository (body) | string, optional | Azure DevOps: the repository |
config.bucket (body) | string, optional | S3 or Google Cloud Storage: the bucket name |
config.region (body) | string, optional | S3: the bucket region, such as us-east-1 |
config.access_key_id (body) | string, optional | S3: the access key ID. Left out, the server's own AWS identity is used |
config.secret_access_key (body) | string, optional | S3: the secret access key. Stored encrypted; reads show ******** |
config.session_token (body) | string, optional | S3: a session token for temporary keys. Stored encrypted; reads show ******** |
config.role_arn (body) | string, optional | S3: an IAM role to assume for reading the bucket |
config.external_id (body) | string, optional | S3: the external ID the role requires. Stored encrypted; reads show ******** |
config.role_session_name (body) | string, optional | S3: the session name used when assuming the role, up to 64 characters |
config.role_duration_seconds (body) | integer, 1 or more, optional | S3: how long the assumed role lasts, in seconds. Left out, 3600 |
config.connection_string (body) | string, optional | Azure Blob Storage: the storage account connection string. Stored encrypted; reads show ******** |
config.container (body) | string, optional | Azure Blob Storage: the container name |
config.credentials_json (body) | string, optional | Google Cloud Storage: the service account key JSON. Stored encrypted; reads show ******** |
config.access_token (body) | string, optional | Dropbox: an access token, used when no refresh token is given. Stored encrypted; reads show ******** |
config.refresh_token (body) | string, optional | Dropbox: the refresh token, sent with app_key and app_secret. Stored encrypted; reads show ******** |
config.app_key (body) | string, optional | Dropbox: the app key |
config.app_secret (body) | string, optional | Dropbox: the app secret. Stored encrypted; reads show ******** |
config.root_folder (body) | string, optional | Dropbox: the folder every path is under |
default_branch (body) | string, optional | The branch to read for Git providers, up to 255 characters |
release_path (body) | string, optional | The folder release scripts are pulled from, up to 500 characters |
adhoc_path (body) | string, optional | The folder ad-hoc scripts are pulled from, up to 500 characters |
file_pattern (body) | string, optional | The file names to pull, up to 255 characters: glob patterns separated by commas, semicolons or spaces, such as *.sql or migrations/**/*.sql |
is_active (body) | boolean, optional | Whether scripts can be pulled from it |
DELETE /api/db-devops/repo-connections/:id
Deletes a repo source. Scripts already pulled from it are kept.
Changes data and can remove or overwrite it · Role: Admin · MCP tool: repo_sources_delete
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The repo source ID |
POST /api/db-devops/repo-connections/test-config
Tries the provider with the settings given, without saving anything, and returns success and a message. With the ID of a saved source, its stored secrets fill in any secret left out, empty or sent as ********. A caller who is not an admin needs the Configuration section in one of their roles.
Reads only · Role: Any signed-in user · MCP tool: repo_sources_test_settings
| Input | Type | Description |
|---|---|---|
id (body) | string (uuid), optional | A saved repo source whose stored secrets fill in missing ones |
provider (body) | one of github, gitlab, bitbucket, azure_devops, s3, azure_blob, gcs, dropbox, required | Where the scripts are kept |
config (body) | object, optional | The provider settings and credentials to test |
config.token (body) | string, optional | GitHub, GitLab, Azure DevOps: the access token. Stored encrypted; reads show ******** |
config.base_url (body) | string, optional | GitHub or GitLab: the API address of a self-hosted server. Left out, github.com or gitlab.com |
config.owner (body) | string, optional | GitHub: the repository owner |
config.repo (body) | string, optional | GitHub: the repository name |
config.project_id (body) | string, optional | GitLab: the numeric project ID or the group/project path |
config.workspace (body) | string, optional | Bitbucket: the workspace |
config.repo_slug (body) | string, optional | Bitbucket: the repository slug |
config.username (body) | string, optional | Bitbucket: the user name or account email |
config.app_password (body) | string, optional | Bitbucket: the app password or API token. Stored encrypted; reads show ******** |
config.organization (body) | string, optional | Azure DevOps: the organization |
config.project (body) | string, optional | Azure DevOps: the project |
config.repository (body) | string, optional | Azure DevOps: the repository |
config.bucket (body) | string, optional | S3 or Google Cloud Storage: the bucket name |
config.region (body) | string, optional | S3: the bucket region, such as us-east-1 |
config.access_key_id (body) | string, optional | S3: the access key ID. Left out, the server's own AWS identity is used |
config.secret_access_key (body) | string, optional | S3: the secret access key. Stored encrypted; reads show ******** |
config.session_token (body) | string, optional | S3: a session token for temporary keys. Stored encrypted; reads show ******** |
config.role_arn (body) | string, optional | S3: an IAM role to assume for reading the bucket |
config.external_id (body) | string, optional | S3: the external ID the role requires. Stored encrypted; reads show ******** |
config.role_session_name (body) | string, optional | S3: the session name used when assuming the role, up to 64 characters |
config.role_duration_seconds (body) | integer, 1 or more, optional | S3: how long the assumed role lasts, in seconds. Left out, 3600 |
config.connection_string (body) | string, optional | Azure Blob Storage: the storage account connection string. Stored encrypted; reads show ******** |
config.container (body) | string, optional | Azure Blob Storage: the container name |
config.credentials_json (body) | string, optional | Google Cloud Storage: the service account key JSON. Stored encrypted; reads show ******** |
config.access_token (body) | string, optional | Dropbox: an access token, used when no refresh token is given. Stored encrypted; reads show ******** |
config.refresh_token (body) | string, optional | Dropbox: the refresh token, sent with app_key and app_secret. Stored encrypted; reads show ******** |
config.app_key (body) | string, optional | Dropbox: the app key |
config.app_secret (body) | string, optional | Dropbox: the app secret. Stored encrypted; reads show ******** |
config.root_folder (body) | string, optional | Dropbox: the folder every path is under |
POST /api/db-devops/repo-connections/:id/test
Tries the provider with the source's stored settings and returns success and a message. Nothing is saved. A caller who is not an admin needs the Configuration section in one of their roles.
Reads only · Role: Any signed-in user · MCP tool: repo_sources_test
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The repo source ID |
POST /api/db-devops/repo-connections/:id/pull
Reads the files matching the source's file pattern under its release or ad-hoc path, or the path given, and saves each new file as a migration script pending approval. A file pulled before is updated only when its content changed, which sets the script back to pending approval and any signed-off release containing it back to pending sign-off. Returns imported, updated, unchanged and failed counts; an inactive source is refused with 409, a provider error with 502, and a caller who is not an admin needs the Configuration section.
Changes data · Role: Any signed-in user · MCP tool: repo_sources_pull
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The repo source ID |
mode (body) | one of release, adhoc, optional | release (the default) reads the release path and saves release scripts; adhoc reads the ad-hoc path and saves ad-hoc scripts |
environment (body) | string, required | The environment new scripts are for. It must be an existing environment |
targetConnectionId (body) | string (uuid), optional | The connection new scripts target. It must be in the environment |
targetDatabase (body) | string, optional | The database on that connection new scripts target. Used only with targetConnectionId |
branch (body) | string, optional | The branch to read, for Git providers. Left out, the source's default branch |
path (body) | string, optional | The folder to read instead of the source's release or ad-hoc path |
POST /api/db-devops/repo-connections/:id/browse
Lists the files and folders directly under a path, each with its name, full path, type and size where known. A provider error is refused with 502, and a caller who is not an admin needs the Configuration section in one of their roles.
Reads only · Role: Any signed-in user · MCP tool: repo_sources_browse
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The repo source ID |
branch (body) | string, optional | The branch to read, for Git providers. Left out, the source's default branch |
path (body) | string, optional | The folder to list. Left out, the top level |