---
title: "(BETA) Add a data source to an AILake Database instance"
method: POST
path: "/api/v1/ailake/database/instances/{instanceId}/dataSources"
tags: ["AI Lake - Databases"]
---

# (BETA) Add a data source to an AILake Database instance

`POST /api/v1/ailake/database/instances/{instanceId}/dataSources`

## Request

- Base URL: `https://www.gooddata.ai`
- URL: `https://www.gooddata.ai/api/v1/ailake/database/instances/{instanceId}/dataSources`
- Auth: none declared

(BETA) Associates an additional metadata-api data source with an existing AI Lake database instance. The new data source uses the same StarRocks connection details as the primary data source.

## Path parameters

- `instanceId` string, required: Database instance identifier. Accepts the database name (preferred) or UUID.

## Request body

- AddDatabaseDataSourceRequest: Request to add a data source to an AI Lake Database instance
  - `dataSourceId` string, required: Identifier for the new data source in metadata-api. Must be unique within the organization.
  - `dataSourceName` string: Display name for the new data source in metadata-api. Defaults to dataSourceId when omitted.

## Response `200`

Data source successfully added

- AddDatabaseDataSourceResponse: Newly created data source association for an AI Lake Database instance
  - `dataSource` DataSourceInfo, required: A single data source association for an AI Lake Database instance
    - `dataSourceId` string, required: Identifier of the data source in metadata-api.
    - `dataSourceName` string, required: Display name of the data source in metadata-api.
    - `id` string, required: Id of the data source association record.

---

[API](https://skmtc.dev/gooddata/apis/gooddata-cn-oapi-all-api.md) - [All operations](https://skmtc.dev/gooddata/apis/gooddata-cn-oapi-all-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gooddata/apis/gooddata-cn-oapi-all-api/revisions/c728ef303bfb?raw)
