---
title: "Get database connections by workspace"
method: GET
path: "/database/connections"
tags: ["DatabaseConnection"]
---

# Get database connections by workspace

`GET /database/connections`

Returns database connections configured in a workspace

## Query parameters

- `workspace_id` string, required

## Response `200`

Database connections in a given workspace

- DatabaseConnectionListingResult — Result envelope for listing database connections
  - `database_connections` DatabaseConnection[] — All database connections for a given Workspace
    - `id` string — Database connection ID
    - `workspace_id` string — Workspace ID
    - `name` string — Database name
    - `description` string — Databaes description
    - `database_type` 'mariadb' | 'mongodb' | 'mssql' | 'mysql' | 'oracle' | 'postgres'
    - `connection_properties` DatabaseConnectionProperties — Database connection details
      - `host` string — Host address of database connection
      - `port` integer — Port number of database connection
      - `database` string — Database name
      - `credentials_id` string — Credential ID to use when connecting to database
      - `link_agent_label` string — DEPRECATED - use link_agent_labels
      - `link_agent_labels` string[] — Link agent override to use when connecting to database (optional)
      - `driver_properties` object — Additional database connection properties
    - `connection_overrides` DatabaseConnectionPropertiesOverride[] — Set of connection_property overrides that apply to this database connection
      - `environment_id` string — Environment ID associated with override
      - `connection_properties` DatabaseConnectionProperties — Database connection details
        - `host` string — Host address of database connection
        - `port` integer — Port number of database connection
        - `database` string — Database name
        - `credentials_id` string — Credential ID to use when connecting to database
        - `link_agent_label` string — DEPRECATED - use link_agent_labels
        - `link_agent_labels` string[] — Link agent override to use when connecting to database (optional)
        - `driver_properties` object — Additional database connection properties
    - `created_by_id` string
    - `created_time` integer
    - `last_updated_by_id` string
    - `last_updated_time` integer
    - `deleted_by_id` string
    - `deleted_time` integer
  - `cursor` string — Pagination cursor

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
