---
title: "POST /v1/projects/{projectsId}/locations/{locationsId}:enrollDataSources"
method: POST
path: "/v1/projects/{projectsId}/locations/{locationsId}:enrollDataSources"
tags: ["projects"]
---

# POST /v1/projects/{projectsId}/locations/{locationsId}:enrollDataSources

`POST /v1/projects/{projectsId}/locations/{locationsId}:enrollDataSources`

## Request

- Base URL: `https://bigquerydatatransfer.googleapis.com`
- URL: `https://bigquerydatatransfer.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}:enrollDataSources`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/bigquery`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/bigquery`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

Enroll data sources in a user project. This allows users to create transfer configurations for these data sources. They will also appear in the ListDataSources RPC and as such, will appear in the [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents can be found in the public guide for [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and [Data Transfer Service](https://cloud.google.com/bigquery/docs/working-with-transfers).

## Path parameters

- `projectsId` string, required
- `locationsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string

## Request body

- EnrollDataSourcesRequest: A request to enroll a set of data sources so they are visible in the BigQuery UI's `Transfer` tab.
  - `dataSourceIds` string[]: Data sources that are enrolled. It is required to provide at least one data source id.

## Response `200`

Successful response

- Empty: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

---

[API](https://skmtc.dev/google/apis/bigquerydatatransfer.md) - [All operations](https://skmtc.dev/google/apis/bigquerydatatransfer/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/bigquerydatatransfer/revisions/0de47e8db40e?raw)
